From 6e6a7deba554dfb298f56d8413d623f46f2e0f67 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 7 Jun 2021 15:37:20 +0300 Subject: [PATCH] migration Services to flutter 2 --- lib/client/base_app_client.dart | 106 +++---- .../insurance_approval_request_model.dart | 26 +- ...t_get_list_pharmacy_for_prescriptions.dart | 52 ++-- .../request_prescription_report.dart | 80 +++--- .../request_prescription_report_enh.dart | 77 +++--- .../Procedure_template_request_model.dart | 4 +- ...cedure_template_details_request_model.dart | 4 +- lib/core/model/referral/ReferralRequest.dart | 56 ++-- .../sick_leave_patient_request_model.dart | 4 +- lib/core/service/authentication_service.dart | 120 ++++---- .../service/hospitals/hospitals_service.dart | 3 +- .../patient/DischargedPatientService.dart | 14 +- .../patient/LiveCarePatientServices.dart | 73 +++-- .../patient/MyReferralPatientService.dart | 26 +- .../service/patient/PatientMuseService.dart | 7 +- lib/core/service/patient/ReferralService.dart | 28 +- .../patient-doctor-referral-service.dart | 49 ++-- .../patient/patientInPatientService.dart | 11 +- lib/core/service/patient/patient_service.dart | 77 +++--- .../insurance/InsuranceCardService.dart | 36 +-- .../lab_order/labs_service.dart | 58 ++-- .../PatientMedicalReportService.dart | 56 ++-- .../medical_report/medical_file_service.dart | 10 +- .../prescription/prescription_service.dart | 86 ++---- .../prescription/prescriptions_service.dart | 100 +++---- .../procedure/procedure_service.dart | 88 +++--- .../radiology/radiology_service.dart | 16 +- .../sick_leave/sickleave_service.dart | 17 +- .../soap/SOAP_service.dart | 104 +++---- .../ucaf/patient-ucaf-service.dart | 30 +- .../patient-vital-signs-service.dart | 48 ++-- lib/icons_app/doctor_app_icons.dart | 7 +- lib/models/SOAP/Allergy_model.dart | 52 ++-- .../GetChiefComplaintReqModel.dart | 14 +- .../GetChiefComplaintResModel.dart | 52 ++-- lib/models/SOAP/GeneralGetReqForSOAP.dart | 6 +- lib/models/SOAP/GetAllergiesResModel.dart | 49 ++-- lib/models/SOAP/GetAssessmentReqModel.dart | 26 +- lib/models/SOAP/GetAssessmentResModel.dart | 58 ++-- .../SOAP/GetGetProgressNoteReqModel.dart | 27 +- .../SOAP/GetGetProgressNoteResModel.dart | 44 +-- lib/models/SOAP/GetHistoryReqModel.dart | 15 +- lib/models/SOAP/GetHistoryResModel.dart | 26 +- .../SOAP/GetPhysicalExamListResModel.dart | 74 ++--- lib/models/SOAP/GetPhysicalExamReqModel.dart | 10 +- lib/models/SOAP/PatchAssessmentReqModel.dart | 34 +-- lib/models/SOAP/PostEpisodeReqModel.dart | 14 +- .../SOAP/get_Allergies_request_model.dart | 17 +- lib/models/SOAP/master_key_model.dart | 46 ++-- lib/models/SOAP/my_selected_allergy.dart | 27 +- lib/models/SOAP/my_selected_assement.dart | 47 ++-- lib/models/SOAP/my_selected_examination.dart | 21 +- lib/models/SOAP/my_selected_history.dart | 16 +- lib/models/SOAP/order-procedure.dart | 98 ++++--- .../SOAP/post_allergy_request_model.dart | 65 ++--- .../SOAP/post_assessment_request_model.dart | 38 +-- .../post_chief_complaint_request_model.dart | 19 +- .../SOAP/post_histories_request_model.dart | 35 ++- .../post_physical_exam_request_model.dart | 178 ++++++------ .../post_progress_note_request_model.dart | 15 +- lib/models/dashboard/dashboard_model.dart | 27 +- lib/models/doctor/clinic_model.dart | 20 +- lib/models/doctor/doctor_profile_model.dart | 96 +++---- ...list_doctor_working_hours_table_model.dart | 13 +- .../list_gt_my_patients_question_model.dart | 119 ++++---- lib/models/doctor/profile_req_Model.dart | 36 +-- .../request_add_referred_doctor_remarks.dart | 63 +++-- lib/models/doctor/request_doctor_reply.dart | 44 +-- lib/models/doctor/request_schedule.dart | 30 +- .../statstics_for_certain_doctor_request.dart | 19 +- lib/models/doctor/user_model.dart | 26 +- .../verify_referral_doctor_remarks.dart | 107 ++++--- lib/models/livecare/end_call_req.dart | 13 +- lib/models/livecare/get_panding_req_list.dart | 25 +- lib/models/livecare/get_pending_res_list.dart | 66 ++--- lib/models/livecare/session_status_model.dart | 14 +- lib/models/livecare/start_call_req.dart | 22 +- lib/models/livecare/start_call_res.dart | 12 +- lib/models/livecare/transfer_to_admin.dart | 20 +- .../MedicalReport/MedicalReportTemplate.dart | 52 ++-- .../MedicalReport/MeidcalReportModel.dart | 106 +++---- lib/models/patient/PatientArrivalEntity.dart | 78 +++--- .../get_clinic_by_project_id_request.dart | 27 +- .../get_doctor_by_clinic_id_request.dart | 57 ++-- ...t_list_stp_referral_frequency_request.dart | 25 +- .../patient/get_pending_patient_er_model.dart | 226 +++++++-------- .../patient/insurance_aprovals_request.dart | 37 ++- .../lab_orders/lab_orders_req_model.dart | 45 ++- .../lab_orders/lab_orders_res_model.dart | 50 ++-- lib/models/patient/lab_result/lab_result.dart | 122 ++++---- .../lab_result/lab_result_req_model.dart | 56 ++-- .../patient/my_referral/PendingReferral.dart | 82 +++--- .../patient/my_referral/clinic-doctor.dart | 173 ++++++------ .../my_referral_patient_model.dart | 200 +++++++------- .../my_referred_patient_model.dart | 260 +++++++++--------- lib/models/patient/orders_request.dart | 39 ++- lib/models/patient/patiant_info_model.dart | 184 ++++++------- ...et_patient_arrival_list_request_model.dart | 17 +- lib/models/patient/patient_model.dart | 134 +++++---- .../prescription/prescription_report.dart | 114 ++++---- .../prescription_report_for_in_patient.dart | 168 +++++------ .../prescription/prescription_req_model.dart | 71 ----- .../prescription/prescription_res_model.dart | 72 ++--- .../request_prescription_report.dart | 54 ++-- lib/models/patient/progress_note_request.dart | 39 ++- .../radiology/radiology_req_model.dart | 30 +- .../radiology/radiology_res_model.dart | 36 +-- ...st_prescription_report_for_in_patient.dart | 56 ++-- .../patient/refer_to_doctor_request.dart | 68 +++-- .../request_my_referral_patient_model.dart | 60 ++-- .../patient/topten_users_res_model.dart | 15 +- .../vital_sign/patient-vital-sign-data.dart | 113 ++++---- .../patient-vital-sign-history.dart | 7 +- .../vital_sign/vital_sign_req_model.dart | 50 ++-- .../vital_sign/vital_sign_res_model.dart | 20 +- .../pharmacies_List_request_model.dart | 25 +- .../pharmacies_items_request_model.dart | 24 +- .../sickleave/add_sickleave_request.dart | 17 +- .../sickleave/extend_sick_leave_request.dart | 11 +- .../sickleave/get_all_sickleave_response.dart | 18 +- 120 files changed, 2978 insertions(+), 3428 deletions(-) delete mode 100644 lib/models/patient/prescription/prescription_req_model.dart diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index f083258d..e2de1f86 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -21,36 +21,34 @@ class BaseAppClient { {required Map body, required Function(dynamic response, int statusCode) onSuccess, required Function(String error, int statusCode) onFailure, - bool isAllowAny = false,bool isLiveCare = false}) async { + bool isAllowAny = false, + bool isLiveCare = false}) async { String url; - if(isLiveCare) + if (isLiveCare) url = BASE_URL_LIVE_CARE + endPoint; else url = BASE_URL + endPoint; bool callLog = true; try { - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); String token = await sharedPref.getString(TOKEN); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - if (body['DoctorID'] == null) - body['DoctorID'] = doctorProfile?.doctorID; + if (body['DoctorID'] == null) body['DoctorID'] = doctorProfile?.doctorID; if (body['DoctorID'] == "") body['DoctorID'] = null; - if (body['EditedBy'] == null) - body['EditedBy'] = doctorProfile?.doctorID; + if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile?.doctorID; if (body['ProjectID'] == null) { body['ProjectID'] = doctorProfile?.projectID; } - if (body['ClinicID'] == null) - body['ClinicID'] = doctorProfile?.clinicID; + if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID; if (body['DoctorID'] == '') { body['DoctorID'] = null; } if (body['EditedBy'] == '') { body.remove("EditedBy"); } - if(body['TokenID'] == null){ + if (body['TokenID'] == null) { body['TokenID'] = token ?? ''; } // body['TokenID'] = "@dm!n" ?? ''; @@ -69,18 +67,16 @@ class BaseAppClient { body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA; if (body['VidaAuthTokenID'] == null) { - body['VidaAuthTokenID'] = - await sharedPref.getString(VIDA_AUTH_TOKEN_ID); + body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); } if (body['VidaRefreshTokenID'] == null) { - body['VidaRefreshTokenID'] = - await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); + body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); } int projectID = await sharedPref.getInt(PROJECT_ID); if (projectID == 2 || projectID == 3) - body['PatientOutSA'] = true; - else if(body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3) + body['PatientOutSA'] = true; + else if (body.containsKey('facilityId') && body['facilityId'] == 2 || body['facilityId'] == 3) body['PatientOutSA'] = true; else body['PatientOutSA'] = false; @@ -92,28 +88,21 @@ class BaseAppClient { var asd2; if (await Helpers.checkConnection()) { final response = await http.post(Uri.parse(url), - body: json.encode(body), - headers: { - 'Content-Type': 'application/json', - 'Accept': 'application/json' - }); + body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}); final int statusCode = response.statusCode; if (statusCode < 200 || statusCode >= 400) { onFailure(Helpers.generateContactAdminMsg(), statusCode); } else { var parsed = json.decode(response.body.toString()); if (parsed['ErrorType'] == 4) { - helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], - parsed['AndroidLink'], parsed['IOSLink']); + helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']); } if (!parsed['IsAuthenticated']) { if (body['OTP_SendType'] != null) { onFailure(getError(parsed), statusCode); } else if (!isAllowAny) { - await Provider.of(AppGlobal.CONTEX, - listen: false) - .logout(); + await Provider.of(AppGlobal.CONTEX, listen: false).logout(); Helpers.showErrorToast('Your session expired Please login again'); } if (isAllowAny) { @@ -141,19 +130,15 @@ class BaseAppClient { {required Map body, required Function(dynamic response, int statusCode) onSuccess, required Function(String error, int statusCode) onFailure, - required PatiantInformtion patient, + PatiantInformtion? patient, bool isExternal = false}) async { String url = BASE_URL + endPoint; try { - Map headers = { - 'Content-Type': 'application/json', - 'Accept': 'application/json' - }; + Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}; String token = await sharedPref.getString(TOKEN); - var languageID = - await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); + var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); body['SetupID'] = body.containsKey('SetupID') ? body['SetupID'] != null ? body['SetupID'] @@ -173,12 +158,11 @@ class BaseAppClient { : PATIENT_OUT_SA_PATIENT_REQ; if (body.containsKey('isDentalAllowedBackend')) { - body['isDentalAllowedBackend'] = - body.containsKey('isDentalAllowedBackend') - ? body['isDentalAllowedBackend'] != null - ? body['isDentalAllowedBackend'] - : IS_DENTAL_ALLOWED_BACKEND - : IS_DENTAL_ALLOWED_BACKEND; + body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; } body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; @@ -186,7 +170,7 @@ class BaseAppClient { body['PatientType'] = body.containsKey('PatientType') ? body['PatientType'] != null ? body['PatientType'] - : patient.patientType != null + : patient!.patientType != null ? patient.patientType : PATIENT_TYPE : PATIENT_TYPE; @@ -194,15 +178,13 @@ class BaseAppClient { body['PatientTypeID'] = body.containsKey('PatientTypeID') ? body['PatientTypeID'] != null ? body['PatientTypeID'] - : patient.patientType != null + : patient!.patientType != null ? patient.patientType : PATIENT_TYPE_ID : PATIENT_TYPE_ID; body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] : token; - body['PatientID'] = body['PatientID'] != null - ? body['PatientID'] - : patient.patientId ?? patient.patientMRN; + body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient!.patientId ?? patient.patientMRN; body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it body['SessionID'] = SESSION_ID; //getSe @@ -217,8 +199,7 @@ class BaseAppClient { print("Body : ${json.encode(body)}"); if (await Helpers.checkConnection()) { - final response = await http.post(Uri.parse(url.trim()), - body: json.encode(body), headers: headers); + final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final int statusCode = response.statusCode; print("statusCode :$statusCode"); if (statusCode < 200 || statusCode >= 400 || json == null) { @@ -230,8 +211,7 @@ class BaseAppClient { onSuccess(parsed, statusCode); } else { if (parsed['ErrorType'] == 4) { - helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], - parsed['AndroidLink'], parsed['IOSLink']); + helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']); } if (parsed['IsAuthenticated'] == null) { if (parsed['isSMSSent'] == true) { @@ -247,28 +227,20 @@ class BaseAppClient { onFailure(getError(parsed), statusCode); } } - } else if (parsed['MessageStatus'] == 1 || - parsed['SMSLoginRequired'] == true) { + } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { onSuccess(parsed, statusCode); - } else if (parsed['MessageStatus'] == 2 && - parsed['IsAuthenticated']) { + } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { if (parsed['SameClinicApptList'] != null) { onSuccess(parsed, statusCode); } else { - if (parsed['message'] == null && - parsed['ErrorEndUserMessage'] == null) { + if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { if (parsed['ErrorSearchMsg'] == null) { - onFailure("Server Error found with no available message", - statusCode); + onFailure("Server Error found with no available message", statusCode); } else { onFailure(parsed['ErrorSearchMsg'], statusCode); } } else { - onFailure( - parsed['message'] ?? - parsed['ErrorEndUserMessage'] ?? - parsed['ErrorMessage'], - statusCode); + onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } } else { @@ -278,9 +250,7 @@ class BaseAppClient { if (parsed['message'] != null) { onFailure(parsed['message'] ?? parsed['message'], statusCode); } else { - onFailure( - parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], - statusCode); + onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); } } } @@ -303,12 +273,8 @@ class BaseAppClient { if (parsed["ValidationErrors"]["ValidationErrors"] != null && parsed["ValidationErrors"]["ValidationErrors"].length != 0) { - for (var i = 0; - i < parsed["ValidationErrors"]["ValidationErrors"].length; - i++) { - error = error + - parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + - "\n"; + for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) { + error = error + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n"; } } } diff --git a/lib/core/insurance_approval_request_model.dart b/lib/core/insurance_approval_request_model.dart index 02f71ecb..11f7804e 100644 --- a/lib/core/insurance_approval_request_model.dart +++ b/lib/core/insurance_approval_request_model.dart @@ -1,17 +1,17 @@ class InsuranceApprovalInPatientRequestModel { - int patientID; - int patientTypeID; - int eXuldAPPNO; - int projectID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? patientID; + int? patientTypeID; + int? eXuldAPPNO; + int? projectID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; InsuranceApprovalInPatientRequestModel( {this.patientID, diff --git a/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart b/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart index af8a3da8..7b453b9b 100644 --- a/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart +++ b/lib/core/model/Prescriptions/request_get_list_pharmacy_for_prescriptions.dart @@ -1,32 +1,32 @@ class RequestGetListPharmacyForPrescriptions { - int ? latitude; - int ? longitude; - double ?versionID; - int ? channel; - int ? languageID; - String ? iPAdress; - String ? generalid; - int ? patientOutSA; - String ? sessionID; - bool ?isDentalAllowedBackend; - int ? deviceTypeID; - int ? itemID; + int? latitude; + int? longitude; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? itemID; RequestGetListPharmacyForPrescriptions( {this.latitude, - this.longitude, - this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.itemID}); + this.longitude, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.itemID}); - RequestGetListPharmacyForPrescriptions.fromJson(Map json) { + RequestGetListPharmacyForPrescriptions.fromJson(Map json) { latitude = json['Latitude']; longitude = json['Longitude']; versionID = json['VersionID']; @@ -41,8 +41,8 @@ class RequestGetListPharmacyForPrescriptions { itemID = json['ItemID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['Latitude'] = this.latitude; data['Longitude'] = this.longitude; data['VersionID'] = this.versionID; diff --git a/lib/core/model/Prescriptions/request_prescription_report.dart b/lib/core/model/Prescriptions/request_prescription_report.dart index 8eeefb7a..b7ade7d4 100644 --- a/lib/core/model/Prescriptions/request_prescription_report.dart +++ b/lib/core/model/Prescriptions/request_prescription_report.dart @@ -1,46 +1,46 @@ class RequestPrescriptionReport { - double ?versionID; - int ? channel; - int ? languageID; - String ? iPAdress; - String ? generalid; - int ? patientOutSA; - String ? sessionID; - bool ?isDentalAllowedBackend; - int ? deviceTypeID; - int ? patientID; - String ? tokenID; - int ? patientTypeID; - int ? patientType; - int ? appointmentNo; - String ? setupID; - int ? episodeID; - int ? clinicID; - int ? projectID; - int ? dischargeNo; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + int? appointmentNo; + String? setupID; + int? episodeID; + int? clinicID; + int? projectID; + int? dischargeNo; RequestPrescriptionReport( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.appointmentNo, - this.setupID, - this.episodeID, - this.clinicID, - this.projectID, - this.dischargeNo}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID, + this.dischargeNo}); - RequestPrescriptionReport.fromJson(Map json) { + RequestPrescriptionReport.fromJson(Map json) { versionID = json['VersionID']; channel = json['Channel']; languageID = json['LanguageID']; @@ -62,8 +62,8 @@ class RequestPrescriptionReport { dischargeNo = json['DischargeNo']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; diff --git a/lib/core/model/Prescriptions/request_prescription_report_enh.dart b/lib/core/model/Prescriptions/request_prescription_report_enh.dart index 9ed39b47..fc048a95 100644 --- a/lib/core/model/Prescriptions/request_prescription_report_enh.dart +++ b/lib/core/model/Prescriptions/request_prescription_report_enh.dart @@ -1,45 +1,46 @@ class RequestPrescriptionReportEnh { - double ?versionID; - int ? channel; - int ? languageID; - String ? iPAdress; - String ? generalid; - int ? patientOutSA; - String ? sessionID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; bool? isDentalAllowedBackend; - int ? deviceTypeID; - int ? patientID; - String ? tokenID; - int ? patientTypeID; - int ? patientType; - int ? appointmentNo; - String ? setupID; - int ? dischargeNo; - int ? episodeID; - int ? clinicID; - int ? projectID; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + int? appointmentNo; + String? setupID; + int? dischargeNo; + int? episodeID; + int? clinicID; + int? projectID; RequestPrescriptionReportEnh( {this.versionID, - this.channel, - this.languageID, - this.iPAdress, - this.generalid, - this.patientOutSA, - this.sessionID, - this.isDentalAllowedBackend, - this.deviceTypeID, - this.patientID, - this.tokenID, - this.patientTypeID, - this.patientType, - this.appointmentNo, - this.setupID, - this.episodeID, - this.clinicID, - this.projectID,this.dischargeNo}); + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID, + this.dischargeNo}); - RequestPrescriptionReportEnh.fromJson(Map json) { + RequestPrescriptionReportEnh.fromJson(Map json) { versionID = json['VersionID']; channel = json['Channel']; languageID = json['LanguageID']; @@ -60,8 +61,8 @@ class RequestPrescriptionReportEnh { projectID = json['ProjectID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; diff --git a/lib/core/model/procedure/Procedure_template_request_model.dart b/lib/core/model/procedure/Procedure_template_request_model.dart index a734382b..abd6a2b3 100644 --- a/lib/core/model/procedure/Procedure_template_request_model.dart +++ b/lib/core/model/procedure/Procedure_template_request_model.dart @@ -86,8 +86,8 @@ class ProcedureTempleteRequestModel { deviceTypeID = json['DeviceTypeID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['DoctorID'] = this.doctorID; data['FirstName'] = this.firstName; data['MiddleName'] = this.middleName; diff --git a/lib/core/model/procedure/procedure_template_details_request_model.dart b/lib/core/model/procedure/procedure_template_details_request_model.dart index 7d48e1c8..c5504cdd 100644 --- a/lib/core/model/procedure/procedure_template_details_request_model.dart +++ b/lib/core/model/procedure/procedure_template_details_request_model.dart @@ -89,8 +89,8 @@ class ProcedureTempleteDetailsRequestModel { deviceTypeID = json['DeviceTypeID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['DoctorID'] = this.doctorID; data['FirstName'] = this.firstName; data['TemplateID'] = this.templateID; diff --git a/lib/core/model/referral/ReferralRequest.dart b/lib/core/model/referral/ReferralRequest.dart index 5b7ffc05..0e0bc161 100644 --- a/lib/core/model/referral/ReferralRequest.dart +++ b/lib/core/model/referral/ReferralRequest.dart @@ -17,38 +17,38 @@ class ReferralRequest { int? languageID; String? stamp; String? iPAdress; - double ?versionID; + double? versionID; int? channel; String? tokenID; String? sessionID; - bool ?isLoginForDoctorApp; - bool ?patientOutSA; + bool? isLoginForDoctorApp; + bool? patientOutSA; ReferralRequest( {this.roomID, - this.referralClinic, - this.referralDoctor, - this.createdBy, - this.editedBy, - this.patientID, - this.patientTypeID, - this.referringClinic, - this.referringDoctor, - this.projectID, - this.admissionNo, - this.referringDoctorRemarks, - this.priority, - this.frequency, - this.extension, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.referralClinic, + this.referralDoctor, + this.createdBy, + this.editedBy, + this.patientID, + this.patientTypeID, + this.referringClinic, + this.referringDoctor, + this.projectID, + this.admissionNo, + this.referringDoctorRemarks, + this.priority, + this.frequency, + this.extension, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); ReferralRequest.fromJson(Map json) { roomID = json['RoomID']; @@ -77,8 +77,8 @@ class ReferralRequest { patientOutSA = json['PatientOutSA']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['RoomID'] = this.roomID; data['ReferralClinic'] = this.referralClinic; data['ReferralDoctor'] = this.referralDoctor; diff --git a/lib/core/model/sick_leave/sick_leave_patient_request_model.dart b/lib/core/model/sick_leave/sick_leave_patient_request_model.dart index ff5079b1..535836d8 100644 --- a/lib/core/model/sick_leave/sick_leave_patient_request_model.dart +++ b/lib/core/model/sick_leave/sick_leave_patient_request_model.dart @@ -41,8 +41,8 @@ class SickLeavePatientRequestModel { sessionID = json['SessionID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['VersionID'] = this.versionID; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; diff --git a/lib/core/service/authentication_service.dart b/lib/core/service/authentication_service.dart index 49e89881..7771bea6 100644 --- a/lib/core/service/authentication_service.dart +++ b/lib/core/service/authentication_service.dart @@ -17,28 +17,29 @@ class AuthenticationService extends BaseService { List get dashboardItemsList => _imeiDetails; NewLoginInformationModel _loginInfo = NewLoginInformationModel(); NewLoginInformationModel get loginInfo => _loginInfo; - SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel(); + SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = + SendActivationCodeForDoctorAppResponseModel(); - SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _activationCodeVerificationScreenRes; + SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => + _activationCodeVerificationScreenRes; - SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel(); + SendActivationCodeForDoctorAppResponseModel _activationCodeForDoctorAppRes = + SendActivationCodeForDoctorAppResponseModel(); SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _activationCodeForDoctorAppRes; - CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel(); + CheckActivationCodeForDoctorAppResponseModel _checkActivationCodeForDoctorAppRes = + CheckActivationCodeForDoctorAppResponseModel(); - CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _checkActivationCodeForDoctorAppRes; + CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => + _checkActivationCodeForDoctorAppRes; Map _insertDeviceImeiRes = {}; List _doctorProfilesList = []; List get doctorProfilesList => _doctorProfilesList; - - - Future selectDeviceImei(imei) async { try { - await baseAppClient.post(SELECT_DEVICE_IMEI, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { _imeiDetails = []; response['List_DoctorDeviceDetails'].forEach((v) { _imeiDetails.add(GetIMEIDetailsModel.fromJson(v)); @@ -49,7 +50,7 @@ class AuthenticationService extends BaseService { }, body: {"IMEI": imei, "TokenID": "@dm!n"}); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } } @@ -57,8 +58,7 @@ class AuthenticationService extends BaseService { hasError = false; _loginInfo = NewLoginInformationModel(); try { - await baseAppClient.post(LOGIN_URL, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(LOGIN_URL, onSuccess: (dynamic response, int statusCode) { _loginInfo = NewLoginInformationModel.fromJson(response); }, onFailure: (String error, int statusCode) { hasError = true; @@ -66,9 +66,8 @@ class AuthenticationService extends BaseService { }, body: userInfo.toJson()); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } - } Future sendActivationCodeVerificationScreen(ActivationCodeForVerificationScreenModel activationCodeModel) async { @@ -77,88 +76,81 @@ class AuthenticationService extends BaseService { try { await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN, onSuccess: (dynamic response, int statusCode) { - _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: activationCodeModel.toJson()); + _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: activationCodeModel.toJson()); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } - } - Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel)async { + Future sendActivationCodeForDoctorApp(ActivationCodeModel activationCodeModel) async { hasError = false; _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel(); try { - await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, - onSuccess: (dynamic response, int statusCode) { - _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: activationCodeModel.toJson()); + await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) { + _activationCodeForDoctorAppRes = SendActivationCodeForDoctorAppResponseModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: activationCodeModel.toJson()); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } } - Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel)async { + Future checkActivationCodeForDoctorApp(CheckActivationCodeRequestModel checkActivationCodeRequestModel) async { hasError = false; _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel(); try { - await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, - onSuccess: (dynamic response, int statusCode) { - _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: checkActivationCodeRequestModel.toJson()); + await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) { + _checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: checkActivationCodeRequestModel.toJson()); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } - } - - Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel)async { + Future insertDeviceImei(InsertIMEIDetailsModel insertIMEIDetailsModel) async { hasError = false; - // insertIMEIDetailsModel.tokenID = "@dm!n"; + // insertIMEIDetailsModel.tokenID = "@dm!n"; _insertDeviceImeiRes = {}; try { - await baseAppClient.post(INSERT_DEVICE_IMEI, - onSuccess: (dynamic response, int statusCode) { - _insertDeviceImeiRes = response; - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: insertIMEIDetailsModel.toJson()); + await baseAppClient.post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { + _insertDeviceImeiRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: insertIMEIDetailsModel.toJson()); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } } - Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel)async { + Future getDoctorProfileBasedOnClinic(ProfileReqModel profileReqModel) async { hasError = false; try { - await baseAppClient.post(GET_DOC_PROFILES, - onSuccess: (dynamic response, int statusCode) { - _doctorProfilesList.clear(); - response['DoctorProfileList'].forEach((v) { - _doctorProfilesList.add(DoctorProfileModel.fromJson(v)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: profileReqModel.toJson()); + await baseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) { + _doctorProfilesList.clear(); + response['DoctorProfileList'].forEach((v) { + _doctorProfilesList.add(DoctorProfileModel.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: profileReqModel.toJson()); } catch (error) { hasError = true; - super.error = error; + super.error = error as String?; } } } diff --git a/lib/core/service/hospitals/hospitals_service.dart b/lib/core/service/hospitals/hospitals_service.dart index f8a7579d..efa24209 100644 --- a/lib/core/service/hospitals/hospitals_service.dart +++ b/lib/core/service/hospitals/hospitals_service.dart @@ -4,8 +4,7 @@ import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_m import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class HospitalsService extends BaseService { - -List hospitals =List(); + List hospitals = []; Future getHospitals(GetHospitalsRequestModel getHospitalsRequestModel) async { hasError = false; diff --git a/lib/core/service/patient/DischargedPatientService.dart b/lib/core/service/patient/DischargedPatientService.dart index 2b353016..6566a57d 100644 --- a/lib/core/service/patient/DischargedPatientService.dart +++ b/lib/core/service/patient/DischargedPatientService.dart @@ -4,15 +4,15 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class DischargedPatientService extends BaseService { - List myDischargedPatients = List(); + List myDischargedPatients = []; - List myDischargeReferralPatients = List(); + List myDischargeReferralPatients = []; Future getDischargedPatient() async { hasError = false; Map body = Map(); await getDoctorProfile(isGetProfile: true); - body['DoctorID'] = doctorProfile.doctorID; + body['DoctorID'] = doctorProfile!.doctorID; body['FirstName'] = "0"; body['MiddleName'] = "0"; body['LastName'] = "0"; @@ -28,8 +28,7 @@ class DischargedPatientService extends BaseService { body['PatientTypeID'] = 1; hasError = false; myDischargedPatients.clear(); - await baseAppClient.post(GET_DISCHARGE_PATIENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_DISCHARGE_PATIENT, onSuccess: (dynamic response, int statusCode) { if (response['List_MyDischargePatient'] != null) { response['List_MyDischargePatient'].forEach((v) { myDischargedPatients.add(PatiantInformtion.fromJson(v)); @@ -45,7 +44,7 @@ class DischargedPatientService extends BaseService { hasError = false; Map body = Map(); await getDoctorProfile(isGetProfile: true); - body['DoctorID'] = doctorProfile.doctorID; + body['DoctorID'] = doctorProfile!.doctorID; body['FirstName'] = "0"; body['MiddleName'] = "0"; body['LastName'] = "0"; @@ -61,8 +60,7 @@ class DischargedPatientService extends BaseService { body['PatientTypeID'] = 1; hasError = false; myDischargeReferralPatients.clear(); - await baseAppClient.post(GET_MY_DISCHARGE_PATIENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_MY_DISCHARGE_PATIENT, onSuccess: (dynamic response, int statusCode) { if (response['List_MyDischargeReferralPatient'] != null) { response['List_MyDischargeReferralPatient'].forEach((v) { myDischargeReferralPatients.add(DischargeReferralPatient.fromJson(v)); diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart index 4fc25094..5b528a33 100644 --- a/lib/core/service/patient/LiveCarePatientServices.dart +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -15,18 +15,18 @@ class LiveCarePatientServices extends BaseService { bool get isFinished => _isFinished; - setFinished(bool isFinished){ + setFinished(bool isFinished) { _isFinished = isFinished; } - var endCallResponse = {}; var transferToAdminResponse = {}; - StartCallRes _startCallRes; + late StartCallRes _startCallRes; StartCallRes get startCallRes => _startCallRes; - Future getPendingPatientERForDoctorApp(PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async{ + Future getPendingPatientERForDoctorApp( + PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async { hasError = false; await baseAppClient.post( GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP, @@ -47,58 +47,47 @@ class LiveCarePatientServices extends BaseService { Future endCall(EndCallReq endCallReq) async { hasError = false; await baseAppClient.post(END_CALL, onSuccess: (response, statusCode) async { - endCallResponse = response; }, onFailure: (String error, int statusCode) { - hasError = true; super.error = error; - }, body: endCallReq.toJson(),isLiveCare: true); + }, body: endCallReq.toJson(), isLiveCare: true); } Future startCall(StartCallReq startCallReq) async { hasError = false; - await baseAppClient.post(START_LIVE_CARE_CALL, - onSuccess: (response, statusCode) async { - _startCallRes = StartCallRes.fromJson(response); + await baseAppClient.post(START_LIVE_CARE_CALL, onSuccess: (response, statusCode) async { + _startCallRes = StartCallRes.fromJson(response); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: startCallReq.toJson(),isLiveCare: true); + }, body: startCallReq.toJson(), isLiveCare: true); } - Future endCallWithCharge(int vcID) async{ + + Future endCallWithCharge(int vcID) async { hasError = false; - await baseAppClient.post( - END_CALL_WITH_CHARGE, - onSuccess: (dynamic response, int statusCode) { - endCallResponse = response; - }, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, - body: { - "VC_ID": vcID,"generalid":"Cs2020@2016\$2958", - },isLiveCare: true - ); + await baseAppClient.post(END_CALL_WITH_CHARGE, onSuccess: (dynamic response, int statusCode) { + endCallResponse = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: { + "VC_ID": vcID, + "generalid": "Cs2020@2016\$2958", + }, isLiveCare: true); } - Future transferToAdmin(int vcID, String notes) async{ + Future transferToAdmin(int vcID, String notes) async { hasError = false; - await baseAppClient.post( - TRANSFERT_TO_ADMIN, - onSuccess: (dynamic response, int statusCode) { - transferToAdminResponse = response; - }, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, - body: { - "VC_ID": vcID, - "IsOutKsa": false, - "Notes": notes, - },isLiveCare: true - ); + await baseAppClient.post(TRANSFERT_TO_ADMIN, onSuccess: (dynamic response, int statusCode) { + transferToAdminResponse = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: { + "VC_ID": vcID, + "IsOutKsa": false, + "Notes": notes, + }, isLiveCare: true); } -} \ No newline at end of file +} diff --git a/lib/core/service/patient/MyReferralPatientService.dart b/lib/core/service/patient/MyReferralPatientService.dart index 536e68a7..d1ef47fa 100644 --- a/lib/core/service/patient/MyReferralPatientService.dart +++ b/lib/core/service/patient/MyReferralPatientService.dart @@ -4,13 +4,13 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/doctor/request_add_referred_doctor_remarks.dart'; class MyReferralInPatientService extends BaseService { - List myReferralPatients = List(); + List myReferralPatients = []; Future getMyReferralPatientService() async { hasError = false; Map body = Map(); await getDoctorProfile(); - body['DoctorID'] = doctorProfile.doctorID; + body['DoctorID'] = doctorProfile!.doctorID; body['FirstName'] = "0"; body['MiddleName'] = "0"; body['LastName'] = "0"; @@ -42,21 +42,17 @@ class MyReferralInPatientService extends BaseService { ); } - Future replay( - String referredDoctorRemarks, MyReferralPatientModel referral) async { + Future replay(String referredDoctorRemarks, MyReferralPatientModel referral) async { hasError = false; await getDoctorProfile(); - RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = - RequestAddReferredDoctorRemarks(); - _requestAddReferredDoctorRemarks.projectID = referral.projectID; - _requestAddReferredDoctorRemarks.admissionNo = - referral.admissionNo.toString(); - _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo; - _requestAddReferredDoctorRemarks.referredDoctorRemarks = - referredDoctorRemarks; - _requestAddReferredDoctorRemarks.editedBy = doctorProfile.doctorID; - _requestAddReferredDoctorRemarks.patientID = referral.patientID; - _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor; + RequestAddReferredDoctorRemarks _requestAddReferredDoctorRemarks = RequestAddReferredDoctorRemarks(); + _requestAddReferredDoctorRemarks.projectID = referral.projectID!; + _requestAddReferredDoctorRemarks.admissionNo = referral.admissionNo.toString(); + _requestAddReferredDoctorRemarks.lineItemNo = referral.lineItemNo!; + _requestAddReferredDoctorRemarks.referredDoctorRemarks = referredDoctorRemarks; + _requestAddReferredDoctorRemarks.editedBy = doctorProfile!.doctorID!; + _requestAddReferredDoctorRemarks.patientID = referral.patientID!; + _requestAddReferredDoctorRemarks.referringDoctor = referral.referringDoctor!; await baseAppClient.post( ADD_REFERRED_DOCTOR_REMARKS, body: _requestAddReferredDoctorRemarks.toJson(), diff --git a/lib/core/service/patient/PatientMuseService.dart b/lib/core/service/patient/PatientMuseService.dart index c34de9e0..893b6260 100644 --- a/lib/core/service/patient/PatientMuseService.dart +++ b/lib/core/service/patient/PatientMuseService.dart @@ -3,16 +3,15 @@ import 'package:doctor_app_flutter/core/model/patient_muse/PatientMuseResultsMod import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class PatientMuseService extends BaseService { - List patientMuseResultsModelList = List(); + List patientMuseResultsModelList = []; - getECGPatient({int patientType, int patientOutSA, int patientID}) async { + getECGPatient({int? patientType, int? patientOutSA, int? patientID}) async { Map body = Map(); body['PatientType'] = patientType == 7 ? 1 : patientType; body['PatientOutSA'] = patientOutSA; body['PatientID'] = patientID; hasError = false; - await baseAppClient.post(GET_ECG, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ECG, onSuccess: (dynamic response, int statusCode) { patientMuseResultsModelList.clear(); response['HIS_GetPatientMuseResultsList'].forEach((v) { patientMuseResultsModelList.add(PatientMuseResultsModel.fromJson(v)); diff --git a/lib/core/service/patient/ReferralService.dart b/lib/core/service/patient/ReferralService.dart index 69e2a810..25469dc2 100644 --- a/lib/core/service/patient/ReferralService.dart +++ b/lib/core/service/patient/ReferralService.dart @@ -4,16 +4,16 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class ReferralService extends BaseService { Future referralPatient( - {int admissionNo, - String roomID, - int referralClinic, - int referralDoctor, - int patientID, - int patientTypeID, - int priority, - int frequency, - String referringDoctorRemarks, - String extension}) async { + {int? admissionNo, + String? roomID, + int? referralClinic, + int? referralDoctor, + int? patientID, + int? patientTypeID, + int? priority, + int? frequency, + String? referringDoctorRemarks, + String? extension}) async { await getDoctorProfile(); ReferralRequest referralRequest = ReferralRequest(); referralRequest.admissionNo = admissionNo; @@ -25,11 +25,11 @@ class ReferralService extends BaseService { referralRequest.priority = priority.toString(); referralRequest.frequency = frequency.toString(); referralRequest.referringDoctorRemarks = referringDoctorRemarks; - referralRequest.referringClinic = doctorProfile.clinicID; - referralRequest.referringDoctor = doctorProfile.doctorID; + referralRequest.referringClinic = doctorProfile!.clinicID; + referralRequest.referringDoctor = doctorProfile!.doctorID; referralRequest.extension = extension; - referralRequest.editedBy = doctorProfile.doctorID; - referralRequest.createdBy = doctorProfile.doctorID; + referralRequest.editedBy = doctorProfile!.doctorID; + referralRequest.createdBy = doctorProfile!.doctorID; referralRequest.patientOutSA = false; await baseAppClient.post( diff --git a/lib/core/service/patient/patient-doctor-referral-service.dart b/lib/core/service/patient/patient-doctor-referral-service.dart index c83c74c9..abf3fab3 100644 --- a/lib/core/service/patient/patient-doctor-referral-service.dart +++ b/lib/core/service/patient/patient-doctor-referral-service.dart @@ -14,7 +14,7 @@ import '../base/lookup-service.dart'; class PatientReferralService extends LookupService { List projectsList = []; List clinicsList = []; - List doctorsList = List(); + List doctorsList = []; List listMyReferredPatientModel = []; List pendingReferralList = []; List patientReferralList = []; @@ -56,8 +56,7 @@ class PatientReferralService extends LookupService { Map body = Map(); body['isSameBranch'] = false; - await baseAppClient.post(GET_REFERRAL_FACILITIES, - onSuccess: (response, statusCode) async { + await baseAppClient.post(GET_REFERRAL_FACILITIES, onSuccess: (response, statusCode) async { projectsList = response['ProjectInfo']; }, onFailure: (String error, int statusCode) { hasError = true; @@ -84,8 +83,7 @@ class PatientReferralService extends LookupService { Future getClinicsList(int projectId) async { hasError = false; - ClinicByProjectIdRequest _clinicByProjectIdRequest = - ClinicByProjectIdRequest(); + ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest(); _clinicByProjectIdRequest.projectID = projectId; await baseAppClient.post( @@ -103,11 +101,9 @@ class PatientReferralService extends LookupService { ); } - Future getDoctorsList( - PatiantInformtion patient, int clinicId, int branchId) async { + Future getDoctorsList(PatiantInformtion patient, int clinicId, int branchId) async { hasError = false; - DoctorsByClinicIdRequest _doctorsByClinicIdRequest = - DoctorsByClinicIdRequest(); + DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest(); _doctorsByClinicIdRequest.projectID = branchId; _doctorsByClinicIdRequest.clinicID = clinicId; @@ -128,9 +124,8 @@ class PatientReferralService extends LookupService { Future getMyReferredPatient() async { hasError = false; - RequestMyReferralPatientModel _requestMyReferralPatient = - RequestMyReferralPatientModel(); - DoctorProfileModel doctorProfile = await getDoctorProfile(); + RequestMyReferralPatientModel _requestMyReferralPatient = RequestMyReferralPatientModel(); + DoctorProfileModel? doctorProfile = await getDoctorProfile(); await baseAppClient.post( GET_MY_REFERRED_PATIENT, @@ -140,8 +135,7 @@ class PatientReferralService extends LookupService { response['List_MyReferredPatient'].forEach((v) { MyReferredPatientModel item = MyReferredPatientModel.fromJson(v); if (doctorProfile != null) { - item.isReferralDoctorSameBranch = - doctorProfile.projectID == item.projectID; + item.isReferralDoctorSameBranch = doctorProfile.projectID == item.projectID; } else { item.isReferralDoctorSameBranch = false; } @@ -159,10 +153,10 @@ class PatientReferralService extends LookupService { Future getPendingReferralList() async { hasError = false; - DoctorProfileModel doctorProfile = await getDoctorProfile(); + DoctorProfileModel? doctorProfile = await getDoctorProfile(); Map body = Map(); // body['ClinicID'] = 0; - body['DoctorID'] = doctorProfile.doctorID; + body['DoctorID'] = doctorProfile!.doctorID; await baseAppClient.post( GET_PENDING_REFERRAL_PATIENT, @@ -171,8 +165,7 @@ class PatientReferralService extends LookupService { response['PendingReferralList'].forEach((v) { PendingReferral item = PendingReferral.fromJson(v); - item.isReferralDoctorSameBranch = - item.targetProjectId == item.sourceProjectId; + item.isReferralDoctorSameBranch = item.targetProjectId == item.sourceProjectId; pendingReferralList.add(item); }); }, @@ -197,8 +190,7 @@ class PatientReferralService extends LookupService { response['ReferralList']['entityList'].forEach((v) { PendingReferral item = PendingReferral.fromJson(v); - item.isReferralDoctorSameBranch = - item.targetProjectId == item.sourceProjectId; + item.isReferralDoctorSameBranch = item.targetProjectId == item.sourceProjectId; patientReferralList.add(item); }); }, @@ -211,10 +203,9 @@ class PatientReferralService extends LookupService { ); } - Future responseReferral( - PendingReferral pendingReferral, bool isAccepted) async { + Future responseReferral(PendingReferral pendingReferral, bool isAccepted) async { hasError = false; - DoctorProfileModel doctorProfile = await getDoctorProfile(); + DoctorProfileModel? doctorProfile = await getDoctorProfile(); Map body = Map(); body['PatientMRN'] = pendingReferral.patientID; @@ -224,7 +215,7 @@ class PatientReferralService extends LookupService { body['IsAccepted'] = isAccepted; body['PatientName'] = pendingReferral.patientName; body['ReferralResponse'] = pendingReferral.remarksFromSource; - body['DoctorName'] = doctorProfile.doctorName; + body['DoctorName'] = doctorProfile!.doctorName; await baseAppClient.post( RESPONSE_PENDING_REFERRAL_PATIENT, @@ -239,15 +230,14 @@ class PatientReferralService extends LookupService { ); } - Future makeReferral(PatiantInformtion patient, String isoStringDate, - int projectID, int clinicID, int doctorID, String remarks) async { + Future makeReferral(PatiantInformtion patient, String isoStringDate, int projectID, int clinicID, int doctorID, + String remarks) async { hasError = false; Map body = Map(); List physiotheraphyGoalsList = []; listOfPhysiotherapyGoals.forEach((element) { - physiotheraphyGoalsList - .add({"goalId": element.id, "remarks": element.remarks}); + physiotheraphyGoalsList.add({"goalId": element.id, "remarks": element.remarks}); }); body['PatientMRN'] = patient.patientMRN ?? patient.patientId; @@ -296,8 +286,7 @@ class PatientReferralService extends LookupService { ); } - Future verifyReferralDoctorRemarks( - MyReferredPatientModel referredPatient) async { + Future verifyReferralDoctorRemarks(MyReferredPatientModel referredPatient) async { hasError = false; Map body = Map(); diff --git a/lib/core/service/patient/patientInPatientService.dart b/lib/core/service/patient/patientInPatientService.dart index e0bc94a3..8648a0cc 100644 --- a/lib/core/service/patient/patientInPatientService.dart +++ b/lib/core/service/patient/patientInPatientService.dart @@ -4,16 +4,15 @@ import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class PatientInPatientService extends BaseService { - List inPatientList = List(); - List myInPatientList = List(); + List inPatientList = []; + List myInPatientList = []; - Future getInPatientList( - PatientSearchRequestModel requestModel, bool isMyInpatient) async { + Future getInPatientList(PatientSearchRequestModel requestModel, bool isMyInpatient) async { hasError = false; await getDoctorProfile(); if (isMyInpatient) { - requestModel.doctorID = doctorProfile.doctorID; + requestModel.doctorID = doctorProfile!.doctorID; } else { requestModel.doctorID = 0; } @@ -27,7 +26,7 @@ class PatientInPatientService extends BaseService { response['List_MyInPatient'].forEach((v) { PatiantInformtion patient = PatiantInformtion.fromJson(v); inPatientList.add(patient); - if(patient.doctorId == doctorProfile.doctorID){ + if (patient.doctorId == doctorProfile!.doctorID) { myInPatientList.add(patient); } }); diff --git a/lib/core/service/patient/patient_service.dart b/lib/core/service/patient/patient_service.dart index e15cc8d1..8eedb7de 100644 --- a/lib/core/service/patient/patient_service.dart +++ b/lib/core/service/patient/patient_service.dart @@ -27,15 +27,12 @@ class PatientService extends BaseService { List _patientLabResultOrdersList = []; - List get patientLabResultOrdersList => - _patientLabResultOrdersList; + List get patientLabResultOrdersList => _patientLabResultOrdersList; - List get patientPrescriptionsList => - _patientPrescriptionsList; + List get patientPrescriptionsList => _patientPrescriptionsList; List _patientPrescriptionsList = []; - List get prescriptionReportForInPatientList => - _prescriptionReportForInPatientList; + List get prescriptionReportForInPatientList => _prescriptionReportForInPatientList; List _prescriptionReportForInPatientList = []; List _patientRadiologyList = []; @@ -79,13 +76,10 @@ class PatientService extends BaseService { get referalFrequancyList => _referalFrequancyList; - DoctorsByClinicIdRequest _doctorsByClinicIdRequest = - DoctorsByClinicIdRequest(); - STPReferralFrequencyRequest _referralFrequencyRequest = - STPReferralFrequencyRequest(); - ClinicByProjectIdRequest _clinicByProjectIdRequest = - ClinicByProjectIdRequest(); - ReferToDoctorRequest _referToDoctorRequest; + DoctorsByClinicIdRequest _doctorsByClinicIdRequest = DoctorsByClinicIdRequest(); + STPReferralFrequencyRequest _referralFrequencyRequest = STPReferralFrequencyRequest(); + ClinicByProjectIdRequest _clinicByProjectIdRequest = ClinicByProjectIdRequest(); + ReferToDoctorRequest? _referToDoctorRequest; Future getPatientList(patient, patientType, {isView}) async { hasError = false; @@ -181,8 +175,7 @@ class PatientService extends BaseService { onSuccess: (dynamic response, int statusCode) { _prescriptionReportForInPatientList = []; response['List_PrescriptionReportForInPatient'].forEach((v) { - prescriptionReportForInPatientList - .add(PrescriptionReportForInPatient.fromJson(v)); + prescriptionReportForInPatientList.add(PrescriptionReportForInPatient.fromJson(v)); }); }, onFailure: (String error, int statusCode) { @@ -375,39 +368,39 @@ class PatientService extends BaseService { // TODO send the total model insted of each parameter Future referToDoctor( - {String selectedDoctorID, - String selectedClinicID, - int admissionNo, - String extension, - String priority, - String frequency, - String referringDoctorRemarks, - int patientID, - int patientTypeID, - String roomID, - int projectID}) async { + {String? selectedDoctorID, + String? selectedClinicID, + int? admissionNo, + String? extension, + String? priority, + String? frequency, + String? referringDoctorRemarks, + int? patientID, + int? patientTypeID, + String? roomID, + int? projectID}) async { hasError = false; // TODO Change it to use it when we implement authentication user Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); - int doctorID = doctorProfile.doctorID; - int clinicId = doctorProfile.clinicID; + DoctorProfileModel? doctorProfile = new DoctorProfileModel.fromJson(profile); + int? doctorID = doctorProfile.doctorID; + int? clinicId = doctorProfile.clinicID; _referToDoctorRequest = ReferToDoctorRequest( - projectID: projectID, - admissionNo: admissionNo, - roomID: roomID, + projectID: projectID!, + admissionNo: admissionNo!, + roomID: roomID!, referralClinic: selectedClinicID.toString(), referralDoctor: selectedDoctorID.toString(), - createdBy: doctorID, - editedBy: doctorID, - patientID: patientID, - patientTypeID: patientTypeID, - referringClinic: clinicId, + createdBy: doctorID!, + editedBy: doctorID!, + patientID: patientID!, + patientTypeID: patientTypeID!, + referringClinic: clinicId!, referringDoctor: doctorID, - referringDoctorRemarks: referringDoctorRemarks, - priority: priority, - frequency: frequency, - extension: extension, + referringDoctorRemarks: referringDoctorRemarks!, + priority: priority!, + frequency: frequency!, + extension: extension!, ); await baseAppClient.post( PATIENT_PROGRESS_NOTE_URL, @@ -416,7 +409,7 @@ class PatientService extends BaseService { hasError = true; super.error = error; }, - body: _referToDoctorRequest.toJson(), + body: _referToDoctorRequest!.toJson(), ); } diff --git a/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart b/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart index 2bb9dac7..2a1574f4 100644 --- a/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart +++ b/lib/core/service/patient_medical_file/insurance/InsuranceCardService.dart @@ -7,37 +7,28 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class InsuranceCardService extends BaseService { InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel( - isDentalAllowedBackend: false, - patientTypeID: 1, - patientType: 1, - eXuldAPPNO: 0, - projectID: 0); - InsuranceApprovalInPatientRequestModel - _insuranceApprovalInPatientRequestModel = + isDentalAllowedBackend: false, patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, projectID: 0); + InsuranceApprovalInPatientRequestModel _insuranceApprovalInPatientRequestModel = InsuranceApprovalInPatientRequestModel(); - List _insuranceApproval = List(); + List _insuranceApproval = []; List get insuranceApproval => _insuranceApproval; - List _insuranceApprovalInPatient = List(); - List get insuranceApprovalInPatient => - _insuranceApprovalInPatient; + List _insuranceApprovalInPatient = []; + List get insuranceApprovalInPatient => _insuranceApprovalInPatient; - Future getInsuranceApprovalInPatient({int mrn}) async { - _insuranceApprovalInPatientRequestModel = - InsuranceApprovalInPatientRequestModel( - patientID: mrn, + Future getInsuranceApprovalInPatient({int? mrn}) async { + _insuranceApprovalInPatientRequestModel = InsuranceApprovalInPatientRequestModel( + patientID: mrn!, patientTypeID: 1, ); hasError = false; insuranceApprovalInPatient.clear(); - await baseAppClient.post(GET_INSURANCE_IN_PATIENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_INSURANCE_IN_PATIENT, onSuccess: (dynamic response, int statusCode) { //prescriptionsList.clear(); response['List_ApprovalMain_InPatient'].forEach((prescriptions) { - insuranceApprovalInPatient - .add(InsuranceApprovalInPatientModel.fromJson(prescriptions)); + insuranceApprovalInPatient.add(InsuranceApprovalInPatientModel.fromJson(prescriptions)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -45,8 +36,7 @@ class InsuranceCardService extends BaseService { }, body: _insuranceApprovalInPatientRequestModel.toJson()); } - Future getInsuranceApproval(PatiantInformtion patient, - {int appointmentNo, int projectId}) async { + Future getInsuranceApproval(PatiantInformtion patient, {int? appointmentNo, int? projectId}) async { hasError = false; // _cardList.clear(); // if (appointmentNo != null) { @@ -59,8 +49,8 @@ class InsuranceCardService extends BaseService { _insuranceApprovalModel.projectID = 0; // } - await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, - patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, patient: patient, + onSuccess: (dynamic response, int statusCode) { print(response['HIS_Approval_List'].length); _insuranceApproval.clear(); _insuranceApproval.length = 0; diff --git a/lib/core/service/patient_medical_file/lab_order/labs_service.dart b/lib/core/service/patient_medical_file/lab_order/labs_service.dart index c7bb9a78..4b7a2459 100644 --- a/lib/core/service/patient_medical_file/lab_order/labs_service.dart +++ b/lib/core/service/patient_medical_file/lab_order/labs_service.dart @@ -10,16 +10,15 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import '../../base/base_service.dart'; class LabsService extends BaseService { - List patientLabOrdersList = List(); + List patientLabOrdersList = []; - Future getPatientLabOrdersList( - PatiantInformtion patient, bool isInpatient) async { + Future getPatientLabOrdersList(PatiantInformtion patient, bool isInpatient) async { hasError = false; Map body = Map(); String url = ""; if (isInpatient) { await getDoctorProfile(); - body['ProjectID'] = doctorProfile.projectID; + body['ProjectID'] = doctorProfile!.projectID; url = GET_PATIENT_LAB_OREDERS; } else { body['isDentalAllowedBackend'] = false; @@ -27,8 +26,7 @@ class LabsService extends BaseService { } patientLabOrdersList = []; patientLabOrdersList.clear(); - await baseAppClient.postPatient(url, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { patientLabOrdersList = []; if (!isInpatient) { response['ListPLO'].forEach((hospital) { @@ -46,19 +44,18 @@ class LabsService extends BaseService { }, body: body); } - RequestPatientLabSpecialResult _requestPatientLabSpecialResult = - RequestPatientLabSpecialResult(); + RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult(); - List patientLabSpecialResult = List(); - List labResultList = List(); - List labOrdersResultsList = List(); + List patientLabSpecialResult = []; + List labResultList = []; + List labOrdersResultsList = []; Future getLaboratoryResult( - {String projectID, - int clinicID, - String invoiceNo, - String orderNo, - PatiantInformtion patient, + {String? projectID, + int? clinicID, + String? invoiceNo, + String? orderNo, + PatiantInformtion? patient, bool isInpatient = false}) async { hasError = false; @@ -69,8 +66,8 @@ class LabsService extends BaseService { _requestPatientLabSpecialResult.orderNo = orderNo; body = _requestPatientLabSpecialResult.toJson(); - await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, - patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_Patient_LAB_SPECIAL_RESULT, patient: patient!, + onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult.clear(); response['ListPLSR'].forEach((hospital) { @@ -82,29 +79,25 @@ class LabsService extends BaseService { }, body: body); } - Future getPatientLabResult( - {PatientLabOrders patientLabOrder, - PatiantInformtion patient, - bool isInpatient}) async { + Future getPatientLabResult({PatientLabOrders? patientLabOrder, PatiantInformtion? patient, bool? isInpatient}) async { hasError = false; String url = ""; - if (isInpatient) { + if (isInpatient!) { url = GET_PATIENT_LAB_RESULTS; } else { url = GET_Patient_LAB_RESULT; } Map body = Map(); - body['InvoiceNo'] = patientLabOrder.invoiceNo; + body['InvoiceNo'] = patientLabOrder!.invoiceNo; body['OrderNo'] = patientLabOrder.orderNo; body['isDentalAllowedBackend'] = false; body['SetupID'] = patientLabOrder.setupID; body['ProjectID'] = patientLabOrder.projectID; body['ClinicID'] = patientLabOrder.clinicID ?? 0; - await baseAppClient.postPatient(url, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient!, onSuccess: (dynamic response, int statusCode) { patientLabSpecialResult = []; labResultList = []; @@ -127,9 +120,7 @@ class LabsService extends BaseService { } Future getPatientLabOrdersResults( - {PatientLabOrders patientLabOrder, - String procedure, - PatiantInformtion patient}) async { + {PatientLabOrders? patientLabOrder, String? procedure, PatiantInformtion? patient}) async { hasError = false; Map body = Map(); if (patientLabOrder != null) { @@ -141,8 +132,8 @@ class LabsService extends BaseService { } body['isDentalAllowedBackend'] = false; body['Procedure'] = procedure; - await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, - patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(GET_Patient_LAB_ORDERS_RESULT, patient: patient!, + onSuccess: (dynamic response, int statusCode) { labOrdersResultsList.clear(); response['ListPLR'].forEach((lab) { labOrdersResultsList.add(LabOrderResult.fromJson(lab)); @@ -153,10 +144,9 @@ class LabsService extends BaseService { }, body: body); } - RequestSendLabReportEmail _requestSendLabReportEmail = - RequestSendLabReportEmail(); + RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); - Future sendLabReportEmail({PatientLabOrders patientLabOrder}) async { + Future sendLabReportEmail({PatientLabOrders? patientLabOrder}) async { // _requestSendLabReportEmail.projectID = patientLabOrder.projectID; // _requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo; // _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; diff --git a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart index 94933d7d..14139715 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -13,12 +13,10 @@ class PatientMedicalReportService extends BaseService { Map body = Map(); await getDoctorProfile(); body['AdmissionNo'] = patient.admissionNo; - body['SetupID'] = doctorProfile.setupID; - body['ProjectID'] = doctorProfile.projectID; - - await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, - onSuccess: (dynamic response, int statusCode) { + body['SetupID'] = doctorProfile!.setupID; + body['ProjectID'] = doctorProfile!.projectID; + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { medicalReportList.clear(); if (response['DAPP_ListMedicalReportList'] != null) { response['DAPP_ListMedicalReportList'].forEach((v) { @@ -38,19 +36,17 @@ class PatientMedicalReportService extends BaseService { body['SetupID'] = "91877"; body['TemplateID'] = 43; - await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, - onSuccess: (dynamic response, int statusCode) { - - medicalReportTemplate.clear(); - if (response['DAPP_GetTemplateByIDList'] != null) { - response['DAPP_GetTemplateByIDList'].forEach((v) { - medicalReportTemplate.add(MedicalReportTemplate.fromJson(v)); - }); - } - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error.toString(); - }, body: body); + await baseAppClient.post(PATIENT_MEDICAL_REPORT_GET_TEMPLATE, onSuccess: (dynamic response, int statusCode) { + medicalReportTemplate.clear(); + if (response['DAPP_GetTemplateByIDList'] != null) { + response['DAPP_GetTemplateByIDList'].forEach((v) { + medicalReportTemplate.add(MedicalReportTemplate.fromJson(v)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error.toString(); + }, body: body); } Future insertMedicalReport(PatiantInformtion patient, String htmlText) async { @@ -61,13 +57,11 @@ class PatientMedicalReportService extends BaseService { body['AdmissionNo'] = patient.admissionNo; body['MedicalReportHTML'] = htmlText; - await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, - onSuccess: (dynamic response, int statusCode) { - - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error.toString(); - }, body: body, patient: patient); + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_INSERT, onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error.toString(); + }, body: body, patient: patient); } Future verifyMedicalReport(PatiantInformtion patient, MedicalReportModel medicalReport) async { @@ -79,12 +73,10 @@ class PatientMedicalReportService extends BaseService { body['InvoiceNo'] = medicalReport.invoiceNo; body['LineItemNo'] = medicalReport.lineItemNo; - await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, - onSuccess: (dynamic response, int statusCode) { - - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error.toString(); - }, body: body, patient: patient); + await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_VERIFIED, onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error.toString(); + }, body: body, patient: patient); } } diff --git a/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart b/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart index 42cdafc6..295d38ac 100644 --- a/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart +++ b/lib/core/service/patient_medical_file/medical_report/medical_file_service.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/model/medical_report/medical_file_reques import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class MedicalFileService extends BaseService { - List _medicalFileList = List(); + List _medicalFileList = []; List get medicalFileList => _medicalFileList; MedicalFileRequestModel _fileRequestModel = MedicalFileRequestModel( @@ -13,15 +13,13 @@ class MedicalFileService extends BaseService { "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiNDM1MGNjZTYtYzc3MS00YjBiLThiNDItMGZhY2IzYzgxMjQ4IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTYwNTQiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA5MjI1MjMwLCJleHAiOjE2MTAwODkyMzAsImlhdCI6MTYwOTIyNTIzMH0.rs7lTBQ1ON4PbR11PBkOyjf818DdeMKuqz2IrCJMYQU", ); - Future getMedicalFile({int mrn}) async { + Future getMedicalFile({int? mrn}) async { _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); _fileRequestModel.iPAdress = "9.9.9.9"; hasError = false; _medicalFileList.clear(); - await baseAppClient.post(GET_MEDICAL_FILE, - onSuccess: (dynamic response, int statusCode) { - _medicalFileList - .add(MedicalFileModel.fromJson(response['PatientFileList'])); + await baseAppClient.post(GET_MEDICAL_FILE, onSuccess: (dynamic response, int statusCode) { + _medicalFileList.add(MedicalFileModel.fromJson(response['PatientFileList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/patient_medical_file/prescription/prescription_service.dart b/lib/core/service/patient_medical_file/prescription/prescription_service.dart index ffbcae9b..96399156 100644 --- a/lib/core/service/patient_medical_file/prescription/prescription_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescription_service.dart @@ -16,9 +16,9 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign- import 'package:doctor_app_flutter/util/date-utils.dart'; class PrescriptionService extends LookupService { - List _prescriptionList = List(); + List _prescriptionList = []; List get prescriptionList => _prescriptionList; - List _drugsList = List(); + List _drugsList = []; List get drugsList => _drugsList; List doctorsList = []; List allMedicationList = []; @@ -31,27 +31,22 @@ class PrescriptionService extends LookupService { dynamic boxQuantity; PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(); - ItemByMedicineRequestModel _itemByMedicineRequestModel = - ItemByMedicineRequestModel(); + ItemByMedicineRequestModel _itemByMedicineRequestModel = ItemByMedicineRequestModel(); SearchDrugRequestModel _drugRequestModel = SearchDrugRequestModel( //search: ["Acetaminophen"], search: ["Amoxicillin"], ); - CalculateBoxQuantityRequestModel _boxQuantityRequestModel = - CalculateBoxQuantityRequestModel(); + CalculateBoxQuantityRequestModel _boxQuantityRequestModel = CalculateBoxQuantityRequestModel(); - PostPrescriptionReqModel _postPrescriptionReqModel = - PostPrescriptionReqModel(); + PostPrescriptionReqModel _postPrescriptionReqModel = PostPrescriptionReqModel(); - Future getItem({int itemID}) async { - _itemByMedicineRequestModel = - ItemByMedicineRequestModel(medicineCode: itemID); + Future getItem({int? itemID}) async { + _itemByMedicineRequestModel = ItemByMedicineRequestModel(medicineCode: itemID); hasError = false; - await baseAppClient.post(GET_ITEM_BY_MEDICINE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ITEM_BY_MEDICINE, onSuccess: (dynamic response, int statusCode) { itemMedicineList = []; itemMedicineList = response['listItemByMedicineCode']['frequencies']; itemMedicineListRoute = response['listItemByMedicineCode']['routes']; @@ -62,11 +57,9 @@ class PrescriptionService extends LookupService { }, body: _itemByMedicineRequestModel.toJson()); } - Future getPatientAssessment( - GetAssessmentReqModel getAssessmentReqModel) async { + Future getPatientAssessment(GetAssessmentReqModel getAssessmentReqModel) async { hasError = false; - await baseAppClient.post(GET_ASSESSMENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ASSESSMENT, onSuccess: (dynamic response, int statusCode) { print("Success"); patientAssessmentList.clear(); response['AssessmentList']['entityList'].forEach((v) { @@ -78,29 +71,26 @@ class PrescriptionService extends LookupService { }, body: getAssessmentReqModel.toJson()); } - Future getPrescription({int mrn}) async { + Future getPrescription({int? mrn}) async { _prescriptionReqModel = PrescriptionReqModel( patientMRN: mrn, ); hasError = false; _prescriptionList.clear(); - await baseAppClient.post(GET_PRESCRIPTION_LIST, - onSuccess: (dynamic response, int statusCode) { - _prescriptionList - .add(PrescriptionModel.fromJson(response['PrescriptionList'])); + await baseAppClient.post(GET_PRESCRIPTION_LIST, onSuccess: (dynamic response, int statusCode) { + _prescriptionList.add(PrescriptionModel.fromJson(response['PrescriptionList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: _prescriptionReqModel.toJson()); } - Future getDrugs({String drugName}) async { - _drugRequestModel = SearchDrugRequestModel(search: [drugName]); + Future getDrugs({String? drugName}) async { + _drugRequestModel = SearchDrugRequestModel(search: [drugName!]); hasError = false; - await baseAppClient.post(SEARCH_DRUG, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEARCH_DRUG, onSuccess: (dynamic response, int statusCode) { doctorsList = []; doctorsList = response['MedicationList']['entityList']; }, onFailure: (String error, int statusCode) { @@ -112,8 +102,7 @@ class PrescriptionService extends LookupService { Future getMedicationList({String drug = ''}) async { hasError = false; _drugRequestModel.search = ["$drug"]; - await baseAppClient.post(SEARCH_DRUG, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEARCH_DRUG, onSuccess: (dynamic response, int statusCode) { allMedicationList = []; response['MedicationList']['entityList'].forEach((v) { allMedicationList.add(GetMedicationResponseModel.fromJson(v)); @@ -124,8 +113,7 @@ class PrescriptionService extends LookupService { }, body: _drugRequestModel.toJson()); } - Future postPrescription( - PostPrescriptionReqModel postProcedureReqModel) async { + Future postPrescription(PostPrescriptionReqModel postProcedureReqModel) async { hasError = false; //_prescriptionList.clear(); await baseAppClient.post( @@ -141,8 +129,7 @@ class PrescriptionService extends LookupService { ); } - Future updatePrescription( - PostPrescriptionReqModel updatePrescriptionReqModel) async { + Future updatePrescription(PostPrescriptionReqModel updatePrescriptionReqModel) async { hasError = false; //_prescriptionList.clear(); await baseAppClient.post( @@ -158,12 +145,8 @@ class PrescriptionService extends LookupService { ); } - Future getDrugToDrug( - VitalSignData vital, - List lstAssessments, - List allergy, - PatiantInformtion patient, - List prescription) async { + Future getDrugToDrug(VitalSignData vital, List lstAssessments, + List allergy, PatiantInformtion patient, List prescription) async { // Map request = { // "Prescription": { // "objPatientInfo": {"Gender": "Male", "Age": "21/06/1967"}, @@ -218,8 +201,7 @@ class PrescriptionService extends LookupService { "Prescription": { "objPatientInfo": { "Gender": patient.gender == 1 ? 'Male' : 'Female', - "Age": AppDateUtils.convertDateFromServerFormat( - patient.dateofBirth, 'dd/MM/yyyy') + "Age": AppDateUtils.convertDateFromServerFormat(patient.dateofBirth!, 'dd/MM/yyyy') }, "objVitalSign": {"Height": vital?.heightCm, "Weight": vital?.weightKg}, "objPrescriptionItems": prescription, @@ -231,29 +213,22 @@ class PrescriptionService extends LookupService { }; hasError = false; - await baseAppClient.post(DRUG_TO_DRUG, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(DRUG_TO_DRUG, onSuccess: (dynamic response, int statusCode) { drugToDrug = []; - drugToDrug = - response['DrugToDrugResponse']['objPrescriptionCheckerResult']; + drugToDrug = response['DrugToDrugResponse']['objPrescriptionCheckerResult']; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: request); } - Future calculateBoxQuantity( - {int freq, int duration, int itemCode, double strength}) async { - _boxQuantityRequestModel = CalculateBoxQuantityRequestModel( - frequency: freq, - duration: duration, - itemCode: itemCode, - strength: strength); + Future calculateBoxQuantity({int? freq, int? duration, int? itemCode, double? strength}) async { + _boxQuantityRequestModel = + CalculateBoxQuantityRequestModel(frequency: freq, duration: duration, itemCode: itemCode, strength: strength); hasError = false; - await baseAppClient.post(GET_BOX_QUANTITY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_BOX_QUANTITY, onSuccess: (dynamic response, int statusCode) { boxQuantity = response['BoxQuantity']; }, onFailure: (String error, int statusCode) { hasError = true; @@ -265,10 +240,7 @@ class PrescriptionService extends LookupService { var allergiesObj = []; allergies.forEach((element) { allergiesObj.add({ - "objProperties": { - 'Id': element.allergyDiseaseId, - 'Name': element.allergyDiseaseName - } + "objProperties": {'Id': element.allergyDiseaseId, 'Name': element.allergyDiseaseName} }); }); return allergiesObj; diff --git a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart index eb860141..83fc9fd3 100644 --- a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart @@ -15,14 +15,13 @@ import 'package:flutter/cupertino.dart'; import '../../base/base_service.dart'; class PrescriptionsService extends BaseService { - List prescriptionsList = List(); - List prescriptionsOrderList = List(); - List prescriptionInPatientList = List(); + List prescriptionsList = []; + List prescriptionsOrderList = []; + List prescriptionInPatientList = []; - InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = - InPatientPrescriptionRequestModel(); + InPatientPrescriptionRequestModel _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel(); - Future getPrescriptionInPatient({int mrn, String adn}) async { + Future getPrescriptionInPatient({int? mrn, String? adn}) async { _inPatientPrescriptionRequestModel = InPatientPrescriptionRequestModel( patientMRN: mrn, admissionNo: adn, @@ -30,12 +29,10 @@ class PrescriptionsService extends BaseService { hasError = false; prescriptionInPatientList.clear(); - await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PRESCRIPTION_IN_PATIENT, onSuccess: (dynamic response, int statusCode) { prescriptionsList.clear(); response['List_PrescriptionReportForInPatient'].forEach((prescriptions) { - prescriptionInPatientList - .add(PrescriotionInPatient.fromJson(prescriptions)); + prescriptionInPatientList.add(PrescriotionInPatient.fromJson(prescriptions)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -47,8 +44,7 @@ class PrescriptionsService extends BaseService { hasError = false; Map body = Map(); body['isDentalAllowedBackend'] = false; - await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(PRESCRIPTIONS, patient: patient, onSuccess: (dynamic response, int statusCode) { prescriptionsList.clear(); response['PatientPrescriptionList'].forEach((prescriptions) { prescriptionsList.add(Prescriptions.fromJson(prescriptions)); @@ -60,15 +56,12 @@ class PrescriptionsService extends BaseService { } RequestPrescriptionReport _requestPrescriptionReport = - RequestPrescriptionReport( - appointmentNo: 0, isDentalAllowedBackend: false); - List prescriptionReportList = List(); + RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false); + List prescriptionReportList = []; - Future getPrescriptionReport( - {Prescriptions prescriptions, - @required PatiantInformtion patient}) async { + Future getPrescriptionReport({Prescriptions? prescriptions, @required PatiantInformtion? patient}) async { hasError = false; - _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo; + _requestPrescriptionReport.dischargeNo = prescriptions!.dischargeNo; _requestPrescriptionReport.projectID = prescriptions.projectID; _requestPrescriptionReport.clinicID = prescriptions.clinicID; _requestPrescriptionReport.setupID = prescriptions.setupID; @@ -76,23 +69,18 @@ class PrescriptionsService extends BaseService { _requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo; await baseAppClient.postPatient( - prescriptions.isInOutPatient - ? GET_PRESCRIPTION_REPORT_ENH - : GET_PRESCRIPTION_REPORT_NEW, - patient: patient, onSuccess: (dynamic response, int statusCode) { + prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, + patient: patient!, onSuccess: (dynamic response, int statusCode) { prescriptionReportList.clear(); prescriptionReportEnhList.clear(); - if (prescriptions.isInOutPatient) { + if (prescriptions.isInOutPatient!) { response['ListPRM'].forEach((prescriptions) { - prescriptionReportList - .add(PrescriptionReport.fromJson(prescriptions)); - prescriptionReportEnhList - .add(PrescriptionReportEnh.fromJson(prescriptions)); + prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); + prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); }); } else { response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { - prescriptionReportList - .add(PrescriptionReport.fromJson(prescriptions)); + prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); }); } }, onFailure: (String error, int statusCode) { @@ -101,25 +89,22 @@ class PrescriptionsService extends BaseService { }, body: _requestPrescriptionReport.toJson()); } - RequestGetListPharmacyForPrescriptions - requestGetListPharmacyForPrescriptions = + RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions( latitude: 0, longitude: 0, isDentalAllowedBackend: false, ); - List pharmacyPrescriptionsList = List(); + List pharmacyPrescriptionsList = []; - Future getListPharmacyForPrescriptions( - {int itemId, @required PatiantInformtion patient}) async { + Future getListPharmacyForPrescriptions({int? itemId, @required PatiantInformtion? patient}) async { hasError = false; requestGetListPharmacyForPrescriptions.itemID = itemId; - await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient, + await baseAppClient.postPatient(GET_PHARMACY_LIST, patient: patient!, onSuccess: (dynamic response, int statusCode) { pharmacyPrescriptionsList.clear(); response['PharmList'].forEach((prescriptions) { - pharmacyPrescriptionsList - .add(PharmacyPrescriptions.fromJson(prescriptions)); + pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -127,39 +112,36 @@ class PrescriptionsService extends BaseService { }, body: requestGetListPharmacyForPrescriptions.toJson()); } - RequestPrescriptionReportEnh _requestPrescriptionReportEnh = - RequestPrescriptionReportEnh( + RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh( isDentalAllowedBackend: false, ); - List prescriptionReportEnhList = List(); + List prescriptionReportEnhList = []; Future getPrescriptionReportEnh( - {PrescriptionsOrder prescriptionsOrder, - @required PatiantInformtion patient}) async { + {PrescriptionsOrder? prescriptionsOrder, @required PatiantInformtion? patient}) async { ///This logic copy from the old app from class [order-history.component.ts] in line 45 bool isInPatient = false; prescriptionsList.forEach((element) { - if (prescriptionsOrder.appointmentNo == "0") { - if (element.dischargeNo == int.parse(prescriptionsOrder.dischargeID)) { + if (prescriptionsOrder!.appointmentNo == "0") { + if (element.dischargeNo == int.parse(prescriptionsOrder!.dischargeID)) { _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; _requestPrescriptionReportEnh.clinicID = element.clinicID; _requestPrescriptionReportEnh.projectID = element.projectID; _requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; - isInPatient = element.isInOutPatient; + isInPatient = element.isInOutPatient!; } } else { - if (int.parse(prescriptionsOrder.appointmentNo) == - element.appointmentNo) { + if (int.parse(prescriptionsOrder.appointmentNo) == element.appointmentNo) { _requestPrescriptionReportEnh.appointmentNo = element.appointmentNo; _requestPrescriptionReportEnh.clinicID = element.clinicID; _requestPrescriptionReportEnh.projectID = element.projectID; _requestPrescriptionReportEnh.episodeID = element.episodeID; _requestPrescriptionReportEnh.setupID = element.setupID; _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; - isInPatient = element.isInOutPatient; + isInPatient = element.isInOutPatient!; ///call inpGetPrescriptionReport } @@ -168,20 +150,17 @@ class PrescriptionsService extends BaseService { hasError = false; - await baseAppClient.postPatient( - isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, - patient: patient, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT_NEW, + patient: patient!, onSuccess: (dynamic response, int statusCode) { prescriptionReportEnhList.clear(); if (isInPatient) { response['ListPRM'].forEach((prescriptions) { - prescriptionReportEnhList - .add(PrescriptionReportEnh.fromJson(prescriptions)); + prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); }); } else { response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { - PrescriptionReportEnh reportEnh = - PrescriptionReportEnh.fromJson(prescriptions); + PrescriptionReportEnh reportEnh = PrescriptionReportEnh.fromJson(prescriptions); reportEnh.itemDescription = prescriptions['ItemDescriptionN']; prescriptionReportEnhList.add(reportEnh); }); @@ -195,13 +174,10 @@ class PrescriptionsService extends BaseService { Future getPrescriptionsOrders() async { Map body = Map(); body['isDentalAllowedBackend'] = false; - await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) { prescriptionsOrderList.clear(); - response['PatientER_GetPatientAllPresOrdersList'] - .forEach((prescriptionsOrder) { - prescriptionsOrderList - .add(PrescriptionsOrder.fromJson(prescriptionsOrder)); + response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) { + prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder)); }); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/patient_medical_file/procedure/procedure_service.dart b/lib/core/service/patient_medical_file/procedure/procedure_service.dart index 0c284f3d..6a757986 100644 --- a/lib/core/service/patient_medical_file/procedure/procedure_service.dart +++ b/lib/core/service/patient_medical_file/procedure/procedure_service.dart @@ -14,30 +14,26 @@ import 'package:doctor_app_flutter/core/model/procedure/update_procedure_request import 'package:doctor_app_flutter/core/service/base/base_service.dart'; class ProcedureService extends BaseService { - List _procedureList = List(); + List _procedureList = []; List get procedureList => _procedureList; - List _valadteProcedureList = List(); + List _valadteProcedureList = []; List get valadteProcedureList => _valadteProcedureList; - List _categoriesList = List(); + List _categoriesList = []; List get categoriesList => _categoriesList; - List procedureslist = List(); + List procedureslist = []; List categoryList = []; // List _templateList = List(); // List get templateList => _templateList; - List templateList = List(); + List templateList = []; - List _templateDetailsList = List(); - List get templateDetailsList => - _templateDetailsList; + List _templateDetailsList = []; + List get templateDetailsList => _templateDetailsList; - GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = - GetOrderedProcedureRequestModel(); + GetOrderedProcedureRequestModel _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(); - ProcedureTempleteRequestModel _procedureTempleteRequestModel = - ProcedureTempleteRequestModel(); - ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel = - ProcedureTempleteDetailsRequestModel(); + ProcedureTempleteRequestModel _procedureTempleteRequestModel = ProcedureTempleteRequestModel(); + ProcedureTempleteDetailsRequestModel _procedureTempleteDetailsRequestModel = ProcedureTempleteDetailsRequestModel(); GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel( // clinicId: 17, @@ -63,8 +59,7 @@ class ProcedureService extends BaseService { //search: ["DENTAL"], ); - Future getProcedureTemplate( - {int doctorId, int projectId, int clinicId, String categoryID}) async { + Future getProcedureTemplate({int? doctorId, int? projectId, int? clinicId, String? categoryID}) async { _procedureTempleteRequestModel = ProcedureTempleteRequestModel( tokenID: "@dm!n", patientID: 0, @@ -72,19 +67,18 @@ class ProcedureService extends BaseService { ); hasError = false; - await baseAppClient.post(GET_TEMPLETE_LIST/*GET_PROCEDURE_TEMPLETE*/, + await baseAppClient.post(GET_TEMPLETE_LIST /*GET_PROCEDURE_TEMPLETE*/, onSuccess: (dynamic response, int statusCode) { - templateList.clear(); + templateList.clear(); response['DAPP_TemplateGetList'].forEach((template) { ProcedureTempleteDetailsModel templateElement = ProcedureTempleteDetailsModel.fromJson(template); - if(categoryID != null){ - if(categoryID == templateElement.categoryID){ + if (categoryID != null) { + if (categoryID == templateElement.categoryID) { templateList.add(templateElement); } } else { templateList.add(templateElement); } - }); // response['HIS_ProcedureTemplateList'].forEach((template) { // _templateList.add(ProcedureTempleteModel.fromJson(template)); @@ -95,21 +89,17 @@ class ProcedureService extends BaseService { }, body: _procedureTempleteRequestModel.toJson()); } - Future getProcedureTemplateDetails( - {int doctorId, int projectId, int clinicId, int templateId}) async { + Future getProcedureTemplateDetails({int? doctorId, int? projectId, int? clinicId, int? templateId}) async { _procedureTempleteDetailsRequestModel = - ProcedureTempleteDetailsRequestModel( - templateID: templateId, searchType: 1, patientID: 0); + ProcedureTempleteDetailsRequestModel(templateID: templateId, searchType: 1, patientID: 0); hasError = false; //insuranceApprovalInPatient.clear(); _templateDetailsList.clear(); - await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PROCEDURE_TEMPLETE_DETAILS, onSuccess: (dynamic response, int statusCode) { //prescriptionsList.clear(); response['HIS_ProcedureTemplateDetailsList'].forEach((template) { - _templateDetailsList - .add(ProcedureTempleteDetailsModel.fromJson(template)); + _templateDetailsList.add(ProcedureTempleteDetailsModel.fromJson(template)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -117,15 +107,12 @@ class ProcedureService extends BaseService { }, body: _procedureTempleteDetailsRequestModel.toJson()); } - Future getProcedure({int mrn}) async { - _getOrderedProcedureRequestModel = - GetOrderedProcedureRequestModel(patientMRN: mrn); + Future getProcedure({int? mrn}) async { + _getOrderedProcedureRequestModel = GetOrderedProcedureRequestModel(patientMRN: mrn); hasError = false; _procedureList.clear(); - await baseAppClient.post(GET_PROCEDURE_LIST, - onSuccess: (dynamic response, int statusCode) { - _procedureList.add( - GetOrderedProcedureModel.fromJson(response['OrderedProcedureList'])); + await baseAppClient.post(GET_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) { + _procedureList.add(GetOrderedProcedureModel.fromJson(response['OrderedProcedureList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -135,8 +122,7 @@ class ProcedureService extends BaseService { Future getCategory() async { hasError = false; - await baseAppClient.post(GET_LIST_CATEGORISE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_LIST_CATEGORISE, onSuccess: (dynamic response, int statusCode) { categoryList = []; categoryList = response['listProcedureCategories']['entityList']; }, onFailure: (String error, int statusCode) { @@ -145,7 +131,7 @@ class ProcedureService extends BaseService { }, body: Map()); } - Future getProcedureCategory({String categoryName, String categoryID,patientId}) async { + Future getProcedureCategory({String? categoryName, String? categoryID, patientId}) async { _getProcedureCategoriseReqModel = GetProcedureReqModel( search: ["$categoryName"], patientMRN: patientId, @@ -156,10 +142,8 @@ class ProcedureService extends BaseService { ); hasError = false; _categoriesList.clear(); - await baseAppClient.post(GET_CATEGORISE_PROCEDURE, - onSuccess: (dynamic response, int statusCode) { - _categoriesList - .add(CategoriseProcedureModel.fromJson(response['ProcedureList'])); + await baseAppClient.post(GET_CATEGORISE_PROCEDURE, onSuccess: (dynamic response, int statusCode) { + _categoriesList.add(CategoriseProcedureModel.fromJson(response['ProcedureList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -169,8 +153,7 @@ class ProcedureService extends BaseService { Future postProcedure(PostProcedureReqModel postProcedureReqModel) async { hasError = false; _procedureList.clear(); - await baseAppClient.post(POST_PROCEDURE_LIST, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_PROCEDURE_LIST, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -178,12 +161,10 @@ class ProcedureService extends BaseService { }, body: postProcedureReqModel.toJson()); } - Future updateProcedure( - UpdateProcedureRequestModel updateProcedureRequestModel) async { + Future updateProcedure(UpdateProcedureRequestModel updateProcedureRequestModel) async { hasError = false; _procedureList.clear(); - await baseAppClient.post(UPDATE_PROCEDURE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(UPDATE_PROCEDURE, onSuccess: (dynamic response, int statusCode) { print("ACCEPTED"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -191,14 +172,11 @@ class ProcedureService extends BaseService { }, body: updateProcedureRequestModel.toJson()); } - Future valadteProcedure( - ProcedureValadteRequestModel procedureValadteRequestModel) async { + Future valadteProcedure(ProcedureValadteRequestModel procedureValadteRequestModel) async { hasError = false; _valadteProcedureList.clear(); - await baseAppClient.post(GET_PROCEDURE_VALIDATION, - onSuccess: (dynamic response, int statusCode) { - _valadteProcedureList.add( - ProcedureValadteModel.fromJson(response['ValidateProcedureList'])); + await baseAppClient.post(GET_PROCEDURE_VALIDATION, onSuccess: (dynamic response, int statusCode) { + _valadteProcedureList.add(ProcedureValadteModel.fromJson(response['ValidateProcedureList'])); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/service/patient_medical_file/radiology/radiology_service.dart b/lib/core/service/patient_medical_file/radiology/radiology_service.dart index 7cf17753..771ee179 100644 --- a/lib/core/service/patient_medical_file/radiology/radiology_service.dart +++ b/lib/core/service/patient_medical_file/radiology/radiology_service.dart @@ -6,21 +6,17 @@ import 'package:flutter/cupertino.dart'; import '../../base/base_service.dart'; class RadiologyService extends BaseService { - List finalRadiologyList = List(); + List finalRadiologyList = []; String url = ''; - Future getRadImageURL( - {int invoiceNo, - int lineItem, - int projectId, - @required PatiantInformtion patient}) async { + Future getRadImageURL({int? invoiceNo, int? lineItem, int? projectId, @required PatiantInformtion? patient}) async { hasError = false; final Map body = new Map(); body['InvoiceNo'] = invoiceNo; body['LineItemNo'] = lineItem; body['ProjectID'] = projectId; - await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient, + await baseAppClient.postPatient(GET_RAD_IMAGE_URL, patient: patient!, onSuccess: (dynamic response, int statusCode) { url = response['Data']; }, onFailure: (String error, int statusCode) { @@ -29,8 +25,7 @@ class RadiologyService extends BaseService { }, body: body); } - Future getPatientRadOrders(PatiantInformtion patient, - {isInPatient = false}) async { + Future getPatientRadOrders(PatiantInformtion patient, {isInPatient = false}) async { String url = GET_PATIENT_ORDERS; final Map body = new Map(); if (isInPatient) { @@ -39,8 +34,7 @@ class RadiologyService extends BaseService { } hasError = false; - await baseAppClient.postPatient(url, patient: patient, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.postPatient(url, patient: patient, onSuccess: (dynamic response, int statusCode) { finalRadiologyList = []; String label = "ListRAD"; if (isInPatient) { diff --git a/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart b/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart index 8113c9a7..63b5d82a 100644 --- a/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart +++ b/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart @@ -16,13 +16,12 @@ class SickLeaveService extends BaseService { List get getReasons => reasonse; List reasonse = []; List get getAllSickLeave => _getAllsickLeave; - List _getAllsickLeave = List(); + List _getAllsickLeave = []; List get coveringDoctorsList => _coveringDoctors; List _coveringDoctors = []; - List get getAllRescheduleLeave => - _getReScheduleLeave; + List get getAllRescheduleLeave => _getReScheduleLeave; List _getReScheduleLeave = []; dynamic get postReschedule => _postReschedule; dynamic _postReschedule; @@ -30,10 +29,9 @@ class SickLeaveService extends BaseService { dynamic get sickLeaveResponse => _sickLeaveResponse; dynamic _sickLeaveResponse; - List getAllSickLeavePatient = List(); + List getAllSickLeavePatient = []; - SickLeavePatientRequestModel _sickLeavePatientRequestModel = - SickLeavePatientRequestModel(); + SickLeavePatientRequestModel _sickLeavePatientRequestModel = SickLeavePatientRequestModel(); Future getStatistics(appoNo, patientMRN) async { hasError = false; @@ -73,8 +71,7 @@ class SickLeaveService extends BaseService { Future extendSickLeave(GetAllSickLeaveResponse request) async { var extendSickLeaveRequest = ExtendSickLeaveRequest(); - extendSickLeaveRequest.patientMRN = - request.patientMRN.toString(); //'3120746'; + extendSickLeaveRequest.patientMRN = request.patientMRN.toString(); //'3120746'; extendSickLeaveRequest.previousRequestNo = request.requestNo.toString(); extendSickLeaveRequest.noOfDays = request.noOfDays.toString(); extendSickLeaveRequest.remarks = request.remarks; @@ -114,8 +111,8 @@ class SickLeaveService extends BaseService { } Future getSickLeavePatient(patientMRN) async { - _sickLeavePatientRequestModel = SickLeavePatientRequestModel( - patientID: patientMRN, patientTypeID: 2, patientType: 1); + _sickLeavePatientRequestModel = + SickLeavePatientRequestModel(patientID: patientMRN, patientTypeID: 2, patientType: 1); hasError = false; getAllSickLeavePatient = []; getAllSickLeavePatient.clear(); diff --git a/lib/core/service/patient_medical_file/soap/SOAP_service.dart b/lib/core/service/patient_medical_file/soap/SOAP_service.dart index b2e0d603..588dd904 100644 --- a/lib/core/service/patient_medical_file/soap/SOAP_service.dart +++ b/lib/core/service/patient_medical_file/soap/SOAP_service.dart @@ -32,7 +32,7 @@ class SOAPService extends LookupService { List patientProgressNoteList = []; List patientAssessmentList = []; - int episodeID; + int? episodeID; Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async { await baseAppClient.post( GET_ALLERGIES, @@ -53,8 +53,7 @@ class SOAPService extends LookupService { Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async { hasError = false; - await baseAppClient.post(POST_EPISODE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_EPISODE, onSuccess: (dynamic response, int statusCode) { print("Success"); episodeID = response['EpisodeID']; }, onFailure: (String error, int statusCode) { @@ -66,8 +65,7 @@ class SOAPService extends LookupService { Future postAllergy(PostAllergyRequestModel postAllergyRequestModel) async { hasError = false; - await baseAppClient.post(POST_ALLERGY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_ALLERGY, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -75,11 +73,9 @@ class SOAPService extends LookupService { }, body: postAllergyRequestModel.toJson()); } - Future postHistories( - PostHistoriesRequestModel postHistoriesRequestModel) async { + Future postHistories(PostHistoriesRequestModel postHistoriesRequestModel) async { hasError = false; - await baseAppClient.post(POST_HISTORY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_HISTORY, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -87,11 +83,9 @@ class SOAPService extends LookupService { }, body: postHistoriesRequestModel.toJson()); } - Future postChiefComplaint( - PostChiefComplaintRequestModel postChiefComplaintRequestModel) async { + Future postChiefComplaint(PostChiefComplaintRequestModel postChiefComplaintRequestModel) async { hasError = false; - await baseAppClient.post(POST_CHIEF_COMPLAINT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -99,11 +93,9 @@ class SOAPService extends LookupService { }, body: postChiefComplaintRequestModel.toJson()); } - Future postPhysicalExam( - PostPhysicalExamRequestModel postPhysicalExamRequestModel) async { + Future postPhysicalExam(PostPhysicalExamRequestModel postPhysicalExamRequestModel) async { hasError = false; - await baseAppClient.post(POST_PHYSICAL_EXAM, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_PHYSICAL_EXAM, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -111,11 +103,9 @@ class SOAPService extends LookupService { }, body: postPhysicalExamRequestModel.toJson()); } - Future postProgressNote( - PostProgressNoteRequestModel postProgressNoteRequestModel) async { + Future postProgressNote(PostProgressNoteRequestModel postProgressNoteRequestModel) async { hasError = false; - await baseAppClient.post(POST_PROGRESS_NOTE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_PROGRESS_NOTE, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -123,11 +113,9 @@ class SOAPService extends LookupService { }, body: postProgressNoteRequestModel.toJson()); } - Future postAssessment( - PostAssessmentRequestModel postAssessmentRequestModel) async { + Future postAssessment(PostAssessmentRequestModel postAssessmentRequestModel) async { hasError = false; - await baseAppClient.post(POST_ASSESSMENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_ASSESSMENT, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -138,8 +126,7 @@ class SOAPService extends LookupService { Future patchAllergy(PostAllergyRequestModel patchAllergyRequestModel) async { hasError = false; - await baseAppClient.post(PATCH_ALLERGY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATCH_ALLERGY, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -147,11 +134,9 @@ class SOAPService extends LookupService { }, body: patchAllergyRequestModel.toJson()); } - Future patchHistories( - PostHistoriesRequestModel patchHistoriesRequestModel) async { + Future patchHistories(PostHistoriesRequestModel patchHistoriesRequestModel) async { hasError = false; - await baseAppClient.post(PATCH_HISTORY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATCH_HISTORY, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -159,11 +144,9 @@ class SOAPService extends LookupService { }, body: patchHistoriesRequestModel.toJson()); } - Future patchChiefComplaint( - PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async { + Future patchChiefComplaint(PostChiefComplaintRequestModel patchChiefComplaintRequestModel) async { hasError = false; - await baseAppClient.post(PATCH_CHIEF_COMPLAINT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATCH_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -171,11 +154,9 @@ class SOAPService extends LookupService { }, body: patchChiefComplaintRequestModel.toJson()); } - Future patchPhysicalExam( - PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async { + Future patchPhysicalExam(PostPhysicalExamRequestModel patchPhysicalExamRequestModel) async { hasError = false; - await baseAppClient.post(PATCH_PHYSICAL_EXAM, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATCH_PHYSICAL_EXAM, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -183,11 +164,9 @@ class SOAPService extends LookupService { }, body: patchPhysicalExamRequestModel.toJson()); } - Future patchProgressNote( - PostProgressNoteRequestModel patchProgressNoteRequestModel) async { + Future patchProgressNote(PostProgressNoteRequestModel patchProgressNoteRequestModel) async { hasError = false; - await baseAppClient.post(PATCH_PROGRESS_NOTE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATCH_PROGRESS_NOTE, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -195,11 +174,9 @@ class SOAPService extends LookupService { }, body: patchProgressNoteRequestModel.toJson()); } - Future patchAssessment( - PatchAssessmentReqModel patchAssessmentRequestModel) async { + Future patchAssessment(PatchAssessmentReqModel patchAssessmentRequestModel) async { hasError = false; - await baseAppClient.post(PATCH_ASSESSMENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(PATCH_ASSESSMENT, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; @@ -210,8 +187,7 @@ class SOAPService extends LookupService { Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { hasError = false; - await baseAppClient.post(GET_ALLERGY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ALLERGY, onSuccess: (dynamic response, int statusCode) { print("Success"); patientAllergiesList.clear(); @@ -224,11 +200,9 @@ class SOAPService extends LookupService { }, body: generalGetReqForSOAP.toJson()); } - Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, - {bool isFirst = false}) async { + Future getPatientHistories(GetHistoryReqModel getHistoryReqModel, {bool isFirst = false}) async { hasError = false; - await baseAppClient.post(GET_HISTORY, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_HISTORY, onSuccess: (dynamic response, int statusCode) { print("Success"); if (isFirst) patientHistoryList.clear(); response['List_History']['entityList'].forEach((v) { @@ -240,11 +214,9 @@ class SOAPService extends LookupService { }, body: getHistoryReqModel.toJson()); } - Future getPatientChiefComplaint( - GetChiefComplaintReqModel getChiefComplaintReqModel) async { + Future getPatientChiefComplaint(GetChiefComplaintReqModel getChiefComplaintReqModel) async { hasError = false; - await baseAppClient.post(GET_CHIEF_COMPLAINT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) { print("Success"); patientChiefComplaintList.clear(); response['List_ChiefComplaint']['entityList'].forEach((v) { @@ -256,11 +228,9 @@ class SOAPService extends LookupService { }, body: getChiefComplaintReqModel.toJson()); } - Future getPatientPhysicalExam( - GetPhysicalExamReqModel getPhysicalExamReqModel) async { + Future getPatientPhysicalExam(GetPhysicalExamReqModel getPhysicalExamReqModel) async { hasError = false; - await baseAppClient.post(GET_PHYSICAL_EXAM, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PHYSICAL_EXAM, onSuccess: (dynamic response, int statusCode) { patientPhysicalExamList.clear(); response['PhysicalExamList']['entityList'].forEach((v) { patientPhysicalExamList.add(GetPhysicalExamResModel.fromJson(v)); @@ -271,11 +241,9 @@ class SOAPService extends LookupService { }, body: getPhysicalExamReqModel.toJson()); } - Future getPatientProgressNote( - GetGetProgressNoteReqModel getGetProgressNoteReqModel) async { + Future getPatientProgressNote(GetGetProgressNoteReqModel getGetProgressNoteReqModel) async { hasError = false; - await baseAppClient.post(GET_PROGRESS_NOTE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_PROGRESS_NOTE, onSuccess: (dynamic response, int statusCode) { print("Success"); patientProgressNoteList.clear(); response['ProgressNoteList']['entityList'].forEach((v) { @@ -287,11 +255,9 @@ class SOAPService extends LookupService { }, body: getGetProgressNoteReqModel.toJson()); } - Future getPatientAssessment( - GetAssessmentReqModel getAssessmentReqModel) async { + Future getPatientAssessment(GetAssessmentReqModel getAssessmentReqModel) async { hasError = false; - await baseAppClient.post(GET_ASSESSMENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ASSESSMENT, onSuccess: (dynamic response, int statusCode) { print("Success"); patientAssessmentList.clear(); response['AssessmentList']['entityList'].forEach((v) { diff --git a/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart b/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart index 22f53226..84162053 100644 --- a/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart +++ b/lib/core/service/patient_medical_file/ucaf/patient-ucaf-service.dart @@ -12,18 +12,17 @@ class UcafService extends LookupService { List patientVitalSignsHistory = []; List patientAssessmentList = []; List orderProcedureList = []; - PrescriptionModel prescriptionList; + PrescriptionModel? prescriptionList; Future getPatientChiefComplaint(PatiantInformtion patient) async { hasError = false; Map body = Map(); - body['PatientMRN'] = patient.patientMRN ; + body['PatientMRN'] = patient.patientMRN; body['AppointmentNo'] = patient.appointmentNo; - body['EpisodeID'] = patient.episodeNo ; + body['EpisodeID'] = patient.episodeNo; body['DoctorID'] = ""; - await baseAppClient.post(GET_CHIEF_COMPLAINT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_CHIEF_COMPLAINT, onSuccess: (dynamic response, int statusCode) { print("Success"); patientChiefComplaintList.clear(); response['List_ChiefComplaint']['entityList'].forEach((v) { @@ -35,8 +34,7 @@ class UcafService extends LookupService { }, body: body); } - Future getInPatientVitalSignHistory( - PatiantInformtion patient, bool isInPatient) async { + Future getInPatientVitalSignHistory(PatiantInformtion patient, bool isInPatient) async { hasError = false; Map body = Map(); body['PatientID'] = patient.patientId; @@ -65,8 +63,7 @@ class UcafService extends LookupService { ); } - Future getPatientVitalSignsHistory( - PatiantInformtion patient, String fromDate, String toDate) async { + Future getPatientVitalSignsHistory(PatiantInformtion patient, String fromDate, String toDate) async { hasError = false; Map body = Map(); body['PatientMRN'] = patient.patientId; // patient.patientMRN @@ -104,8 +101,7 @@ class UcafService extends LookupService { body['AppointmentNo'] = patient.appointmentNo; body['EpisodeID'] = patient.episodeNo; - await baseAppClient.post(GET_ASSESSMENT, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ASSESSMENT, onSuccess: (dynamic response, int statusCode) { print("Success"); patientAssessmentList.clear(); response['AssessmentList']['entityList'].forEach((v) { @@ -127,10 +123,8 @@ class UcafService extends LookupService { hasError = false; prescriptionList = null; - await baseAppClient.post(GET_PRESCRIPTION_LIST, - onSuccess: (dynamic response, int statusCode) { - prescriptionList = - PrescriptionModel.fromJson(response['PrescriptionList']); + await baseAppClient.post(GET_PRESCRIPTION_LIST, onSuccess: (dynamic response, int statusCode) { + prescriptionList = PrescriptionModel.fromJson(response['PrescriptionList']); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; @@ -144,8 +138,7 @@ class UcafService extends LookupService { body['AppointmentNo'] = patient.appointmentNo; body['EpisodeID'] = patient.episodeNo; - await baseAppClient.post(GET_ORDER_PROCEDURE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ORDER_PROCEDURE, onSuccess: (dynamic response, int statusCode) { print("Success"); orderProcedureList.clear(); response['OrderedProcedureList']['entityList'].forEach((v) { @@ -163,8 +156,7 @@ class UcafService extends LookupService { body['PatientMRN'] = patient.patientMRN; body['AppointmentNo'] = patient.appointmentNo; - await baseAppClient.post(POST_UCAF, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(POST_UCAF, onSuccess: (dynamic response, int statusCode) { print("Success"); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart b/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart index 1c07aa48..a6bf9649 100644 --- a/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart +++ b/lib/core/service/patient_medical_file/vital_sign/patient-vital-signs-service.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign- import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; class VitalSignsService extends BaseService { - VitalSignData patientVitalSigns; + VitalSignData? patientVitalSigns; List patientVitalSignsHistory = []; Future getPatientVitalSign(PatiantInformtion patient) async { @@ -21,8 +21,7 @@ class VitalSignsService extends BaseService { if (response['VitalSignsList'] != null) { if (response['VitalSignsList']['entityList'] != null && (response['VitalSignsList']['entityList'] as List).length > 0) { - patientVitalSigns = VitalSignData.fromJson( - response['VitalSignsList']['entityList'][0]); + patientVitalSigns = VitalSignData.fromJson(response['VitalSignsList']['entityList'][0]); } } }, @@ -34,8 +33,7 @@ class VitalSignsService extends BaseService { ); } - Future getPatientVitalSignsHistory( - PatiantInformtion patient, String fromDate, String toDate) async { + Future getPatientVitalSignsHistory(PatiantInformtion patient, String fromDate, String toDate) async { patientVitalSigns = null; hasError = false; Map body = Map(); @@ -54,14 +52,14 @@ class VitalSignsService extends BaseService { body['ProjectID'] = patient.projectId; } await baseAppClient.post( - GET_PATIENT_VITAL_SIGN, + GET_PATIENT_VITAL_SIGN, onSuccess: (dynamic response, int statusCode) { patientVitalSignsHistory.clear(); - if (response['List_DoctorPatientVitalSign'] != null) { - response['List_DoctorPatientVitalSign'].forEach((v) { - patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); - }); - } + if (response['List_DoctorPatientVitalSign'] != null) { + response['List_DoctorPatientVitalSign'].forEach((v) { + patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); + }); + } }, onFailure: (String error, int statusCode) { hasError = true; @@ -84,22 +82,16 @@ class VitalSignsService extends BaseService { // body['InOutPatientType'] = 2; // } - - await baseAppClient.postPatient( - GET_PATIENT_VITAL_SIGN, - onSuccess: (dynamic response, int statusCode) { - patientVitalSignsHistory.clear(); - if (response['List_DoctorPatientVitalSign'] != null) { - response['List_DoctorPatientVitalSign'].forEach((v) { - patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); - });} - }, - onFailure: (String error, int statusCode) { - hasError = true; - super.error = error.toString(); - }, - body: body, - patient: patient - ); + await baseAppClient.postPatient(GET_PATIENT_VITAL_SIGN, onSuccess: (dynamic response, int statusCode) { + patientVitalSignsHistory.clear(); + if (response['List_DoctorPatientVitalSign'] != null) { + response['List_DoctorPatientVitalSign'].forEach((v) { + patientVitalSignsHistory.add(new VitalSignHistory.fromJson(v)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error.toString(); + }, body: body, patient: patient); } } diff --git a/lib/icons_app/doctor_app_icons.dart b/lib/icons_app/doctor_app_icons.dart index a73be2e3..2c375a7a 100644 --- a/lib/icons_app/doctor_app_icons.dart +++ b/lib/icons_app/doctor_app_icons.dart @@ -11,7 +11,7 @@ /// fonts: /// - asset: fonts/DoctorApp.ttf /// -/// +/// /// * MFG Labs, Copyright (C) 2012 by Daniel Bruce /// Author: MFG Labs /// License: SIL (http://scripts.sil.org/OFL) @@ -23,8 +23,8 @@ import 'package:flutter/widgets.dart'; class DoctorApp { DoctorApp._(); - static const _kFontFam = 'DoctorApp'; - static const String _kFontPkg = null; + static const _kFontFam = 'DoctorApp'; + static const String? _kFontPkg = null; static const IconData female_icon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData male = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); @@ -192,6 +192,7 @@ class DoctorApp { static const IconData verify_finger = IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData verify_whtsapp = IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData verify_sms = IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg); + /// static const IconData 124 = IconData(0xe8a7, fontFamily: _kFontFam, fontPackage: _kFontPkg); ///static const IconData 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData obese_bmi_r_1 = IconData(0xe8a9, fontFamily: _kFontFam, fontPackage: _kFontPkg); diff --git a/lib/models/SOAP/Allergy_model.dart b/lib/models/SOAP/Allergy_model.dart index c3493832..3e0e9cbc 100644 --- a/lib/models/SOAP/Allergy_model.dart +++ b/lib/models/SOAP/Allergy_model.dart @@ -1,32 +1,32 @@ class AllergyModel { - int allergyDiseaseId; - String allergyDiseaseName; - int allergyDiseaseType; - int appointmentNo; - int createdBy; - String createdByName; - String createdOn; - int episodeID; - bool isChecked; - bool isUpdatedByNurse; - int severity; - String severityName; + int? allergyDiseaseId; + String? allergyDiseaseName; + int? allergyDiseaseType; + int? appointmentNo; + int? createdBy; + String? createdByName; + String? createdOn; + int? episodeID; + bool? isChecked; + bool? isUpdatedByNurse; + int? severity; + String? severityName; AllergyModel( {this.allergyDiseaseId, - this.allergyDiseaseName, - this.allergyDiseaseType, - this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.episodeID, - this.isChecked, - this.isUpdatedByNurse, - this.severity, - this.severityName}); + this.allergyDiseaseName, + this.allergyDiseaseType, + this.appointmentNo, + this.createdBy, + this.createdByName, + this.createdOn, + this.episodeID, + this.isChecked, + this.isUpdatedByNurse, + this.severity, + this.severityName}); - AllergyModel.fromJson(Map json) { + AllergyModel.fromJson(Map json) { allergyDiseaseId = json['allergyDiseaseId']; allergyDiseaseName = json['allergyDiseaseName']; allergyDiseaseType = json['allergyDiseaseType']; @@ -41,8 +41,8 @@ class AllergyModel { severityName = json['severityName']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['allergyDiseaseId'] = this.allergyDiseaseId; data['allergyDiseaseName'] = this.allergyDiseaseName; data['allergyDiseaseType'] = this.allergyDiseaseType; diff --git a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart index 80188dfe..878205fc 100644 --- a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart +++ b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintReqModel.dart @@ -1,12 +1,11 @@ class GetChiefComplaintReqModel { - int patientMRN; - int appointmentNo; - int episodeId; - int episodeID; + int? patientMRN; + int? appointmentNo; + int? episodeId; + int? episodeID; dynamic doctorID; - GetChiefComplaintReqModel( - {this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID}); + GetChiefComplaintReqModel({this.patientMRN, this.appointmentNo, this.episodeId, this.episodeID, this.doctorID}); GetChiefComplaintReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; @@ -14,8 +13,7 @@ class GetChiefComplaintReqModel { episodeId = json['EpisodeId']; episodeID = json['EpisodeID']; doctorID = json['DoctorID']; - -} + } Map toJson() { final Map data = new Map(); diff --git a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart index 85ada324..f8a48ed0 100644 --- a/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart +++ b/lib/models/SOAP/ChiefComplaint/GetChiefComplaintResModel.dart @@ -1,32 +1,32 @@ class GetChiefComplaintResModel { - int appointmentNo; - String ccdate; - String chiefComplaint; - String clinicDescription; - int clinicID; - String currentMedication; - int doctorID; - String doctorName; - int episodeId; - String hopi; - int patientMRN; - int status; + int? appointmentNo; + String? ccdate; + String? chiefComplaint; + String? clinicDescription; + int? clinicID; + String? currentMedication; + int? doctorID; + String? doctorName; + int? episodeId; + String? hopi; + int? patientMRN; + int? status; GetChiefComplaintResModel( {this.appointmentNo, - this.ccdate, - this.chiefComplaint, - this.clinicDescription, - this.clinicID, - this.currentMedication, - this.doctorID, - this.doctorName, - this.episodeId, - this.hopi, - this.patientMRN, - this.status}); + this.ccdate, + this.chiefComplaint, + this.clinicDescription, + this.clinicID, + this.currentMedication, + this.doctorID, + this.doctorName, + this.episodeId, + this.hopi, + this.patientMRN, + this.status}); - GetChiefComplaintResModel.fromJson(Map json) { + GetChiefComplaintResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; ccdate = json['ccdate']; chiefComplaint = json['chiefComplaint']; @@ -41,8 +41,8 @@ class GetChiefComplaintResModel { status = json['status']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['appointmentNo'] = this.appointmentNo; data['ccdate'] = this.ccdate; data['chiefComplaint'] = this.chiefComplaint; diff --git a/lib/models/SOAP/GeneralGetReqForSOAP.dart b/lib/models/SOAP/GeneralGetReqForSOAP.dart index 70e76313..65ba7d6b 100644 --- a/lib/models/SOAP/GeneralGetReqForSOAP.dart +++ b/lib/models/SOAP/GeneralGetReqForSOAP.dart @@ -1,7 +1,7 @@ class GeneralGetReqForSOAP { - int patientMRN; - int appointmentNo; - int episodeId; + int? patientMRN; + int? appointmentNo; + int? episodeId; dynamic editedBy; dynamic doctorID; diff --git a/lib/models/SOAP/GetAllergiesResModel.dart b/lib/models/SOAP/GetAllergiesResModel.dart index 1eeca63e..745b169a 100644 --- a/lib/models/SOAP/GetAllergiesResModel.dart +++ b/lib/models/SOAP/GetAllergiesResModel.dart @@ -1,31 +1,32 @@ class GetAllergiesResModel { - int allergyDiseaseId; - String allergyDiseaseName; - int allergyDiseaseType; - int appointmentNo; - int createdBy; - String createdByName; - String createdOn; - int episodeID; - bool isChecked; - bool isUpdatedByNurse; - int severity; - String severityName; - String remarks; + int? allergyDiseaseId; + String? allergyDiseaseName; + int? allergyDiseaseType; + int? appointmentNo; + int? createdBy; + String? createdByName; + String? createdOn; + int? episodeID; + bool? isChecked; + bool? isUpdatedByNurse; + int? severity; + String? severityName; + String? remarks; GetAllergiesResModel( {this.allergyDiseaseId, - this.allergyDiseaseName, - this.allergyDiseaseType, - this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.episodeID, - this.isChecked, - this.isUpdatedByNurse, - this.severity, - this.severityName, this.remarks=''}); + this.allergyDiseaseName, + this.allergyDiseaseType, + this.appointmentNo, + this.createdBy, + this.createdByName, + this.createdOn, + this.episodeID, + this.isChecked, + this.isUpdatedByNurse, + this.severity, + this.severityName, + this.remarks = ''}); GetAllergiesResModel.fromJson(Map json) { allergyDiseaseId = json['allergyDiseaseId']; diff --git a/lib/models/SOAP/GetAssessmentReqModel.dart b/lib/models/SOAP/GetAssessmentReqModel.dart index 965382b5..fffe4f92 100644 --- a/lib/models/SOAP/GetAssessmentReqModel.dart +++ b/lib/models/SOAP/GetAssessmentReqModel.dart @@ -1,22 +1,22 @@ class GetAssessmentReqModel { - int patientMRN; - int appointmentNo; - String episodeID; - String from; - String to; - int clinicID; + int? patientMRN; + int? appointmentNo; + String? episodeID; + String? from; + String? to; + int? clinicID; dynamic doctorID; dynamic editedBy; GetAssessmentReqModel( {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.from, - this.to, - this.clinicID, - this.editedBy, - this.doctorID}); + this.appointmentNo, + this.episodeID, + this.from, + this.to, + this.clinicID, + this.editedBy, + this.doctorID}); GetAssessmentReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/SOAP/GetAssessmentResModel.dart b/lib/models/SOAP/GetAssessmentResModel.dart index 4d1b1b68..fb92f994 100644 --- a/lib/models/SOAP/GetAssessmentResModel.dart +++ b/lib/models/SOAP/GetAssessmentResModel.dart @@ -1,36 +1,36 @@ class GetAssessmentResModel { - int appointmentNo; - String asciiDesc; - String clinicDescription; - int clinicID; - bool complexDiagnosis; - int conditionID; - int createdBy; - String createdOn; - int diagnosisTypeID; - int doctorID; - String doctorName; - int episodeId; - String icdCode10ID; - int patientMRN; - String remarks; + int? appointmentNo; + String? asciiDesc; + String? clinicDescription; + int? clinicID; + bool? complexDiagnosis; + int? conditionID; + int? createdBy; + String? createdOn; + int? diagnosisTypeID; + int? doctorID; + String? doctorName; + int? episodeId; + String? icdCode10ID; + int? patientMRN; + String? remarks; GetAssessmentResModel( {this.appointmentNo, - this.asciiDesc, - this.clinicDescription, - this.clinicID, - this.complexDiagnosis, - this.conditionID, - this.createdBy, - this.createdOn, - this.diagnosisTypeID, - this.doctorID, - this.doctorName, - this.episodeId, - this.icdCode10ID, - this.patientMRN, - this.remarks}); + this.asciiDesc, + this.clinicDescription, + this.clinicID, + this.complexDiagnosis, + this.conditionID, + this.createdBy, + this.createdOn, + this.diagnosisTypeID, + this.doctorID, + this.doctorName, + this.episodeId, + this.icdCode10ID, + this.patientMRN, + this.remarks}); GetAssessmentResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetGetProgressNoteReqModel.dart b/lib/models/SOAP/GetGetProgressNoteReqModel.dart index 1da4a8bf..0a36bb94 100644 --- a/lib/models/SOAP/GetGetProgressNoteReqModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteReqModel.dart @@ -1,22 +1,22 @@ class GetGetProgressNoteReqModel { - int patientMRN; - int appointmentNo; - String episodeID; - String from; - String to; - int clinicID; + int? patientMRN; + int? appointmentNo; + String? episodeID; + String? from; + String? to; + int? clinicID; dynamic doctorID; dynamic editedBy; GetGetProgressNoteReqModel( {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.from, - this.to, - this.clinicID, - this.editedBy, - this.doctorID}); + this.appointmentNo, + this.episodeID, + this.from, + this.to, + this.clinicID, + this.editedBy, + this.doctorID}); GetGetProgressNoteReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; @@ -27,7 +27,6 @@ class GetGetProgressNoteReqModel { clinicID = json['ClinicID']; doctorID = json['DoctorID']; editedBy = json['EditedBy']; - } Map toJson() { diff --git a/lib/models/SOAP/GetGetProgressNoteResModel.dart b/lib/models/SOAP/GetGetProgressNoteResModel.dart index 4ae7ed8c..e5923ac8 100644 --- a/lib/models/SOAP/GetGetProgressNoteResModel.dart +++ b/lib/models/SOAP/GetGetProgressNoteResModel.dart @@ -1,28 +1,28 @@ -class GetPatientProgressNoteResModel { - int appointmentNo; - int createdBy; - String createdByName; - String createdOn; - String dName; - String editedByName; - String editedOn; - int episodeId; - String mName; - int patientMRN; - String planNote; +class GetPatientProgressNoteResModel { + int? appointmentNo; + int? createdBy; + String? createdByName; + String? createdOn; + String? dName; + String? editedByName; + String? editedOn; + int? episodeId; + String? mName; + int? patientMRN; + String? planNote; GetPatientProgressNoteResModel( {this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.dName, - this.editedByName, - this.editedOn, - this.episodeId, - this.mName, - this.patientMRN, - this.planNote}); + this.createdBy, + this.createdByName, + this.createdOn, + this.dName, + this.editedByName, + this.editedOn, + this.episodeId, + this.mName, + this.patientMRN, + this.planNote}); GetPatientProgressNoteResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetHistoryReqModel.dart b/lib/models/SOAP/GetHistoryReqModel.dart index 720b6342..b4a5f404 100644 --- a/lib/models/SOAP/GetHistoryReqModel.dart +++ b/lib/models/SOAP/GetHistoryReqModel.dart @@ -1,11 +1,11 @@ class GetHistoryReqModel { - int patientMRN; - int historyType; - String episodeID; - String from; - String to; - int clinicID; - int appointmentNo; + int? patientMRN; + int? historyType; + String? episodeID; + String? from; + String? to; + int? clinicID; + int? appointmentNo; dynamic editedBy; dynamic doctorID; @@ -30,7 +30,6 @@ class GetHistoryReqModel { doctorID = json['DoctorID']; appointmentNo = json['AppointmentNo']; editedBy = json['EditedBy']; - } Map toJson() { diff --git a/lib/models/SOAP/GetHistoryResModel.dart b/lib/models/SOAP/GetHistoryResModel.dart index c4b4f129..9773aea8 100644 --- a/lib/models/SOAP/GetHistoryResModel.dart +++ b/lib/models/SOAP/GetHistoryResModel.dart @@ -1,20 +1,20 @@ class GetHistoryResModel { - int appointmentNo; - int episodeId; - int historyId; - int historyType; - bool isChecked; - int patientMRN; - String remarks; + int? appointmentNo; + int? episodeId; + int? historyId; + int? historyType; + bool? isChecked; + int? patientMRN; + String? remarks; GetHistoryResModel( {this.appointmentNo, - this.episodeId, - this.historyId, - this.historyType, - this.isChecked, - this.patientMRN, - this.remarks}); + this.episodeId, + this.historyId, + this.historyType, + this.isChecked, + this.patientMRN, + this.remarks}); GetHistoryResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetPhysicalExamListResModel.dart b/lib/models/SOAP/GetPhysicalExamListResModel.dart index c97189b1..952e3a5c 100644 --- a/lib/models/SOAP/GetPhysicalExamListResModel.dart +++ b/lib/models/SOAP/GetPhysicalExamListResModel.dart @@ -1,44 +1,44 @@ class GetPhysicalExamResModel { - int appointmentNo; - int createdBy; - String createdByName; - String createdOn; - Null editedBy; - String editedByName; - String editedOn; - int episodeId; - int examId; - String examName; - int examType; - int examinationType; - String examinationTypeName; - bool isAbnormal; - bool isNew; - bool isNormal; - bool notExamined; - int patientMRN; - String remarks; + int? appointmentNo; + int? createdBy; + String? createdByName; + String? createdOn; + dynamic editedBy; + String? editedByName; + String? editedOn; + int? episodeId; + int? examId; + String? examName; + int? examType; + int? examinationType; + String? examinationTypeName; + bool? isAbnormal; + bool? isNew; + bool? isNormal; + bool? notExamined; + int? patientMRN; + String? remarks; GetPhysicalExamResModel( {this.appointmentNo, - this.createdBy, - this.createdByName, - this.createdOn, - this.editedBy, - this.editedByName, - this.editedOn, - this.episodeId, - this.examId, - this.examName, - this.examType, - this.examinationType, - this.examinationTypeName, - this.isAbnormal, - this.isNew, - this.isNormal, - this.notExamined, - this.patientMRN, - this.remarks}); + this.createdBy, + this.createdByName, + this.createdOn, + this.editedBy, + this.editedByName, + this.editedOn, + this.episodeId, + this.examId, + this.examName, + this.examType, + this.examinationType, + this.examinationTypeName, + this.isAbnormal, + this.isNew, + this.isNormal, + this.notExamined, + this.patientMRN, + this.remarks}); GetPhysicalExamResModel.fromJson(Map json) { appointmentNo = json['appointmentNo']; diff --git a/lib/models/SOAP/GetPhysicalExamReqModel.dart b/lib/models/SOAP/GetPhysicalExamReqModel.dart index 5145c419..57d14a3f 100644 --- a/lib/models/SOAP/GetPhysicalExamReqModel.dart +++ b/lib/models/SOAP/GetPhysicalExamReqModel.dart @@ -1,9 +1,9 @@ class GetPhysicalExamReqModel { - int patientMRN; - int appointmentNo; - String episodeID; - String from; - String to; + int? patientMRN; + int? appointmentNo; + String? episodeID; + String? from; + String? to; dynamic editedBy; dynamic doctorID; diff --git a/lib/models/SOAP/PatchAssessmentReqModel.dart b/lib/models/SOAP/PatchAssessmentReqModel.dart index 8cbf5cb7..c52a6a51 100644 --- a/lib/models/SOAP/PatchAssessmentReqModel.dart +++ b/lib/models/SOAP/PatchAssessmentReqModel.dart @@ -1,24 +1,24 @@ class PatchAssessmentReqModel { - int patientMRN; - int appointmentNo; - int episodeID; - String icdcode10Id; - String prevIcdCode10ID; - int conditionId; - int diagnosisTypeId; - bool complexDiagnosis; - String remarks; + int? patientMRN; + int? appointmentNo; + int? episodeID; + String? icdcode10Id; + String? prevIcdCode10ID; + int? conditionId; + int? diagnosisTypeId; + bool? complexDiagnosis; + String? remarks; PatchAssessmentReqModel( {this.patientMRN, - this.appointmentNo, - this.episodeID, - this.icdcode10Id, - this.prevIcdCode10ID, - this.conditionId, - this.diagnosisTypeId, - this.complexDiagnosis, - this.remarks}); + this.appointmentNo, + this.episodeID, + this.icdcode10Id, + this.prevIcdCode10ID, + this.conditionId, + this.diagnosisTypeId, + this.complexDiagnosis, + this.remarks}); PatchAssessmentReqModel.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/SOAP/PostEpisodeReqModel.dart b/lib/models/SOAP/PostEpisodeReqModel.dart index 6d3ee45a..75402036 100644 --- a/lib/models/SOAP/PostEpisodeReqModel.dart +++ b/lib/models/SOAP/PostEpisodeReqModel.dart @@ -1,14 +1,10 @@ class PostEpisodeReqModel { - int appointmentNo; - int patientMRN; - int doctorID; - String vidaAuthTokenID; + int? appointmentNo; + int? patientMRN; + int? doctorID; + String? vidaAuthTokenID; - PostEpisodeReqModel( - {this.appointmentNo, - this.patientMRN, - this.doctorID, - this.vidaAuthTokenID}); + PostEpisodeReqModel({this.appointmentNo, this.patientMRN, this.doctorID, this.vidaAuthTokenID}); PostEpisodeReqModel.fromJson(Map json) { appointmentNo = json['AppointmentNo']; diff --git a/lib/models/SOAP/get_Allergies_request_model.dart b/lib/models/SOAP/get_Allergies_request_model.dart index 7676d530..25177e3e 100644 --- a/lib/models/SOAP/get_Allergies_request_model.dart +++ b/lib/models/SOAP/get_Allergies_request_model.dart @@ -1,16 +1,11 @@ class GetAllergiesRequestModel { - String vidaAuthTokenID; - int patientMRN; - int appointmentNo; - int episodeId; - String doctorID; + String? vidaAuthTokenID; + int? patientMRN; + int? appointmentNo; + int? episodeId; + String? doctorID; - GetAllergiesRequestModel( - {this.vidaAuthTokenID, - this.patientMRN, - this.appointmentNo, - this.episodeId, - this.doctorID}); + GetAllergiesRequestModel({this.vidaAuthTokenID, this.patientMRN, this.appointmentNo, this.episodeId, this.doctorID}); GetAllergiesRequestModel.fromJson(Map json) { vidaAuthTokenID = json['VidaAuthTokenID']; diff --git a/lib/models/SOAP/master_key_model.dart b/lib/models/SOAP/master_key_model.dart index a1c32039..0f1a4c5a 100644 --- a/lib/models/SOAP/master_key_model.dart +++ b/lib/models/SOAP/master_key_model.dart @@ -1,6 +1,6 @@ class MasterKeyModel { - String alias; - String aliasN; + String? alias; + String? aliasN; dynamic code; dynamic description; dynamic detail1; @@ -8,31 +8,31 @@ class MasterKeyModel { dynamic detail3; dynamic detail4; dynamic detail5; - int groupID; - int id; - String nameAr; - String nameEn; + int? groupID; + int? id; + String? nameAr; + String? nameEn; dynamic remarks; - int typeId; - String valueList; + int? typeId; + String? valueList; MasterKeyModel( {this.alias, - this.aliasN, - this.code, - this.description, - this.detail1, - this.detail2, - this.detail3, - this.detail4, - this.detail5, - this.groupID, - this.id, - this.nameAr, - this.nameEn, - this.remarks, - this.typeId, - this.valueList}); + this.aliasN, + this.code, + this.description, + this.detail1, + this.detail2, + this.detail3, + this.detail4, + this.detail5, + this.groupID, + this.id, + this.nameAr, + this.nameEn, + this.remarks, + this.typeId, + this.valueList}); MasterKeyModel.fromJson(Map json) { alias = json['alias']; diff --git a/lib/models/SOAP/my_selected_allergy.dart b/lib/models/SOAP/my_selected_allergy.dart index c4e52af7..0347a5ba 100644 --- a/lib/models/SOAP/my_selected_allergy.dart +++ b/lib/models/SOAP/my_selected_allergy.dart @@ -1,28 +1,25 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class MySelectedAllergy { - MasterKeyModel selectedAllergySeverity; - MasterKeyModel selectedAllergy; - String remark; - bool isChecked; - bool isExpanded; - int createdBy; + MasterKeyModel? selectedAllergySeverity; + MasterKeyModel? selectedAllergy; + String? remark; + bool? isChecked; + bool? isExpanded; + int? createdBy; MySelectedAllergy( {this.selectedAllergySeverity, this.selectedAllergy, this.remark, this.isChecked, - this.isExpanded = true, + this.isExpanded = true, this.createdBy}); MySelectedAllergy.fromJson(Map json) { - selectedAllergySeverity = json['selectedAllergySeverity'] != null - ? new MasterKeyModel.fromJson(json['selectedAllergySeverity']) - : null; - selectedAllergy = json['selectedAllergy'] != null - ? new MasterKeyModel.fromJson(json['selectedAllergy']) - : null; + selectedAllergySeverity = + json['selectedAllergySeverity'] != null ? new MasterKeyModel.fromJson(json['selectedAllergySeverity']) : null; + selectedAllergy = json['selectedAllergy'] != null ? new MasterKeyModel.fromJson(json['selectedAllergy']) : null; remark = json['remark']; isChecked = json['isChecked']; isExpanded = json['isExpanded']; @@ -32,10 +29,10 @@ class MySelectedAllergy { Map toJson() { final Map data = new Map(); if (this.selectedAllergySeverity != null) { - data['selectedAllergySeverity'] = this.selectedAllergySeverity.toJson(); + data['selectedAllergySeverity'] = this.selectedAllergySeverity!.toJson(); } if (this.selectedAllergy != null) { - data['selectedAllergy'] = this.selectedAllergy.toJson(); + data['selectedAllergy'] = this.selectedAllergy!.toJson(); } data['remark'] = this.remark; data['isChecked'] = this.isChecked; diff --git a/lib/models/SOAP/my_selected_assement.dart b/lib/models/SOAP/my_selected_assement.dart index 4d4afc2d..f683f8b7 100644 --- a/lib/models/SOAP/my_selected_assement.dart +++ b/lib/models/SOAP/my_selected_assement.dart @@ -1,37 +1,36 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class MySelectedAssessment { - MasterKeyModel selectedICD; - MasterKeyModel selectedDiagnosisCondition; - MasterKeyModel selectedDiagnosisType; - String remark; - int appointmentId; - int createdBy; - String createdOn; - int doctorID; - String doctorName; - String icdCode10ID; + MasterKeyModel? selectedICD; + MasterKeyModel? selectedDiagnosisCondition; + MasterKeyModel? selectedDiagnosisType; + String? remark; + int? appointmentId; + int? createdBy; + String? createdOn; + int? doctorID; + String? doctorName; + String? icdCode10ID; 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}); MySelectedAssessment.fromJson(Map json) { - selectedICD = json['selectedICD'] != null - ? new MasterKeyModel.fromJson(json['selectedICD']) - : null; + selectedICD = json['selectedICD'] != null ? new MasterKeyModel.fromJson(json['selectedICD']) : null; selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null ? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition']) : null; - selectedDiagnosisType = json['selectedDiagnosisType'] != null - ? new MasterKeyModel.fromJson(json['selectedDiagnosisType']) - : null; + selectedDiagnosisType = + json['selectedDiagnosisType'] != null ? new MasterKeyModel.fromJson(json['selectedDiagnosisType']) : null; remark = json['remark']; appointmentId = json['appointmentId']; createdBy = json['createdBy']; @@ -45,13 +44,13 @@ class MySelectedAssessment { final Map data = new Map(); if (this.selectedICD != null) { - data['selectedICD'] = this.selectedICD.toJson(); + data['selectedICD'] = this.selectedICD!.toJson(); } if (this.selectedDiagnosisCondition != null) { - data['selectedICD'] = this.selectedDiagnosisCondition.toJson(); + data['selectedICD'] = this.selectedDiagnosisCondition!.toJson(); } if (this.selectedDiagnosisType != null) { - data['selectedICD'] = this.selectedDiagnosisType.toJson(); + data['selectedICD'] = this.selectedDiagnosisType!.toJson(); } data['remark'] = this.remark; data['appointmentId'] = this.appointmentId; diff --git a/lib/models/SOAP/my_selected_examination.dart b/lib/models/SOAP/my_selected_examination.dart index 393af944..fc147415 100644 --- a/lib/models/SOAP/my_selected_examination.dart +++ b/lib/models/SOAP/my_selected_examination.dart @@ -1,13 +1,13 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class MySelectedExamination { - MasterKeyModel selectedExamination; - String remark; - bool isNormal; - bool isAbnormal; - bool notExamined; - bool isNew; - int createdBy; + MasterKeyModel? selectedExamination; + String? remark; + bool? isNormal; + bool? isAbnormal; + bool? notExamined; + bool? isNew; + int? createdBy; MySelectedExamination( {this.selectedExamination, @@ -19,9 +19,8 @@ class MySelectedExamination { this.createdBy}); MySelectedExamination.fromJson(Map json) { - selectedExamination = json['selectedExamination'] != null - ? new MasterKeyModel.fromJson(json['selectedExamination']) - : null; + selectedExamination = + json['selectedExamination'] != null ? new MasterKeyModel.fromJson(json['selectedExamination']) : null; remark = json['remark']; isNormal = json['isNormal']; isAbnormal = json['isAbnormal']; @@ -34,7 +33,7 @@ class MySelectedExamination { final Map data = new Map(); if (this.selectedExamination != null) { - data['selectedExamination'] = this.selectedExamination.toJson(); + data['selectedExamination'] = this.selectedExamination!.toJson(); } data['remark'] = this.remark; data['isNormal'] = this.isNormal; diff --git a/lib/models/SOAP/my_selected_history.dart b/lib/models/SOAP/my_selected_history.dart index 11e366c2..59ae412a 100644 --- a/lib/models/SOAP/my_selected_history.dart +++ b/lib/models/SOAP/my_selected_history.dart @@ -1,18 +1,14 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; class MySelectedHistory { - MasterKeyModel selectedHistory; - String remark; - bool isChecked; + MasterKeyModel? selectedHistory; + String? remark; + bool? isChecked; - MySelectedHistory( - { this.selectedHistory, this.remark, this.isChecked}); + MySelectedHistory({this.selectedHistory, this.remark, this.isChecked}); MySelectedHistory.fromJson(Map json) { - - selectedHistory = json['selectedHistory'] != null - ? new MasterKeyModel.fromJson(json['selectedHistory']) - : null; + selectedHistory = json['selectedHistory'] != null ? new MasterKeyModel.fromJson(json['selectedHistory']) : null; remark = json['remark']; remark = json['isChecked']; } @@ -21,7 +17,7 @@ class MySelectedHistory { final Map data = new Map(); if (this.selectedHistory != null) { - data['selectedHistory'] = this.selectedHistory.toJson(); + data['selectedHistory'] = this.selectedHistory!.toJson(); } data['remark'] = this.remark; data['isChecked'] = this.remark; diff --git a/lib/models/SOAP/order-procedure.dart b/lib/models/SOAP/order-procedure.dart index 4e134a07..24865e44 100644 --- a/lib/models/SOAP/order-procedure.dart +++ b/lib/models/SOAP/order-procedure.dart @@ -1,55 +1,54 @@ class OrderProcedure { - - String achiCode; - String appointmentDate; - int appointmentNo; - int categoryID; - String clinicDescription; - String cptCode; - int createdBy; - String createdOn; - String doctorName; - bool isApprovalCreated; - bool isApprovalRequired; - bool isCovered; - bool isInvoiced; - bool isReferralInvoiced; - bool isUncoveredByDoctor; - int lineItemNo; - String orderDate; - int orderNo; - int orderType; - String procedureId; - String procedureName; - String remarks; - String status; - String template; + String? achiCode; + String? appointmentDate; + int? appointmentNo; + int? categoryID; + String? clinicDescription; + String? cptCode; + int? createdBy; + String? createdOn; + String? doctorName; + bool? isApprovalCreated; + bool? isApprovalRequired; + bool? isCovered; + bool? isInvoiced; + bool? isReferralInvoiced; + bool? isUncoveredByDoctor; + int? lineItemNo; + String? orderDate; + int? orderNo; + int? orderType; + String? procedureId; + String? procedureName; + String? remarks; + String? status; + String? template; OrderProcedure( {this.achiCode, - this.appointmentDate, - this.appointmentNo, - this.categoryID, - this.clinicDescription, - this.cptCode, - this.createdBy, - this.createdOn, - this.doctorName, - this.isApprovalCreated, - this.isApprovalRequired, - this.isCovered, - this.isInvoiced, - this.isReferralInvoiced, - this.isUncoveredByDoctor, - this.lineItemNo, - this.orderDate, - this.orderNo, - this.orderType, - this.procedureId, - this.procedureName, - this.remarks, - this.status, - this.template}); + this.appointmentDate, + this.appointmentNo, + this.categoryID, + this.clinicDescription, + this.cptCode, + this.createdBy, + this.createdOn, + this.doctorName, + this.isApprovalCreated, + this.isApprovalRequired, + this.isCovered, + this.isInvoiced, + this.isReferralInvoiced, + this.isUncoveredByDoctor, + this.lineItemNo, + this.orderDate, + this.orderNo, + this.orderType, + this.procedureId, + this.procedureName, + this.remarks, + this.status, + this.template}); OrderProcedure.fromJson(Map json) { achiCode = json['achiCode']; @@ -106,5 +105,4 @@ class OrderProcedure { data['template'] = this.template; return data; } - -} \ No newline at end of file +} diff --git a/lib/models/SOAP/post_allergy_request_model.dart b/lib/models/SOAP/post_allergy_request_model.dart index 6783d885..9488a965 100644 --- a/lib/models/SOAP/post_allergy_request_model.dart +++ b/lib/models/SOAP/post_allergy_request_model.dart @@ -1,16 +1,13 @@ class PostAllergyRequestModel { - List - listHisProgNotePatientAllergyDiseaseVM; + List? listHisProgNotePatientAllergyDiseaseVM; PostAllergyRequestModel({this.listHisProgNotePatientAllergyDiseaseVM}); PostAllergyRequestModel.fromJson(Map json) { if (json['listHisProgNotePatientAllergyDiseaseVM'] != null) { - listHisProgNotePatientAllergyDiseaseVM = - new List(); + listHisProgNotePatientAllergyDiseaseVM = []; json['listHisProgNotePatientAllergyDiseaseVM'].forEach((v) { - listHisProgNotePatientAllergyDiseaseVM - .add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v)); + listHisProgNotePatientAllergyDiseaseVM!.add(new ListHisProgNotePatientAllergyDiseaseVM.fromJson(v)); }); } } @@ -18,44 +15,42 @@ class PostAllergyRequestModel { Map toJson() { final Map data = new Map(); if (this.listHisProgNotePatientAllergyDiseaseVM != null) { - data['listHisProgNotePatientAllergyDiseaseVM'] = this - .listHisProgNotePatientAllergyDiseaseVM - .map((v) => v.toJson()) - .toList(); + data['listHisProgNotePatientAllergyDiseaseVM'] = + this.listHisProgNotePatientAllergyDiseaseVM!.map((v) => v.toJson()).toList(); } return data; } } class ListHisProgNotePatientAllergyDiseaseVM { - int patientMRN; - int allergyDiseaseType; - int allergyDiseaseId; - int episodeId; - int appointmentNo; - int severity; - bool isChecked; - bool isUpdatedByNurse; - String remarks; - int createdBy; - String createdOn; - int editedBy; - String editedOn; + int? patientMRN; + int? allergyDiseaseType; + int? allergyDiseaseId; + int? episodeId; + int? appointmentNo; + int? severity; + bool? isChecked; + bool? isUpdatedByNurse; + String? remarks; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; ListHisProgNotePatientAllergyDiseaseVM( {this.patientMRN, - this.allergyDiseaseType, - this.allergyDiseaseId, - this.episodeId, - this.appointmentNo, - this.severity, - this.isChecked, - this.isUpdatedByNurse, - this.remarks, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn}); + this.allergyDiseaseType, + this.allergyDiseaseId, + this.episodeId, + this.appointmentNo, + this.severity, + this.isChecked, + this.isUpdatedByNurse, + this.remarks, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); ListHisProgNotePatientAllergyDiseaseVM.fromJson(Map json) { patientMRN = json['patientMRN']; diff --git a/lib/models/SOAP/post_assessment_request_model.dart b/lib/models/SOAP/post_assessment_request_model.dart index af577671..3222f248 100644 --- a/lib/models/SOAP/post_assessment_request_model.dart +++ b/lib/models/SOAP/post_assessment_request_model.dart @@ -1,23 +1,19 @@ class PostAssessmentRequestModel { - int patientMRN; - int appointmentNo; - int episodeId; - List icdCodeDetails; + int? patientMRN; + int? appointmentNo; + int? episodeId; + List? icdCodeDetails; - PostAssessmentRequestModel( - {this.patientMRN, - this.appointmentNo, - this.episodeId, - this.icdCodeDetails}); + PostAssessmentRequestModel({this.patientMRN, this.appointmentNo, this.episodeId, this.icdCodeDetails}); PostAssessmentRequestModel.fromJson(Map json) { patientMRN = json['PatientMRN']; appointmentNo = json['AppointmentNo']; episodeId = json['EpisodeID']; if (json['icdCodeDetails'] != null) { - icdCodeDetails = new List(); + icdCodeDetails = []; json['icdCodeDetails'].forEach((v) { - icdCodeDetails.add(new IcdCodeDetails.fromJson(v)); + icdCodeDetails!.add(new IcdCodeDetails.fromJson(v)); }); } } @@ -28,26 +24,20 @@ class PostAssessmentRequestModel { data['AppointmentNo'] = this.appointmentNo; data['EpisodeID'] = this.episodeId; if (this.icdCodeDetails != null) { - data['icdCodeDetails'] = - this.icdCodeDetails.map((v) => v.toJson()).toList(); + data['icdCodeDetails'] = this.icdCodeDetails!.map((v) => v.toJson()).toList(); } return data; } } class IcdCodeDetails { - String icdcode10Id; - int conditionId; - int diagnosisTypeId; - bool complexDiagnosis; - String remarks; + String? icdcode10Id; + int? conditionId; + int? diagnosisTypeId; + bool? complexDiagnosis; + String? remarks; - IcdCodeDetails( - {this.icdcode10Id, - this.conditionId, - this.diagnosisTypeId, - this.complexDiagnosis, - this.remarks}); + IcdCodeDetails({this.icdcode10Id, this.conditionId, this.diagnosisTypeId, this.complexDiagnosis, this.remarks}); IcdCodeDetails.fromJson(Map json) { icdcode10Id = json['icdcode10Id']; diff --git a/lib/models/SOAP/post_chief_complaint_request_model.dart b/lib/models/SOAP/post_chief_complaint_request_model.dart index f1e9c2b4..fa4c1684 100644 --- a/lib/models/SOAP/post_chief_complaint_request_model.dart +++ b/lib/models/SOAP/post_chief_complaint_request_model.dart @@ -1,17 +1,16 @@ class PostChiefComplaintRequestModel { - int appointmentNo; - int episodeID; - int patientMRN; - String chiefComplaint; - String hopi; - String currentMedication; - bool ispregnant; - bool isLactation; - int numberOfWeeks; + int? appointmentNo; + int? episodeID; + int? patientMRN; + String? chiefComplaint; + String? hopi; + String? currentMedication; + bool? ispregnant; + bool? isLactation; + int? numberOfWeeks; dynamic doctorID; dynamic editedBy; - PostChiefComplaintRequestModel( {this.appointmentNo, this.episodeID, diff --git a/lib/models/SOAP/post_histories_request_model.dart b/lib/models/SOAP/post_histories_request_model.dart index d8be3fb2..89b6586d 100644 --- a/lib/models/SOAP/post_histories_request_model.dart +++ b/lib/models/SOAP/post_histories_request_model.dart @@ -1,14 +1,14 @@ class PostHistoriesRequestModel { - List listMedicalHistoryVM; + List? listMedicalHistoryVM; dynamic doctorID; PostHistoriesRequestModel({this.listMedicalHistoryVM, this.doctorID}); PostHistoriesRequestModel.fromJson(Map json) { if (json['listMedicalHistoryVM'] != null) { - listMedicalHistoryVM = new List(); + listMedicalHistoryVM = []; json['listMedicalHistoryVM'].forEach((v) { - listMedicalHistoryVM.add(new ListMedicalHistoryVM.fromJson(v)); + listMedicalHistoryVM!.add(new ListMedicalHistoryVM.fromJson(v)); }); } doctorID = json['DoctorID']; @@ -17,8 +17,7 @@ class PostHistoriesRequestModel { Map toJson() { final Map data = new Map(); if (this.listMedicalHistoryVM != null) { - data['listMedicalHistoryVM'] = - this.listMedicalHistoryVM.map((v) => v.toJson()).toList(); + data['listMedicalHistoryVM'] = this.listMedicalHistoryVM!.map((v) => v.toJson()).toList(); } data['DoctorID'] = this.doctorID; return data; @@ -26,22 +25,22 @@ class PostHistoriesRequestModel { } class ListMedicalHistoryVM { - int patientMRN; - int historyType; - int historyId; - int episodeId; - int appointmentNo; - bool isChecked; - String remarks; + int? patientMRN; + int? historyType; + int? historyId; + int? episodeId; + int? appointmentNo; + bool? isChecked; + String? remarks; ListMedicalHistoryVM( {this.patientMRN, - this.historyType, - this.historyId, - this.episodeId, - this.appointmentNo, - this.isChecked, - this.remarks}); + this.historyType, + this.historyId, + this.episodeId, + this.appointmentNo, + this.isChecked, + this.remarks}); ListMedicalHistoryVM.fromJson(Map json) { patientMRN = json['patientMRN']; diff --git a/lib/models/SOAP/post_physical_exam_request_model.dart b/lib/models/SOAP/post_physical_exam_request_model.dart index 52836232..d1b44e04 100644 --- a/lib/models/SOAP/post_physical_exam_request_model.dart +++ b/lib/models/SOAP/post_physical_exam_request_model.dart @@ -1,15 +1,13 @@ - class PostPhysicalExamRequestModel { - List listHisProgNotePhysicalExaminationVM; + List? listHisProgNotePhysicalExaminationVM; PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM}); PostPhysicalExamRequestModel.fromJson(Map json) { if (json['listHisProgNotePhysicalExaminationVM'] != null) { - listHisProgNotePhysicalExaminationVM = new List(); + listHisProgNotePhysicalExaminationVM = []; json['listHisProgNotePhysicalExaminationVM'].forEach((v) { - listHisProgNotePhysicalExaminationVM - .add(new ListHisProgNotePhysicalExaminationVM.fromJson(v)); + listHisProgNotePhysicalExaminationVM!.add(new ListHisProgNotePhysicalExaminationVM.fromJson(v)); }); } } @@ -18,97 +16,97 @@ class PostPhysicalExamRequestModel { final Map data = new Map(); if (this.listHisProgNotePhysicalExaminationVM != null) { data['listHisProgNotePhysicalExaminationVM'] = - this.listHisProgNotePhysicalExaminationVM.map((v) => v.toJson()).toList(); + this.listHisProgNotePhysicalExaminationVM!.map((v) => v.toJson()).toList(); } return data; } } - class ListHisProgNotePhysicalExaminationVM { - int episodeId; - int appointmentNo; - int examType; - int examId; - int patientMRN; - bool isNormal; - bool isAbnormal; - bool notExamined; - String examName; - String examinationTypeName; - int examinationType; - String remarks; - bool isNew; - int createdBy; - String createdOn; - String createdByName; - int editedBy; - String editedOn; - String editedByName; +class ListHisProgNotePhysicalExaminationVM { + int? episodeId; + int? appointmentNo; + int? examType; + int? examId; + int? patientMRN; + bool? isNormal; + bool? isAbnormal; + bool? notExamined; + String? examName; + String? examinationTypeName; + int? examinationType; + String? remarks; + bool? isNew; + int? createdBy; + String? createdOn; + String? createdByName; + int? editedBy; + String? editedOn; + String? editedByName; - ListHisProgNotePhysicalExaminationVM( - {this.episodeId, - this.appointmentNo, - this.examType, - this.examId, - this.patientMRN, - this.isNormal, - this.isAbnormal, - this.notExamined, - this.examName, - this.examinationTypeName, - this.examinationType, - this.remarks, - this.isNew, - this.createdBy, - this.createdOn, - this.createdByName, - this.editedBy, - this.editedOn, - this.editedByName}); + ListHisProgNotePhysicalExaminationVM( + {this.episodeId, + this.appointmentNo, + this.examType, + this.examId, + this.patientMRN, + this.isNormal, + this.isAbnormal, + this.notExamined, + this.examName, + this.examinationTypeName, + this.examinationType, + this.remarks, + this.isNew, + this.createdBy, + this.createdOn, + this.createdByName, + this.editedBy, + this.editedOn, + this.editedByName}); - ListHisProgNotePhysicalExaminationVM.fromJson(Map json) { - episodeId = json['episodeId']; - appointmentNo = json['appointmentNo']; - examType = json['examType']; - examId = json['examId']; - patientMRN = json['patientMRN']; - isNormal = json['isNormal']; - isAbnormal = json['isAbnormal']; - notExamined = json['notExamined']; - examName = json['examName']; - examinationTypeName = json['examinationTypeName']; - examinationType = json['examinationType']; - remarks = json['remarks']; - isNew = json['isNew']; - createdBy = json['createdBy']; - createdOn = json['createdOn']; - createdByName = json['createdByName']; - editedBy = json['editedBy']; - editedOn = json['editedOn']; - editedByName = json['editedByName']; - } + ListHisProgNotePhysicalExaminationVM.fromJson(Map json) { + episodeId = json['episodeId']; + appointmentNo = json['appointmentNo']; + examType = json['examType']; + examId = json['examId']; + patientMRN = json['patientMRN']; + isNormal = json['isNormal']; + isAbnormal = json['isAbnormal']; + notExamined = json['notExamined']; + examName = json['examName']; + examinationTypeName = json['examinationTypeName']; + examinationType = json['examinationType']; + remarks = json['remarks']; + isNew = json['isNew']; + createdBy = json['createdBy']; + createdOn = json['createdOn']; + createdByName = json['createdByName']; + editedBy = json['editedBy']; + editedOn = json['editedOn']; + editedByName = json['editedByName']; + } - Map toJson() { - final Map data = new Map(); - data['episodeId'] = this.episodeId; - data['appointmentNo'] = this.appointmentNo; - data['examType'] = this.examType; - data['examId'] = this.examId; - data['patientMRN'] = this.patientMRN; - data['isNormal'] = this.isNormal; - data['isAbnormal'] = this.isAbnormal; - data['notExamined'] = this.notExamined; - data['examName'] = this.examName; - data['examinationTypeName'] = this.examinationTypeName; - data['examinationType'] = this.examinationType; - data['remarks'] = this.remarks; - data['isNew'] = this.isNew; - data['createdBy'] = this.createdBy; - data['createdOn'] = this.createdOn; - data['createdByName'] = this.createdByName; - data['editedBy'] = this.editedBy; - data['editedOn'] = this.editedOn; - data['editedByName'] = this.editedByName; - return data; - } + Map toJson() { + final Map data = new Map(); + data['episodeId'] = this.episodeId; + data['appointmentNo'] = this.appointmentNo; + data['examType'] = this.examType; + data['examId'] = this.examId; + data['patientMRN'] = this.patientMRN; + data['isNormal'] = this.isNormal; + data['isAbnormal'] = this.isAbnormal; + data['notExamined'] = this.notExamined; + data['examName'] = this.examName; + data['examinationTypeName'] = this.examinationTypeName; + data['examinationType'] = this.examinationType; + data['remarks'] = this.remarks; + data['isNew'] = this.isNew; + data['createdBy'] = this.createdBy; + data['createdOn'] = this.createdOn; + data['createdByName'] = this.createdByName; + data['editedBy'] = this.editedBy; + data['editedOn'] = this.editedOn; + data['editedByName'] = this.editedByName; + return data; } +} diff --git a/lib/models/SOAP/post_progress_note_request_model.dart b/lib/models/SOAP/post_progress_note_request_model.dart index 2925819d..da603bee 100644 --- a/lib/models/SOAP/post_progress_note_request_model.dart +++ b/lib/models/SOAP/post_progress_note_request_model.dart @@ -1,18 +1,13 @@ class PostProgressNoteRequestModel { - int appointmentNo; - int episodeId; - int patientMRN; - String planNote; + int? appointmentNo; + int? episodeId; + int? patientMRN; + String? planNote; dynamic doctorID; dynamic editedBy; PostProgressNoteRequestModel( - {this.appointmentNo, - this.episodeId, - this.patientMRN, - this.planNote, - this.doctorID, - this.editedBy}); + {this.appointmentNo, this.episodeId, this.patientMRN, this.planNote, this.doctorID, this.editedBy}); PostProgressNoteRequestModel.fromJson(Map json) { appointmentNo = json['AppointmentNo']; diff --git a/lib/models/dashboard/dashboard_model.dart b/lib/models/dashboard/dashboard_model.dart index 0e03e899..5719b06b 100644 --- a/lib/models/dashboard/dashboard_model.dart +++ b/lib/models/dashboard/dashboard_model.dart @@ -1,7 +1,7 @@ class DashboardModel { - String kPIName; - int displaySequence; - List summaryoptions; + String? kPIName; + int? displaySequence; + List? summaryoptions; DashboardModel({this.kPIName, this.displaySequence, this.summaryoptions}); @@ -9,9 +9,9 @@ class DashboardModel { kPIName = json['KPIName']; displaySequence = json['displaySequence']; if (json['summaryoptions'] != null) { - summaryoptions = new List(); + summaryoptions = []; json['summaryoptions'].forEach((v) { - summaryoptions.add(new Summaryoptions.fromJson(v)); + summaryoptions!.add(new Summaryoptions.fromJson(v)); }); } } @@ -21,21 +21,20 @@ class DashboardModel { data['KPIName'] = this.kPIName; data['displaySequence'] = this.displaySequence; if (this.summaryoptions != null) { - data['summaryoptions'] = - this.summaryoptions.map((v) => v.toJson()).toList(); + data['summaryoptions'] = this.summaryoptions!.map((v) => v.toJson()).toList(); } return data; } } class Summaryoptions { - String kPIParameter; - String captionColor; - bool isCaptionBold; - bool isValueBold; - int order; - int value; - String valueColor; + String? kPIParameter; + String? captionColor; + bool? isCaptionBold; + bool? isValueBold; + int? order; + int? value; + String? valueColor; Summaryoptions( {this.kPIParameter, diff --git a/lib/models/doctor/clinic_model.dart b/lib/models/doctor/clinic_model.dart index e5eb8eee..690837fe 100644 --- a/lib/models/doctor/clinic_model.dart +++ b/lib/models/doctor/clinic_model.dart @@ -6,20 +6,14 @@ *@desc: Clinic Model */ class ClinicModel { - Null setupID; - int projectID; - int doctorID; - int clinicID; - bool isActive; - String clinicName; + dynamic setupID; + int? projectID; + int? doctorID; + int? clinicID; + bool? isActive; + String? clinicName; - ClinicModel( - {this.setupID, - this.projectID, - this.doctorID, - this.clinicID, - this.isActive, - this.clinicName}); + ClinicModel({this.setupID, this.projectID, this.doctorID, this.clinicID, this.isActive, this.clinicName}); ClinicModel.fromJson(Map json) { setupID = json['SetupID']; diff --git a/lib/models/doctor/doctor_profile_model.dart b/lib/models/doctor/doctor_profile_model.dart index 7c7f6e37..f0221c34 100644 --- a/lib/models/doctor/doctor_profile_model.dart +++ b/lib/models/doctor/doctor_profile_model.dart @@ -1,45 +1,45 @@ class DoctorProfileModel { - int doctorID; - String doctorName; - Null doctorNameN; - int clinicID; - String clinicDescription; - Null clinicDescriptionN; - Null licenseExpiry; - int employmentType; + int? doctorID; + String? doctorName; + dynamic doctorNameN; + int? clinicID; + String? clinicDescription; + dynamic clinicDescriptionN; + dynamic licenseExpiry; + int? employmentType; dynamic setupID; - int projectID; - String projectName; - String nationalityID; - String nationalityName; - Null nationalityNameN; - int gender; - String genderDescription; - Null genderDescriptionN; - Null doctorTitle; - Null projectNameN; - bool isAllowWaitList; - String titleDescription; - Null titleDescriptionN; - Null isRegistered; - Null isDoctorDummy; - bool isActive; - Null isDoctorAppointmentDisplayed; - bool doctorClinicActive; - Null isbookingAllowed; - String doctorCases; - Null doctorPicture; - String doctorProfileInfo; - List specialty; - int actualDoctorRate; - String doctorImageURL; - int doctorRate; - String doctorTitleForProfile; - bool isAppointmentAllowed; - String nationalityFlagURL; - int noOfPatientsRate; - String qR; - int serviceID; + int? projectID; + String? projectName; + String? nationalityID; + String? nationalityName; + dynamic nationalityNameN; + int? gender; + String? genderDescription; + dynamic genderDescriptionN; + dynamic doctorTitle; + dynamic projectNameN; + bool? isAllowWaitList; + String? titleDescription; + dynamic titleDescriptionN; + dynamic isRegistered; + dynamic isDoctorDummy; + bool? isActive; + dynamic isDoctorAppointmentDisplayed; + bool? doctorClinicActive; + dynamic isbookingAllowed; + String? doctorCases; + dynamic doctorPicture; + String? doctorProfileInfo; + List? specialty; + int? actualDoctorRate; + String? doctorImageURL; + int? doctorRate; + String? doctorTitleForProfile; + bool? isAppointmentAllowed; + String? nationalityFlagURL; + int? noOfPatientsRate; + String? qR; + int? serviceID; DoctorProfileModel( {this.doctorID, @@ -84,7 +84,7 @@ class DoctorProfileModel { this.qR, this.serviceID}); - DoctorProfileModel.fromJson(Map json) { + DoctorProfileModel.fromJson(Map json) { doctorID = json['DoctorID']; doctorName = json['DoctorName']; doctorNameN = json['DoctorNameN']; @@ -110,26 +110,26 @@ class DoctorProfileModel { isRegistered = json['IsRegistered']; isDoctorDummy = json['IsDoctorDummy']; isActive = json['IsActive']; - isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed']; + isDoctorAppointmentDisplayed = json['IsDoctorAppoint?mentDisplayed']; doctorClinicActive = json['DoctorClinicActive']; isbookingAllowed = json['IsbookingAllowed']; doctorCases = json['DoctorCases']; doctorPicture = json['DoctorPicture']; doctorProfileInfo = json['DoctorProfileInfo']; - specialty = json['Specialty'].cast(); + specialty = json['Specialty'].cast(); actualDoctorRate = json['ActualDoctorRate']; doctorImageURL = json['DoctorImageURL']; doctorRate = json['DoctorRate']; doctorTitleForProfile = json['DoctorTitleForProfile']; - isAppointmentAllowed = json['IsAppointmentAllowed']; + isAppointmentAllowed = json['IsAppoint?mentAllowed']; nationalityFlagURL = json['NationalityFlagURL']; noOfPatientsRate = json['NoOfPatientsRate']; qR = json['QR']; serviceID = json['ServiceID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['DoctorID'] = this.doctorID; data['DoctorName'] = this.doctorName; data['DoctorNameN'] = this.doctorNameN; @@ -155,7 +155,7 @@ class DoctorProfileModel { data['IsRegistered'] = this.isRegistered; data['IsDoctorDummy'] = this.isDoctorDummy; data['IsActive'] = this.isActive; - data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed; + data['IsDoctorAppoint?mentDisplayed'] = this.isDoctorAppointmentDisplayed; data['DoctorClinicActive'] = this.doctorClinicActive; data['IsbookingAllowed'] = this.isbookingAllowed; data['DoctorCases'] = this.doctorCases; @@ -166,7 +166,7 @@ class DoctorProfileModel { data['DoctorImageURL'] = this.doctorImageURL; data['DoctorRate'] = this.doctorRate; data['DoctorTitleForProfile'] = this.doctorTitleForProfile; - data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['IsAppoint?mentAllowed'] = this.isAppointmentAllowed; data['NationalityFlagURL'] = this.nationalityFlagURL; data['NoOfPatientsRate'] = this.noOfPatientsRate; data['QR'] = this.qR; diff --git a/lib/models/doctor/list_doctor_working_hours_table_model.dart b/lib/models/doctor/list_doctor_working_hours_table_model.dart index 4712d285..94e507c8 100644 --- a/lib/models/doctor/list_doctor_working_hours_table_model.dart +++ b/lib/models/doctor/list_doctor_working_hours_table_model.dart @@ -1,12 +1,11 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class ListDoctorWorkingHoursTable { - DateTime date; - String dayName; - String workingHours; - String projectName; - String clinicName; - + DateTime? date; + String? dayName; + String? workingHours; + String? projectName; + String? clinicName; ListDoctorWorkingHoursTable({ this.date, @@ -37,5 +36,5 @@ class ListDoctorWorkingHoursTable { class WorkingHours { String from; String to; - WorkingHours({this.from, this.to}); + WorkingHours({required this.from, required this.to}); } diff --git a/lib/models/doctor/list_gt_my_patients_question_model.dart b/lib/models/doctor/list_gt_my_patients_question_model.dart index 35d09812..a5b881f1 100644 --- a/lib/models/doctor/list_gt_my_patients_question_model.dart +++ b/lib/models/doctor/list_gt_my_patients_question_model.dart @@ -1,68 +1,64 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; - - - - class ListGtMyPatientsQuestions { - String setupID; - int projectID; - int transactionNo; - int patientType; - int patientID; - int doctorID; - int requestType; - DateTime requestDate; - String requestTime; - String remarks; - int status; - int createdBy; - String createdOn; - int editedBy; - String editedOn; - String patientName; - Null patientNameN; - int gender; - String dateofBirth; - String mobileNumber; - String emailAddress; - int admissionNo; - int referringDoctor; - int lineItemNo; - String age; - String genderDescription; - bool isVidaCall; + String? setupID; + int? projectID; + int? transactionNo; + int? patientType; + int? patientID; + int? doctorID; + int? requestType; + DateTime? requestDate; + String? requestTime; + String? remarks; + int? status; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + String? patientName; + dynamic patientNameN; + int? gender; + String? dateofBirth; + String? mobileNumber; + String? emailAddress; + int? admissionNo; + int? referringDoctor; + int? lineItemNo; + String? age; + String? genderDescription; + bool? isVidaCall; ListGtMyPatientsQuestions( {this.setupID, - this.projectID, - this.transactionNo, - this.patientType, - this.patientID, - this.doctorID, - this.requestType, - this.requestDate, - this.requestTime, - this.remarks, - this.status, - this.createdBy, - this.createdOn, - this.editedBy, - this.editedOn, - this.patientName, - this.patientNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.admissionNo, - this.referringDoctor, - this.lineItemNo, - this.age, - this.genderDescription, - this.isVidaCall}); + this.projectID, + this.transactionNo, + this.patientType, + this.patientID, + this.doctorID, + this.requestType, + this.requestDate, + this.requestTime, + this.remarks, + this.status, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.patientName, + this.patientNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.admissionNo, + this.referringDoctor, + this.lineItemNo, + this.age, + this.genderDescription, + this.isVidaCall}); - ListGtMyPatientsQuestions.fromJson(Map json) { + ListGtMyPatientsQuestions.fromJson(Map json) { setupID = json['SetupID']; projectID = json['ProjectID']; transactionNo = json['TransactionNo']; @@ -70,7 +66,7 @@ class ListGtMyPatientsQuestions { patientID = json['PatientID']; doctorID = json['DoctorID']; requestType = json['RequestType']; - requestDate = AppDateUtils.convertStringToDate(json['RequestDate']) ; + requestDate = AppDateUtils.convertStringToDate(json['RequestDate']); requestTime = json['RequestTime']; remarks = json['Remarks']; status = json['Status']; @@ -92,8 +88,8 @@ class ListGtMyPatientsQuestions { isVidaCall = json['IsVidaCall']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['TransactionNo'] = this.transactionNo; @@ -124,4 +120,3 @@ class ListGtMyPatientsQuestions { return data; } } - diff --git a/lib/models/doctor/profile_req_Model.dart b/lib/models/doctor/profile_req_Model.dart index 8f2ef985..56d937da 100644 --- a/lib/models/doctor/profile_req_Model.dart +++ b/lib/models/doctor/profile_req_Model.dart @@ -6,32 +6,32 @@ *@desc: ProfileReqModel */ class ProfileReqModel { - int projectID; - int clinicID; - int doctorID; - bool isRegistered; - bool license; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; + int? projectID; + int? clinicID; + int? doctorID; + bool? isRegistered; + bool? license; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; ProfileReqModel( {this.projectID, this.clinicID, this.doctorID, - this.isRegistered =true, + this.isRegistered = true, this.license, this.languageID, this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress='11.11.11.11', - this.versionID=5.5, - this.channel=9, - this.sessionID='E2bsEeYEJo', + this.iPAdress = '11.11.11.11', + this.versionID = 5.5, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', this.tokenID, this.isLoginForDoctorApp = true}); diff --git a/lib/models/doctor/request_add_referred_doctor_remarks.dart b/lib/models/doctor/request_add_referred_doctor_remarks.dart index b396c47f..e4d3ecdb 100644 --- a/lib/models/doctor/request_add_referred_doctor_remarks.dart +++ b/lib/models/doctor/request_add_referred_doctor_remarks.dart @@ -1,41 +1,40 @@ import 'package:doctor_app_flutter/config/config.dart'; class RequestAddReferredDoctorRemarks { - int projectID; - String admissionNo; - int lineItemNo; - String referredDoctorRemarks; - int editedBy; - int patientID; - int referringDoctor; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - + int? projectID; + String? admissionNo; + int? lineItemNo; + String? referredDoctorRemarks; + int? editedBy; + int? patientID; + int? referringDoctor; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; RequestAddReferredDoctorRemarks( {this.projectID, - this.admissionNo, - this.lineItemNo, - this.referredDoctorRemarks, - this.editedBy, - this.patientID, - this.referringDoctor, - this.languageID = LANGUAGE_ID, - this.stamp = STAMP, - this.iPAdress = IP_ADDRESS, - this.versionID = VERSION_ID, - this.channel= CHANNEL, - this.tokenID, - this.sessionID = SESSION_ID, - this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, - this.patientOutSA = PATIENT_OUT_SA}); + this.admissionNo, + this.lineItemNo, + this.referredDoctorRemarks, + this.editedBy, + this.patientID, + this.referringDoctor, + this.languageID = LANGUAGE_ID, + this.stamp = STAMP, + this.iPAdress = IP_ADDRESS, + this.versionID = VERSION_ID, + this.channel = CHANNEL, + this.tokenID, + this.sessionID = SESSION_ID, + this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, + this.patientOutSA = PATIENT_OUT_SA}); RequestAddReferredDoctorRemarks.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/doctor/request_doctor_reply.dart b/lib/models/doctor/request_doctor_reply.dart index 707336d6..3720d647 100644 --- a/lib/models/doctor/request_doctor_reply.dart +++ b/lib/models/doctor/request_doctor_reply.dart @@ -1,34 +1,34 @@ import 'package:doctor_app_flutter/config/config.dart'; class RequestDoctorReply { - int projectID; - int doctorID; - int transactionNo; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? projectID; + int? doctorID; + int? transactionNo; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; RequestDoctorReply( - {this.projectID , - this.doctorID , - this.transactionNo = TRANSACTION_NO , - this.languageID , - this.stamp , + {this.projectID, + this.doctorID, + this.transactionNo = TRANSACTION_NO, + this.languageID, + this.stamp, this.iPAdress, - this.versionID , + this.versionID, this.channel, - this.tokenID , + this.tokenID, this.sessionID, - this.isLoginForDoctorApp , - this.patientOutSA }); + this.isLoginForDoctorApp, + this.patientOutSA}); - RequestDoctorReply.fromJson(Map json) { + RequestDoctorReply.fromJson(Map json) { projectID = json['ProjectID']; doctorID = json['DoctorID']; transactionNo = json['TransactionNo']; diff --git a/lib/models/doctor/request_schedule.dart b/lib/models/doctor/request_schedule.dart index 03bafeca..55e70a9a 100644 --- a/lib/models/doctor/request_schedule.dart +++ b/lib/models/doctor/request_schedule.dart @@ -1,20 +1,18 @@ - - class RequestSchedule { - int projectID; - int clinicID; - int doctorID; - int doctorWorkingHoursDays; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + int? projectID; + int? clinicID; + int? doctorID; + int? doctorWorkingHoursDays; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; RequestSchedule( {this.projectID, diff --git a/lib/models/doctor/statstics_for_certain_doctor_request.dart b/lib/models/doctor/statstics_for_certain_doctor_request.dart index 08fa03f3..8b810fe0 100644 --- a/lib/models/doctor/statstics_for_certain_doctor_request.dart +++ b/lib/models/doctor/statstics_for_certain_doctor_request.dart @@ -1,18 +1,13 @@ class StatsticsForCertainDoctorRequest { - bool outSA; - int doctorID; - String tokenID; - int channel; - int projectID; - String generalid; + bool? outSA; + int? doctorID; + String? tokenID; + int? channel; + int? projectID; + String? generalid; StatsticsForCertainDoctorRequest( - {this.outSA, - this.doctorID, - this.tokenID, - this.channel, - this.projectID, - this.generalid}); + {this.outSA, this.doctorID, this.tokenID, this.channel, this.projectID, this.generalid}); StatsticsForCertainDoctorRequest.fromJson(Map json) { outSA = json['OutSA']; diff --git a/lib/models/doctor/user_model.dart b/lib/models/doctor/user_model.dart index 95035f8d..2500bfd7 100644 --- a/lib/models/doctor/user_model.dart +++ b/lib/models/doctor/user_model.dart @@ -1,16 +1,16 @@ class UserModel { - String userID; - String password; - int projectID; - int languageID; - String iPAdress; - double versionID; - int channel; - String sessionID; - String tokenID; - String stamp; - bool isLoginForDoctorApp; - int patientOutSA; + String? userID; + String? password; + int? projectID; + int? languageID; + String? iPAdress; + double? versionID; + int? channel; + String? sessionID; + String? tokenID; + String? stamp; + bool? isLoginForDoctorApp; + int? patientOutSA; UserModel( {this.userID, @@ -26,7 +26,7 @@ class UserModel { this.isLoginForDoctorApp, this.patientOutSA}); - UserModel.fromJson(Map json) { + UserModel.fromJson(Map json) { userID = json['UserID']; password = json['Password']; projectID = json['ProjectID']; diff --git a/lib/models/doctor/verify_referral_doctor_remarks.dart b/lib/models/doctor/verify_referral_doctor_remarks.dart index b9bfce0a..97c00390 100644 --- a/lib/models/doctor/verify_referral_doctor_remarks.dart +++ b/lib/models/doctor/verify_referral_doctor_remarks.dart @@ -1,54 +1,54 @@ import 'package:doctor_app_flutter/config/config.dart'; class VerifyReferralDoctorRemarks { - int projectID; - String admissionNo; - int lineItemNo; - String referredDoctorRemarks; - int editedBy; - int patientID; - int referringDoctor; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - String firstName; + int? projectID; + String? admissionNo; + int? lineItemNo; + String? referredDoctorRemarks; + int? editedBy; + int? patientID; + int? referringDoctor; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + String? firstName; - String middleName; - String lastName; - String patientMobileNumber; - String patientIdentificationID; + String? middleName; + String? lastName; + String? patientMobileNumber; + String? patientIdentificationID; - VerifyReferralDoctorRemarks( - {this.projectID, - this.admissionNo, - this.lineItemNo, - this.referredDoctorRemarks, - this.editedBy, - this.patientID, - this.referringDoctor, - this.languageID = LANGUAGE_ID, - this.stamp = STAMP, - this.iPAdress = IP_ADDRESS, - this.versionID = VERSION_ID, - this.channel= CHANNEL, - this.tokenID, - this.sessionID = SESSION_ID, - this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, - this.patientOutSA = PATIENT_OUT_SA, - this.firstName, - this.middleName, - this.lastName, - this.patientMobileNumber, - this.patientIdentificationID, - }); + VerifyReferralDoctorRemarks({ + this.projectID, + this.admissionNo, + this.lineItemNo, + this.referredDoctorRemarks, + this.editedBy, + this.patientID, + this.referringDoctor, + this.languageID = LANGUAGE_ID, + this.stamp = STAMP, + this.iPAdress = IP_ADDRESS, + this.versionID = VERSION_ID, + this.channel = CHANNEL, + this.tokenID, + this.sessionID = SESSION_ID, + this.isLoginForDoctorApp = IS_LOGIN_FOR_DOCTOR_APP, + this.patientOutSA = PATIENT_OUT_SA, + this.firstName, + this.middleName, + this.lastName, + this.patientMobileNumber, + this.patientIdentificationID, + }); - VerifyReferralDoctorRemarks.fromJson(Map json) { + VerifyReferralDoctorRemarks.fromJson(Map json) { projectID = json['ProjectID']; admissionNo = json['AdmissionNo']; lineItemNo = json['LineItemNo']; @@ -65,18 +65,15 @@ class VerifyReferralDoctorRemarks { sessionID = json['SessionID']; isLoginForDoctorApp = json['IsLoginForDoctorApp']; patientOutSA = json['PatientOutSA']; - firstName= json["FirstName"]; - middleName= json["MiddleName"]; - lastName= json["LastName"]; - patientMobileNumber= json["PatientMobileNumber"]; - patientIdentificationID = json["PatientIdentificationID"]; - - - + firstName = json["FirstName"]; + middleName = json["MiddleName"]; + lastName = json["LastName"]; + patientMobileNumber = json["PatientMobileNumber"]; + patientIdentificationID = json["PatientIdentificationID"]; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['ProjectID'] = this.projectID; data['AdmissionNo'] = this.admissionNo; data['LineItemNo'] = this.lineItemNo; diff --git a/lib/models/livecare/end_call_req.dart b/lib/models/livecare/end_call_req.dart index 7a1ae8eb..e3cc2722 100644 --- a/lib/models/livecare/end_call_req.dart +++ b/lib/models/livecare/end_call_req.dart @@ -1,12 +1,11 @@ class EndCallReq { - int vCID; - String tokenID; - String generalid; - int doctorId; - bool isDestroy; + int? vCID; + String? tokenID; + String? generalid; + int? doctorId; + bool? isDestroy; - EndCallReq( - {this.vCID, this.tokenID, this.generalid, this.doctorId, this.isDestroy}); + EndCallReq({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isDestroy}); EndCallReq.fromJson(Map json) { vCID = json['VC_ID']; diff --git a/lib/models/livecare/get_panding_req_list.dart b/lib/models/livecare/get_panding_req_list.dart index 719b9134..2ed2638a 100644 --- a/lib/models/livecare/get_panding_req_list.dart +++ b/lib/models/livecare/get_panding_req_list.dart @@ -1,16 +1,11 @@ class LiveCarePendingListRequest { - PatientData patientData; - int doctorID; - String sErServiceID; - int projectID; - int sourceID; - - LiveCarePendingListRequest( - {this.patientData, - this.doctorID, - this.sErServiceID, - this.projectID, - this.sourceID}); + PatientData? patientData; + int? doctorID; + String? sErServiceID; + int? projectID; + int? sourceID; + + LiveCarePendingListRequest({this.patientData, this.doctorID, this.sErServiceID, this.projectID, this.sourceID}); LiveCarePendingListRequest.fromJson(Map json) { patientData = new PatientData.fromJson(json['PatientData']); @@ -23,7 +18,7 @@ class LiveCarePendingListRequest { Map toJson() { final Map data = new Map(); - data['PatientData'] = this.patientData.toJson(); + data['PatientData'] = this.patientData!.toJson(); data['DoctorID'] = this.doctorID; data['SErServiceID'] = this.sErServiceID; data['ProjectID'] = this.projectID; @@ -33,9 +28,9 @@ class LiveCarePendingListRequest { } class PatientData { - bool isOutKSA; + bool? isOutKSA; - PatientData({this.isOutKSA}); + PatientData({required this.isOutKSA}); PatientData.fromJson(Map json) { isOutKSA = json['IsOutKSA']; diff --git a/lib/models/livecare/get_pending_res_list.dart b/lib/models/livecare/get_pending_res_list.dart index b45c53b9..85d62d35 100644 --- a/lib/models/livecare/get_pending_res_list.dart +++ b/lib/models/livecare/get_pending_res_list.dart @@ -1,43 +1,43 @@ class LiveCarePendingListResponse { dynamic acceptedBy; dynamic acceptedOn; - int age; + int? age; dynamic appointmentNo; - String arrivalTime; - String arrivalTimeD; - int callStatus; - String clientRequestID; - String clinicName; + String? arrivalTime; + String? arrivalTimeD; + int? callStatus; + String? clientRequestID; + String? clinicName; dynamic consoltationEnd; dynamic consultationNotes; dynamic createdOn; - String dateOfBirth; - String deviceToken; - String deviceType; + String? dateOfBirth; + String? deviceToken; + String? deviceType; dynamic doctorName; - String editOn; - String gender; - bool isFollowUP; + String? editOn; + String? gender; + bool? isFollowUP; dynamic isFromVida; - int isLoginB; - bool isOutKSA; - int isRejected; - String language; - double latitude; - double longitude; - String mobileNumber; + int? isLoginB; + bool? isOutKSA; + int? isRejected; + String? language; + double? latitude; + double? longitude; + String? mobileNumber; dynamic openSession; dynamic openTokenID; - String patientID; - String patientName; - int patientStatus; - String preferredLanguage; - int projectID; - double scoring; - int serviceID; + String? patientID; + String? patientName; + int? patientStatus; + String? preferredLanguage; + int? projectID; + double? scoring; + int? serviceID; dynamic tokenID; - int vCID; - String voipToken; + int? vCID; + String? voipToken; LiveCarePendingListResponse( {this.acceptedBy, @@ -80,11 +80,11 @@ class LiveCarePendingListResponse { this.vCID, this.voipToken}); - LiveCarePendingListResponse.fromJson(Map json) { + LiveCarePendingListResponse.fromJson(Map json) { acceptedBy = json['AcceptedBy']; acceptedOn = json['AcceptedOn']; age = json['Age']; - appointmentNo = json['AppointmentNo']; + appointmentNo = json['Appoint?mentNo']; arrivalTime = json['ArrivalTime']; arrivalTimeD = json['ArrivalTimeD']; callStatus = json['CallStatus']; @@ -122,12 +122,12 @@ class LiveCarePendingListResponse { voipToken = json['VoipToken']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['AcceptedBy'] = this.acceptedBy; data['AcceptedOn'] = this.acceptedOn; data['Age'] = this.age; - data['AppointmentNo'] = this.appointmentNo; + data['Appoint?mentNo'] = this.appointmentNo; data['ArrivalTime'] = this.arrivalTime; data['ArrivalTimeD'] = this.arrivalTimeD; data['CallStatus'] = this.callStatus; diff --git a/lib/models/livecare/session_status_model.dart b/lib/models/livecare/session_status_model.dart index 7e7a3e43..18d5ae6b 100644 --- a/lib/models/livecare/session_status_model.dart +++ b/lib/models/livecare/session_status_model.dart @@ -1,14 +1,10 @@ class SessionStatusModel { - bool isAuthenticated; - int messageStatus; - String result; - int sessionStatus; + bool? isAuthenticated; + int? messageStatus; + String? result; + int? sessionStatus; - SessionStatusModel( - {this.isAuthenticated, - this.messageStatus, - this.result, - this.sessionStatus}); + SessionStatusModel({this.isAuthenticated, this.messageStatus, this.result, this.sessionStatus}); SessionStatusModel.fromJson(Map json) { isAuthenticated = json['IsAuthenticated']; diff --git a/lib/models/livecare/start_call_req.dart b/lib/models/livecare/start_call_req.dart index 1ad04480..9dabccc1 100644 --- a/lib/models/livecare/start_call_req.dart +++ b/lib/models/livecare/start_call_req.dart @@ -1,15 +1,15 @@ class StartCallReq { - int vCID; - bool isrecall; - String tokenID; - String generalid; - int doctorId; - bool isOutKsa; - String projectName; - String docotrName; - String clincName; - String docSpec; - int clinicId; + int? vCID; + bool? isrecall; + String? tokenID; + String? generalid; + int? doctorId; + bool? isOutKsa; + String? projectName; + String? docotrName; + String? clincName; + String? docSpec; + int? clinicId; StartCallReq( {this.vCID, diff --git a/lib/models/livecare/start_call_res.dart b/lib/models/livecare/start_call_res.dart index 67259996..acbe9c4b 100644 --- a/lib/models/livecare/start_call_res.dart +++ b/lib/models/livecare/start_call_res.dart @@ -1,10 +1,10 @@ class StartCallRes { - String result; - String openSessionID; - String openTokenID; - bool isAuthenticated; - int messageStatus; - String appointmentNo; + String? result; + String? openSessionID; + String? openTokenID; + bool? isAuthenticated; + int? messageStatus; + String? appointmentNo; StartCallRes( {this.result, diff --git a/lib/models/livecare/transfer_to_admin.dart b/lib/models/livecare/transfer_to_admin.dart index 841f5e7d..291528b9 100644 --- a/lib/models/livecare/transfer_to_admin.dart +++ b/lib/models/livecare/transfer_to_admin.dart @@ -1,18 +1,12 @@ class TransferToAdminReq { - int vCID; - String tokenID; - String generalid; - int doctorId; - bool isOutKsa; - String notes; + int? vCID; + String? tokenID; + String? generalid; + int? doctorId; + bool? isOutKsa; + String? notes; - TransferToAdminReq( - {this.vCID, - this.tokenID, - this.generalid, - this.doctorId, - this.isOutKsa, - this.notes}); + TransferToAdminReq({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa, this.notes}); TransferToAdminReq.fromJson(Map json) { vCID = json['VC_ID']; diff --git a/lib/models/patient/MedicalReport/MedicalReportTemplate.dart b/lib/models/patient/MedicalReport/MedicalReportTemplate.dart index f00e84a0..aa0d1279 100644 --- a/lib/models/patient/MedicalReport/MedicalReportTemplate.dart +++ b/lib/models/patient/MedicalReport/MedicalReportTemplate.dart @@ -1,32 +1,32 @@ class MedicalReportTemplate { - String setupID; - int projectID; - int templateID; - String procedureID; - int reportType; - String templateName; - String templateNameN; - String templateText; - String templateTextN; - bool isActive; - String templateTextHtml; - String templateTextNHtml; + String? setupID; + int? projectID; + int? templateID; + String? procedureID; + int? reportType; + String? templateName; + String? templateNameN; + String? templateText; + String? templateTextN; + bool? isActive; + String? templateTextHtml; + String? templateTextNHtml; MedicalReportTemplate( {this.setupID, - this.projectID, - this.templateID, - this.procedureID, - this.reportType, - this.templateName, - this.templateNameN, - this.templateText, - this.templateTextN, - this.isActive, - this.templateTextHtml, - this.templateTextNHtml}); + this.projectID, + this.templateID, + this.procedureID, + this.reportType, + this.templateName, + this.templateNameN, + this.templateText, + this.templateTextN, + this.isActive, + this.templateTextHtml, + this.templateTextNHtml}); - MedicalReportTemplate.fromJson(Map json) { + MedicalReportTemplate.fromJson(Map json) { setupID = json['SetupID']; projectID = json['ProjectID']; templateID = json['TemplateID']; @@ -41,8 +41,8 @@ class MedicalReportTemplate { templateTextNHtml = json['TemplateTextNHtml']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['TemplateID'] = this.templateID; diff --git a/lib/models/patient/MedicalReport/MeidcalReportModel.dart b/lib/models/patient/MedicalReport/MeidcalReportModel.dart index 74ee53a5..6cfe81ca 100644 --- a/lib/models/patient/MedicalReport/MeidcalReportModel.dart +++ b/lib/models/patient/MedicalReport/MeidcalReportModel.dart @@ -1,60 +1,60 @@ class MedicalReportModel { - String reportData; - String setupID; - int projectID; - String projectName; - String projectNameN; - int patientID; - String invoiceNo; - int status; - String verifiedOn; + String? reportData; + String? setupID; + int? projectID; + String? projectName; + String? projectNameN; + int? patientID; + String? invoiceNo; + int? status; + String? verifiedOn; dynamic verifiedBy; - String editedOn; - int editedBy; - int lineItemNo; - String createdOn; - int templateID; - int doctorID; - int doctorGender; - String doctorGenderDescription; - String doctorGenderDescriptionN; - String doctorImageURL; - String doctorName; - String doctorNameN; - int clinicID; - String clinicName; - String clinicNameN; - String reportDataHtml; + String? editedOn; + int? editedBy; + int? lineItemNo; + String? createdOn; + int? templateID; + int? doctorID; + int? doctorGender; + String? doctorGenderDescription; + String? doctorGenderDescriptionN; + String? doctorImageURL; + String? doctorName; + String? doctorNameN; + int? clinicID; + String? clinicName; + String? clinicNameN; + String? reportDataHtml; MedicalReportModel( {this.reportData, - this.setupID, - this.projectID, - this.projectName, - this.projectNameN, - this.patientID, - this.invoiceNo, - this.status, - this.verifiedOn, - this.verifiedBy, - this.editedOn, - this.editedBy, - this.lineItemNo, - this.createdOn, - this.templateID, - this.doctorID, - this.doctorGender, - this.doctorGenderDescription, - this.doctorGenderDescriptionN, - this.doctorImageURL, - this.doctorName, - this.doctorNameN, - this.clinicID, - this.clinicName, - this.clinicNameN, - this.reportDataHtml}); + this.setupID, + this.projectID, + this.projectName, + this.projectNameN, + this.patientID, + this.invoiceNo, + this.status, + this.verifiedOn, + this.verifiedBy, + this.editedOn, + this.editedBy, + this.lineItemNo, + this.createdOn, + this.templateID, + this.doctorID, + this.doctorGender, + this.doctorGenderDescription, + this.doctorGenderDescriptionN, + this.doctorImageURL, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicName, + this.clinicNameN, + this.reportDataHtml}); - MedicalReportModel.fromJson(Map json) { + MedicalReportModel.fromJson(Map json) { reportData = json['ReportData']; setupID = json['SetupID']; projectID = json['ProjectID']; @@ -83,8 +83,8 @@ class MedicalReportModel { reportDataHtml = json['ReportDataHtml']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['ReportData'] = this.reportData; data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; diff --git a/lib/models/patient/PatientArrivalEntity.dart b/lib/models/patient/PatientArrivalEntity.dart index 54622cd7..710cd70f 100644 --- a/lib/models/patient/PatientArrivalEntity.dart +++ b/lib/models/patient/PatientArrivalEntity.dart @@ -1,44 +1,44 @@ class PatientArrivalEntity { - String age; - String appointmentDate; - int appointmentNo; - String appointmentType; - String arrivedOn; - String companyName; - String endTime; - int episodeNo; - int fallRiskScore; - String gender; - int medicationOrders; - String mobileNumber; - String nationality; - int patientMRN; - String patientName; - int rowCount; - String startTime; - String visitType; + String? age; + String? appointmentDate; + int? appointmentNo; + String? appointmentType; + String? arrivedOn; + String? companyName; + String? endTime; + int? episodeNo; + int? fallRiskScore; + String? gender; + int? medicationOrders; + String? mobileNumber; + String? nationality; + int? patientMRN; + String? patientName; + int? rowCount; + String? startTime; + String? visitType; PatientArrivalEntity( {this.age, - this.appointmentDate, - this.appointmentNo, - this.appointmentType, - this.arrivedOn, - this.companyName, - this.endTime, - this.episodeNo, - this.fallRiskScore, - this.gender, - this.medicationOrders, - this.mobileNumber, - this.nationality, - this.patientMRN, - this.patientName, - this.rowCount, - this.startTime, - this.visitType}); + this.appointmentDate, + this.appointmentNo, + this.appointmentType, + this.arrivedOn, + this.companyName, + this.endTime, + this.episodeNo, + this.fallRiskScore, + this.gender, + this.medicationOrders, + this.mobileNumber, + this.nationality, + this.patientMRN, + this.patientName, + this.rowCount, + this.startTime, + this.visitType}); - PatientArrivalEntity.fromJson(Map json) { + PatientArrivalEntity.fromJson(Map json) { age = json['age']; appointmentDate = json['appointmentDate']; appointmentNo = json['appointmentNo']; @@ -59,8 +59,8 @@ class PatientArrivalEntity { visitType = json['visitType']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['age'] = this.age; data['appointmentDate'] = this.appointmentDate; data['appointmentNo'] = this.appointmentNo; @@ -81,4 +81,4 @@ class PatientArrivalEntity { data['visitType'] = this.visitType; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/get_clinic_by_project_id_request.dart b/lib/models/patient/get_clinic_by_project_id_request.dart index 09198dc0..c3ba279d 100644 --- a/lib/models/patient/get_clinic_by_project_id_request.dart +++ b/lib/models/patient/get_clinic_by_project_id_request.dart @@ -1,6 +1,5 @@ class ClinicByProjectIdRequest { - - /* + /* *@author: Ibrahim Albitar *@Date:03/06/2020 *@param: @@ -8,17 +7,17 @@ class ClinicByProjectIdRequest { *@desc: ClinicByProjectIdRequest */ - int projectID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + int? projectID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; /* { "ProjectID": 21, @@ -48,7 +47,7 @@ class ClinicByProjectIdRequest { this.patientOutSA = false, this.patientTypeID = 1}); - ClinicByProjectIdRequest.fromJson(Map json) { + ClinicByProjectIdRequest.fromJson(Map json) { projectID = json['ProjectID']; languageID = json['LanguageID']; stamp = json['stamp']; diff --git a/lib/models/patient/get_doctor_by_clinic_id_request.dart b/lib/models/patient/get_doctor_by_clinic_id_request.dart index 9504fc35..351f19f7 100644 --- a/lib/models/patient/get_doctor_by_clinic_id_request.dart +++ b/lib/models/patient/get_doctor_by_clinic_id_request.dart @@ -1,35 +1,31 @@ class DoctorsByClinicIdRequest { + int? clinicID; + int? projectID; + bool? continueDentalPlan; + bool? isSearchAppointmnetByClinicID; + int? patientID; + int? gender; + bool? isGetNearAppointment; + bool? isVoiceCommand; + int? latitude; + int? longitude; + bool? license; + bool? isDentalAllowedBackend; - int clinicID; - int projectID; - bool continueDentalPlan; - bool isSearchAppointmnetByClinicID; - int patientID; - int gender; - bool isGetNearAppointment; - bool isVoiceCommand; - int latitude; - int longitude; - bool license; - bool isDentalAllowedBackend; - - - DoctorsByClinicIdRequest( - { - this.clinicID, - this.projectID, - this.continueDentalPlan = false, - this.isSearchAppointmnetByClinicID = true, - this.patientID, - this.gender, - this.isGetNearAppointment = false, - this.isVoiceCommand = true, - this.latitude = 0, - this.longitude = 0, - this.license = true, - this.isDentalAllowedBackend = false, - }); - + DoctorsByClinicIdRequest({ + this.clinicID, + this.projectID, + this.continueDentalPlan = false, + this.isSearchAppointmnetByClinicID = true, + this.patientID, + this.gender, + this.isGetNearAppointment = false, + this.isVoiceCommand = true, + this.latitude = 0, + this.longitude = 0, + this.license = true, + this.isDentalAllowedBackend = false, + }); DoctorsByClinicIdRequest.fromJson(Map json) { clinicID = json['ClinicID']; @@ -61,6 +57,5 @@ class DoctorsByClinicIdRequest { data['License'] = this.license; data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; return data; - } } diff --git a/lib/models/patient/get_list_stp_referral_frequency_request.dart b/lib/models/patient/get_list_stp_referral_frequency_request.dart index 7f466deb..ca4f3bd3 100644 --- a/lib/models/patient/get_list_stp_referral_frequency_request.dart +++ b/lib/models/patient/get_list_stp_referral_frequency_request.dart @@ -1,6 +1,5 @@ class STPReferralFrequencyRequest { - -/* +/* *@author: Ibrahim Albitar *@Date:03/06/2020 *@param: @@ -8,16 +7,16 @@ class STPReferralFrequencyRequest { *@desc: */ - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; /* { "LanguageID": 2, @@ -45,7 +44,7 @@ class STPReferralFrequencyRequest { this.patientOutSA = false, this.patientTypeID = 1}); - STPReferralFrequencyRequest.fromJson(Map json) { + STPReferralFrequencyRequest.fromJson(Map json) { languageID = json['LanguageID']; stamp = json['stamp']; iPAdress = json['IPAdress']; diff --git a/lib/models/patient/get_pending_patient_er_model.dart b/lib/models/patient/get_pending_patient_er_model.dart index e1b50a81..e16024ac 100644 --- a/lib/models/patient/get_pending_patient_er_model.dart +++ b/lib/models/patient/get_pending_patient_er_model.dart @@ -7,9 +7,10 @@ */ import 'dart:convert'; -ListPendingPatientListModel listPendingPatientListModelFromJson(String str) => ListPendingPatientListModel.fromJson(json.decode(str)); +ListPendingPatientListModel listPendingPatientListModelFromJson(String? str) => + ListPendingPatientListModel.fromJson(json.decode(str!)); -String listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); +String? listPendingPatientListModelToJson(ListPendingPatientListModel data) => json.encode(data.toJson()); class ListPendingPatientListModel { ListPendingPatientListModel({ @@ -56,127 +57,128 @@ class ListPendingPatientListModel { dynamic acceptedBy; dynamic acceptedOn; - int age; + int? age; dynamic appointmentNo; - String arrivalTime; - String arrivalTimeD; - int callStatus; - String clientRequestId; - String clinicName; + String? arrivalTime; + String? arrivalTimeD; + int? callStatus; + String? clientRequestId; + String? clinicName; dynamic consoltationEnd; dynamic consultationNotes; dynamic createdOn; - DateTime dateOfBirth; - String deviceToken; - String deviceType; + DateTime? dateOfBirth; + String? deviceToken; + String? deviceType; dynamic doctorName; - String editOn; - String gender; - bool isFollowUp; + String? editOn; + String? gender; + bool? isFollowUp; dynamic isFromVida; - int isLoginB; - bool isOutKsa; - int isRejected; - String language; - double latitude; - double longitude; - String mobileNumber; + int? isLoginB; + bool? isOutKsa; + int? isRejected; + String? language; + double? latitude; + double? longitude; + String? mobileNumber; dynamic openSession; dynamic openTokenId; - String patientId; - String patientName; - int patientStatus; - String preferredLanguage; - int projectId; - int scoring; - int serviceId; + String? patientId; + String? patientName; + int? patientStatus; + String? preferredLanguage; + int? projectId; + int? scoring; + int? serviceId; dynamic tokenId; - int vcId; - String voipToken; + int? vcId; + String? voipToken; - factory ListPendingPatientListModel.fromJson(Map json) => ListPendingPatientListModel( - acceptedBy: json["AcceptedBy"], - acceptedOn: json["AcceptedOn"], - age: json["Age"], - appointmentNo: json["AppointmentNo"], - arrivalTime: json["ArrivalTime"], - arrivalTimeD: json["ArrivalTimeD"], - callStatus: json["CallStatus"], - clientRequestId: json["ClientRequestID"], - clinicName: json["ClinicName"], - consoltationEnd: json["ConsoltationEnd"], - consultationNotes: json["ConsultationNotes"], - createdOn: json["CreatedOn"], - dateOfBirth: DateTime.parse(json["DateOfBirth"]), - deviceToken: json["DeviceToken"], - deviceType: json["DeviceType"], - doctorName: json["DoctorName"], - editOn: json["EditOn"], - gender: json["Gender"], - isFollowUp: json["IsFollowUP"], - isFromVida: json["IsFromVida"], - isLoginB: json["IsLoginB"], - isOutKsa: json["IsOutKSA"], - isRejected: json["IsRejected"], - language: json["Language"], - latitude: json["Latitude"].toDouble(), - longitude: json["Longitude"].toDouble(), - mobileNumber: json["MobileNumber"], - openSession: json["OpenSession"], - openTokenId: json["OpenTokenID"], - patientId: json["PatientID"], - patientName: json["PatientName"], - patientStatus: json["PatientStatus"], - preferredLanguage: json["PreferredLanguage"], - projectId: json["ProjectID"], - scoring: json["Scoring"], - serviceId: json["ServiceID"], - tokenId: json["TokenID"], - vcId: json["VC_ID"], - voipToken: json["VoipToken"], - ); + factory ListPendingPatientListModel.fromJson(Map json) => ListPendingPatientListModel( + acceptedBy: json["AcceptedBy"], + acceptedOn: json["AcceptedOn"], + age: json["Age"], + appointmentNo: json["AppointmentNo"], + arrivalTime: json["ArrivalTime"], + arrivalTimeD: json["ArrivalTimeD"], + callStatus: json["CallStatus"], + clientRequestId: json["ClientRequestID"], + clinicName: json["ClinicName"], + consoltationEnd: json["ConsoltationEnd"], + consultationNotes: json["ConsultationNotes"], + createdOn: json["CreatedOn"], + dateOfBirth: DateTime.parse(json["DateOfBirth"]), + deviceToken: json["DeviceToken"], + deviceType: json["DeviceType"], + doctorName: json["DoctorName"], + editOn: json["EditOn"], + gender: json["Gender"], + isFollowUp: json["IsFollowUP"], + isFromVida: json["IsFromVida"], + isLoginB: json["IsLoginB"], + isOutKsa: json["IsOutKSA"], + isRejected: json["IsRejected"], + language: json["Language"], + latitude: json["Latitude"].toDouble(), + longitude: json["Longitude"].toDouble(), + mobileNumber: json["MobileNumber"], + openSession: json["OpenSession"], + openTokenId: json["OpenTokenID"], + patientId: json["PatientID"], + patientName: json["PatientName"], + patientStatus: json["PatientStatus"], + preferredLanguage: json["PreferredLanguage"], + projectId: json["ProjectID"], + scoring: json["Scoring"], + serviceId: json["ServiceID"], + tokenId: json["TokenID"], + vcId: json["VC_ID"], + voipToken: json["VoipToken"], + ); - Map toJson() => { - "AcceptedBy": acceptedBy, - "AcceptedOn": acceptedOn, - "Age": age, - "AppointmentNo": appointmentNo, - "ArrivalTime": arrivalTime, - "ArrivalTimeD": arrivalTimeD, - "CallStatus": callStatus, - "ClientRequestID": clientRequestId, - "ClinicName": clinicName, - "ConsoltationEnd": consoltationEnd, - "ConsultationNotes": consultationNotes, - "CreatedOn": createdOn, - "DateOfBirth": "${dateOfBirth.year.toString().padLeft(4, '0')}-${dateOfBirth.month.toString().padLeft(2, '0')}-${dateOfBirth.day.toString().padLeft(2, '0')}", - "DeviceToken": deviceToken, - "DeviceType": deviceType, - "DoctorName": doctorName, - "EditOn": editOn, - "Gender": gender, - "IsFollowUP": isFollowUp, - "IsFromVida": isFromVida, - "IsLoginB": isLoginB, - "IsOutKSA": isOutKsa, - "IsRejected": isRejected, - "Language": language, - "Latitude": latitude, - "Longitude": longitude, - "MobileNumber": mobileNumber, - "OpenSession": openSession, - "OpenTokenID": openTokenId, - "PatientID": patientId, - "PatientName": patientName, - "PatientStatus": patientStatus, - "PreferredLanguage": preferredLanguage, - "ProjectID": projectId, - "Scoring": scoring, - "ServiceID": serviceId, - "TokenID": tokenId, - "VC_ID": vcId, - "VoipToken": voipToken, - }; + Map toJson() => { + "AcceptedBy": acceptedBy, + "AcceptedOn": acceptedOn, + "Age": age, + "AppointmentNo": appointmentNo, + "ArrivalTime": arrivalTime, + "ArrivalTimeD": arrivalTimeD, + "CallStatus": callStatus, + "ClientRequestID": clientRequestId, + "ClinicName": clinicName, + "ConsoltationEnd": consoltationEnd, + "ConsultationNotes": consultationNotes, + "CreatedOn": createdOn, + "DateOfBirth": + "${dateOfBirth!.year.toString().padLeft(4, '0')}-${dateOfBirth!.month.toString().padLeft(2, '0')}-${dateOfBirth!.day.toString().padLeft(2, '0')}", + "DeviceToken": deviceToken, + "DeviceType": deviceType, + "DoctorName": doctorName, + "EditOn": editOn, + "Gender": gender, + "IsFollowUP": isFollowUp, + "IsFromVida": isFromVida, + "IsLoginB": isLoginB, + "IsOutKSA": isOutKsa, + "IsRejected": isRejected, + "Language": language, + "Latitude": latitude, + "Longitude": longitude, + "MobileNumber": mobileNumber, + "OpenSession": openSession, + "OpenTokenID": openTokenId, + "PatientID": patientId, + "PatientName": patientName, + "PatientStatus": patientStatus, + "PreferredLanguage": preferredLanguage, + "ProjectID": projectId, + "Scoring": scoring, + "ServiceID": serviceId, + "TokenID": tokenId, + "VC_ID": vcId, + "VoipToken": voipToken, + }; } // To parse this JSON data, do // diff --git a/lib/models/patient/insurance_aprovals_request.dart b/lib/models/patient/insurance_aprovals_request.dart index 2d3ac663..eb505c34 100644 --- a/lib/models/patient/insurance_aprovals_request.dart +++ b/lib/models/patient/insurance_aprovals_request.dart @@ -21,23 +21,22 @@ *@desc: */ class InsuranceAprovalsRequest { - int exuldAppNO; - int patientID; - int channel; - int projectID; - int languageID; - String stamp; - String ipAdress; - double versionID; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + int? exuldAppNO; + int? patientID; + int? channel; + int? projectID; + int? languageID; + String? stamp; + String? ipAdress; + double? versionID; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; InsuranceAprovalsRequest( - { - this.exuldAppNO, + {this.exuldAppNO, this.patientID, this.channel = 9, this.projectID = 12, @@ -46,12 +45,12 @@ class InsuranceAprovalsRequest { this.stamp = '2020-04-23T21:01:21.492Z', this.ipAdress = '11.11.11.11', this.versionID = 5.8, - this.tokenID , + this.tokenID, this.sessionID = 'e29zoooEJ4', this.isLoginForDoctorApp = true, this.patientOutSA = false}); - InsuranceAprovalsRequest.fromJson(Map json) { + InsuranceAprovalsRequest.fromJson(Map json) { exuldAppNO = json['EXuldAPPNO']; patientID = json['PatientID']; channel = json['Channel']; @@ -67,8 +66,8 @@ class InsuranceAprovalsRequest { patientOutSA = json['PatientOutSA']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['EXuldAPPNO'] = this.exuldAppNO; data['PatientID'] = this.patientID; data['Channel'] = this.channel; diff --git a/lib/models/patient/lab_orders/lab_orders_req_model.dart b/lib/models/patient/lab_orders/lab_orders_req_model.dart index a97f4093..15efb56e 100644 --- a/lib/models/patient/lab_orders/lab_orders_req_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_req_model.dart @@ -1,24 +1,23 @@ - -/* - *@author: Elham Rababah - *@Date:6/5/2020 - *@param: +/* + *@author: Elham Rababah + *@Date:6/5/2020 + *@param: *@return:LabOrdersReqModel *@desc: LabOrdersReqModel class */ class LabOrdersReqModel { - int patientID; - int patientTypeID; - int projectID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? patientID; + int? patientTypeID; + int? projectID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; LabOrdersReqModel( {this.patientID, @@ -27,12 +26,12 @@ class LabOrdersReqModel { this.languageID, this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress='11.11.11.11', - this.versionID=5.5, - this.channel=9, - this.sessionID='E2bsEeYEJo', - this.isLoginForDoctorApp =true, - this.patientOutSA=false}); + this.iPAdress = '11.11.11.11', + this.versionID = 5.5, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', + this.isLoginForDoctorApp = true, + this.patientOutSA = false}); LabOrdersReqModel.fromJson(Map json) { patientID = json['PatientID']; diff --git a/lib/models/patient/lab_orders/lab_orders_res_model.dart b/lib/models/patient/lab_orders/lab_orders_res_model.dart index 7f463933..3aa46535 100644 --- a/lib/models/patient/lab_orders/lab_orders_res_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_res_model.dart @@ -1,29 +1,27 @@ - - import 'package:doctor_app_flutter/util/date-utils.dart'; class LabOrdersResModel { - String setupID; - int projectID; - int patientID; - int patientType; - int orderNo; - String orderDate; - int invoiceTransactionType; - int invoiceNo; - int clinicId; - int doctorId; - int status; - String createdBy; - Null createdByN; - DateTime createdOn; - String editedBy; - Null editedByN; - String editedOn; - String clinicName; - String doctorImageURL; - String doctorName; - String projectName; + String? setupID; + int? projectID; + int? patientID; + int? patientType; + int? orderNo; + String? orderDate; + int? invoiceTransactionType; + int? invoiceNo; + int? clinicId; + int? doctorId; + int? status; + String? createdBy; + dynamic createdByN; + DateTime? createdOn; + String? editedBy; + dynamic editedByN; + String? editedOn; + String? clinicName; + String? doctorImageURL; + String? doctorName; + String? projectName; LabOrdersResModel( {this.setupID, @@ -48,7 +46,7 @@ class LabOrdersResModel { this.doctorName, this.projectName}); - LabOrdersResModel.fromJson(Map json) { + LabOrdersResModel.fromJson(Map json) { setupID = json['SetupID']; projectID = json['ProjectID']; patientID = json['PatientID']; @@ -72,8 +70,8 @@ class LabOrdersResModel { projectName = json['ProjectName']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['PatientID'] = this.patientID; diff --git a/lib/models/patient/lab_result/lab_result.dart b/lib/models/patient/lab_result/lab_result.dart index ca753f2d..6e740e16 100644 --- a/lib/models/patient/lab_result/lab_result.dart +++ b/lib/models/patient/lab_result/lab_result.dart @@ -1,64 +1,64 @@ class LabResult { - String setupID; - int projectID; - int orderNo; - int lineItemNo; - int packageID; - int testID; - String description; - String resultValue; - String referenceRange; - Null convertedResultValue; - Null convertedReferenceRange; - Null resultValueFlag; - int status; - String createdBy; - Null createdByN; - String createdOn; - String editedBy; - Null editedByN; - String editedOn; - String verifiedBy; - Null verifiedByN; - String verifiedOn; + String? setupID; + int? projectID; + int? orderNo; + int? lineItemNo; + int? packageID; + int? testID; + String? description; + String? resultValue; + String? referenceRange; + dynamic convertedResultValue; + dynamic convertedReferenceRange; + dynamic resultValueFlag; + int? status; + String? createdBy; + dynamic createdByN; + String? createdOn; + String? editedBy; + dynamic editedByN; + String? editedOn; + String? verifiedBy; + dynamic verifiedByN; + String? verifiedOn; Null patientID; - int gender; - Null maleInterpretativeData; - Null femaleInterpretativeData; - String testCode; - String statusDescription; + int? gender; + dynamic maleinterpretativeData; + dynamic femaleinterpretativeData; + String? testCode; + String? statusDescription; LabResult( {this.setupID, - this.projectID, - this.orderNo, - this.lineItemNo, - this.packageID, - this.testID, - this.description, - this.resultValue, - this.referenceRange, - this.convertedResultValue, - this.convertedReferenceRange, - this.resultValueFlag, - this.status, - this.createdBy, - this.createdByN, - this.createdOn, - this.editedBy, - this.editedByN, - this.editedOn, - this.verifiedBy, - this.verifiedByN, - this.verifiedOn, - this.patientID, - this.gender, - this.maleInterpretativeData, - this.femaleInterpretativeData, - this.testCode, - this.statusDescription}); + this.projectID, + this.orderNo, + this.lineItemNo, + this.packageID, + this.testID, + this.description, + this.resultValue, + this.referenceRange, + this.convertedResultValue, + this.convertedReferenceRange, + this.resultValueFlag, + this.status, + this.createdBy, + this.createdByN, + this.createdOn, + this.editedBy, + this.editedByN, + this.editedOn, + this.verifiedBy, + this.verifiedByN, + this.verifiedOn, + this.patientID, + this.gender, + this.maleinterpretativeData, + this.femaleinterpretativeData, + this.testCode, + this.statusDescription}); - LabResult.fromJson(Map json) { + LabResult.fromJson(Map json) { setupID = json['SetupID']; projectID = json['ProjectID']; orderNo = json['OrderNo']; @@ -83,14 +83,14 @@ class LabResult { verifiedOn = json['VerifiedOn']; patientID = json['PatientID']; gender = json['Gender']; - maleInterpretativeData = json['MaleInterpretativeData']; - femaleInterpretativeData = json['FemaleInterpretativeData']; + maleinterpretativeData = json['Maleint?erpretativeData']; + femaleinterpretativeData = json['Femaleint?erpretativeData']; testCode = json['TestCode']; statusDescription = json['StatusDescription']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['OrderNo'] = this.orderNo; @@ -115,8 +115,8 @@ class LabResult { data['VerifiedOn'] = this.verifiedOn; data['PatientID'] = this.patientID; data['Gender'] = this.gender; - data['MaleInterpretativeData'] = this.maleInterpretativeData; - data['FemaleInterpretativeData'] = this.femaleInterpretativeData; + data['Maleint?erpretativeData'] = this.maleinterpretativeData; + data['Femaleint?erpretativeData'] = this.femaleinterpretativeData; data['TestCode'] = this.testCode; data['StatusDescription'] = this.statusDescription; return data; diff --git a/lib/models/patient/lab_result/lab_result_req_model.dart b/lib/models/patient/lab_result/lab_result_req_model.dart index 5e58a4a5..91510d38 100644 --- a/lib/models/patient/lab_result/lab_result_req_model.dart +++ b/lib/models/patient/lab_result/lab_result_req_model.dart @@ -1,36 +1,36 @@ class RequestLabResult { - int projectID; - String setupID; - int orderNo; - int invoiceNo; - int patientTypeID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? projectID; + String? setupID; + int? orderNo; + int? invoiceNo; + int? patientTypeID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; RequestLabResult( {this.projectID, - this.setupID, - this.orderNo, - this.invoiceNo, - this.patientTypeID, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.setupID, + this.orderNo, + this.invoiceNo, + this.patientTypeID, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); - RequestLabResult.fromJson(Map json) { + RequestLabResult.fromJson(Map json) { projectID = json['ProjectID']; setupID = json['SetupID']; orderNo = json['OrderNo']; diff --git a/lib/models/patient/my_referral/PendingReferral.dart b/lib/models/patient/my_referral/PendingReferral.dart index 6d3f0b83..58f12baf 100644 --- a/lib/models/patient/my_referral/PendingReferral.dart +++ b/lib/models/patient/my_referral/PendingReferral.dart @@ -1,37 +1,37 @@ import '../patiant_info_model.dart'; class PendingReferral { - PatiantInformtion patientDetails; - String doctorImageUrl; - String nationalityFlagUrl; - String responded; - String answerFromTarget; - String createdOn; - int data; - int isSameBranch; - String editedOn; - int interBranchReferral; - int patientID; - String patientName; - int patientType; - int referralNo; - String referralStatus; - String referredByDoctorInfo; - String referredFromBranchName; - String referredOn; - String referredType; - String remarksFromSource; - String respondedOn; - int sourceAppointmentNo; - int sourceProjectId; - String sourceSetupID; - String startDate; - int targetAppointmentNo; - String targetClinicID; - String targetDoctorID; - int targetProjectId; - String targetSetupID; - bool isReferralDoctorSameBranch; + PatiantInformtion? patientDetails; + String? doctorImageUrl; + String? nationalityFlagUrl; + String? responded; + String? answerFromTarget; + String? createdOn; + int? data; + int? isSameBranch; + String? editedOn; + int? interBranchReferral; + int? patientID; + String? patientName; + int? patientType; + int? referralNo; + String? referralStatus; + String? referredByDoctorInfo; + String? referredFromBranchName; + String? referredOn; + String? referredType; + String? remarksFromSource; + String? respondedOn; + int? sourceAppointmentNo; + int? sourceProjectId; + String? sourceSetupID; + String? startDate; + int? targetAppointmentNo; + String? targetClinicID; + String? targetDoctorID; + int? targetProjectId; + String? targetSetupID; + bool? isReferralDoctorSameBranch; PendingReferral({ this.patientDetails, @@ -68,9 +68,7 @@ class PendingReferral { }); PendingReferral.fromJson(Map json) { - patientDetails = json['patientDetails'] != null - ? PatiantInformtion.fromJson(json['patientDetails']) - : null; + patientDetails = json['patientDetails'] != null ? PatiantInformtion.fromJson(json['patientDetails']) : null; doctorImageUrl = json['DoctorImageURL']; nationalityFlagUrl = json['NationalityFlagURL']; responded = json['Responded']; @@ -79,7 +77,7 @@ class PendingReferral { data = json['data']; isSameBranch = json['isSameBranch']; editedOn = json['editedOn']; - interBranchReferral = json['interBranchReferral']; + int? erBranchReferral = json['int?erBranchReferral']; patientID = json['patientID']; patientName = json['patientName']; patientType = json['patientType']; @@ -91,19 +89,19 @@ class PendingReferral { referredType = json['referredType']; remarksFromSource = json['remarksFromSource']; respondedOn = json['respondedOn']; - sourceAppointmentNo = json['sourceAppointmentNo']; + sourceAppointmentNo = json['sourceAppoint?mentNo']; sourceProjectId = json['sourceProjectId']; sourceSetupID = json['sourceSetupID']; startDate = json['startDate']; - targetAppointmentNo = json['targetAppointmentNo']; + targetAppointmentNo = json['targetAppoint?mentNo']; targetClinicID = json['targetClinicID']; targetDoctorID = json['targetDoctorID']; targetProjectId = json['targetProjectId']; targetSetupID = json['targetSetupID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['DoctorImageURL'] = this.doctorImageUrl; data['NationalityFlagURL'] = this.nationalityFlagUrl; data['Responded'] = this.responded; @@ -112,7 +110,7 @@ class PendingReferral { data['data'] = this.data; data['isSameBranch'] = this.isSameBranch; data['editedOn'] = this.editedOn; - data['interBranchReferral'] = this.interBranchReferral; + data['int?erBranchReferral'] = this.interBranchReferral; data['patientID'] = this.patientID; data['patientName'] = this.patientName; data['patientType'] = this.patientType; @@ -124,11 +122,11 @@ class PendingReferral { data['referredType'] = this.referredType; data['remarksFromSource'] = this.remarksFromSource; data['respondedOn'] = this.respondedOn; - data['sourceAppointmentNo'] = this.sourceAppointmentNo; + data['sourceAppoint?mentNo'] = this.sourceAppointmentNo; data['sourceProjectId'] = this.sourceProjectId; data['sourceSetupID'] = this.sourceSetupID; data['startDate'] = this.startDate; - data['targetAppointmentNo'] = this.targetAppointmentNo; + data['targetAppoint?mentNo'] = this.targetAppointmentNo; data['targetClinicID'] = this.targetClinicID; data['targetDoctorID'] = this.targetDoctorID; data['targetProjectId'] = this.targetProjectId; diff --git a/lib/models/patient/my_referral/clinic-doctor.dart b/lib/models/patient/my_referral/clinic-doctor.dart index 843f636c..a8c541cf 100644 --- a/lib/models/patient/my_referral/clinic-doctor.dart +++ b/lib/models/patient/my_referral/clinic-doctor.dart @@ -1,86 +1,86 @@ class ClinicDoctor { - int clinicID; - String clinicName; - String doctorTitle; - int iD; - String name; - int projectID; - String projectName; - int actualDoctorRate; - int clinicRoomNo; - String date; - String dayName; - int doctorID; - String doctorImageURL; - String doctorProfile; - String doctorProfileInfo; - int doctorRate; - int gender; - String genderDescription; - bool isAppointmentAllowed; - bool isDoctorAllowVedioCall; - bool isDoctorDummy; - bool isLiveCare; - String latitude; - String longitude; - String nationalityFlagURL; - String nationalityID; - String nationalityName; - String nearestFreeSlot; - int noOfPatientsRate; - String originalClinicID; - int personRate; - int projectDistanceInKiloMeters; - String qR; - String qRString; - int rateNumber; - String serviceID; - String setupID; - List speciality; - String workingHours; + int? clinicID; + String? clinicName; + String? doctorTitle; + int? iD; + String? name; + int? projectID; + String? projectName; + int? actualDoctorRate; + int? clinicRoomNo; + String? date; + String? dayName; + int? doctorID; + String? doctorImageURL; + String? doctorProfile; + String? doctorProfileInfo; + int? doctorRate; + int? gender; + String? genderDescription; + bool? isAppointmentAllowed; + bool? isDoctorAllowVedioCall; + bool? isDoctorDummy; + bool? isLiveCare; + String? latitude; + String? longitude; + String? nationalityFlagURL; + String? nationalityID; + String? nationalityName; + String? nearestFreeSlot; + int? noOfPatientsRate; + String? originalClinicID; + int? personRate; + int? projectDistanceInKiloMeters; + String? qR; + String? qRString; + int? rateNumber; + String? serviceID; + String? setupID; + List? speciality; + String? workingHours; ClinicDoctor( {this.clinicID, - this.clinicName, - this.doctorTitle, - this.iD, - this.name, - this.projectID, - this.projectName, - this.actualDoctorRate, - this.clinicRoomNo, - this.date, - this.dayName, - this.doctorID, - this.doctorImageURL, - this.doctorProfile, - this.doctorProfileInfo, - this.doctorRate, - this.gender, - this.genderDescription, - this.isAppointmentAllowed, - this.isDoctorAllowVedioCall, - this.isDoctorDummy, - this.isLiveCare, - this.latitude, - this.longitude, - this.nationalityFlagURL, - this.nationalityID, - this.nationalityName, - this.nearestFreeSlot, - this.noOfPatientsRate, - this.originalClinicID, - this.personRate, - this.projectDistanceInKiloMeters, - this.qR, - this.qRString, - this.rateNumber, - this.serviceID, - this.setupID, - this.speciality, - this.workingHours}); + this.clinicName, + this.doctorTitle, + this.iD, + this.name, + this.projectID, + this.projectName, + this.actualDoctorRate, + this.clinicRoomNo, + this.date, + this.dayName, + this.doctorID, + this.doctorImageURL, + this.doctorProfile, + this.doctorProfileInfo, + this.doctorRate, + this.gender, + this.genderDescription, + this.isAppointmentAllowed, + this.isDoctorAllowVedioCall, + this.isDoctorDummy, + this.isLiveCare, + this.latitude, + this.longitude, + this.nationalityFlagURL, + this.nationalityID, + this.nationalityName, + this.nearestFreeSlot, + this.noOfPatientsRate, + this.originalClinicID, + this.personRate, + this.projectDistanceInKiloMeters, + this.qR, + this.qRString, + this.rateNumber, + this.serviceID, + this.setupID, + this.speciality, + this.workingHours}); - ClinicDoctor.fromJson(Map json) { + ClinicDoctor.fromJson(Map json) { clinicID = json['ClinicID']; clinicName = json['ClinicName']; doctorTitle = json['DoctorTitle']; @@ -99,7 +99,7 @@ class ClinicDoctor { doctorRate = json['DoctorRate']; gender = json['Gender']; genderDescription = json['GenderDescription']; - isAppointmentAllowed = json['IsAppointmentAllowed']; + isAppointmentAllowed = json['IsAppoint?mentAllowed']; isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; isDoctorDummy = json['IsDoctorDummy']; isLiveCare = json['IsLiveCare']; @@ -114,16 +114,16 @@ class ClinicDoctor { personRate = json['PersonRate']; projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters']; qR = json['QR']; - qRString = json['QRString']; + qRString = json['QRString?']; rateNumber = json['RateNumber']; serviceID = json['ServiceID']; setupID = json['SetupID']; - speciality = json['Speciality'].cast(); + speciality = json['Speciality'].cast(); workingHours = json['WorkingHours']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['ClinicID'] = this.clinicID; data['ClinicName'] = this.clinicName; data['DoctorTitle'] = this.doctorTitle; @@ -142,7 +142,7 @@ class ClinicDoctor { data['DoctorRate'] = this.doctorRate; data['Gender'] = this.gender; data['GenderDescription'] = this.genderDescription; - data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['IsAppoint?mentAllowed'] = this.isAppointmentAllowed; data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; data['IsDoctorDummy'] = this.isDoctorDummy; data['IsLiveCare'] = this.isLiveCare; @@ -157,7 +157,7 @@ class ClinicDoctor { data['PersonRate'] = this.personRate; data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters; data['QR'] = this.qR; - data['QRString'] = this.qRString; + data['QRString?'] = this.qRString; data['RateNumber'] = this.rateNumber; data['ServiceID'] = this.serviceID; data['SetupID'] = this.setupID; @@ -165,5 +165,4 @@ class ClinicDoctor { data['WorkingHours'] = this.workingHours; return data; } - -} \ No newline at end of file +} diff --git a/lib/models/patient/my_referral/my_referral_patient_model.dart b/lib/models/patient/my_referral/my_referral_patient_model.dart index f1506f8e..f79a57c3 100644 --- a/lib/models/patient/my_referral/my_referral_patient_model.dart +++ b/lib/models/patient/my_referral/my_referral_patient_model.dart @@ -1,108 +1,108 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class MyReferralPatientModel { - int projectID; - int lineItemNo; - int doctorID; - int patientID; - String doctorName; - String doctorNameN; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; - int gender; - String dateofBirth; - String mobileNumber; - String emailAddress; - String patientIdentificationNo; - int patientType; - String admissionNo; - String admissionDate; - String roomID; - String bedID; - String nursingStationID; - String description; - String nationalityName; - String nationalityNameN; - String clinicDescription; - String clinicDescriptionN; - int referralDoctor; - int referringDoctor; - int referralClinic; - int referringClinic; - int referralStatus; - String referralDate; - String referringDoctorRemarks; - String referredDoctorRemarks; - String referralResponseOn; - int priority; - int frequency; - DateTime mAXResponseTime; - String age; - String frequencyDescription; - String genderDescription; - bool isDoctorLate; - bool isDoctorResponse; - String nursingStationName; - String priorityDescription; - String referringClinicDescription; - String referringDoctorName; + int? projectID; + int? lineItemNo; + int? doctorID; + int? patientID; + String? doctorName; + String? doctorNameN; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? gender; + String? dateofBirth; + String? mobileNumber; + String? emailAddress; + String? patientIdentificationNo; + int? patientType; + String? admissionNo; + String? admissionDate; + String? roomID; + String? bedID; + String? nursingStationID; + String? description; + String? nationalityName; + String? nationalityNameN; + String? clinicDescription; + String? clinicDescriptionN; + int? referralDoctor; + int? referringDoctor; + int? referralClinic; + int? referringClinic; + int? referralStatus; + String? referralDate; + String? referringDoctorRemarks; + String? referredDoctorRemarks; + String? referralResponseOn; + int? priority; + int? frequency; + DateTime? mAXResponseTime; + String? age; + String? frequencyDescription; + String? genderDescription; + bool? isDoctorLate; + bool? isDoctorResponse; + String? nursingStationName; + String? priorityDescription; + String? referringClinicDescription; + String? referringDoctorName; MyReferralPatientModel( {this.projectID, - this.lineItemNo, - this.doctorID, - this.patientID, - this.doctorName, - this.doctorNameN, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.patientIdentificationNo, - this.patientType, - this.admissionNo, - this.admissionDate, - this.roomID, - this.bedID, - this.nursingStationID, - this.description, - this.nationalityName, - this.nationalityNameN, - this.clinicDescription, - this.clinicDescriptionN, - this.referralDoctor, - this.referringDoctor, - this.referralClinic, - this.referringClinic, - this.referralStatus, - this.referralDate, - this.referringDoctorRemarks, - this.referredDoctorRemarks, - this.referralResponseOn, - this.priority, - this.frequency, - this.mAXResponseTime, - this.age, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nursingStationName, - this.priorityDescription, - this.referringClinicDescription, - this.referringDoctorName}); + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.clinicDescription, + this.clinicDescriptionN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.age, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName}); - MyReferralPatientModel.fromJson(Map json) { + MyReferralPatientModel.fromJson(Map json) { projectID = json['ProjectID']; lineItemNo = json['LineItemNo']; doctorID = json['DoctorID']; @@ -154,8 +154,8 @@ class MyReferralPatientModel { referringDoctorName = json['ReferringDoctorName']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['ProjectID'] = this.projectID; data['LineItemNo'] = this.lineItemNo; data['DoctorID'] = this.doctorID; diff --git a/lib/models/patient/my_referral/my_referred_patient_model.dart b/lib/models/patient/my_referral/my_referred_patient_model.dart index 44a427f7..0dad14af 100644 --- a/lib/models/patient/my_referral/my_referred_patient_model.dart +++ b/lib/models/patient/my_referral/my_referred_patient_model.dart @@ -1,136 +1,134 @@ - - class MyReferredPatientModel { - String rowID; - int projectID; - int lineItemNo; - int doctorID; - int patientID; - String doctorName; - String doctorNameN; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; - int gender; - String dateofBirth; - String mobileNumber; - String emailAddress; - String patientIdentificationNo; - int patientType; - String admissionNo; - String admissionDate; - String roomID; - String bedID; - String nursingStationID; - String description; - String nationalityName; - String nationalityNameN; - String clinicDescription; - String clinicDescriptionN; - int referralDoctor; - int referringDoctor; - int referralClinic; - int referringClinic; - int referralStatus; - String referralDate; - String referringDoctorRemarks; - String referredDoctorRemarks; - String referralResponseOn; - int priority; - int frequency; - String mAXResponseTime; - int episodeID; - int appointmentNo; - String appointmentDate; - int appointmentType; - int patientMRN; - String createdOn; - int clinicID; - String nationalityID; - String age; - String doctorImageURL; - String frequencyDescription; - String genderDescription; - bool isDoctorLate; - bool isDoctorResponse; - String nationalityFlagURL; - String nursingStationName; - String priorityDescription; - String referringClinicDescription; - String referralDoctorName; - String referralClinicDescription; - String referringDoctorName; - bool isReferralDoctorSameBranch; - String referralStatusDesc; + String? rowID; + int? projectID; + int? lineItemNo; + int? doctorID; + int? patientID; + String? doctorName; + String? doctorNameN; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? gender; + String? dateofBirth; + String? mobileNumber; + String? emailAddress; + String? patientIdentificationNo; + int? patientType; + String? admissionNo; + String? admissionDate; + String? roomID; + String? bedID; + String? nursingStationID; + String? description; + String? nationalityName; + String? nationalityNameN; + String? clinicDescription; + String? clinicDescriptionN; + int? referralDoctor; + int? referringDoctor; + int? referralClinic; + int? referringClinic; + int? referralStatus; + String? referralDate; + String? referringDoctorRemarks; + String? referredDoctorRemarks; + String? referralResponseOn; + int? priority; + int? frequency; + String? mAXResponseTime; + int? episodeID; + int? appointmentNo; + String? appointmentDate; + int? appointmentType; + int? patientMRN; + String? createdOn; + int? clinicID; + String? nationalityID; + String? age; + String? doctorImageURL; + String? frequencyDescription; + String? genderDescription; + bool? isDoctorLate; + bool? isDoctorResponse; + String? nationalityFlagURL; + String? nursingStationName; + String? priorityDescription; + String? referringClinicDescription; + String? referralDoctorName; + String? referralClinicDescription; + String? referringDoctorName; + bool? isReferralDoctorSameBranch; + String? referralStatusDesc; - MyReferredPatientModel({ - this.rowID, - this.projectID, - this.lineItemNo, - this.doctorID, - this.patientID, - this.doctorName, - this.doctorNameN, - this.firstName, - this.middleName, - this.lastName, - this.firstNameN, - this.middleNameN, - this.lastNameN, - this.gender, - this.dateofBirth, - this.mobileNumber, - this.emailAddress, - this.patientIdentificationNo, - this.patientType, - this.admissionNo, - this.admissionDate, - this.roomID, - this.bedID, - this.nursingStationID, - this.description, - this.nationalityName, - this.nationalityNameN, - this.clinicDescription, - this.clinicDescriptionN, - this.referralDoctor, - this.referringDoctor, - this.referralClinic, - this.referringClinic, - this.referralStatus, - this.referralDate, - this.referringDoctorRemarks, - this.referredDoctorRemarks, - this.referralResponseOn, - this.priority, - this.frequency, - this.mAXResponseTime, - this.episodeID, - this.appointmentNo, - this.appointmentDate, - this.appointmentType, - this.patientMRN, - this.createdOn, - this.clinicID, - this.nationalityID, - this.age, - this.doctorImageURL, - this.frequencyDescription, - this.genderDescription, - this.isDoctorLate, - this.isDoctorResponse, - this.nationalityFlagURL, - this.nursingStationName, - this.priorityDescription, - this.referringClinicDescription, - this.referringDoctorName, - this.isReferralDoctorSameBranch, - this.referralDoctorName, - this.referralClinicDescription,this.referralStatusDesc - }); + MyReferredPatientModel( + {this.rowID, + this.projectID, + this.lineItemNo, + this.doctorID, + this.patientID, + this.doctorName, + this.doctorNameN, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.mobileNumber, + this.emailAddress, + this.patientIdentificationNo, + this.patientType, + this.admissionNo, + this.admissionDate, + this.roomID, + this.bedID, + this.nursingStationID, + this.description, + this.nationalityName, + this.nationalityNameN, + this.clinicDescription, + this.clinicDescriptionN, + this.referralDoctor, + this.referringDoctor, + this.referralClinic, + this.referringClinic, + this.referralStatus, + this.referralDate, + this.referringDoctorRemarks, + this.referredDoctorRemarks, + this.referralResponseOn, + this.priority, + this.frequency, + this.mAXResponseTime, + this.episodeID, + this.appointmentNo, + this.appointmentDate, + this.appointmentType, + this.patientMRN, + this.createdOn, + this.clinicID, + this.nationalityID, + this.age, + this.doctorImageURL, + this.frequencyDescription, + this.genderDescription, + this.isDoctorLate, + this.isDoctorResponse, + this.nationalityFlagURL, + this.nursingStationName, + this.priorityDescription, + this.referringClinicDescription, + this.referringDoctorName, + this.isReferralDoctorSameBranch, + this.referralDoctorName, + this.referralClinicDescription, + this.referralStatusDesc}); MyReferredPatientModel.fromJson(Map json) { rowID = json['RowID']; diff --git a/lib/models/patient/orders_request.dart b/lib/models/patient/orders_request.dart index 1372cfd6..8fb336aa 100644 --- a/lib/models/patient/orders_request.dart +++ b/lib/models/patient/orders_request.dart @@ -1,4 +1,3 @@ - /* *@author: Ibrahim Albitar *@Date:15/5/2020 @@ -23,36 +22,36 @@ */ class OrdersRequest { - int visitType; - int admissionNo; - int projectID; - int languageID; - String stamp; - String iPAdress; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; - double versionID; + int? visitType; + int? admissionNo; + int? projectID; + int? languageID; + String? stamp; + String? iPAdress; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; + double? versionID; OrdersRequest( - {this.visitType , + {this.visitType, this.admissionNo, this.projectID = 12, this.stamp = '2020-04-23T21:01:21.492Z', this.languageID = 2, this.iPAdress = '11.11.11.11', this.channel = 9, - this.tokenID , + this.tokenID, this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, this.versionID = 5.5, this.patientOutSA = false}); - OrdersRequest.fromJson(Map json) { + OrdersRequest.fromJson(Map json) { visitType = json['VisitType']; admissionNo = json['AdmissionNo']; projectID = json['ProjectID']; @@ -68,8 +67,8 @@ class OrdersRequest { versionID = json['VersionID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['VisitType'] = this.visitType; data['AdmissionNo'] = this.admissionNo; data['ProjectID'] = this.projectID; @@ -85,4 +84,4 @@ class OrdersRequest { data['VersionID'] = this.versionID; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/patiant_info_model.dart b/lib/models/patient/patiant_info_model.dart index 71d46dc9..16377e7a 100644 --- a/lib/models/patient/patiant_info_model.dart +++ b/lib/models/patient/patiant_info_model.dart @@ -1,79 +1,79 @@ // TODO : it have to be changed. class PatiantInformtion { - final PatiantInformtion patientDetails; - int genderInt; + final PatiantInformtion? patientDetails; + int? genderInt; dynamic age; - String appointmentDate; + String? appointmentDate; dynamic appointmentNo; dynamic appointmentType; - String arrivalTime; - String arrivalTimeD; - int callStatus; + String? arrivalTime; + String? arrivalTimeD; + int? callStatus; dynamic callStatusDisc; - int callTypeID; - String clientRequestID; - String clinicName; - String consoltationEnd; - String consultationNotes; - int appointmentTypeId; - String arrivedOn; - int clinicGroupId; - String companyName; + int? callTypeID; + String? clientRequestID; + String? clinicName; + String? consoltationEnd; + String? consultationNotes; + int? appointmentTypeId; + String? arrivedOn; + int? clinicGroupId; + String? companyName; dynamic dischargeStatus; dynamic doctorDetails; - int doctorId; - String endTime; - int episodeNo; - int fallRiskScore; - bool isSigned; - int medicationOrders; - String mobileNumber; - String nationality; - int projectId; - int clinicId; + int? doctorId; + String? endTime; + int? episodeNo; + int? fallRiskScore; + bool? isSigned; + int? medicationOrders; + String? mobileNumber; + String? nationality; + int? projectId; + int? clinicId; dynamic patientId; - String doctorName; - String doctorNameN; - String firstName; - String middleName; - String lastName; - String firstNameN; - String middleNameN; - String lastNameN; - String fullName; - String fullNameN; - int gender; - String dateofBirth; - String nationalityId; - String emailAddress; - String patientIdentificationNo; - int patientType; - int patientMRN; - String admissionNo; - String admissionDate; - String createdOn; - String roomId; - String bedId; - String nursingStationId; - String description; - String clinicDescription; - String clinicDescriptionN; - String nationalityName; - String nationalityNameN; - String genderDescription; - String nursingStationName; - String startTime; - String visitType; - String nationalityFlagURL; - int patientStatus; - int patientStatusType; - int visitTypeId; - String startTimes; - String dischargeDate; - int status; - int vcId; - String voipToken; + String? doctorName; + String? doctorNameN; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + String? fullName; + String? fullNameN; + int? gender; + String? dateofBirth; + String? nationalityId; + String? emailAddress; + String? patientIdentificationNo; + int? patientType; + int? patientMRN; + String? admissionNo; + String? admissionDate; + String? createdOn; + String? roomId; + String? bedId; + String? nursingStationId; + String? description; + String? clinicDescription; + String? clinicDescriptionN; + String? nationalityName; + String? nationalityNameN; + String? genderDescription; + String? nursingStationName; + String? startTime; + String? visitType; + String? nationalityFlagURL; + int? patientStatus; + int? patientStatusType; + int? visitTypeId; + String? startTimes; + String? dischargeDate; + int? status; + int? vcId; + String? voipToken; PatiantInformtion( {this.patientDetails, @@ -150,17 +150,14 @@ class PatiantInformtion { this.vcId, this.voipToken}); - factory PatiantInformtion.fromJson(Map json) => - PatiantInformtion( - patientDetails: json['patientDetails'] != null - ? new PatiantInformtion.fromJson(json['patientDetails']) - : null, + factory PatiantInformtion.fromJson(Map json) => PatiantInformtion( + 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"], patientId: json["PatientID"] != null ? json["PatientID"] is String - ? int.parse(json["PatientID"]) + ? int?.parse(json["PatientID"]) : json["PatientID"] : json["patientID"] ?? json['patientMRN'] ?? json['PatientMRN'], doctorName: json["DoctorName"] ?? json["doctorName"], @@ -173,18 +170,16 @@ class PatiantInformtion { lastNameN: json["LastNameN"] ?? json["lastNameN"], gender: json["Gender"] != null ? json["Gender"] is String - ? int.parse(json["Gender"]) + ? int?.parse(json["Gender"]) : json["Gender"] : json["gender"], fullName: json["fullName"] ?? json["fullName"] ?? json["PatientName"], - fullNameN: - json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"], + fullNameN: json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"], dateofBirth: json["DateofBirth"] ?? json["dob"] ?? json['DateOfBirth'], 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"], @@ -194,16 +189,10 @@ 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"], @@ -211,8 +200,7 @@ 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'], @@ -224,17 +212,15 @@ class PatiantInformtion { isSigned: json['isSigned'], medicationOrders: json['medicationOrders'], nationality: json['nationality'] ?? json['NationalityNameN'], - patientMRN: json['patientMRN'] ?? json['PatientMRN']?? ( - json["PatientID"] != null ? - int.parse(json["PatientID"].toString()) - : int.parse(json["patientID"].toString())), + patientMRN: json['patientMRN'] ?? + json['PatientMRN'] ?? + (json["PatientID"] != null + ? int?.parse(json["PatientID"].toString()) + : 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'], diff --git a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart b/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart index 1d0da9c5..c37cd72b 100644 --- a/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart +++ b/lib/models/patient/patient_arrival/get_patient_arrival_list_request_model.dart @@ -1,12 +1,12 @@ class GetPatientArrivalListRequestModel { - String vidaAuthTokenID; - String from; - String to; - String doctorID; - int pageIndex; - int pageSize; - int clinicID; - int patientMRN; + String? vidaAuthTokenID; + String? from; + String? to; + String? doctorID; + int? pageIndex; + int? pageSize; + int? clinicID; + int? patientMRN; GetPatientArrivalListRequestModel( {this.vidaAuthTokenID, @@ -40,7 +40,6 @@ class GetPatientArrivalListRequestModel { data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['PatientMRN'] = this.patientMRN; - return data; } } diff --git a/lib/models/patient/patient_model.dart b/lib/models/patient/patient_model.dart index 7368c538..27da32f1 100644 --- a/lib/models/patient/patient_model.dart +++ b/lib/models/patient/patient_model.dart @@ -7,110 +7,108 @@ *@desc: */ class PatientModel { - int ProjectID; - int ClinicID; - int DoctorID; - String FirstName; + int? ProjectID; + int? ClinicID; + int? DoctorID; + String? FirstName; - String MiddleName; - String LastName; - String PatientMobileNumber; - String PatientIdentificationID; - int PatientID; - String From; - String To; - int LanguageID; - String stamp; - String IPAdress; - double VersionID; - int Channel; - String TokenID; - String SessionID; - bool IsLoginForDoctorApp; - bool PatientOutSA; - int Searchtype; - String IdentificationNo; - String MobileNo; - int get getProjectID => ProjectID; + String? MiddleName; + String? LastName; + String? PatientMobileNumber; + String? PatientIdentificationID; + int? PatientID; + String? From; + String? To; + int? LanguageID; + String? stamp; + String? IPAdress; + double? VersionID; + int? Channel; + String? TokenID; + String? SessionID; + bool? IsLoginForDoctorApp; + bool? PatientOutSA; + int? Searchtype; + String? IdentificationNo; + String? MobileNo; + int? get getProjectID => ProjectID; - set setProjectID(int ProjectID) => this.ProjectID = ProjectID; + set setProjectID(int? ProjectID) => this.ProjectID = ProjectID; - int get getClinicID => ClinicID; + int? get getClinicID => ClinicID; - set setClinicID(int ClinicID) => this.ClinicID = ClinicID; + set setClinicID(int? ClinicID) => this.ClinicID = ClinicID; - int get getDoctorID => DoctorID; + int? get getDoctorID => DoctorID; - set setDoctorID(int DoctorID) => this.DoctorID = DoctorID; - String get getFirstName => FirstName; + set setDoctorID(int? DoctorID) => this.DoctorID = DoctorID; + String? get getFirstName => FirstName; - set setFirstName(String FirstName) => this.FirstName = FirstName; + set setFirstName(String? FirstName) => this.FirstName = FirstName; - String get getMiddleName => MiddleName; + String? get getMiddleName => MiddleName; - set setMiddleName(String MiddleName) => this.MiddleName = MiddleName; + set setMiddleName(String? MiddleName) => this.MiddleName = MiddleName; - String get getLastName => LastName; + String? get getLastName => LastName; - set setLastName(String LastName) => this.LastName = LastName; + set setLastName(String? LastName) => this.LastName = LastName; - String get getPatientMobileNumber => PatientMobileNumber; + String? get getPatientMobileNumber => PatientMobileNumber; - set setPatientMobileNumber(String PatientMobileNumber) => - this.PatientMobileNumber = PatientMobileNumber; + set setPatientMobileNumber(String? PatientMobileNumber) => this.PatientMobileNumber = PatientMobileNumber; -// String get getPatientIdentificationID => PatientIdentificationID; +// String? get getPatientIdentificationID => PatientIdentificationID; -// set setPatientIdentificationID(String PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID; +// set setPatientIdentificationID(String? PatientIdentificationID) => this.PatientIdentificationID = PatientIdentificationID; - int get getPatientID => PatientID; + int? get getPatientID => PatientID; - set setPatientID(int PatientID) => this.PatientID = PatientID; + set setPatientID(int? PatientID) => this.PatientID = PatientID; - String get getFrom => From; + String? get getFrom => From; - set setFrom(String From) => this.From = From; + set setFrom(String? From) => this.From = From; - String get getTo => To; + String? get getTo => To; - set setTo(String To) => this.To = To; + set setTo(String? To) => this.To = To; - int get getLanguageID => LanguageID; + int? get getLanguageID => LanguageID; - set setLanguageID(int LanguageID) => this.LanguageID = LanguageID; + set setLanguageID(int? LanguageID) => this.LanguageID = LanguageID; - String get getStamp => stamp; + String? get getStamp => stamp; - set setStamp(String stamp) => this.stamp = stamp; + set setStamp(String? stamp) => this.stamp = stamp; - String get getIPAdress => IPAdress; + String? get getIPAdress => IPAdress; - set setIPAdress(String IPAdress) => this.IPAdress = IPAdress; + set setIPAdress(String? IPAdress) => this.IPAdress = IPAdress; - double get getVersionID => VersionID; + double? get getVersionID => VersionID; - set setVersionID(double VersionID) => this.VersionID = VersionID; + set setVersionID(double? VersionID) => this.VersionID = VersionID; - int get getChannel => Channel; + int? get getChannel => Channel; - set setChannel(int Channel) => this.Channel = Channel; + set setChannel(int? Channel) => this.Channel = Channel; - String get getTokenID => TokenID; + String? get getTokenID => TokenID; - set setTokenID(String TokenID) => this.TokenID = TokenID; + set setTokenID(String? TokenID) => this.TokenID = TokenID; - String get getSessionID => SessionID; + String? get getSessionID => SessionID; - set setSessionID(String SessionID) => this.SessionID = SessionID; + set setSessionID(String? SessionID) => this.SessionID = SessionID; - bool get getIsLoginForDoctorApp => IsLoginForDoctorApp; + bool? get getIsLoginForDoctorApp => IsLoginForDoctorApp; - set setIsLoginForDoctorApp(bool IsLoginForDoctorApp) => - this.IsLoginForDoctorApp = IsLoginForDoctorApp; + set setIsLoginForDoctorApp(bool? IsLoginForDoctorApp) => this.IsLoginForDoctorApp = IsLoginForDoctorApp; - bool get getPatientOutSA => PatientOutSA; + bool? get getPatientOutSA => PatientOutSA; - set setPatientOutSA(bool PatientOutSA) => this.PatientOutSA = PatientOutSA; + set setPatientOutSA(bool? PatientOutSA) => this.PatientOutSA = PatientOutSA; PatientModel( {this.ProjectID, @@ -137,12 +135,12 @@ class PatientModel { this.IdentificationNo, this.MobileNo}); - factory PatientModel.fromJson(Map json) => PatientModel( + factory PatientModel.fromJson(Map json) => PatientModel( FirstName: json["FirstName"], LastName: json["LasttName"], ); - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['ProjectID'] = this.ProjectID; data['ClinicID'] = this.ClinicID; data['DoctorID'] = this.DoctorID; diff --git a/lib/models/patient/prescription/prescription_report.dart b/lib/models/patient/prescription/prescription_report.dart index 05d28bdc..10119e75 100644 --- a/lib/models/patient/prescription/prescription_report.dart +++ b/lib/models/patient/prescription/prescription_report.dart @@ -1,70 +1,70 @@ class PrescriptionReport { - String address; - int appointmentNo; - String clinic; - String companyName; - int days; - String doctorName; - int doseDailyQuantity; - String frequency; - int frequencyNumber; + String? address; + int? appointmentNo; + String? clinic; + String? companyName; + int? days; + String? doctorName; + int? doseDailyQuantity; + String? frequency; + int? frequencyNumber; Null imageExtension; Null imageSRCUrl; Null imageString; Null imageThumbUrl; - String isCovered; - String itemDescription; - int itemID; - String orderDate; - int patientID; - String patientName; - String phoneOffice1; + String? isCovered; + String? itemDescription; + int? itemID; + String? orderDate; + int? patientID; + String? patientName; + String? phoneOffice1; Null prescriptionQR; - int prescriptionTimes; + int? prescriptionTimes; Null productImage; - String productImageBase64; - String productImageString; - int projectID; - String projectName; - String remarks; - String route; - String sKU; - int scaleOffset; - String startDate; + String? productImageBase64; + String? productImageString; + int? projectID; + String? projectName; + String? remarks; + String? route; + String? sKU; + int? scaleOffset; + String? startDate; PrescriptionReport( {this.address, - this.appointmentNo, - this.clinic, - this.companyName, - this.days, - this.doctorName, - this.doseDailyQuantity, - this.frequency, - this.frequencyNumber, - this.imageExtension, - this.imageSRCUrl, - this.imageString, - this.imageThumbUrl, - this.isCovered, - this.itemDescription, - this.itemID, - this.orderDate, - this.patientID, - this.patientName, - this.phoneOffice1, - this.prescriptionQR, - this.prescriptionTimes, - this.productImage, - this.productImageBase64, - this.productImageString, - this.projectID, - this.projectName, - this.remarks, - this.route, - this.sKU, - this.scaleOffset, - this.startDate}); + this.appointmentNo, + this.clinic, + this.companyName, + this.days, + this.doctorName, + this.doseDailyQuantity, + this.frequency, + this.frequencyNumber, + this.imageExtension, + this.imageSRCUrl, + this.imageString, + this.imageThumbUrl, + this.isCovered, + this.itemDescription, + this.itemID, + this.orderDate, + this.patientID, + this.patientName, + this.phoneOffice1, + this.prescriptionQR, + this.prescriptionTimes, + this.productImage, + this.productImageBase64, + this.productImageString, + this.projectID, + this.projectName, + this.remarks, + this.route, + this.sKU, + this.scaleOffset, + this.startDate}); PrescriptionReport.fromJson(Map json) { address = json['Address']; diff --git a/lib/models/patient/prescription/prescription_report_for_in_patient.dart b/lib/models/patient/prescription/prescription_report_for_in_patient.dart index 21cb13b1..f6285885 100644 --- a/lib/models/patient/prescription/prescription_report_for_in_patient.dart +++ b/lib/models/patient/prescription/prescription_report_for_in_patient.dart @@ -1,104 +1,104 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class PrescriptionReportForInPatient { - int admissionNo; - int authorizedBy; + int? admissionNo; + int? authorizedBy; Null bedNo; - String comments; - int createdBy; - String createdByName; + String? comments; + int? createdBy; + String? createdByName; Null createdByNameN; - String createdOn; - String direction; - int directionID; + String? createdOn; + String? direction; + int? directionID; Null directionN; - String dose; - int editedBy; + String? dose; + int? editedBy; Null iVDiluentLine; - int iVDiluentType; + int? iVDiluentType; Null iVDiluentVolume; Null iVRate; Null iVStability; - String itemDescription; - int itemID; - int lineItemNo; - int locationId; - int noOfDoses; - int orderNo; - int patientID; - String pharmacyRemarks; - DateTime prescriptionDatetime; - int prescriptionNo; - String processedBy; - int projectID; - int refillID; - String refillType; + String? itemDescription; + int? itemID; + int? lineItemNo; + int? locationId; + int? noOfDoses; + int? orderNo; + int? patientID; + String? pharmacyRemarks; + DateTime? prescriptionDatetime; + int? prescriptionNo; + String? processedBy; + int? projectID; + int? refillID; + String? refillType; Null refillTypeN; - int reviewedPharmacist; + int? reviewedPharmacist; Null roomId; - String route; - int routeId; + String? route; + int? routeId; Null routeN; Null setupID; - DateTime startDatetime; - int status; - String statusDescription; + DateTime? startDatetime; + int? status; + String? statusDescription; Null statusDescriptionN; - DateTime stopDatetime; - int unitofMeasurement; - String unitofMeasurementDescription; + DateTime? stopDatetime; + int? unitofMeasurement; + String? unitofMeasurementDescription; Null unitofMeasurementDescriptionN; PrescriptionReportForInPatient( {this.admissionNo, - this.authorizedBy, - this.bedNo, - this.comments, - this.createdBy, - this.createdByName, - this.createdByNameN, - this.createdOn, - this.direction, - this.directionID, - this.directionN, - this.dose, - this.editedBy, - this.iVDiluentLine, - this.iVDiluentType, - this.iVDiluentVolume, - this.iVRate, - this.iVStability, - this.itemDescription, - this.itemID, - this.lineItemNo, - this.locationId, - this.noOfDoses, - this.orderNo, - this.patientID, - this.pharmacyRemarks, - this.prescriptionDatetime, - this.prescriptionNo, - this.processedBy, - this.projectID, - this.refillID, - this.refillType, - this.refillTypeN, - this.reviewedPharmacist, - this.roomId, - this.route, - this.routeId, - this.routeN, - this.setupID, - this.startDatetime, - this.status, - this.statusDescription, - this.statusDescriptionN, - this.stopDatetime, - this.unitofMeasurement, - this.unitofMeasurementDescription, - this.unitofMeasurementDescriptionN}); + this.authorizedBy, + this.bedNo, + this.comments, + this.createdBy, + this.createdByName, + this.createdByNameN, + this.createdOn, + this.direction, + this.directionID, + this.directionN, + this.dose, + this.editedBy, + this.iVDiluentLine, + this.iVDiluentType, + this.iVDiluentVolume, + this.iVRate, + this.iVStability, + this.itemDescription, + this.itemID, + this.lineItemNo, + this.locationId, + this.noOfDoses, + this.orderNo, + this.patientID, + this.pharmacyRemarks, + this.prescriptionDatetime, + this.prescriptionNo, + this.processedBy, + this.projectID, + this.refillID, + this.refillType, + this.refillTypeN, + this.reviewedPharmacist, + this.roomId, + this.route, + this.routeId, + this.routeN, + this.setupID, + this.startDatetime, + this.status, + this.statusDescription, + this.statusDescriptionN, + this.stopDatetime, + this.unitofMeasurement, + this.unitofMeasurementDescription, + this.unitofMeasurementDescriptionN}); - PrescriptionReportForInPatient.fromJson(Map json) { + PrescriptionReportForInPatient.fromJson(Map json) { admissionNo = json['AdmissionNo']; authorizedBy = json['AuthorizedBy']; bedNo = json['BedNo']; @@ -138,7 +138,7 @@ class PrescriptionReportForInPatient { routeId = json['RouteId']; routeN = json['RouteN']; setupID = json['SetupID']; - startDatetime = AppDateUtils.convertStringToDate(json['StartDatetime']) ; + startDatetime = AppDateUtils.convertStringToDate(json['StartDatetime']); status = json['Status']; statusDescription = json['StatusDescription']; statusDescriptionN = json['StatusDescriptionN']; @@ -148,8 +148,8 @@ class PrescriptionReportForInPatient { unitofMeasurementDescriptionN = json['UnitofMeasurementDescriptionN']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['AdmissionNo'] = this.admissionNo; data['AuthorizedBy'] = this.authorizedBy; data['BedNo'] = this.bedNo; diff --git a/lib/models/patient/prescription/prescription_req_model.dart b/lib/models/patient/prescription/prescription_req_model.dart deleted file mode 100644 index 9141c282..00000000 --- a/lib/models/patient/prescription/prescription_req_model.dart +++ /dev/null @@ -1,71 +0,0 @@ -/* - *@author: Elham Rababah - *@Date:6/5/2020 - *@param: - *@return:PrescriptionReqModel - *@desc: PrescriptionReqModel class - */ -class PrescriptionReqModel { - int patientID; - int setupID; - int projectID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; - - PrescriptionReqModel( - {this.patientID, - this.setupID, - this.projectID, - this.languageID, - this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress = '11.11.11.11', - this.versionID = 5.5, - this.channel = 9, - this.sessionID = 'E2bsEeYEJo', - this.tokenID, - this.isLoginForDoctorApp = true, - this.patientOutSA = false, - this.patientTypeID}); - - PrescriptionReqModel.fromJson(Map json) { - patientID = json['PatientID']; - setupID = json['SetupID']; - projectID = json['ProjectID']; - languageID = json['LanguageID']; - stamp = json['stamp']; - iPAdress = json['IPAdress']; - versionID = json['VersionID']; - channel = json['Channel']; - tokenID = json['TokenID']; - sessionID = json['SessionID']; - isLoginForDoctorApp = json['IsLoginForDoctorApp']; - patientOutSA = json['PatientOutSA']; - patientTypeID = json['PatientTypeID']; - } - - Map toJson() { - final Map data = new Map(); - data['PatientID'] = this.patientID; - data['SetupID'] = this.setupID; - data['ProjectID'] = this.projectID; - data['LanguageID'] = this.languageID; - data['stamp'] = this.stamp; - data['IPAdress'] = this.iPAdress; - data['VersionID'] = this.versionID; - data['Channel'] = this.channel; - data['TokenID'] = this.tokenID; - data['SessionID'] = this.sessionID; - data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; - data['PatientOutSA'] = this.patientOutSA; - data['PatientTypeID'] = this.patientTypeID; - return data; - } -} diff --git a/lib/models/patient/prescription/prescription_res_model.dart b/lib/models/patient/prescription/prescription_res_model.dart index 9c7e296d..cc7fc44d 100644 --- a/lib/models/patient/prescription/prescription_res_model.dart +++ b/lib/models/patient/prescription/prescription_res_model.dart @@ -6,39 +6,39 @@ *@desc: PrescriptionResModel class */ class PrescriptionResModel { - String setupID; - int projectID; - int patientID; - int appointmentNo; - String appointmentDate; - String doctorName; - String clinicDescription; - String name; - int episodeID; - int actualDoctorRate; - int admission; - int clinicID; - String companyName; - String despensedStatus; - String dischargeDate; - int dischargeNo; - int doctorID; - String doctorImageURL; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - bool isInOutPatient; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - bool isInsurancePatient; - String nationalityFlagURL; - int noOfPatientsRate; - String qR; - List speciality; + String? setupID; + int? projectID; + int? patientID; + int? appointmentNo; + String? appointmentDate; + String? doctorName; + String? clinicDescription; + String? name; + int? episodeID; + int? actualDoctorRate; + int? admission; + int? clinicID; + String? companyName; + String? despensedStatus; + String? dischargeDate; + int? dischargeNo; + int? doctorID; + String? doctorImageURL; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + bool? isInsurancePatient; + String? nationalityFlagURL; + int? noOfPatientsRate; + String? qR; + List? speciality; PrescriptionResModel( {this.setupID, @@ -75,7 +75,7 @@ class PrescriptionResModel { this.qR, this.speciality}); - PrescriptionResModel.fromJson(Map json) { + PrescriptionResModel.fromJson(Map json) { setupID = json['SetupID']; projectID = json['ProjectID']; patientID = json['PatientID']; @@ -111,8 +111,8 @@ class PrescriptionResModel { speciality = json['Speciality']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['PatientID'] = this.patientID; diff --git a/lib/models/patient/prescription/request_prescription_report.dart b/lib/models/patient/prescription/request_prescription_report.dart index 0581692e..078fd874 100644 --- a/lib/models/patient/prescription/request_prescription_report.dart +++ b/lib/models/patient/prescription/request_prescription_report.dart @@ -1,34 +1,34 @@ class RequestPrescriptionReport { - int projectID; - int appointmentNo; - int episodeID; - String setupID; - int patientTypeID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? projectID; + int? appointmentNo; + int? episodeID; + String? setupID; + int? patientTypeID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; RequestPrescriptionReport( {this.projectID, - this.appointmentNo, - this.episodeID, - this.setupID, - this.patientTypeID, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA}); + this.appointmentNo, + this.episodeID, + this.setupID, + this.patientTypeID, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); RequestPrescriptionReport.fromJson(Map json) { projectID = json['ProjectID']; diff --git a/lib/models/patient/progress_note_request.dart b/lib/models/patient/progress_note_request.dart index fe0add5f..e19c50ed 100644 --- a/lib/models/patient/progress_note_request.dart +++ b/lib/models/patient/progress_note_request.dart @@ -1,4 +1,3 @@ - /* *@author: Ibrahim Albitar *@Date:15/5/2020 @@ -23,36 +22,36 @@ */ class ProgressNoteRequest { - int visitType; - int admissionNo; - int projectID; - int languageID; - String stamp; - String iPAdress; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; - double versionID; + int? visitType; + int? admissionNo; + int? projectID; + int? languageID; + String? stamp; + String? iPAdress; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; + double? versionID; ProgressNoteRequest( - {this.visitType , + {this.visitType, this.admissionNo, this.projectID = 12, this.stamp = '2020-04-23T21:01:21.492Z', this.languageID = 2, this.iPAdress = '11.11.11.11', this.channel = 9, - this.tokenID , + this.tokenID, this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, this.versionID = 5.5, this.patientOutSA = false}); - ProgressNoteRequest.fromJson(Map json) { + ProgressNoteRequest.fromJson(Map json) { visitType = json['VisitType']; admissionNo = json['AdmissionNo']; projectID = json['ProjectID']; @@ -68,8 +67,8 @@ class ProgressNoteRequest { versionID = json['VersionID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['VisitType'] = this.visitType; data['AdmissionNo'] = this.admissionNo; data['ProjectID'] = this.projectID; @@ -85,4 +84,4 @@ class ProgressNoteRequest { data['VersionID'] = this.versionID; return data; } -} \ No newline at end of file +} diff --git a/lib/models/patient/radiology/radiology_req_model.dart b/lib/models/patient/radiology/radiology_req_model.dart index 47154d8b..3b510019 100644 --- a/lib/models/patient/radiology/radiology_req_model.dart +++ b/lib/models/patient/radiology/radiology_req_model.dart @@ -6,18 +6,18 @@ *@desc: RadiologyReqModel class */ class RadiologyReqModel { - int patientID; - int projectID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + int? patientID; + int? projectID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; RadiologyReqModel( {this.patientID, @@ -33,7 +33,7 @@ class RadiologyReqModel { this.patientOutSA = false, this.patientTypeID}); - RadiologyReqModel.fromJson(Map json) { + RadiologyReqModel.fromJson(Map json) { patientID = json['PatientID']; projectID = json['ProjectID']; languageID = json['LanguageID']; @@ -48,8 +48,8 @@ class RadiologyReqModel { patientTypeID = json['PatientTypeID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['PatientID'] = this.patientID; data['ProjectID'] = this.projectID; data['LanguageID'] = this.languageID; diff --git a/lib/models/patient/radiology/radiology_res_model.dart b/lib/models/patient/radiology/radiology_res_model.dart index 6c6509a9..cf618dd7 100644 --- a/lib/models/patient/radiology/radiology_res_model.dart +++ b/lib/models/patient/radiology/radiology_res_model.dart @@ -6,21 +6,21 @@ *@desc: RadiologyResModel class */ class RadiologyResModel { - String setupID; - int projectID; - int patientID; - int invoiceLineItemNo; - int invoiceNo; - String reportData; - String imageURL; - int clinicId; - int doctorId; - String reportDate; - String clinicName; - String doctorImageURL; - String doctorName; - String projectName; - Null statusDescription; + String? setupID; + int? projectID; + int? patientID; + int? invoiceLineItemNo; + int? invoiceNo; + String? reportData; + String? imageURL; + int? clinicId; + int? doctorId; + String? reportDate; + String? clinicName; + String? doctorImageURL; + String? doctorName; + String? projectName; + dynamic statusDescription; RadiologyResModel( {this.setupID, @@ -39,7 +39,7 @@ class RadiologyResModel { this.projectName, this.statusDescription}); - RadiologyResModel.fromJson(Map json) { + RadiologyResModel.fromJson(Map json) { setupID = json['SetupID']; projectID = json['ProjectID']; patientID = json['PatientID']; @@ -57,8 +57,8 @@ class RadiologyResModel { statusDescription = json['StatusDescription']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['SetupID'] = this.setupID; data['ProjectID'] = this.projectID; data['PatientID'] = this.patientID; diff --git a/lib/models/patient/reauest_prescription_report_for_in_patient.dart b/lib/models/patient/reauest_prescription_report_for_in_patient.dart index 857705c4..fe8bc3f1 100644 --- a/lib/models/patient/reauest_prescription_report_for_in_patient.dart +++ b/lib/models/patient/reauest_prescription_report_for_in_patient.dart @@ -1,34 +1,34 @@ class RequestPrescriptionReportForInPatient { - int patientID; - int projectID; - int admissionNo; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; + int? patientID; + int? projectID; + int? admissionNo; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; RequestPrescriptionReportForInPatient( {this.patientID, - this.projectID, - this.admissionNo, - this.languageID, - this.stamp, - this.iPAdress, - this.versionID, - this.channel, - this.tokenID, - this.sessionID, - this.isLoginForDoctorApp, - this.patientOutSA, - this.patientTypeID}); + this.projectID, + this.admissionNo, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA, + this.patientTypeID}); - RequestPrescriptionReportForInPatient.fromJson(Map json) { + RequestPrescriptionReportForInPatient.fromJson(Map json) { patientID = json['PatientID']; projectID = json['ProjectID']; admissionNo = json['AdmissionNo']; @@ -44,8 +44,8 @@ class RequestPrescriptionReportForInPatient { patientTypeID = json['PatientTypeID']; } - Map toJson() { - final Map data = new Map(); + Map toJson() { + final Map data = new Map(); data['PatientID'] = this.patientID; data['ProjectID'] = this.projectID; data['AdmissionNo'] = this.admissionNo; diff --git a/lib/models/patient/refer_to_doctor_request.dart b/lib/models/patient/refer_to_doctor_request.dart index 83db54f4..fc1fd80d 100644 --- a/lib/models/patient/refer_to_doctor_request.dart +++ b/lib/models/patient/refer_to_doctor_request.dart @@ -1,40 +1,38 @@ import 'package:flutter/cupertino.dart'; class ReferToDoctorRequest { - -/* - *@author: Ibrahim Albitar - *@Date:03/06/2020 - *@param: +/* + *@author: Ibrahim Albitar + *@Date:03/06/2020 + *@param: *@return: *@desc: ReferToDoctor */ - int projectID; - int admissionNo; - String roomID; - String referralClinic; - String referralDoctor; - int createdBy; - int editedBy; - int patientID; - int patientTypeID; - int referringClinic; - int referringDoctor; - String referringDoctorRemarks; - String priority; - String frequency; - String extension; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - + int? projectID; + int? admissionNo; + String? roomID; + String? referralClinic; + String? referralDoctor; + int? createdBy; + int? editedBy; + int? patientID; + int? patientTypeID; + int? referringClinic; + int? referringDoctor; + String? referringDoctorRemarks; + String? priority; + String? frequency; + String? extension; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; /* { @@ -68,17 +66,17 @@ class ReferToDoctorRequest { ReferToDoctorRequest( {@required this.projectID, @required this.admissionNo, - @required this.roomID , + @required this.roomID, @required this.referralClinic, - @required this.referralDoctor , + @required this.referralDoctor, @required this.createdBy, - @required this.editedBy , + @required this.editedBy, @required this.patientID, @required this.patientTypeID, @required this.referringClinic, @required this.referringDoctor, @required this.referringDoctorRemarks, - @required this.priority , + @required this.priority, @required this.frequency, @required this.extension, this.languageID = 2, @@ -91,7 +89,7 @@ class ReferToDoctorRequest { this.isLoginForDoctorApp = true, this.patientOutSA = false}); - ReferToDoctorRequest.fromJson(Map json) { + ReferToDoctorRequest.fromJson(Map json) { projectID = json['ProjectID']; admissionNo = json['AdmissionNo']; roomID = json['RoomID']; diff --git a/lib/models/patient/request_my_referral_patient_model.dart b/lib/models/patient/request_my_referral_patient_model.dart index 219b7b2a..21e725d2 100644 --- a/lib/models/patient/request_my_referral_patient_model.dart +++ b/lib/models/patient/request_my_referral_patient_model.dart @@ -1,26 +1,24 @@ - - class RequestMyReferralPatientModel { - int projectID; - int clinicID; - int doctorID; - String firstName; - String middleName; - String lastName; - String patientMobileNumber; - String patientIdentificationID; - int patientID; - String from; - String to; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? projectID; + int? clinicID; + int? doctorID; + String? firstName; + String? middleName; + String? lastName; + String? patientMobileNumber; + String? patientIdentificationID; + int? patientID; + String? from; + String? to; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; RequestMyReferralPatientModel( {this.projectID, @@ -34,17 +32,17 @@ class RequestMyReferralPatientModel { this.patientID = 0, this.from = "0", this.to = "0", - this.languageID , - this.stamp , - this.iPAdress , - this.versionID , - this.channel , + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.channel, this.tokenID, - this.sessionID , - this.isLoginForDoctorApp , - this.patientOutSA }); + this.sessionID, + this.isLoginForDoctorApp, + this.patientOutSA}); - RequestMyReferralPatientModel.fromJson(Map json) { + RequestMyReferralPatientModel.fromJson(Map json) { projectID = json['ProjectID']; clinicID = json['ClinicID']; doctorID = json['DoctorID']; diff --git a/lib/models/patient/topten_users_res_model.dart b/lib/models/patient/topten_users_res_model.dart index 3454568f..b1144d9a 100644 --- a/lib/models/patient/topten_users_res_model.dart +++ b/lib/models/patient/topten_users_res_model.dart @@ -1,4 +1,3 @@ - /* *@author: Amjad Amireh *@Date:27/4/2020 @@ -8,25 +7,23 @@ *@desc: */ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; + //ModelResponse class ModelResponse { - final List list; - String firstName; + final List? list; + String? firstName; ModelResponse({ this.list, this.firstName, }); factory ModelResponse.fromJson(List parsedJson) { - - - List list = new List(); - + List list = []; + list = parsedJson.map((i) => PatiantInformtion.fromJson(i)).toList(); return new ModelResponse(list: list); } } -class PatiantInformtionl { -} \ No newline at end of file +class PatiantInformtionl {} diff --git a/lib/models/patient/vital_sign/patient-vital-sign-data.dart b/lib/models/patient/vital_sign/patient-vital-sign-data.dart index 57133a08..c02c2464 100644 --- a/lib/models/patient/vital_sign/patient-vital-sign-data.dart +++ b/lib/models/patient/vital_sign/patient-vital-sign-data.dart @@ -1,68 +1,68 @@ class VitalSignData { - int appointmentNo; - int bloodPressureCuffLocation; - int bloodPressureCuffSize; - int bloodPressureHigher; - int bloodPressureLower; - int bloodPressurePatientPosition; + int? appointmentNo; + int? bloodPressureCuffLocation; + int? bloodPressureCuffSize; + int? bloodPressureHigher; + int? bloodPressureLower; + int? bloodPressurePatientPosition; var bodyMassIndex; - int fio2; - int headCircumCm; + int? fio2; + int? headCircumCm; var heightCm; - int idealBodyWeightLbs; - bool isPainManagementDone; - bool isVitalsRequired; - int leanBodyWeightLbs; - String painCharacter; - String painDuration; - String painFrequency; - String painLocation; - int painScore; - int patientMRN; - int patientType; - int pulseBeatPerMinute; - int pulseRhythm; - int respirationBeatPerMinute; - int respirationPattern; - int sao2; - int status; + int? idealBodyWeightLbs; + bool? isPainManagementDone; + bool? isVitalsRequired; + int? leanBodyWeightLbs; + String? painCharacter; + String? painDuration; + String? painFrequency; + String? painLocation; + int? painScore; + int? patientMRN; + int? patientType; + int? pulseBeatPerMinute; + int? pulseRhythm; + int? respirationBeatPerMinute; + int? respirationPattern; + int? sao2; + int? status; var temperatureCelcius; - int temperatureCelciusMethod; + int? temperatureCelciusMethod; var waistSizeInch; var weightKg; VitalSignData( {this.appointmentNo, - this.bloodPressureCuffLocation, - this.bloodPressureCuffSize, - this.bloodPressureHigher, - this.bloodPressureLower, - this.bloodPressurePatientPosition, - this.bodyMassIndex, - this.fio2, - this.headCircumCm, - this.heightCm, - this.idealBodyWeightLbs, - this.isPainManagementDone, - this.isVitalsRequired, - this.leanBodyWeightLbs, - this.painCharacter, - this.painDuration, - this.painFrequency, - this.painLocation, - this.painScore, - this.patientMRN, - this.patientType, - this.pulseBeatPerMinute, - this.pulseRhythm, - this.respirationBeatPerMinute, - this.respirationPattern, - this.sao2, - this.status, - this.temperatureCelcius, - this.temperatureCelciusMethod, - this.waistSizeInch, - this.weightKg}); + this.bloodPressureCuffLocation, + this.bloodPressureCuffSize, + this.bloodPressureHigher, + this.bloodPressureLower, + this.bloodPressurePatientPosition, + this.bodyMassIndex, + this.fio2, + this.headCircumCm, + this.heightCm, + this.idealBodyWeightLbs, + this.isPainManagementDone, + this.isVitalsRequired, + this.leanBodyWeightLbs, + this.painCharacter, + this.painDuration, + this.painFrequency, + this.painLocation, + this.painScore, + this.patientMRN, + this.patientType, + this.pulseBeatPerMinute, + this.pulseRhythm, + this.respirationBeatPerMinute, + this.respirationPattern, + this.sao2, + this.status, + this.temperatureCelcius, + this.temperatureCelciusMethod, + this.waistSizeInch, + this.weightKg}); VitalSignData.fromJson(Map json) { appointmentNo = json['appointmentNo']; @@ -133,5 +133,4 @@ class VitalSignData { data['weightKg'] = this.weightKg; return data; } - } diff --git a/lib/models/patient/vital_sign/patient-vital-sign-history.dart b/lib/models/patient/vital_sign/patient-vital-sign-history.dart index ed39a86e..9b125216 100644 --- a/lib/models/patient/vital_sign/patient-vital-sign-history.dart +++ b/lib/models/patient/vital_sign/patient-vital-sign-history.dart @@ -25,9 +25,9 @@ class VitalSignHistory { var painDuration; var painCharacter; var painFrequency; - bool isPainManagementDone; + bool? isPainManagementDone; var status; - bool isVitalsRequired; + bool? isVitalsRequired; var patientID; var createdOn; var doctorID; @@ -242,8 +242,7 @@ class VitalSignHistory { data['BloodPressure'] = this.bloodPressure; data['BloodPressureCuffLocationDesc'] = this.bloodPressureCuffLocationDesc; data['BloodPressureCuffSizeDesc'] = this.bloodPressureCuffSizeDesc; - data['BloodPressurePatientPositionDesc'] = - this.bloodPressurePatientPositionDesc; + data['BloodPressurePatientPositionDesc'] = this.bloodPressurePatientPositionDesc; data['ClinicName'] = this.clinicName; data['DoctorImageURL'] = this.doctorImageURL; data['DoctorName'] = this.doctorName; diff --git a/lib/models/patient/vital_sign/vital_sign_req_model.dart b/lib/models/patient/vital_sign/vital_sign_req_model.dart index 2cfd24c2..e18e3a0a 100644 --- a/lib/models/patient/vital_sign/vital_sign_req_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_req_model.dart @@ -1,26 +1,25 @@ - -/* - *@author: Elham Rababah - *@Date:27/4/2020 - *@param: +/* + *@author: Elham Rababah + *@Date:27/4/2020 + *@param: *@return: *@desc: VitalSignReqModel */ class VitalSignReqModel { - int patientID; - int projectID; - int patientTypeID; - int inOutpatientType; - int transNo; - int languageID; - String stamp ; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; + int? patientID; + int? projectID; + int? patientTypeID; + int? inOutpatientType; + int? transNo; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; VitalSignReqModel( {this.patientID, @@ -30,13 +29,13 @@ class VitalSignReqModel { this.languageID, this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', - this.iPAdress='11.11.11.11', - this.versionID=5.8, - this.channel=9, - this.sessionID='E2bsEeYEJo', - this.isLoginForDoctorApp=true, + this.iPAdress = '11.11.11.11', + this.versionID = 5.8, + this.channel = 9, + this.sessionID = 'E2bsEeYEJo', + this.isLoginForDoctorApp = true, this.patientTypeID, - this.patientOutSA=false}); + this.patientOutSA = false}); VitalSignReqModel.fromJson(Map json) { projectID = json['ProjectID']; @@ -73,5 +72,4 @@ class VitalSignReqModel { data['PatientTypeID'] = this.patientTypeID; return data; } - } diff --git a/lib/models/patient/vital_sign/vital_sign_res_model.dart b/lib/models/patient/vital_sign/vital_sign_res_model.dart index 78af108d..e5af8aef 100644 --- a/lib/models/patient/vital_sign/vital_sign_res_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_res_model.dart @@ -34,17 +34,17 @@ class VitalSignResModel { var painDuration; var painCharacter; var painFrequency; - bool isPainManagementDone; + bool? isPainManagementDone; var status; - bool isVitalsRequired; + bool? isVitalsRequired; var patientID; - var createdOn; + var createdOn; var doctorID; var clinicID; var triageCategory; var gCScore; var lineItemNo; - DateTime vitalSignDate; + DateTime? vitalSignDate; var actualTimeTaken; var sugarLevel; var fBS; @@ -61,9 +61,9 @@ class VitalSignResModel { var bloodPressureCuffLocationDesc; var bloodPressureCuffSizeDesc; var bloodPressurePatientPositionDesc; - var clinicName; - var doctorImageURL; - var doctorName; + var clinicName; + var doctorImageURL; + var doctorName; var painScoreDesc; var pulseRhythmDesc; var respirationPatternDesc; @@ -170,7 +170,8 @@ class VitalSignResModel { triageCategory = json['TriageCategory']; gCScore = json['GCScore']; lineItemNo = json['LineItemNo']; - vitalSignDate = json['VitalSignDate'] !=null? AppDateUtils.convertStringToDate(json['VitalSignDate']): new DateTime.now(); + vitalSignDate = + json['VitalSignDate'] != null ? AppDateUtils.convertStringToDate(json['VitalSignDate']) : new DateTime.now(); actualTimeTaken = json['ActualTimeTaken']; sugarLevel = json['SugarLevel']; fBS = json['FBS']; @@ -251,8 +252,7 @@ class VitalSignResModel { data['BloodPressure'] = this.bloodPressure; data['BloodPressureCuffLocationDesc'] = this.bloodPressureCuffLocationDesc; data['BloodPressureCuffSizeDesc'] = this.bloodPressureCuffSizeDesc; - data['BloodPressurePatientPositionDesc'] = - this.bloodPressurePatientPositionDesc; + data['BloodPressurePatientPositionDesc'] = this.bloodPressurePatientPositionDesc; data['ClinicName'] = this.clinicName; data['DoctorImageURL'] = this.doctorImageURL; data['DoctorName'] = this.doctorName; diff --git a/lib/models/pharmacies/pharmacies_List_request_model.dart b/lib/models/pharmacies/pharmacies_List_request_model.dart index 90b5c378..31c3f758 100644 --- a/lib/models/pharmacies/pharmacies_List_request_model.dart +++ b/lib/models/pharmacies/pharmacies_List_request_model.dart @@ -1,4 +1,3 @@ - /* *@author: Ibrahim Albitar *@Date:27/4/2020 @@ -8,17 +7,17 @@ */ class PharmaciesListRequestModel { - int itemID; - int languageID; - String stamp; - String ipAdress; - double versionID; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - bool patientOutSA; - int patientTypeID; - int channel; + int? itemID; + int? languageID; + String? stamp; + String? ipAdress; + double? versionID; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + int? patientTypeID; + int? channel; PharmaciesListRequestModel( {this.itemID, @@ -62,4 +61,4 @@ class PharmaciesListRequestModel { data['Channel'] = this.channel; return data; } -} \ No newline at end of file +} diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index 4f2e947a..801fed36 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -7,18 +7,18 @@ */ class PharmaciesItemsRequestModel { - String pHRItemName; - int pageIndex = 0; - int pageSize = 20; - double versionID = 5.5; - int channel = 3; - int languageID = 2; - String iPAdress = "10.20.10.20"; - String generalid = "Cs2020@2016\$2958"; - int patientOutSA = 0; - String sessionID = "KvFJENeAUCxyVdIfEkHw"; - bool isDentalAllowedBackend = false; - int deviceTypeID = 2; + String? pHRItemName; + int? pageIndex = 0; + int? pageSize = 20; + double? versionID = 5.5; + int? channel = 3; + int? languageID = 2; + String? iPAdress = "10.20.10.20"; + String? generalid = "Cs2020@2016\$2958"; + int? patientOutSA = 0; + String? sessionID = "KvFJENeAUCxyVdIfEkHw"; + bool? isDentalAllowedBackend = false; + int? deviceTypeID = 2; PharmaciesItemsRequestModel( {this.pHRItemName, diff --git a/lib/models/sickleave/add_sickleave_request.dart b/lib/models/sickleave/add_sickleave_request.dart index d398153b..05d839f1 100644 --- a/lib/models/sickleave/add_sickleave_request.dart +++ b/lib/models/sickleave/add_sickleave_request.dart @@ -1,16 +1,11 @@ class AddSickLeaveRequest { - String patientMRN; - String appointmentNo; - String startDate; - String noOfDays; - String remarks; + String? patientMRN; + String? appointmentNo; + String? startDate; + String? noOfDays; + String? remarks; - AddSickLeaveRequest( - {this.patientMRN, - this.appointmentNo, - this.startDate, - this.noOfDays, - this.remarks}); + AddSickLeaveRequest({this.patientMRN, this.appointmentNo, this.startDate, this.noOfDays, this.remarks}); AddSickLeaveRequest.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/sickleave/extend_sick_leave_request.dart b/lib/models/sickleave/extend_sick_leave_request.dart index 8b61eb90..e25c2eb8 100644 --- a/lib/models/sickleave/extend_sick_leave_request.dart +++ b/lib/models/sickleave/extend_sick_leave_request.dart @@ -1,11 +1,10 @@ class ExtendSickLeaveRequest { - String patientMRN; - String previousRequestNo; - String noOfDays; - String remarks; + String? patientMRN; + String? previousRequestNo; + String? noOfDays; + String? remarks; - ExtendSickLeaveRequest( - {this.patientMRN, this.previousRequestNo, this.noOfDays, this.remarks}); + ExtendSickLeaveRequest({this.patientMRN, this.previousRequestNo, this.noOfDays, this.remarks}); ExtendSickLeaveRequest.fromJson(Map json) { patientMRN = json['PatientMRN']; diff --git a/lib/models/sickleave/get_all_sickleave_response.dart b/lib/models/sickleave/get_all_sickleave_response.dart index de831213..7cfb292b 100644 --- a/lib/models/sickleave/get_all_sickleave_response.dart +++ b/lib/models/sickleave/get_all_sickleave_response.dart @@ -1,13 +1,13 @@ class GetAllSickLeaveResponse { - int appointmentNo; - bool isExtendedLeave; - int noOfDays; - int patientMRN; - String remarks; - int requestNo; - String startDate; - int status; - String statusDescription; + int? appointmentNo; + bool? isExtendedLeave; + int? noOfDays; + int? patientMRN; + String? remarks; + int? requestNo; + String? startDate; + int? status; + String? statusDescription; GetAllSickLeaveResponse( {this.appointmentNo, this.isExtendedLeave,