From d784310c8247d32721973dfcf6f573b08fb9bde5 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 6 Jun 2021 18:02:23 +0300 Subject: [PATCH] Migrate models to flutter 2 --- lib/client/base_app_client.dart | 40 ++- lib/config/size_config.dart | 22 +- .../admissionRequest/admission-request.dart | 94 +++---- .../model/admissionRequest/clinic-model.dart | 21 +- .../model/admissionRequest/ward-model.dart | 8 +- .../model/auth/activation_Code_req_model.dart | 21 +- ...on_code_for_verification_screen_model.dart | 27 +- ...on_code_for_doctor_app_response_model.dart | 110 ++++---- .../check_activation_code_request_model.dart | 29 +- lib/core/model/auth/imei_details.dart | 59 ++-- lib/core/model/auth/insert_imei_model.dart | 66 ++--- .../new_login_information_response_model.dart | 46 ++-- ...on_code_for_doctor_app_response_model.dart | 8 +- .../get_hospitals_request_model.dart | 18 +- .../get_hospitals_response_model.dart | 6 +- .../model/insurance/insurance_approval.dart | 66 ++--- .../insurance_approval_in_patient_model.dart | 118 ++++---- lib/core/model/labs/LabOrderResult.dart | 30 +- lib/core/model/labs/lab_result.dart | 71 +++-- lib/core/model/labs/patient_lab_orders.dart | 72 ++--- .../labs/patient_lab_special_result.dart | 10 +- .../labs/request_patient_lab_orders.dart | 26 +- .../request_patient_lab_special_result.dart | 36 +-- .../labs/request_send_lab_report_email.dart | 98 +++---- ...dingPatientERForDoctorAppRequestModel.dart | 6 +- .../medical_report/medical_file_model.dart | 258 +++++++++--------- .../medical_file_request_model.dart | 6 +- .../patient-admission-request-service.dart | 1 + lib/models/doctor/doctor_profile_model.dart | 2 +- pubspec.yaml | 2 +- 30 files changed, 690 insertions(+), 687 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 7713eb3a..f083258d 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -18,9 +18,9 @@ Helpers helpers = new Helpers(); class BaseAppClient { //TODO change the post fun to nun static when you change all service post(String endPoint, - {Map body, - Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, + {required Map body, + required Function(dynamic response, int statusCode) onSuccess, + required Function(String error, int statusCode) onFailure, bool isAllowAny = false,bool isLiveCare = false}) async { String url; if(isLiveCare) @@ -30,22 +30,20 @@ class BaseAppClient { bool callLog = true; try { - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); String token = await sharedPref.getString(TOKEN); - if (profile != null) { - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - if (body['DoctorID'] == null) - body['DoctorID'] = doctorProfile?.doctorID; - if (body['DoctorID'] == "") body['DoctorID'] = null; - if (body['EditedBy'] == null) - body['EditedBy'] = doctorProfile?.doctorID; - if (body['ProjectID'] == null) { - body['ProjectID'] = doctorProfile?.projectID; - } - - if (body['ClinicID'] == null) - body['ClinicID'] = doctorProfile?.clinicID; + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + if (body['DoctorID'] == null) + body['DoctorID'] = doctorProfile?.doctorID; + if (body['DoctorID'] == "") body['DoctorID'] = null; + 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['DoctorID'] == '') { body['DoctorID'] = null; } @@ -140,10 +138,10 @@ class BaseAppClient { } postPatient(String endPoint, - {Map body, - Function(dynamic response, int statusCode) onSuccess, - Function(String error, int statusCode) onFailure, - @required PatiantInformtion patient, + {required Map body, + required Function(dynamic response, int statusCode) onSuccess, + required Function(String error, int statusCode) onFailure, + required PatiantInformtion patient, bool isExternal = false}) async { String url = BASE_URL + endPoint; diff --git a/lib/config/size_config.dart b/lib/config/size_config.dart index 6b996b3f..06dc3cda 100644 --- a/lib/config/size_config.dart +++ b/lib/config/size_config.dart @@ -5,14 +5,14 @@ class SizeConfig { static double _blockWidth = 0; static double _blockHeight = 0; - static double realScreenWidth; - static double realScreenHeight; - static double screenWidth; - static double screenHeight; - static double textMultiplier; - static double imageSizeMultiplier; - static double heightMultiplier; - static double widthMultiplier; + static double ? realScreenWidth; + static double ? realScreenHeight; + static double ? screenWidth; + static double ? screenHeight; + static double ? textMultiplier; + static double ? imageSizeMultiplier; + static double ? heightMultiplier; + static double ? widthMultiplier; static bool isPortrait = true; static bool isMobilePortrait = false; @@ -28,7 +28,7 @@ class SizeConfig { } if (orientation == Orientation.portrait) { isPortrait = true; - if (realScreenWidth < 450) { + if (realScreenWidth! < 450) { isMobilePortrait = true; } // textMultiplier = _blockHeight; @@ -43,8 +43,8 @@ class SizeConfig { screenHeight = realScreenWidth; screenWidth = realScreenHeight; } - _blockWidth = screenWidth / 100; - _blockHeight = screenHeight / 100; + _blockWidth = (screenWidth! / 100); + _blockHeight = (screenHeight! / 100)!; textMultiplier = _blockHeight; imageSizeMultiplier = _blockWidth; diff --git a/lib/core/model/admissionRequest/admission-request.dart b/lib/core/model/admissionRequest/admission-request.dart index 1ab5a990..5cf56e8e 100644 --- a/lib/core/model/admissionRequest/admission-request.dart +++ b/lib/core/model/admissionRequest/admission-request.dart @@ -1,48 +1,48 @@ class AdmissionRequest { - int patientMRN; - int admitToClinic; - bool isPregnant; - int pregnancyWeeks; - int pregnancyType; - int noOfBabies; - int mrpDoctorID; - String admissionDate; - int expectedDays; - int admissionType; - int admissionLocationID; - int roomCategoryID; - int wardID; - bool isSickLeaveRequired; - String sickLeaveComments; - bool isTransport; - String transportComments; - bool isPhysioAppointmentNeeded; - String physioAppointmentComments; - bool isOPDFollowupAppointmentNeeded; - String opdFollowUpComments; - bool isDietType; - int dietType; - String dietRemarks; - bool isPhysicalActivityModification; - String physicalActivityModificationComments; - int orStatus; - String mainLineOfTreatment; - int estimatedCost; - String elementsForImprovement; - bool isPackagePatient; - String complications; - String otherDepartmentInterventions; - String otherProcedures; - String pastMedicalHistory; - String pastSurgicalHistory; - List admissionRequestDiagnoses; - List admissionRequestProcedures; - int appointmentNo; - int episodeID; - int admissionRequestNo; + late int patientMRN; + late int? admitToClinic; + late bool? isPregnant; + late int pregnancyWeeks; + late int pregnancyType; + late int noOfBabies; + late int? mrpDoctorID; + late String? admissionDate; + late int? expectedDays; + late int? admissionType; + late int admissionLocationID; + late int roomCategoryID; + late int? wardID; + late bool? isSickLeaveRequired; + late String sickLeaveComments; + late bool isTransport; + late String transportComments; + late bool isPhysioAppointmentNeeded; + late String physioAppointmentComments; + late bool isOPDFollowupAppointmentNeeded; + late String opdFollowUpComments; + late bool? isDietType; + late int? dietType; + late String? dietRemarks; + late bool isPhysicalActivityModification; + late String physicalActivityModificationComments; + late int orStatus; + late String? mainLineOfTreatment; + late int? estimatedCost; + late String? elementsForImprovement; + late bool isPackagePatient; + late String complications; + late String otherDepartmentInterventions; + late String otherProcedures; + late String pastMedicalHistory; + late String pastSurgicalHistory; + late List? admissionRequestDiagnoses; + late List? admissionRequestProcedures; + late int? appointmentNo; + late int? episodeID; + late int? admissionRequestNo; AdmissionRequest( - {this.patientMRN, + {required this.patientMRN, this.admitToClinic, this.isPregnant, this.pregnancyWeeks = 0, @@ -123,17 +123,17 @@ class AdmissionRequest { pastMedicalHistory = json['pastMedicalHistory']; pastSurgicalHistory = json['pastSurgicalHistory']; if (json['admissionRequestDiagnoses'] != null) { - admissionRequestDiagnoses = new List(); + admissionRequestDiagnoses = []; json['admissionRequestDiagnoses'].forEach((v) { - admissionRequestDiagnoses.add(v); + admissionRequestDiagnoses!.add(v); // admissionRequestDiagnoses // .add(new AdmissionRequestDiagnoses.fromJson(v)); }); } if (json['admissionRequestProcedures'] != null) { - admissionRequestProcedures = new List(); + admissionRequestProcedures = []; json['admissionRequestProcedures'].forEach((v) { - admissionRequestProcedures.add(v); + admissionRequestProcedures!.add(v); // admissionRequestProcedures // .add(new AdmissionRequestProcedures.fromJson(v)); }); @@ -190,7 +190,7 @@ class AdmissionRequest { } if (this.admissionRequestProcedures != null) { data['admissionRequestProcedures'] = - this.admissionRequestProcedures.map((v) => v.toJson()).toList(); + this.admissionRequestProcedures!.map((v) => v.toJson()).toList(); } data['appointmentNo'] = this.appointmentNo; data['episodeID'] = this.episodeID; diff --git a/lib/core/model/admissionRequest/clinic-model.dart b/lib/core/model/admissionRequest/clinic-model.dart index 05d34645..e5a03264 100644 --- a/lib/core/model/admissionRequest/clinic-model.dart +++ b/lib/core/model/admissionRequest/clinic-model.dart @@ -1,16 +1,16 @@ class Clinic { - int clinicGroupID; - String clinicGroupName; - int clinicID; - String clinicNameArabic; - String clinicNameEnglish; + late int? clinicGroupID; + late String? clinicGroupName; + late int? clinicID; + late String? clinicNameArabic; + late String? clinicNameEnglish; Clinic( {this.clinicGroupID, - this.clinicGroupName, - this.clinicID, - this.clinicNameArabic, - this.clinicNameEnglish}); + this.clinicGroupName, + this.clinicID, + this.clinicNameArabic, + this.clinicNameEnglish}); Clinic.fromJson(Map json) { clinicGroupID = json['clinicGroupID']; @@ -29,5 +29,4 @@ class Clinic { data['clinicNameEnglish'] = this.clinicNameEnglish; return data; } - -} \ No newline at end of file +} diff --git a/lib/core/model/admissionRequest/ward-model.dart b/lib/core/model/admissionRequest/ward-model.dart index 606758d3..8f7b9fe5 100644 --- a/lib/core/model/admissionRequest/ward-model.dart +++ b/lib/core/model/admissionRequest/ward-model.dart @@ -1,9 +1,9 @@ class WardModel{ - String description; - String descriptionN; - int floorID; - bool isActive; + late String ? description; + late String ? descriptionN; + late int ? floorID; + late bool ? isActive; WardModel( {this.description, this.descriptionN, this.floorID, this.isActive}); diff --git a/lib/core/model/auth/activation_Code_req_model.dart b/lib/core/model/auth/activation_Code_req_model.dart index 1a9510e8..1ef02c02 100644 --- a/lib/core/model/auth/activation_Code_req_model.dart +++ b/lib/core/model/auth/activation_Code_req_model.dart @@ -1,14 +1,15 @@ class ActivationCodeModel { - String mobileNumber; - String zipCode; - int channel; - int languageID; - double versionID; - int memberID; - String password; - int facilityId; - String generalid; - String otpSendType; + late String? mobileNumber; + late String? zipCode; + late int? channel; + late int? languageID; + late double? versionID; + late int? memberID; + late String? password; + late int? facilityId; + late String? generalid; + late String? otpSendType; + ActivationCodeModel( {this.mobileNumber, this.zipCode, diff --git a/lib/core/model/auth/activation_code_for_verification_screen_model.dart b/lib/core/model/auth/activation_code_for_verification_screen_model.dart index 28cc58db..f7aba9f0 100644 --- a/lib/core/model/auth/activation_code_for_verification_screen_model.dart +++ b/lib/core/model/auth/activation_code_for_verification_screen_model.dart @@ -1,17 +1,18 @@ class ActivationCodeForVerificationScreenModel { - int oTPSendType; - String mobileNumber; - String zipCode; - int channel; - int languageID; - double versionID; - int memberID; - int facilityId; - String generalid; - int isMobileFingerPrint; - String vidaAuthTokenID; - String vidaRefreshTokenID; - String iMEI; + late int? oTPSendType; + late String? mobileNumber; + late String? zipCode; + late int? channel; + late int? languageID; + late double? versionID; + late int? memberID; + late int? facilityId; + late String? generalid; + late int? isMobileFingerPrint; + late String? vidaAuthTokenID; + late String? vidaRefreshTokenID; + late String? iMEI; + ActivationCodeForVerificationScreenModel( {this.oTPSendType, this.mobileNumber, diff --git a/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart b/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart index c5ff29e6..0d9e5149 100644 --- a/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart +++ b/lib/core/model/auth/check_activation_code_for_doctor_app_response_model.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; class CheckActivationCodeForDoctorAppResponseModel { - String authenticationTokenID; - List listDoctorsClinic; - List listDoctorProfile; - MemberInformation memberInformation; + late String? authenticationTokenID; + late List? listDoctorsClinic; + late List? listDoctorProfile; + late MemberInformation? memberInformation; CheckActivationCodeForDoctorAppResponseModel( {this.authenticationTokenID, @@ -15,16 +15,16 @@ class CheckActivationCodeForDoctorAppResponseModel { Map json) { authenticationTokenID = json['AuthenticationTokenID']; if (json['List_DoctorsClinic'] != null) { - listDoctorsClinic = new List(); + listDoctorsClinic = []; json['List_DoctorsClinic'].forEach((v) { - listDoctorsClinic.add(new ListDoctorsClinic.fromJson(v)); + listDoctorsClinic!.add(new ListDoctorsClinic.fromJson(v)); }); } if (json['List_DoctorProfile'] != null) { - listDoctorProfile = new List(); + listDoctorProfile = []; json['List_DoctorProfile'].forEach((v) { - listDoctorProfile.add(new DoctorProfileModel.fromJson(v)); + listDoctorProfile!.add(new DoctorProfileModel.fromJson(v)); }); } @@ -38,34 +38,35 @@ class CheckActivationCodeForDoctorAppResponseModel { data['AuthenticationTokenID'] = this.authenticationTokenID; if (this.listDoctorsClinic != null) { data['List_DoctorsClinic'] = - this.listDoctorsClinic.map((v) => v.toJson()).toList(); + this.listDoctorsClinic!.map((v) => v.toJson()).toList(); } if (this.listDoctorProfile != null) { data['List_DoctorProfile'] = - this.listDoctorProfile.map((v) => v.toJson()).toList(); + this.listDoctorProfile!.map((v) => v.toJson()).toList(); } if (this.memberInformation != null) { - data['memberInformation'] = this.memberInformation.toJson(); + data['memberInformation'] = this.memberInformation!.toJson(); } return data; } } class ListDoctorsClinic { - Null setupID; - int projectID; - int doctorID; - int clinicID; - bool isActive; - String clinicName; - - ListDoctorsClinic({this.setupID, - this.projectID, - this.doctorID, - this.clinicID, - this.isActive, - this.clinicName}); + late dynamic setupID; + late int? projectID; + late int? doctorID; + late int? clinicID; + late bool? isActive; + late String? clinicName; + + ListDoctorsClinic( + {this.setupID, + this.projectID, + this.doctorID, + this.clinicID, + this.isActive, + this.clinicName}); ListDoctorsClinic.fromJson(Map json) { setupID = json['SetupID']; @@ -89,31 +90,32 @@ class ListDoctorsClinic { } class MemberInformation { - List clinics; - int doctorId; - String email; - int employeeId; - int memberId; - Null memberName; - Null memberNameArabic; - String preferredLanguage; - List roles; - - MemberInformation({this.clinics, - this.doctorId, - this.email, - this.employeeId, - this.memberId, - this.memberName, - this.memberNameArabic, - this.preferredLanguage, - this.roles}); + late List? clinics; + late int? doctorId; + late String? email; + late int? employeeId; + late int? memberId; + late dynamic memberName; + late dynamic memberNameArabic; + late String? preferredLanguage; + late List? roles; + + MemberInformation( + {this.clinics, + this.doctorId, + this.email, + this.employeeId, + this.memberId, + this.memberName, + this.memberNameArabic, + this.preferredLanguage, + this.roles}); MemberInformation.fromJson(Map json) { if (json['clinics'] != null) { - clinics = new List(); + clinics = []; json['clinics'].forEach((v) { - clinics.add(new Clinics.fromJson(v)); + clinics!.add(new Clinics.fromJson(v)); }); } doctorId = json['doctorId']; @@ -124,9 +126,9 @@ class MemberInformation { memberNameArabic = json['memberNameArabic']; preferredLanguage = json['preferredLanguage']; if (json['roles'] != null) { - roles = new List(); + roles = []; json['roles'].forEach((v) { - roles.add(new Roles.fromJson(v)); + roles!.add(new Roles.fromJson(v)); }); } } @@ -134,7 +136,7 @@ class MemberInformation { Map toJson() { final Map data = new Map(); if (this.clinics != null) { - data['clinics'] = this.clinics.map((v) => v.toJson()).toList(); + data['clinics'] = this.clinics!.map((v) => v.toJson()).toList(); } data['doctorId'] = this.doctorId; data['email'] = this.email; @@ -144,16 +146,16 @@ class MemberInformation { data['memberNameArabic'] = this.memberNameArabic; data['preferredLanguage'] = this.preferredLanguage; if (this.roles != null) { - data['roles'] = this.roles.map((v) => v.toJson()).toList(); + data['roles'] = this.roles!.map((v) => v.toJson()).toList(); } return data; } } class Clinics { - bool defaultClinic; - int id; - String name; + late bool? defaultClinic; + late int? id; + late String? name; Clinics({this.defaultClinic, this.id, this.name}); @@ -173,8 +175,8 @@ class Clinics { } class Roles { - String name; - int roleId; + late String? name; + late int? roleId; Roles({this.name, this.roleId}); diff --git a/lib/core/model/auth/check_activation_code_request_model.dart b/lib/core/model/auth/check_activation_code_request_model.dart index 9bb3d4f6..187c989c 100644 --- a/lib/core/model/auth/check_activation_code_request_model.dart +++ b/lib/core/model/auth/check_activation_code_request_model.dart @@ -1,18 +1,19 @@ class CheckActivationCodeRequestModel { - String mobileNumber; - String zipCode; - int doctorID; - String iPAdress; - int channel; - int languageID; - int projectID; - double versionID; - String generalid; - String logInTokenID; - String activationCode; - String vidaAuthTokenID; - String vidaRefreshTokenID; - int oTPSendType; + late String? mobileNumber; + late String? zipCode; + late int? doctorID; + late String? iPAdress; + late int? channel; + late int? languageID; + late int? projectID; + late double? versionID; + late String? generalid; + late String? logInTokenID; + late String? activationCode; + late String? vidaAuthTokenID; + late String? vidaRefreshTokenID; + late int? oTPSendType; + CheckActivationCodeRequestModel( {this.mobileNumber, this.zipCode, diff --git a/lib/core/model/auth/imei_details.dart b/lib/core/model/auth/imei_details.dart index eb37e736..95ff1e74 100644 --- a/lib/core/model/auth/imei_details.dart +++ b/lib/core/model/auth/imei_details.dart @@ -1,33 +1,34 @@ class GetIMEIDetailsModel { - int iD; - String iMEI; - int logInTypeID; - bool outSA; - String mobile; - dynamic identificationNo; - int doctorID; - String doctorName; - String doctorNameN; - int clinicID; - String clinicDescription; - dynamic clinicDescriptionN; - int projectID; - String projectName; - String genderDescription; - dynamic genderDescriptionN; - String titleDescription; - dynamic titleDescriptionN; - dynamic zipCode; - String createdOn; - dynamic createdBy; - String editedOn; - dynamic editedBy; - bool biometricEnabled; - dynamic preferredLanguage; - bool isActive; - String vidaAuthTokenID; - String vidaRefreshTokenID; - String password; + late int? iD; + late String? iMEI; + late int? logInTypeID; + late bool? outSA; + late String? mobile; + late dynamic identificationNo; + late int? doctorID; + late String? doctorName; + late String? doctorNameN; + late int? clinicID; + late String? clinicDescription; + late dynamic clinicDescriptionN; + late int? projectID; + late String? projectName; + late String? genderDescription; + late dynamic genderDescriptionN; + late String? titleDescription; + late dynamic titleDescriptionN; + late dynamic zipCode; + late String? createdOn; + late dynamic createdBy; + late String? editedOn; + late dynamic editedBy; + late bool? biometricEnabled; + late dynamic preferredLanguage; + late bool? isActive; + late String? vidaAuthTokenID; + late String? vidaRefreshTokenID; + late String? password; + GetIMEIDetailsModel( {this.iD, this.iMEI, diff --git a/lib/core/model/auth/insert_imei_model.dart b/lib/core/model/auth/insert_imei_model.dart index 25e22b7a..5e54b127 100644 --- a/lib/core/model/auth/insert_imei_model.dart +++ b/lib/core/model/auth/insert_imei_model.dart @@ -1,37 +1,37 @@ class InsertIMEIDetailsModel { - String iMEI; - int logInTypeID; - dynamic outSA; - String mobile; - dynamic identificationNo; - int doctorID; - String doctorName; - String doctorNameN; - int clinicID; - String clinicDescription; - Null clinicDescriptionN; - String projectName; - String genderDescription; - Null genderDescriptionN; - String titleDescription; - Null titleDescriptionN; - bool bioMetricEnabled; - Null preferredLanguage; - bool isActive; - int editedBy; - int projectID; - String tokenID; - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String sessionID; - bool isLoginForDoctorApp; - int patientOutSA; - String vidaAuthTokenID; - String vidaRefreshTokenID; - dynamic password; + late String? iMEI; + late int ?logInTypeID; + late dynamic outSA; + late String? mobile; + late dynamic identificationNo; + late int ?doctorID; + late String? doctorName; + late String ?doctorNameN; + late int ?clinicID; + late String ?clinicDescription; + late dynamic clinicDescriptionN; + late String ?projectName; + late String ?genderDescription; + late dynamic genderDescriptionN; + late String ?titleDescription; + late dynamic titleDescriptionN; + late bool ?bioMetricEnabled; + late dynamic preferredLanguage; + late bool ?isActive; + late int ?editedBy; + late int ?projectID; + late String ?tokenID; + late int ?languageID; + late String ?stamp; + late String ?iPAdress; + late double ?versionID; + late int ?channel; + late String ?sessionID; + late bool ?isLoginForDoctorApp; + late int ?patientOutSA; + late String ?vidaAuthTokenID; + late String ?vidaRefreshTokenID; + late dynamic password; InsertIMEIDetailsModel( {this.iMEI, this.logInTypeID, diff --git a/lib/core/model/auth/new_login_information_response_model.dart b/lib/core/model/auth/new_login_information_response_model.dart index 117060e4..c834580b 100644 --- a/lib/core/model/auth/new_login_information_response_model.dart +++ b/lib/core/model/auth/new_login_information_response_model.dart @@ -1,13 +1,13 @@ class NewLoginInformationModel { - int doctorID; - List listMemberInformation; - String logInTokenID; - String mobileNumber; - Null sELECTDeviceIMEIbyIMEIList; - int userID; - String zipCode; - bool isActiveCode; - bool isSMSSent; + late int? doctorID; + late List? listMemberInformation; + late String ?logInTokenID; + late String ?mobileNumber; + late dynamic sELECTDeviceIMEIbyIMEIList; + late int ?userID; + late String ?zipCode; + late bool ?isActiveCode; + late bool ?isSMSSent; NewLoginInformationModel( {this.doctorID, @@ -23,9 +23,9 @@ class NewLoginInformationModel { NewLoginInformationModel.fromJson(Map json) { doctorID = json['DoctorID']; if (json['List_MemberInformation'] != null) { - listMemberInformation = new List(); + listMemberInformation = []; json['List_MemberInformation'].forEach((v) { - listMemberInformation.add(new ListMemberInformation.fromJson(v)); + listMemberInformation!.add(new ListMemberInformation.fromJson(v)); }); } logInTokenID = json['LogInTokenID']; @@ -42,7 +42,7 @@ class NewLoginInformationModel { data['DoctorID'] = this.doctorID; if (this.listMemberInformation != null) { data['List_MemberInformation'] = - this.listMemberInformation.map((v) => v.toJson()).toList(); + this.listMemberInformation!.map((v) => v.toJson()).toList(); } data['LogInTokenID'] = this.logInTokenID; data['MobileNumber'] = this.mobileNumber; @@ -56,17 +56,17 @@ class NewLoginInformationModel { } class ListMemberInformation { - Null setupID; - int memberID; - String memberName; - Null memberNameN; - String preferredLang; - String pIN; - String saltHash; - int referenceID; - int employeeID; - int roleID; - int projectid; + late dynamic setupID; + late int ? memberID; + late String ? memberName; + late dynamic memberNameN; + late String ? preferredLang; + late String ? pIN; + late String ? saltHash; + late int ? referenceID; + late int ? employeeID; + late int ? roleID; + late int ? projectid; ListMemberInformation( {this.setupID, diff --git a/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart b/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart index ceaf4c65..db971954 100644 --- a/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart +++ b/lib/core/model/auth/send_activation_code_for_doctor_app_response_model.dart @@ -1,8 +1,8 @@ class SendActivationCodeForDoctorAppResponseModel { - String logInTokenID; - String verificationCode; - String vidaAuthTokenID; - String vidaRefreshTokenID; + String? logInTokenID; + String? verificationCode; + String? vidaAuthTokenID; + String? vidaRefreshTokenID; SendActivationCodeForDoctorAppResponseModel( {this.logInTokenID, diff --git a/lib/core/model/hospitals/get_hospitals_request_model.dart b/lib/core/model/hospitals/get_hospitals_request_model.dart index 8a5f1bc1..550f8ca8 100644 --- a/lib/core/model/hospitals/get_hospitals_request_model.dart +++ b/lib/core/model/hospitals/get_hospitals_request_model.dart @@ -1,13 +1,13 @@ class GetHospitalsRequestModel { - int languageID; - String stamp; - String iPAdress; - double versionID; - int channel; - String tokenID; - String sessionID; - bool isLoginForDoctorApp; - String memberID; + int ?languageID; + String? stamp; + String? iPAdress; + double? versionID; + int ?channel; + String? tokenID; + String? sessionID; + bool ?isLoginForDoctorApp; + String ?memberID; GetHospitalsRequestModel( {this.languageID, diff --git a/lib/core/model/hospitals/get_hospitals_response_model.dart b/lib/core/model/hospitals/get_hospitals_response_model.dart index edbc3fe5..1109b58b 100644 --- a/lib/core/model/hospitals/get_hospitals_response_model.dart +++ b/lib/core/model/hospitals/get_hospitals_response_model.dart @@ -1,7 +1,7 @@ class GetHospitalsResponseModel { - String facilityGroupId; - int facilityId; - String facilityName; + String? facilityGroupId; + int ?facilityId; + String ?facilityName; GetHospitalsResponseModel( {this.facilityGroupId, this.facilityId, this.facilityName}); diff --git a/lib/core/model/insurance/insurance_approval.dart b/lib/core/model/insurance/insurance_approval.dart index a3717c42..69e88a2e 100644 --- a/lib/core/model/insurance/insurance_approval.dart +++ b/lib/core/model/insurance/insurance_approval.dart @@ -1,11 +1,11 @@ class ApporvalDetails { - int approvalNo; + int? approvalNo; - String procedureName; + String? procedureName; //String procedureNameN; - String status; + String ?status; - String isInvoicedDesc; + String ?isInvoicedDesc; ApporvalDetails( {this.approvalNo, this.procedureName, this.status, this.isInvoicedDesc}); @@ -35,35 +35,35 @@ class ApporvalDetails { } class InsuranceApprovalModel { - List apporvalDetails; - 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 eXuldAPPNO; - int projectID; - String doctorName; - String clinicName; - String patientDescription; - int approvalNo; - String approvalStatusDescption; - int unUsedCount; - String doctorImage; - String projectName; + List ?apporvalDetails; + 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 ? eXuldAPPNO; + int ? projectID; + String ? doctorName; + String ? clinicName; + String ? patientDescription; + int ? approvalNo; + String ?approvalStatusDescption; + int ? unUsedCount; + String ? doctorImage; + String ? projectName; //String companyName; - String expiryDate; - String rceiptOn; - int appointmentNo; + String ? expiryDate; + String ? rceiptOn; + int ?appointmentNo; InsuranceApprovalModel( {this.versionID, @@ -126,9 +126,9 @@ class InsuranceApprovalModel { doctorImage = json['DoctorImageURL']; clinicName = json['ClinicName']; if (json['ApporvalDetails'] != null) { - apporvalDetails = new List(); + apporvalDetails =[]; json['ApporvalDetails'].forEach((v) { - apporvalDetails.add(new ApporvalDetails.fromJson(v)); + apporvalDetails!.add(new ApporvalDetails.fromJson(v)); }); } appointmentNo = json['AppointmentNo']; diff --git a/lib/core/model/insurance/insurance_approval_in_patient_model.dart b/lib/core/model/insurance/insurance_approval_in_patient_model.dart index f185a8bf..722d34c7 100644 --- a/lib/core/model/insurance/insurance_approval_in_patient_model.dart +++ b/lib/core/model/insurance/insurance_approval_in_patient_model.dart @@ -1,36 +1,36 @@ class InsuranceApprovalInPatientModel { - String setupID; - int projectID; - int approvalNo; - int status; - String approvalDate; - int patientType; - int patientID; - int companyID; - bool subCategoryID; - int doctorID; - int clinicID; - int approvalType; - int inpatientApprovalSubType; + String? setupID; + int? projectID; + int? approvalNo; + int? status; + String? approvalDate; + int? patientType; + int? patientID; + int? companyID; + bool? subCategoryID; + int? doctorID; + int? clinicID; + int? approvalType; + int? inpatientApprovalSubType; dynamic isApprovalOnGross; - String companyApprovalNo; + String? companyApprovalNo; dynamic progNoteOrderNo; - String submitOn; - String receiptOn; - String expiryDate; - int admissionNo; - int admissionRequestNo; - String approvalStatusDescption; + String? submitOn; + String? receiptOn; + String? expiryDate; + int? admissionNo; + int? admissionRequestNo; + String? approvalStatusDescption; dynamic approvalStatusDescptionN; dynamic remarks; - List apporvalDetails; - String clinicName; + List? apporvalDetails; + String? clinicName; dynamic companyName; - String doctorName; - String projectName; - int totaUnUsedCount; - int unUsedCount; - String doctorImage; + String? doctorName; + String? projectName; + int? totaUnUsedCount; + int? unUsedCount; + String? doctorImage; InsuranceApprovalInPatientModel( {this.setupID, @@ -93,9 +93,9 @@ class InsuranceApprovalInPatientModel { approvalStatusDescptionN = json['ApprovalStatusDescptionN']; remarks = json['Remarks']; if (json['ApporvalDetails'] != null) { - apporvalDetails = new List(); + apporvalDetails = []; json['ApporvalDetails'].forEach((v) { - apporvalDetails.add(new ApporvalDetails.fromJson(v)); + apporvalDetails!.add(new ApporvalDetails.fromJson(v)); }); } clinicName = json['ClinicName']; @@ -135,7 +135,7 @@ class InsuranceApprovalInPatientModel { data['Remarks'] = this.remarks; if (this.apporvalDetails != null) { data['ApporvalDetails'] = - this.apporvalDetails.map((v) => v.toJson()).toList(); + this.apporvalDetails!.map((v) => v.toJson()).toList(); } data['ClinicName'] = this.clinicName; data['CompanyName'] = this.companyName; @@ -148,35 +148,35 @@ class InsuranceApprovalInPatientModel { } class ApporvalDetails { - Null setupID; - Null projectID; - int approvalNo; - Null lineItemNo; - Null orderType; - Null procedureID; - Null toothNo; - Null price; - Null approvedAmount; - Null unapprovedPatientShare; - Null waivedAmount; - Null discountType; - Null discountValue; - Null shareType; - Null patientShareTypeValue; - Null companyShareTypeValue; - Null patientShare; - Null companyShare; - Null deductableAmount; - String disapprovedRemarks; - Null progNoteOrderNo; - Null progNoteLineItemNo; - Null invoiceTransactionType; - Null invoiceNo; - String procedureName; - String procedureNameN; - String status; - Null isInvoiced; - String isInvoicedDesc; + dynamic setupID; + dynamic projectID; + int? approvalNo; + dynamic lineItemNo; + dynamic orderType; + dynamic procedureID; + dynamic toothNo; + dynamic price; + dynamic approvedAmount; + dynamic unapprovedPatientShare; + dynamic waivedAmount; + dynamic discountType; + dynamic discountValue; + dynamic shareType; + dynamic patientShareTypeValue; + dynamic companyShareTypeValue; + dynamic patientShare; + dynamic companyShare; + dynamic deductableAmount; + String? disapprovedRemarks; + dynamic progNoteOrderNo; + dynamic progNoteLineItemNo; + dynamic invoiceTransactionType; + dynamic invoiceNo; + String? procedureName; + String? procedureNameN; + String? status; + dynamic isInvoiced; + String? isInvoicedDesc; ApporvalDetails( {this.setupID, diff --git a/lib/core/model/labs/LabOrderResult.dart b/lib/core/model/labs/LabOrderResult.dart index ecb4ae65..7fc4432f 100644 --- a/lib/core/model/labs/LabOrderResult.dart +++ b/lib/core/model/labs/LabOrderResult.dart @@ -1,23 +1,23 @@ class LabOrderResult { - String description; + String? description; dynamic femaleInterpretativeData; - int gender; - int lineItemNo; + int ?gender; + int? lineItemNo; dynamic maleInterpretativeData; dynamic notes; - String packageID; - int patientID; - String projectID; - String referanceRange; - String resultValue; - String sampleCollectedOn; - String sampleReceivedOn; - String setupID; + String ?packageID; + int ?patientID; + String ? projectID; + String ? referanceRange; + String ? resultValue; + String ? sampleCollectedOn; + String ? sampleReceivedOn; + String ? setupID; dynamic superVerifiedOn; - String testCode; - String uOM; - String verifiedOn; - String verifiedOnDateTime; + String? testCode; + String? uOM; + String? verifiedOn; + String? verifiedOnDateTime; LabOrderResult( {this.description, diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart index 1c09696b..9a8cfe82 100644 --- a/lib/core/model/labs/lab_result.dart +++ b/lib/core/model/labs/lab_result.dart @@ -1,44 +1,44 @@ class LabResult { - String description; + String? description; dynamic femaleInterpretativeData; - int gender; - int lineItemNo; + int? gender; + int? lineItemNo; dynamic maleInterpretativeData; - String notes; - String packageID; - int patientID; - String projectID; - String referanceRange; - String resultValue; - String sampleCollectedOn; - String sampleReceivedOn; - String setupID; + String? notes; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; dynamic superVerifiedOn; - String testCode; - String uOM; - String verifiedOn; + String? testCode; + String? uOM; + String? verifiedOn; dynamic verifiedOnDateTime; LabResult( {this.description, - this.femaleInterpretativeData, - this.gender, - this.lineItemNo, - this.maleInterpretativeData, - this.notes, - this.packageID, - this.patientID, - this.projectID, - this.referanceRange, - this.resultValue, - this.sampleCollectedOn, - this.sampleReceivedOn, - this.setupID, - this.superVerifiedOn, - this.testCode, - this.uOM, - this.verifiedOn, - this.verifiedOnDateTime}); + this.femaleInterpretativeData, + this.gender, + this.lineItemNo, + this.maleInterpretativeData, + this.notes, + this.packageID, + this.patientID, + this.projectID, + this.referanceRange, + this.resultValue, + this.sampleCollectedOn, + this.sampleReceivedOn, + this.setupID, + this.superVerifiedOn, + this.testCode, + this.uOM, + this.verifiedOn, + this.verifiedOnDateTime}); LabResult.fromJson(Map json) { description = json['Description']; @@ -87,12 +87,11 @@ class LabResult { } } - class LabResultList { String filterName = ""; - List patientLabResultList = List(); + List patientLabResultList = []; - LabResultList({this.filterName, LabResult lab}) { + LabResultList({required this.filterName, required LabResult lab}) { patientLabResultList.add(lab); } } diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart index af60f86f..08f81f16 100644 --- a/lib/core/model/labs/patient_lab_orders.dart +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -1,40 +1,40 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; class PatientLabOrders { - int actualDoctorRate; - String clinicDescription; - String clinicDescriptionEnglish; - Null clinicDescriptionN; - int clinicID; - int doctorID; - String doctorImageURL; - String doctorName; - String doctorNameEnglish; - Null doctorNameN; - int doctorRate; - String doctorTitle; - int gender; - String genderDescription; - String invoiceNo; - bool isActiveDoctorProfile; - bool isDoctorAllowVedioCall; - bool isExecludeDoctor; - bool isInOutPatient; - String isInOutPatientDescription; - String isInOutPatientDescriptionN; - bool isRead; - String nationalityFlagURL; - int noOfPatientsRate; - DateTime orderDate; - String orderNo; - String patientID; - String projectID; - String projectName; - Null projectNameN; - String qR; - String setupID; - List speciality; - bool isLiveCareAppointment; + int ?actualDoctorRate; + String ?clinicDescription; + String ?clinicDescriptionEnglish; + dynamic clinicDescriptionN; + int ?clinicID; + int ?doctorID; + String? doctorImageURL; + String ?doctorName; + String ?doctorNameEnglish; + dynamic doctorNameN; + int ?doctorRate; + String ?doctorTitle; + int ?gender; + String ?genderDescription; + String ?invoiceNo; + bool ?isActiveDoctorProfile; + bool ?isDoctorAllowVedioCall; + bool ?isExecludeDoctor; + bool ?isInOutPatient; + String ?isInOutPatientDescription; + String ?isInOutPatientDescriptionN; + bool ?isRead; + String ?nationalityFlagURL; + int ?noOfPatientsRate; + DateTime? orderDate; + String ?orderNo; + String ?patientID; + String ?projectID; + String ?projectName; + dynamic projectNameN; + String ?qR; + String ?setupID; + List ?speciality; + bool ?isLiveCareAppointment; PatientLabOrders( {this.actualDoctorRate, this.clinicDescription, @@ -149,10 +149,10 @@ class PatientLabOrders { class PatientLabOrdersList { String filterName = ""; - List patientLabOrdersList = List(); + List patientLabOrdersList = []; PatientLabOrdersList( - {this.filterName, PatientLabOrders patientDoctorAppointment}) { + {required this.filterName, required PatientLabOrders patientDoctorAppointment}) { patientLabOrdersList.add(patientDoctorAppointment); } } diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart index 2fbcb832..f86dd56f 100644 --- a/lib/core/model/labs/patient_lab_special_result.dart +++ b/lib/core/model/labs/patient_lab_special_result.dart @@ -1,9 +1,9 @@ class PatientLabSpecialResult { - String invoiceNo; - String moduleID; - String resultData; - String resultDataHTML; - Null resultDataTxt; + String ?invoiceNo; + String ?moduleID; + String ? resultData; + String ? resultDataHTML; + dynamic resultDataTxt; PatientLabSpecialResult( {this.invoiceNo, diff --git a/lib/core/model/labs/request_patient_lab_orders.dart b/lib/core/model/labs/request_patient_lab_orders.dart index ce9263ef..4f746277 100644 --- a/lib/core/model/labs/request_patient_lab_orders.dart +++ b/lib/core/model/labs/request_patient_lab_orders.dart @@ -1,17 +1,17 @@ class RequestPatientLabOrders { - 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; + 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; RequestPatientLabOrders( {this.versionID, diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart index b48cf0e1..100f92b5 100644 --- a/lib/core/model/labs/request_patient_lab_special_result.dart +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -1,22 +1,22 @@ class RequestPatientLabSpecialResult { - String invoiceNo; - String orderNo; - String setupID; - String projectID; - int clinicID; - 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; + String? invoiceNo; + String? orderNo; + String? setupID; + String? projectID; + int ?clinicID; + 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; RequestPatientLabSpecialResult( {this.invoiceNo, diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart index 118da906..66f5e2a0 100644 --- a/lib/core/model/labs/request_send_lab_report_email.dart +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -1,56 +1,56 @@ class RequestSendLabReportEmail { - 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; - String to; - String dateofBirth; - String patientIditificationNum; - String patientMobileNumber; - String patientName; - String setupID; - String projectName; - String clinicName; - String doctorName; - String projectID; - String invoiceNo; - String orderDate; + 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; + String? to; + String? dateofBirth; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + String? setupID; + String? projectName; + String? clinicName; + String? doctorName; + String? projectID; + String? invoiceNo; + String? orderDate; RequestSendLabReportEmail( {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.to, - this.dateofBirth, - this.patientIditificationNum, - this.patientMobileNumber, - this.patientName, - this.setupID, - this.projectName, - this.clinicName, - this.doctorName, - this.projectID, - this.invoiceNo, - this.orderDate}); + 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.to, + this.dateofBirth, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.setupID, + this.projectName, + this.clinicName, + this.doctorName, + this.projectID, + this.invoiceNo, + this.orderDate}); RequestSendLabReportEmail.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart b/lib/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart index dc1f25b3..a99c9649 100644 --- a/lib/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart +++ b/lib/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart @@ -1,7 +1,7 @@ class PendingPatientERForDoctorAppRequestModel { - bool outSA; - int doctorID; - String sErServiceID; + bool ? outSA; + int ? doctorID; + String ? sErServiceID; PendingPatientERForDoctorAppRequestModel( {this.outSA, this.doctorID, this.sErServiceID}); diff --git a/lib/core/model/medical_report/medical_file_model.dart b/lib/core/model/medical_report/medical_file_model.dart index deebb2af..53737499 100644 --- a/lib/core/model/medical_report/medical_file_model.dart +++ b/lib/core/model/medical_report/medical_file_model.dart @@ -1,14 +1,14 @@ class MedicalFileModel { - List entityList; + List? entityList; dynamic statusMessage; MedicalFileModel({this.entityList, this.statusMessage}); MedicalFileModel.fromJson(Map json) { if (json['entityList'] != null) { - entityList = new List(); + entityList = []; json['entityList'].forEach((v) { - entityList.add(new EntityList.fromJson(v)); + entityList!.add(new EntityList.fromJson(v)); }); } statusMessage = json['statusMessage']; @@ -17,7 +17,7 @@ class MedicalFileModel { Map toJson() { final Map data = new Map(); if (this.entityList != null) { - data['entityList'] = this.entityList.map((v) => v.toJson()).toList(); + data['entityList'] = this.entityList!.map((v) => v.toJson()).toList(); } data['statusMessage'] = this.statusMessage; return data; @@ -25,15 +25,15 @@ class MedicalFileModel { } class EntityList { - List timelines; + List? timelines; EntityList({this.timelines}); EntityList.fromJson(Map json) { if (json['Timelines'] != null) { - timelines = new List(); + timelines = []; json['Timelines'].forEach((v) { - timelines.add(new Timelines.fromJson(v)); + timelines!.add(new Timelines.fromJson(v)); }); } } @@ -41,25 +41,25 @@ class EntityList { Map toJson() { final Map data = new Map(); if (this.timelines != null) { - data['Timelines'] = this.timelines.map((v) => v.toJson()).toList(); + data['Timelines'] = this.timelines!.map((v) => v.toJson()).toList(); } return data; } } class Timelines { - int clinicId; - String clinicName; - String date; - int doctorId; - String doctorImage; - String doctorName; - int encounterNumber; - String encounterType; - int projectID; - String projectName; - String setupID; - List timeLineEvents; + int? clinicId; + String? clinicName; + String? date; + int? doctorId; + String? doctorImage; + String? doctorName; + int? encounterNumber; + String? encounterType; + int? projectID; + String? projectName; + String? setupID; + List? timeLineEvents; Timelines( {this.clinicId, @@ -88,9 +88,9 @@ class Timelines { projectName = json['ProjectName']; setupID = json['SetupID']; if (json['TimeLineEvents'] != null) { - timeLineEvents = new List(); + timeLineEvents = []; json['TimeLineEvents'].forEach((v) { - timeLineEvents.add(new TimeLineEvents.fromJson(v)); + timeLineEvents!.add(new TimeLineEvents.fromJson(v)); }); } } @@ -110,25 +110,25 @@ class Timelines { data['SetupID'] = this.setupID; if (this.timeLineEvents != null) { data['TimeLineEvents'] = - this.timeLineEvents.map((v) => v.toJson()).toList(); + this.timeLineEvents!.map((v) => v.toJson()).toList(); } return data; } } class TimeLineEvents { - List admissions; - String colorClass; - List consulations; + List? admissions; + String? colorClass; + List? consulations; TimeLineEvents({this.admissions, this.colorClass, this.consulations}); TimeLineEvents.fromJson(Map json) { colorClass = json['ColorClass']; if (json['Consulations'] != null) { - consulations = new List(); + consulations = []; json['Consulations'].forEach((v) { - consulations.add(new Consulations.fromJson(v)); + consulations!.add(new Consulations.fromJson(v)); }); } } @@ -138,38 +138,38 @@ class TimeLineEvents { data['ColorClass'] = this.colorClass; if (this.consulations != null) { - data['Consulations'] = this.consulations.map((v) => v.toJson()).toList(); + data['Consulations'] = this.consulations!.map((v) => v.toJson()).toList(); } return data; } } class Consulations { - int admissionNo; - String appointmentDate; - int appointmentNo; - String appointmentType; - String clinicID; - String clinicName; - int doctorID; - String doctorName; - String endTime; - String episodeDate; - int episodeID; - int patientID; - int projectID; - String projectName; - String remarks; - String setupID; - String startTime; - String visitFor; - String visitType; - String dispalyName; - List lstAssessments; - List lstPhysicalExam; - List lstProcedure; - List lstMedicalHistory; - List lstCheifComplaint; + int? admissionNo; + String? appointmentDate; + int? appointmentNo; + String? appointmentType; + String? clinicID; + String? clinicName; + int? doctorID; + String? doctorName; + String? endTime; + String? episodeDate; + int? episodeID; + int? patientID; + int? projectID; + String? projectName; + String? remarks; + String? setupID; + String? startTime; + String? visitFor; + String? visitType; + String? dispalyName; + List? lstAssessments; + List? lstPhysicalExam; + List? lstProcedure; + List? lstMedicalHistory; + List? lstCheifComplaint; Consulations( {this.admissionNo, @@ -220,33 +220,33 @@ class Consulations { visitType = json['VisitType']; dispalyName = json['dispalyName']; if (json['lstAssessments'] != null) { - lstAssessments = new List(); + lstAssessments = []; json['lstAssessments'].forEach((v) { - lstAssessments.add(new LstAssessments.fromJson(v)); + lstAssessments!.add(new LstAssessments.fromJson(v)); }); } if (json['lstCheifComplaint'] != null) { - lstCheifComplaint = new List(); + lstCheifComplaint = []; json['lstCheifComplaint'].forEach((v) { - lstCheifComplaint.add(new LstCheifComplaint.fromJson(v)); + lstCheifComplaint!.add(new LstCheifComplaint.fromJson(v)); }); } if (json['lstPhysicalExam'] != null) { - lstPhysicalExam = new List(); + lstPhysicalExam = []; json['lstPhysicalExam'].forEach((v) { - lstPhysicalExam.add(new LstPhysicalExam.fromJson(v)); + lstPhysicalExam!.add(new LstPhysicalExam.fromJson(v)); }); } if (json['lstProcedure'] != null) { - lstProcedure = new List(); + lstProcedure = []; json['lstProcedure'].forEach((v) { - lstProcedure.add(new LstProcedure.fromJson(v)); + lstProcedure!.add(new LstProcedure.fromJson(v)); }); } if (json['lstMedicalHistory'] != null) { - lstMedicalHistory = new List(); + lstMedicalHistory = []; json['lstMedicalHistory'].forEach((v) { - lstMedicalHistory.add(new LstMedicalHistory.fromJson(v)); + lstMedicalHistory!.add(new LstMedicalHistory.fromJson(v)); }); } } @@ -275,40 +275,40 @@ class Consulations { data['dispalyName'] = this.dispalyName; if (this.lstAssessments != null) { data['lstAssessments'] = - this.lstAssessments.map((v) => v.toJson()).toList(); + this.lstAssessments!.map((v) => v.toJson()).toList(); } if (this.lstCheifComplaint != null) { data['lstCheifComplaint'] = - this.lstCheifComplaint.map((v) => v.toJson()).toList(); + this.lstCheifComplaint!.map((v) => v.toJson()).toList(); } if (this.lstPhysicalExam != null) { data['lstPhysicalExam'] = - this.lstPhysicalExam.map((v) => v.toJson()).toList(); + this.lstPhysicalExam!.map((v) => v.toJson()).toList(); } if (this.lstProcedure != null) { - data['lstProcedure'] = this.lstProcedure.map((v) => v.toJson()).toList(); + data['lstProcedure'] = this.lstProcedure!.map((v) => v.toJson()).toList(); } if (this.lstMedicalHistory != null) { data['lstMedicalHistory'] = - this.lstMedicalHistory.map((v) => v.toJson()).toList(); + this.lstMedicalHistory!.map((v) => v.toJson()).toList(); } return data; } } class LstCheifComplaint { - int appointmentNo; - String cCDate; - String chiefComplaint; - String currentMedication; - int episodeID; - String hOPI; - int patientID; - String patientType; - int projectID; - String projectName; - String setupID; - String dispalyName; + int? appointmentNo; + String? cCDate; + String? chiefComplaint; + String? currentMedication; + int? episodeID; + String? hOPI; + int? patientID; + String? patientType; + int? projectID; + String? projectName; + String? setupID; + String? dispalyName; LstCheifComplaint( {this.appointmentNo, @@ -358,19 +358,19 @@ class LstCheifComplaint { } class LstAssessments { - int appointmentNo; - String condition; - String description; - int episodeID; - String iCD10; - int patientID; - String patientType; - int projectID; - String projectName; - String remarks; - String setupID; - String type; - String dispalyName; + int? appointmentNo; + String? condition; + String? description; + int? episodeID; + String? iCD10; + int? patientID; + String? patientType; + int? projectID; + String? projectName; + String? remarks; + String? setupID; + String? type; + String? dispalyName; LstAssessments( {this.appointmentNo, @@ -423,19 +423,19 @@ class LstAssessments { } class LstPhysicalExam { - String abnormal; - int appointmentNo; - int episodeID; - String examDesc; - String examID; - String examType; - int patientID; - String patientType; - int projectID; - String projectName; - String remarks; - String setupID; - String dispalyName; + String? abnormal; + int? appointmentNo; + int? episodeID; + String? examDesc; + String? examID; + String? examType; + int? patientID; + String? patientType; + int? projectID; + String? projectName; + String? remarks; + String? setupID; + String? dispalyName; LstPhysicalExam( {this.abnormal, @@ -488,17 +488,17 @@ class LstPhysicalExam { } class LstProcedure { - int appointmentNo; - int episodeID; - String orderDate; - int patientID; - String patientType; - String procName; - String procedureId; - int projectID; - String projectName; - String setupID; - String dispalyName; + int? appointmentNo; + int? episodeID; + String? orderDate; + int? patientID; + String? patientType; + String? procName; + String? procedureId; + int? projectID; + String? projectName; + String? setupID; + String? dispalyName; LstProcedure( {this.appointmentNo, @@ -545,17 +545,17 @@ class LstProcedure { } class LstMedicalHistory { - int appointmentNo; - String checked; - int episodeID; - String history; - int patientID; - String patientType; - int projectID; - String projectName; - String remarks; - String setupID; - String dispalyName; + int? appointmentNo; + String? checked; + int? episodeID; + String? history; + int? patientID; + String? patientType; + int? projectID; + String? projectName; + String? remarks; + String? setupID; + String? dispalyName; LstMedicalHistory( {this.appointmentNo, diff --git a/lib/core/model/medical_report/medical_file_request_model.dart b/lib/core/model/medical_report/medical_file_request_model.dart index 8703141a..01a2abf2 100644 --- a/lib/core/model/medical_report/medical_file_request_model.dart +++ b/lib/core/model/medical_report/medical_file_request_model.dart @@ -1,7 +1,7 @@ class MedicalFileRequestModel { - int patientMRN; - String vidaAuthTokenID; - String iPAdress; + int ?patientMRN; + String ?vidaAuthTokenID; + String ?iPAdress; MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress}); diff --git a/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart b/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart index c97f8426..bc952162 100644 --- a/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart +++ b/lib/core/service/patient_medical_file/admission_request/patient-admission-request-service.dart @@ -222,6 +222,7 @@ class AdmissionRequestService extends LookupService { POST_ADMISSION_REQUEST, onSuccess: (dynamic response, int statusCode) { print(response["admissionResponse"]["success"]); + AdmissionRequest admissionRequest = AdmissionRequest.fromJson(response); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/models/doctor/doctor_profile_model.dart b/lib/models/doctor/doctor_profile_model.dart index c2f5b0dd..7c7f6e37 100644 --- a/lib/models/doctor/doctor_profile_model.dart +++ b/lib/models/doctor/doctor_profile_model.dart @@ -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']; diff --git a/pubspec.yaml b/pubspec.yaml index ac0e78c3..ce9d34be 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ description: A new Flutter project. version: 1.2.2+2 environment: - sdk: ">=2.8.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" #dependency_overrides: