Merge branch 'development-3.3' of http://34.17.52.79/Haroon6138/doctor_app_flutter into update_flutter_3.16.0

# Conflicts:
#	ios/Runner.xcodeproj/project.pbxproj
#	lib/core/model/SOAP/assessment/patch_assessment_req_model.dart
#	lib/core/service/patient_medical_file/soap/SOAP_service.dart
#	lib/core/viewModel/SOAP_view_model.dart
#	lib/core/viewModel/dashboard_view_model.dart
#	lib/core/viewModel/prescription/prescription_view_model.dart
#	lib/core/viewModel/procedure_View_model.dart
#	lib/screens/doctor_schedule/doctor_schedule.dart
#	lib/screens/home/home_screen.dart
#	lib/screens/patients/insurance_approvals_details.dart
#	lib/screens/patients/profile/lab_result/labs_home_page.dart
#	lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart
#	lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart
#	lib/screens/prescription/add_prescription/add_drug/add_drug_widget.dart
#	lib/screens/prescription/add_prescription/prescription_form_widget.dart
#	lib/screens/prescription/new_prescriptions_page.dart
#	lib/screens/procedures/add_procedure_page.dart
#	lib/screens/procedures/procedure_screen.dart
#	lib/utils/translations_delegate_base_utils.dart
#	lib/widgets/shared/speech-text-popup.dart
#	pubspec.lock
#	pubspec.yaml
flutter_3.16.0_zoom
Sultan khan 2 years ago
commit e4b891bf68

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>13.0</string>
</dict>
</plist>

@ -506,7 +506,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.99;
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -637,15 +637,12 @@
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.99;
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -679,7 +676,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.99;
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr;
PRODUCT_NAME = Runner;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

@ -40,7 +40,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"

@ -138,7 +138,11 @@ class BaseAppClient {
if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode);
if(parsed['ErrorCode'] =='699'){
onSuccess(parsed, statusCode);
}else {
onFailure(getError(parsed), statusCode);
}
} else if (!isAllowAny) {
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false).logout();

@ -9,9 +9,9 @@ const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
//const BASE_URL = 'https://webservices.hmg.com/';
const BASE_URL = 'https://webservices.hmg.com/';
// const BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; //Vida Plus URL
@ -144,6 +144,7 @@ const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcompl
const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam';
const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote';
const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment';
const IS_PRESCRIPTION_ORDER_CREATED = 'Services/DoctorApplication.svc/REST/IsPresecriptionOrderCreated';
const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies';
const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory';
@ -189,7 +190,8 @@ const GET_MY_REFERRAL_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GtMyRef
const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient";
const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
// const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus";
const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_Async";
const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL';
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -202,6 +204,8 @@ const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptio
const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh';
const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient";
const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient";
const IS_PRINCIPAL_COVERED = "Services/DoctorApplication.svc/REST/IsPrincipalDiagnosisCovered";
const GET_ICD10DISEASE = "Services/DoctorApplication.svc/REST/GetICD10DiseaseForItemId";
const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave";
const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient";
@ -277,6 +281,10 @@ const DOCTOR_ER_SIGN_ASSESSMENT = "Services/DoctorApplication.svc/REST/DoctorApp
const DOCTOR_SCHEDULE = "api/ScheduledSchedule/GetallSchedulebyUser";
const DOCTOR_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/FetchRadCriticalFinding";
const ACKNOWLEDGE_RADIOLOGY_CRITICAL_FINDINGS = "Services/DoctorApplication.svc/REST/Acknowledgeradcriticalfindings";
var selectedPatientType = 1;
//*********change value to decode json from Dropdown ************
@ -309,7 +317,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 8.7;
const VERSION_ID = 8.9;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -669,6 +669,11 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Add Assessment Details",
"ar": "أضف تفاصيل التقييم"
},
"updateAssessmentDetails": {
"en": "Update Assessment Details",
"ar":"تحديث تفاصيل التقييم"
},
"progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"},
"addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"},
"createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "},
@ -1149,6 +1154,13 @@ const Map<String, Map<String, String>> localizedValues = {
"doctorSchedule": {"en": "Doctor Schedule", "ar":"جدول الطبيب"},
"doctorRota": {"en": "Doctor Rota", "ar":"دوران الطبيب"},
"dateFrom": {"en": "Date From", "ar":"التاريخ من"},
"searchFindSchedule": {"en": "Search and find out the doctors schedule ", "ar":"بحث ومعرفة جدول الطبيب"}
"searchFindSchedule": {"en": "Search and find out the doctors schedule ", "ar":"بحث ومعرفة جدول الطبيب"},
"onePrimaryDiagnosis": {"en": "There has to be at-least 1 principal diagnosis", "ar":"يجب أن يكون هناك تشخيص رئيسي واحد على الأقل"},
"principalDiagnosisCannot": {"en": "Principal Diagnosis cannot modify once the order created", "ar":"لا يمكن تعديل التشخيص الرئيسي بمجرد إنشاء الطلب"},
"afterOrderCreation": {"en": "After order created, you cannot modify the principal diagnosis, Do you want to continue?", "ar":"بعد إنشاء الطلب، لا يمكنك تعديل التشخيص الأساسي، هل تريد المتابعة؟"},
"principalCoveredOrNot": {"en": "Principal Diagnosis is not covered for this patient", "ar":"لا يتم تغطية التشخيص الرئيسي لهذا المريض"},
"complexDiagnosis": {"en": "Complex Diagnosis", "ar":"التشخيص المعقد"},
};

@ -1,7 +1,49 @@
class PatchAssessmentReqModel {
class PostAssessmentRequestUpdateModel {
int? patientMRN;
int? appointmentNo;
int? episodeID;
int? episodeId;
String? createdByName;
int? createdBy;
List<IcdCodeDetailsUpdate?>? icdCodeDetails;
PostAssessmentRequestUpdateModel(
{this.patientMRN,
this.appointmentNo,
this.episodeId,
this.createdByName,
this.createdBy,
this.icdCodeDetails});
PostAssessmentRequestUpdateModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeId = json['EpisodeID'];
createdByName = json['CreatedByName'];
createdBy= json['CreatedBy'];
if (json['icdCodeDetails'] != null) {
icdCodeDetails = [];
json['icdCodeDetails'].forEach((v) {
icdCodeDetails!.add(new IcdCodeDetailsUpdate.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeId;
data['CreatedByName'] = this.createdByName;
data['CreatedBy'] = this.createdBy;
if (this.icdCodeDetails != null) {
data['icdCodeDetails'] =
this.icdCodeDetails!.map((v) => v?.toJson()).toList();
}
return data;
}
}
class IcdCodeDetailsUpdate {
String? icdcode10Id;
String? prevIcdCode10ID;
int? conditionId;
@ -9,40 +51,35 @@ class PatchAssessmentReqModel {
bool? complexDiagnosis;
String? remarks;
PatchAssessmentReqModel(
{this.patientMRN,
this.appointmentNo,
this.episodeID,
this.icdcode10Id,
this.prevIcdCode10ID,
this.conditionId,
this.diagnosisTypeId,
this.complexDiagnosis,
this.remarks});
PatchAssessmentReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];
icdcode10Id = json['Icdcode10Id'];
prevIcdCode10ID = json['PrevIcdCode10ID'];
conditionId = json['ConditionId'];
diagnosisTypeId = json['DiagnosisTypeId'];
complexDiagnosis = json['ComplexDiagnosis'];
remarks = json['Remarks'];
IcdCodeDetailsUpdate(
{this.icdcode10Id,
this.conditionId,
this.prevIcdCode10ID,
this.diagnosisTypeId,
this.complexDiagnosis,
this.remarks});
IcdCodeDetailsUpdate.fromJson(Map<String, dynamic> json) {
icdcode10Id = json['icdcode10Id'];
conditionId = json['conditionId'];
prevIcdCode10ID = json['prevIcdCode10ID'];
diagnosisTypeId = json['diagnosisTypeId'];
complexDiagnosis = json['complexDiagnosis'];
remarks = json['remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
data['Icdcode10Id'] = this.icdcode10Id;
data['PrevIcdCode10ID'] = this.prevIcdCode10ID;
data['ConditionId'] = this.conditionId;
data['DiagnosisTypeId'] = this.diagnosisTypeId;
data['ComplexDiagnosis'] = this.complexDiagnosis;
data['Remarks'] = this.remarks;
data['icdcode10Id'] = this.icdcode10Id;
data['conditionId'] = this.conditionId;
data['prevIcdCode10ID'] = this.prevIcdCode10ID;
data['diagnosisTypeId'] = this.diagnosisTypeId;
data['complexDiagnosis'] = this.complexDiagnosis;
data['remarks'] = this.remarks;
return data;
}
}

@ -2,6 +2,8 @@ class MasterKeyModel {
String? alias;
String? aliasN;
dynamic code;
dynamic codeId;
dynamic asciiDesc;
dynamic description;
dynamic detail1;
dynamic detail2;
@ -20,6 +22,8 @@ class MasterKeyModel {
{this.alias,
this.aliasN,
this.code,
this.codeId,
this.asciiDesc,
this.description,
this.detail1,
this.detail2,
@ -39,6 +43,8 @@ class MasterKeyModel {
aliasN = json['aliasN'];
code = json['code'];
description = json['description'];
codeId = json['codeId'];
asciiDesc = json['asciiDesc'];
detail1 = json['detail1'];
detail2 = json['detail2'];
detail3 = json['detail3'];
@ -59,6 +65,8 @@ class MasterKeyModel {
data['aliasN'] = this.aliasN;
data['code'] = this.code;
data['description'] = this.description;
data['codeId'] = this.codeId;
data['asciiDesc'] = this.asciiDesc;
data['detail1'] = this.detail1;
data['detail2'] = this.detail2;
data['detail3'] = this.detail3;

@ -0,0 +1,60 @@
class RadiologyCriticalFindingModel {
String? clinicName;
String? doctorName;
String? imageURL;
int? invoiceLineItemNo;
int? invoiceNo;
String? notificationMesssage;
int? patientId;
String? patientName;
String? procedureName;
String? reportData;
String? reportOn;
String? resultFindings;
RadiologyCriticalFindingModel(
{this.clinicName,
this.doctorName,
this.imageURL,
this.invoiceLineItemNo,
this.invoiceNo,
this.notificationMesssage,
this.patientId,
this.patientName,
this.procedureName,
this.reportData,
this.reportOn,
this.resultFindings});
RadiologyCriticalFindingModel.fromJson(Map<String, dynamic> json) {
clinicName = json['clinicName'];
doctorName = json['doctorName'];
imageURL = json['imageURL'];
invoiceLineItemNo = json['invoiceLineItemNo'];
invoiceNo = json['invoiceNo'];
notificationMesssage = json['notificationMesssage'];
patientId = json['patientId'];
patientName = json['patientName'];
procedureName = json['procedureName'];
reportData = json['reportData'];
reportOn = json['reportOn'];
resultFindings = json['resultFindings'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['clinicName'] = this.clinicName;
data['doctorName'] = this.doctorName;
data['imageURL'] = this.imageURL;
data['invoiceLineItemNo'] = this.invoiceLineItemNo;
data['invoiceNo'] = this.invoiceNo;
data['notificationMesssage'] = this.notificationMesssage;
data['patientId'] = this.patientId;
data['patientName'] = this.patientName;
data['procedureName'] = this.procedureName;
data['reportData'] = this.reportData;
data['reportOn'] = this.reportOn;
data['resultFindings'] = this.resultFindings;
return data;
}
}

@ -17,7 +17,8 @@ class AuthenticationService extends BaseService {
List<GetIMEIDetailsModel> get dashboardItemsList => _imeiDetails;
NewLoginInformationModel _loginInfo = NewLoginInformationModel();
String _errorCode ='';
String get errorCode => _errorCode;
NewLoginInformationModel get loginInfo => _loginInfo;
SendActivationCodeForDoctorAppResponseModel _activationCodeVerificationScreenRes = SendActivationCodeForDoctorAppResponseModel();
@ -105,12 +106,22 @@ class AuthenticationService extends BaseService {
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel();
try {
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) {
_checkActivationCodeForDoctorAppRes = CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
if(response['ErrorCode'] =='699'){
_errorCode = response['ErrorCode'];
hasError = true;
super.error = response['ErrorEndUserMessage'];
}else {
_errorCode ='';
_checkActivationCodeForDoctorAppRes =
CheckActivationCodeForDoctorAppResponseModel.fromJson(response);
}
}, onFailure: (String error, int statusCode) {
_errorCode ='';
hasError = true;
super.error = error;
}, body: checkActivationCodeRequestModel.toJson());
} catch (error) {
_errorCode ='';
hasError = true;
super.error = error.toString();
}

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/dashboard/radiology_critical_finding_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart';
@ -7,8 +8,12 @@ import '../../model/dashboard/doctor_schedule.dart';
class DashboardService extends BaseService {
List<DashboardModel> _dashboardItemsList = [];
RadiologyCriticalFindingModel? _radiologyCriticalFindingModel;
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
RadiologyCriticalFindingModel? get radiologyCriticalFindingModel => _radiologyCriticalFindingModel;
bool hasVirtualClinic = false;
String? sServiceID;
@ -48,4 +53,46 @@ class DashboardService extends BaseService {
},
);
}
Future acknowledgeDoctorHasRadiologyFindings(String invoiceNo, String invoiceLineItemNo) async {
hasError = false;
await getDoctorProfile(isGetProfile: true);
await baseAppClient.post(
ACKNOWLEDGE_RADIOLOGY_CRITICAL_FINDINGS,
onSuccess: (dynamic response, int statusCode) {
// _radiologyCriticalFindingModel = RadiologyCriticalFindingModel.fromJson(response["RadiologyVMEntityListInfoResponse"]["entityList"][0]);
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: {
"DoctorID": doctorProfile?.doctorID, // test user 9920
"LoginDoctorID": doctorProfile?.doctorID,
"invoiceNo": invoiceNo,
"invoiceLineItemNo": invoiceLineItemNo,
},
);
}
Future checkDoctorHasRadiologyFindings() async {
hasError = false;
await getDoctorProfile(isGetProfile: true);
await baseAppClient.post(
DOCTOR_RADIOLOGY_CRITICAL_FINDINGS,
onSuccess: (dynamic response, int statusCode) {
if(response["RadiologyVMEntityListInfoResponse"]["entityList"].length != 0) {
_radiologyCriticalFindingModel = RadiologyCriticalFindingModel.fromJson(response["RadiologyVMEntityListInfoResponse"]["entityList"][0]);
}
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: {
"DoctorID": doctorProfile?.doctorID, // test user 9920
"LoginDoctorID": doctorProfile?.doctorID
},
);
}
}

@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription
import 'package:doctor_app_flutter/core/model/Prescriptions/request_prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/core/model/calculate_box_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/item_by_medicine_request_model.dart';
@ -49,6 +50,8 @@ class PrescriptionService extends LookupService {
List<dynamic> itemMedicineList = [];
List<dynamic> itemMedicineListRoute = [];
List<dynamic> itemMedicineListUnit = [];
List<MasterKeyModel> icd10CodeListByItem =[];
bool isDiagnosisCovered =true;
dynamic boxQuantity;
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel();
@ -373,4 +376,41 @@ class PrescriptionService extends LookupService {
super.error = error;
}, body: _getMedicationForInPatientRequestModel.toJson());
}
Future isPrincipalCovered(PatiantInformtion patient) async {
hasError = false;
await baseAppClient.post(IS_PRINCIPAL_COVERED,
body:{
"PatientID":patient.patientId,
"EncounterNo":patient.appointmentNo ?? 0,
"EncounterType":patient.appointmentTypeId ?? 0,
"DoctorID":patient.doctorId,
}, onSuccess: (dynamic response, int statusCode) {
isDiagnosisCovered = response['IsDiagnosisCovered'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
}
Future getIcd10DISESECode(PatiantInformtion patient, int itemID) async {
hasError = false;
await baseAppClient.post(GET_ICD10DISEASE,
body:{
"PatientMRN":patient.patientId,
"ItemID":itemID,
"DoctorID":patient.doctorId,
}, onSuccess: (dynamic response, int statusCode) {
icd10CodeListByItem.clear();
Map<String, dynamic> data = response['List_ICD10Desease'];
data['entityList'].forEach((v) {
icd10CodeListByItem.add(MasterKeyModel.fromJson(v));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
});
}
}

@ -3,7 +3,6 @@ import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_mod
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/general_get_req_for_SOAP.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_res_model.dart';
@ -22,6 +21,8 @@ import 'package:doctor_app_flutter/core/model/SOAP/progress_note/GetGetProgressN
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/get_progress_note_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/post_progress_note_request_model.dart';
import '../../../model/SOAP/assessment/patch_assessment_req_model.dart';
import '../../../model/patient/patiant_info_model.dart';
import '../../base/lookup-service.dart';
class SOAPService extends LookupService {
@ -33,7 +34,7 @@ class SOAPService extends LookupService {
List<GetAssessmentResModel> patientAssessmentList = [];
int? episodeID;
bool isPrescriptionOrder =false;
Future postEpisode(PostEpisodeReqModel postEpisodeReqModel) async {
hasError = false;
@ -196,9 +197,9 @@ class SOAPService extends LookupService {
}
Future patchAssessment(
PatchAssessmentReqModel patchAssessmentRequestModel) async {
PostAssessmentRequestUpdateModel patchAssessmentRequestModel) async {
hasError = false;
await baseAppClient.post(PATCH_ASSESSMENT,
await baseAppClient.post(POST_ASSESSMENT,
onSuccess: (dynamic response, int statusCode) {
print("Success");
}, onFailure: (String error, int statusCode) {
@ -317,4 +318,22 @@ class SOAPService extends LookupService {
super.error = error;
}, body: getEpisodeForInpatientReqModel.toJson());
}
Future isPrescriptionOrderCreated(
PatiantInformtion patientInfo) async {
hasError = false;
await baseAppClient.post(IS_PRESCRIPTION_ORDER_CREATED,
onSuccess: (dynamic response, int statusCode) {
print("Success");
isPrescriptionOrder = response['IsPrescriptionCreated'];
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: {
"PatientMRN":patientInfo.patientMRN,
"EncounterNo":patientInfo.appointmentNo,
"EncounterType":patientInfo.appointmentTypeId,
"DoctorID":patientInfo.doctorId,
});
}
}

@ -4,7 +4,6 @@ import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_mod
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/post_allergy_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/post_assessment_request_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/chief_complaint/get_chief_complaint_res_model.dart';
@ -23,19 +22,20 @@ import 'package:doctor_app_flutter/core/model/SOAP/post_episode_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/get_progress_note_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/progress_note/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/soap/SOAP_service.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_allergy.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_examination.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_history.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/soap/SOAP_service.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessment_call_back.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objective_call_back.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/plan/plan_call_back.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/subjective_call_back.dart';
import '../../locator.dart';
import '../model/SOAP/assessment/patch_assessment_req_model.dart';
import 'base_view_model.dart';
class SOAPViewModel extends BaseViewModel {
@ -78,8 +78,8 @@ class SOAPViewModel extends BaseViewModel {
List<GetAssessmentResModel> get patientAssessmentList => _SOAPService.patientAssessmentList;
int get episodeID => _SOAPService.episodeID!;
int? get episodeID => _SOAPService.episodeID;
bool get isPrescriptionOrder => _SOAPService.isPrescriptionOrder;
bool isAddProgress = true;
bool isAddExamInProgress = true;
String progressNoteText = "";
@ -220,9 +220,9 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future patchAssessment(PatchAssessmentReqModel patchAssessmentRequestModel) async {
Future patchAssessment(PostAssessmentRequestUpdateModel patchAssessmentRequestModel) async {
setState(ViewState.BusyLocal);
await _SOAPService.patchAssessment(patchAssessmentRequestModel);
await _SOAPService.patchAssessment(patchAssessmentRequestModel!);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
@ -622,6 +622,18 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future isPrescriptionOrderCreated(PatiantInformtion patientInfo) async{
setState(ViewState.BusyLocal);
await _SOAPService.isPrescriptionOrderCreated(patientInfo);
if (_SOAPService.hasError) {
error = _SOAPService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
postSubjectServices({patientInfo, String? complaintsText, String? medicationText, String? illnessText, List<MySelectedHistory>? myHistoryList, List<MySelectedAllergy>? myAllergiesList}) async {
List services = [];

@ -37,6 +37,7 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED, UNVERIFIED }
class AuthenticationViewModel extends BaseViewModel {
AuthenticationService _authService = locator<AuthenticationService>();
HospitalsService _hospitalsService = locator<HospitalsService>();
get errorCode => _authService.errorCode;
List<GetIMEIDetailsModel> get imeiDetails => _authService.dashboardItemsList;
@ -198,6 +199,7 @@ class AuthenticationViewModel extends BaseViewModel {
error = _authService.error;
setState(ViewState.ErrorLocal);
} else {
await setDataAfterSendActivationSuccess(checkActivationCodeForDoctorAppRes);
setState(ViewState.Idle);
}
@ -333,13 +335,19 @@ class AuthenticationViewModel extends BaseViewModel {
getDeviceInfoFromFirebase() async {
// await checkIsHuawei();
var token;
var APNSToken;
_firebaseMessaging.setAutoInitEnabled(true);
if (Platform.isIOS) {
_firebaseMessaging.requestPermission();
}
setState(ViewState.Busy);
try {
if (Platform.isIOS) {
APNSToken = await _firebaseMessaging.getAPNSToken();
print("APNS TOKEN: $APNSToken");
}
token = await _firebaseMessaging.getToken();
print("Device TOKEN: $token");
} catch (ex) {
print(ex);
}

@ -1,7 +1,5 @@
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/core/model/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import 'package:doctor_app_flutter/core/model/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/core/model/dashboard/radiology_critical_finding_model.dart';
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
@ -9,6 +7,9 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import '../../locator.dart';
import '../model/dashboard/dashboard_model.dart';
import '../model/dashboard/get_special_clinical_care_List_Respose_Model.dart';
import '../model/doctor/clinic_model.dart';
import 'authentication_view_model.dart';
import 'base_view_model.dart';
@ -20,6 +21,8 @@ class DashboardViewModel extends BaseViewModel {
List<DashboardModel> get dashboardItemsList => _dashboardService.dashboardItemsList;
RadiologyCriticalFindingModel? get radiologyCriticalFindingModel => _dashboardService.radiologyCriticalFindingModel;
bool get hasVirtualClinic => _dashboardService.hasVirtualClinic;
String? get sServiceID => _dashboardService.sServiceID;
@ -37,6 +40,7 @@ class DashboardViewModel extends BaseViewModel {
_dashboardService.getDashboard(),
_dashboardService.checkDoctorHasLiveCare(),
_specialClinicsService.getSpecialClinicalCareList(),
_dashboardService.checkDoctorHasRadiologyFindings()
]);
if (_dashboardService.hasError) {
@ -70,6 +74,10 @@ class DashboardViewModel extends BaseViewModel {
await _dashboardService.checkDoctorHasLiveCare();
}
Future acknowledgeRadiologyCriticalFinding(String invoiceNo, String invoiceLineItemNo) async {
await _dashboardService.acknowledgeDoctorHasRadiologyFindings(invoiceNo, invoiceLineItemNo);
}
Future getSpecialClinicalCareList() async {
setState(ViewState.Busy);
await _specialClinicsService.getSpecialClinicalCareList();
@ -80,7 +88,7 @@ class DashboardViewModel extends BaseViewModel {
// setState(ViewState.Idle);
}
Future changeClinic(int clinicId, AuthenticationViewModel authProvider) async {
Future changeClinic(dynamic clinicId, AuthenticationViewModel authProvider) async {
setState(ViewState.BusyLocal);
await getDoctorProfile();
ClinicModel clinicModel = ClinicModel(

@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Allergy/get_allergies_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/get_assessment_res_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/model/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/core/service/patient_medical_file/prescription/prescription_service.dart';
@ -42,10 +43,12 @@ class PrescriptionViewModel extends BaseViewModel {
List<Prescriptions> get prescriptionsList => _prescriptionService.prescriptionsList;
Future getItem({required int itemID}) async {
List<MasterKeyModel> get icd10DeseaseItems =>_prescriptionService.icd10CodeListByItem;
bool get isPrincipalCovered_ => _prescriptionService.isDiagnosisCovered;
Future getItem({int? itemID}) async {
hasError = false;
setState(ViewState.BusyLocal);
await _prescriptionService.getItem(itemID: itemID);
await _prescriptionService.getItem(itemID: itemID!);
if (_prescriptionService.hasError) {
error = _prescriptionService.error!;
setState(ViewState.ErrorLocal);
@ -173,4 +176,29 @@ class PrescriptionViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
Future isPrincipalCovered(
{
required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionService.isPrincipalCovered(patient);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future getIcd10DISESECode(
{
required PatiantInformtion patient, int? itemID}) async {
setState(ViewState.Busy);
await _prescriptionService.getIcd10DISESECode(patient, itemID!);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}

@ -29,11 +29,14 @@ import 'package:doctor_app_flutter/utils/utils.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart';
import '../service/patient_medical_file/prescription/prescription_service.dart';
class ProcedureViewModel extends BaseViewModel {
//TODO Hussam clean it
FilterType filterType = FilterType.Clinic;
bool hasError = false;
ProcedureService _procedureService = locator<ProcedureService>();
PrescriptionService _prescriptionService = locator<PrescriptionService>();
List<GetOrderedProcedureModel> get procedureList => _procedureService.procedureList;
@ -64,7 +67,9 @@ class ProcedureViewModel extends BaseViewModel {
bool get isRadiologyVIDAPlus => _isRadiologyVIDAPlus;
Future getProcedure({required int mrn, String? patientType, int? appointmentNo, bool isLocalBusy = false}) async {
bool get isPrincipalCovered_ => _prescriptionService.isDiagnosisCovered;
Future getProcedure({int? mrn, String? patientType, int? appointmentNo, bool isLocalBusy = false}) async {
hasError = false;
await getDoctorProfile();
if (isLocalBusy)
@ -457,4 +462,15 @@ class ProcedureViewModel extends BaseViewModel {
items.addAll(masterList);
}
}
Future isPrincipalCovered({required PatiantInformtion patient}) async {
// setState(ViewState.Busy);
await _prescriptionService.isPrincipalCovered(patient);
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else {
// setState(ViewState.Idle);
}
}
}

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/auth_method_types.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/service/authentication_service.dart';
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/utils/date-utils.dart';
@ -464,6 +465,12 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
if (authenticationViewModel.state == ViewState.ErrorLocal) {
Navigator.pop(context);
Utils.showErrorToast(authenticationViewModel.error);
if (authenticationViewModel.errorCode == '699') {
Navigator.pop(context);
authenticationViewModel.deleteUser();
authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED);
}
} else {
await authenticationViewModel.onCheckActivationCodeSuccess();
if (value != null) {

@ -15,6 +15,7 @@ import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/errors/error_message.dart';
import '../base/base_view.dart';
class DoctorSchedulePage extends StatefulWidget {
@override
_DoctorSchedulePageState createState() => _DoctorSchedulePageState();
@ -26,21 +27,16 @@ class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
double currentPage = 0;
int selectedindex = 0;
List weeks = [];
// List<DoctorScheduleResponse> doctorScheduleResponse = [];
int weekMS = 604800 * 1000;
// DoctorList? doctorList;
List<String> freeSlots = [];
bool isPageChange = false;
String fromDate = DateFormat('yyyy-MM-dd').format(DateTime.now());
String toDate = DateFormat('yyyy-MM-dd').format(DateTime.now().add(Duration(days: 30)));
// AppSharedPreferences sharedPref = AppSharedPreferences();
String toDate =
DateFormat('yyyy-MM-dd').format(DateTime.now().add(Duration(days: 30)));
int pageNo=1;
@override
void initState() {
// this.doctorList = widget.doctorList;
super.initState();
}
@ -87,53 +83,81 @@ class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
children: [
IconButton(
onPressed: () {
model.getDoctorRota(
fromDate,
toDate,
);
if(pageNo >1) {
pageNo--;
model.getDoctorRota(fromDate, toDate,
pageNo: pageNo);
}
},
icon: SvgPicture.asset('assets/images/svgs/prev.svg', height: 25, width: 10)),
IconButton(onPressed: () {}, icon: SvgPicture.asset('assets/images/svgs/next.svg', height: 25, width: 10))
icon: SvgPicture.asset(
'assets/images/svgs/prev.svg',
height: 25,
width: 10)),
IconButton(
onPressed: () {
pageNo++;
model.getDoctorRota(fromDate, toDate, pageNo: pageNo);
},
icon: SvgPicture.asset(
'assets/images/svgs/next.svg',
height: 25,
width: 10))
],
),
],
)),
],
),
model.getDoctorRotation.length == 0
? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
))
: Container(
margin: EdgeInsets.only(top: 45),
child: PageView.builder(
controller: _pageController,
itemCount: model.getDoctorRotation.length,
onPageChanged: (index) {
setState(() {
isPageChange = true;
this.currentPage = index.toDouble();
});
},
itemBuilder: (context, index) {
return Container(
child: ListView.builder(
itemCount: model.getDoctorRotation[index].scheduleforuser!.length,
itemBuilder: (context, index2) => InkWell(
onTap: () {
// final weekDay = weeks[index][index2]['DayName'];
},
child: Row(
children: [
Expanded(
flex: 1,
child: Padding(
padding: projectViewModel.isArabic ? EdgeInsets.only(right: 17) : EdgeInsets.only(left: 17),
child: Row(children: [
Column(
children: [
Text(DateFormat('EEEE').format(model.getDoctorRotation[index].scheduleforuser![index2].days!)
model.getDoctorRotation.length ==0 ? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
)) :
Container(
margin: EdgeInsets.only(top: 45),
child: PageView.builder(
controller: _pageController,
itemCount: model.getDoctorRotation.length,
onPageChanged: (index) {
setState(() {
isPageChange = true;
this.currentPage = index.toDouble();
});
},
itemBuilder: (context, index) {
return model.getDoctorRotation[index]
.scheduleforuser!.length ==0 ? Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
)) : Container(
child: ListView.builder(
itemCount: model.getDoctorRotation[index]
.scheduleforuser!.length,
itemBuilder: (context, index2) => InkWell(
onTap: () {
// final weekDay = weeks[index][index2]['DayName'];
},
child: Row(
children: [
Expanded(
flex: 1,
child: Padding(
padding:
projectViewModel.isArabic
? EdgeInsets.only(
right: 17)
: EdgeInsets.only(
left: 17),
child: Row(children: [
Column(
children: [
Text(DateFormat('EEEE')
.format(model
.getDoctorRotation[
index]
.scheduleforuser![
index2]
.days!)
// fontSize: 13,
// fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500,
@ -188,13 +212,22 @@ class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
),
Container(
height: 45,
child: ListView.builder(
itemCount: model.getDoctorRotation[index].scheduleforuser![index2]!.shiftforuser!.length,
itemBuilder: (context, index3) => Row(children: [
Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].fromtimetext.toString()),
Text(" " + TranslationBase.of(context).to + " "),
Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].totimetext.toString())
])))
child: ListView
.builder(
itemCount: model
.getDoctorRotation[
index]
.scheduleforuser![
index2]
.shiftforuser
!.length,
itemBuilder: (context,
index3) =>
Row(children: [
Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].fromtimetext.toString()),
Text(" "+TranslationBase.of(context).to +" "),
Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].totimetext.toString())
])))
// ],)
]))),
@ -218,103 +251,131 @@ class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
showDialog(
context: context,
builder: (BuildContext context) {
return StatefulBuilder(builder: (context, setState) {
return AlertDialog(
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).search,
style: TextStyle(fontSize: 22),
),
Text(
TranslationBase.of(context).searchFindSchedule,
style: TextStyle(fontSize: 16),
)
],
),
content: Container(
height: 150,
child: Column(children: [
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days: 365)),
onConfirm: (date) {
setState(() {
fromDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding: EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), color: Colors.white, boxShadow: [BoxShadow(blurRadius: .26, spreadRadius: 1 * 1.5, color: Colors.black.withOpacity(.05))]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).dateFrom,
style: TextStyle(fontSize: 12),
),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [Text(fromDate), Icon(Icons.calendar_month_outlined)])
],
))),
SizedBox(
height: 20,
),
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days: 365)),
onConfirm: (date) {
setState(() {
toDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding: EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), color: Colors.white, boxShadow: [BoxShadow(blurRadius: .26, spreadRadius: 1 * 1.5, color: Colors.black.withOpacity(.05))]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).toDate,
style: TextStyle(fontSize: 12),
),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [Text(toDate), Icon(Icons.calendar_month_outlined)])
],
)))
]),
),
actions: [
AppButton(
title: TranslationBase.of(context).search,
onPressed: () {
setState(() {
model.getDoctorRota(fromDate, toDate);
Navigator.pop(context);
});
},
)
],
);
;
});
return StatefulBuilder(
builder:(context, setState) {
return
AlertDialog(
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).search,
style: TextStyle(fontSize: 22),
),
Text(
TranslationBase.of(context).searchFindSchedule,
style: TextStyle(fontSize: 16),
)
],
),
content: Container(
height: 150,
child: Column(children: [
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days:365)),
onConfirm: (date) {
setState(() {
fromDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding:
EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: .26,
spreadRadius: 1 * 1.5,
color: Colors.black.withOpacity(.05))
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).dateFrom,
style: TextStyle(fontSize: 12),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(fromDate, style: TextStyle(fontSize: 14),),
Icon(Icons.calendar_month_outlined)
])
],
))),
SizedBox(height: 20,),
InkWell(
onTap: () {
DatePicker.showDatePicker(
context,
showTitleActions: true,
minTime: DateTime(DateTime.now().year - 1, 1, 1),
maxTime: DateTime.now().add(Duration(days:365)),
onConfirm: (date) {
setState(() {
toDate = DateFormat('yyyy-MM-dd').format(date);
});
},
);
},
child: Container(
padding:
EdgeInsets.only(top: 5, left: 12, right: 12, bottom: 5),
width: double.infinity,
height: 56,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
boxShadow: [
BoxShadow(
blurRadius: .26,
spreadRadius: 1 * 1.5,
color: Colors.black.withOpacity(.05))
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).toDate,
style: TextStyle(fontSize: 12),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(toDate, style: TextStyle(fontSize: 14),),
Icon(Icons.calendar_month_outlined)
])
],
)))
]),
),
actions: [
AppButton(
title:TranslationBase.of(context).search,
onPressed: () {
setState((){
model.getDoctorRota(fromDate, toDate);
Navigator.pop(context);
});
},
)
],
);
;
}
);
},
);
}

@ -68,7 +68,14 @@ class _HomeScreenState extends State<HomeScreen> {
return BaseView<DashboardViewModel>(
onModelReady: (model) async {
model.startHomeScreenServices(projectsProvider, authenticationViewModel);
model.startHomeScreenServices(projectsProvider, authenticationViewModel).then((value) {
if (model.radiologyCriticalFindingModel != null) {
print("onModelReady radiologyCriticalFindingModel!!!");
showRadiologyFindingDialog(model);
} else {
print("onModelReady radiologyCriticalFindingModel EMPTYYYY!!!");
}
});
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
@ -142,7 +149,7 @@ class _HomeScreenState extends State<HomeScreen> {
)),
],
),
AppText(Utils.convertToTitleCase(item.clinicName!),
AppText(Utils.convertToTitleCase(item.clinicName),
fontSize: 14, letterSpacing: -0.96, color: AppGlobal.appTextColor, fontWeight: FontWeight.bold, textAlign: TextAlign.end),
],
);
@ -151,7 +158,7 @@ class _HomeScreenState extends State<HomeScreen> {
onChanged: (newValue) async {
clinicId = newValue;
GifLoaderDialogUtils.showMyDialog(context);
await model.changeClinic(int.parse(newValue.toString()), authenticationViewModel);
await model.changeClinic(newValue, authenticationViewModel);
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
@ -160,7 +167,7 @@ class _HomeScreenState extends State<HomeScreen> {
items: projectsProvider.doctorClinicsList.map((item) {
return DropdownMenuItem(
child: AppText(
Utils.convertToTitleCase(item.clinicName!),
Utils.convertToTitleCase(item.clinicName),
fontSize: 14,
letterSpacing: -0.96,
color: AppGlobal.appTextColor,
@ -270,42 +277,33 @@ class _HomeScreenState extends State<HomeScreen> {
);
}
showRadiologyFindingDialog(DashboardViewModel model) {
Utils.showConfirmationDialog(context, model.radiologyCriticalFindingModel!.notificationMesssage!, () async {
Navigator.of(context).pop();
GifLoaderDialogUtils.showMyDialog(context);
await model.acknowledgeRadiologyCriticalFinding(model.radiologyCriticalFindingModel!.invoiceNo.toString(), model.radiologyCriticalFindingModel!.invoiceLineItemNo.toString());
GifLoaderDialogUtils.hideDialog(context);
}, isShowCancelButton: false);
}
List<Widget> homePatientsCardsWidget(DashboardViewModel model, projectsProvider) {
colorIndex = 0;
List<LinearGradient> backgroundColors = [];
backgroundColors.add(
LinearGradient(
begin: Alignment(-1.0, -2.0),
end: Alignment(1.0, 2.0),
colors: [
AppGlobal.appRedColor,
Color(0xFFAD3B3B),
],
),
); //AppGlobal.appRedColor;
backgroundColors.add(
LinearGradient(
begin: Alignment.center,
end: Alignment.center,
colors: [
Color(0xFFC9C9C9),
Color(0xFFC9C9C9),
],
),
);
backgroundColors.add(
LinearGradient(
begin: Alignment.center,
end: Alignment.center,
colors: [Color(0xFF71787E), AppGlobal.appTextColor],
),
);
List<LinearGradient> backgroundColors =[];
backgroundColors.add(LinearGradient(begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 2.0), colors: [
AppGlobal.appRedColor,
Color(0xFFAD3B3B),
])); //AppGlobal.appRedColor;
backgroundColors.add(LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [
Color(0xFFC9C9C9),
Color(0xFFC9C9C9),
]));
backgroundColors.add(LinearGradient(begin: Alignment.center, end: Alignment.center, colors: [Color(0xFF71787E), AppGlobal.appTextColor]));
List<Color> backgroundIconColors = [];
backgroundIconColors.add(Colors.white12);
backgroundIconColors.add(Colors.white38);
backgroundIconColors.add( Colors.white38);
backgroundIconColors.add(Colors.white10);
List<Color> textColors = [];
List<Color> textColors =[];
textColors.add(Colors.white);
textColors.add(Color(0xFF353E47));
textColors.add(Colors.white);
@ -313,41 +311,39 @@ class _HomeScreenState extends State<HomeScreen> {
List<HomePatientCard> patientCards = [];
if (model.hasVirtualClinic) {
patientCards.add(
HomePatientCard(
gradient: backgroundColors[colorIndex],
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.livecare,
textColor: textColors[colorIndex],
iconSize: 21,
text: "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}",
onTap: () {
// TODO MOSA TEST
// PatiantInformtion patient = PatiantInformtion(
// patientStatusType: 43,
// episodeNo: 0,
// vcId: 42342,
// fullName: "mosa test",
// dateofBirth: "2000-05-01 10:42:35.790004"
// );
// Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
// "patient": patient,
// "patientType": "0",
// "isSearch": false,
// "isInpatient": false,
// "arrivalType": "0",
// "isSearchAndOut": false,
// "isFromLiveCare": true,
// });
Navigator.push(
context,
FadePage(
page: LiveCarePatientScreen(),
),
);
},
),
);
patientCards.add(HomePatientCard(
gradient: backgroundColors[colorIndex],
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.livecare,
textColor: textColors[colorIndex],
iconSize: 21,
text: "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}",
onTap: () {
// TODO MOSA TEST
// PatiantInformtion patient = PatiantInformtion(
// patientStatusType: 43,
// episodeNo: 0,
// vcId: 42342,
// fullName: "mosa test",
// dateofBirth: "2000-05-01 10:42:35.790004"
// );
// Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
// "patient": patient,
// "patientType": "0",
// "isSearch": false,
// "isInpatient": false,
// "arrivalType": "0",
// "isSearchAndOut": false,
// "isFromLiveCare": true,
// });
Navigator.push(
context,
FadePage(
page: LiveCarePatientScreen(),
),
);
},
));
changeColorIndex();
}
@ -418,11 +414,7 @@ class _HomeScreenState extends State<HomeScreen> {
context,
MaterialPageRoute(
builder: (context) => OutPatientsScreen(
patientSearchRequestModel: PatientSearchRequestModel(
from: date,
to: date,
doctorID: authenticationViewModel.doctorProfile!.doctorID,
),
patientSearchRequestModel: PatientSearchRequestModel(from: date, to: date, doctorID: authenticationViewModel.doctorProfile!.doctorID),
),
settings: RouteSettings(name: 'OutPatientsScreen'),
));

File diff suppressed because it is too large Load Diff

@ -15,7 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/errors/error_message.dart';
class LabsHomePage extends StatefulWidget {
@ -48,7 +48,10 @@ class _LabsHomePageState extends State<LabsHomePage> {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getLabs(patient!, isInpatient: false),
onModelReady: (model) {
model.getLabs(patient!, isInpatient: false);
model.isPrincipalCovered(patient: patient!);
},
builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model,
backgroundColor: Colors.grey[100]!,
@ -72,6 +75,17 @@ class _LabsHomePageState extends State<LabsHomePage> {
title: TranslationBase.of(context).lab,
subTitle: TranslationBase.of(context).result,
),
SizedBox(
height: 20,
),
!model.isPrincipalCovered_
? Center(
child: AppText(
TranslationBase.of(context).principalCoveredOrNot,
color: Colors.red,
textAlign: TextAlign.center,
))
: SizedBox(),
if ((patient!.patientStatusType != null && patient!.patientStatusType == 43) || (isFromLiveCare! && patient!.appointmentNo != null))
AddNewOrder(
onTap: () {
@ -111,7 +125,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
child: Container(
width: 20,
decoration: BoxDecoration(
color: model.patientLabOrdersList[index].isLiveCareAppointment!
color: model.patientLabOrdersList![index].isLiveCareAppointment!
? Colors.red[900]
: !model.patientLabOrdersList[index].isInOutPatient!
? Colors.black
@ -142,27 +156,25 @@ class _LabsHomePageState extends State<LabsHomePage> {
margin: EdgeInsets.only(left: 20),
child: DoctorCard(
isNoMargin: true,
onTap: () {
Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patient: patient!,
isInpatient: isInpatient!,
arrivalType: arrivalType!,
patientType: patientType!,
),
onTap: () => Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(
patientLabOrders: model.patientLabOrdersList[index],
patient: patient!,
isInpatient: isInpatient!,
arrivalType: arrivalType!,
patientType: patientType!,
),
);
},
doctorName: Utils.convertToTitleCase(model.patientLabOrdersList[index].doctorName!),
),
),
doctorName: Utils.convertToTitleCase(model.patientLabOrdersList[index].doctorName),
invoiceNO: ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model.patientLabOrdersList[index].doctorImageURL!,
branch: model.patientLabOrdersList[index].projectName!,
clinic: Utils.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription!),
appointmentDate: model.patientLabOrdersList[index].createdOn!,
orderNo: model.patientLabOrdersList[index].orderNo!,
profileUrl: model.patientLabOrdersList[index].doctorImageURL,
branch: model.patientLabOrdersList[index].projectName,
clinic: Utils.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription),
appointmentDate: model.patientLabOrdersList[index].createdOn,
orderNo: model.patientLabOrdersList[index].orderNo,
isShowTime: false,
),
),
@ -170,7 +182,7 @@ class _LabsHomePageState extends State<LabsHomePage> {
),
),
),
if (model.patientLabOrdersList.isEmpty && patient!.patientStatusType != 43)
if (model.patientLabOrdersList.isEmpty && patient!.patientStatusType! != 43)
Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,

@ -17,6 +17,7 @@ import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../widgets/shared/app_texts_widget.dart';
import '../../../../widgets/shared/errors/error_message.dart';
class RadiologyHomePage extends StatefulWidget {
@ -47,7 +48,11 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient, patientType: patientType, isInPatient: false),
onModelReady: (model) {
model.getPatientRadOrders(
patient, patientType: patientType, isInPatient: false);
model.isPrincipalCovered(patient: patient);
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100]!,
@ -70,11 +75,16 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
title: TranslationBase.of(context).radiology,
subTitle: TranslationBase.of(context).result,
),
if (patient.patientStatusType != null && patient.patientStatusType == 43)
ServiceTitle(
title: TranslationBase.of(context).radiology,
subTitle: TranslationBase.of(context).result,
),
SizedBox(height: 20,),
!model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(),
if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {

@ -2,14 +2,12 @@ import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/view_state.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/patch_assessment_req_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/Assessment/post_assessment_request_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_assement.dart';
import 'package:doctor_app_flutter/core/model/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
@ -23,6 +21,8 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../../core/model/SOAP/Assessment/post_assessment_request_model.dart';
import '../../../../../core/model/SOAP/assessment/patch_assessment_req_model.dart';
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
@ -46,6 +46,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
GlobalKey key = new GlobalKey<AutoCompleteTextFieldState<MasterKeyModel>>();
bool isFormSubmitted = false;
bool complexDiagnosis = true;
@override
Widget build(BuildContext context) {
@ -95,7 +96,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBar: BottomSheetTitle(title: TranslationBase.of(context).addAssessmentDetails),
appBar: BottomSheetTitle(title: widget.isUpdate ? TranslationBase.of(context).updateAssessmentDetails : TranslationBase.of(context).addAssessmentDetails),
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
@ -108,6 +109,23 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
SizedBox(
height: 16,
),
Row(children: [
Checkbox(
value: complexDiagnosis,
onChanged: (bool? value) {
complexDiagnosis = value!;
setState(() {});
},
checkColor: Colors.white,
activeColor: Colors.green,
),
Text(
TranslationBase.of(context).complexDiagnosis,
),
]),
SizedBox(
height: 16,
),
Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: AppTextFieldCustom(
@ -157,9 +175,8 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
isTextFieldHasSuffix: true,
suffixIcon: IconButton(
onPressed: () {
print(icdNameController.text);
if (icdNameController.text.length <= 3) {
DrAppToastMsg.showErrorToast("Please enter 4 or more characters");
if (icdNameController.text.length <= 2) {
DrAppToastMsg.showErrorToast("Please enter 3 or more characters");
} else {
model.listOfICD10!.clear();
model.callAddAssessmentLookupsServices(searchKey: icdNameController.text);
@ -172,20 +189,20 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
onFieldSubmitted: () {},
)),
model.listOfICD10!.length > 0 && icdNameController.text.isNotEmpty
model.listOfICD10.length > 0 && icdNameController.text.isNotEmpty
? Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.4, //height to 9% of screen height,
child: ListView.builder(
shrinkWrap: true,
itemCount: model.listOfICD10!.length,
itemCount: model.listOfICD10.length,
itemBuilder: (context, index) {
return InkWell(
child: ListTile(title: AppText(model.listOfICD10![index].description + " / " + model.listOfICD10![index].code.toString(), fontSize: 12.0)),
child: ListTile(title: AppText(model.listOfICD10[index].description + " / " + model.listOfICD10[index].code.toString(), fontSize: 12.0)),
onTap: () {
widget.mySelectedAssessment.selectedICD = model.listOfICD10![index];
icdNameController.text = model.listOfICD10![index].description;
model.listOfICD10!.clear();
widget.mySelectedAssessment.selectedICD = model.listOfICD10[index];
icdNameController.text = model.listOfICD10[index].description;
model.listOfICD10.clear();
setState(() {});
});
},
@ -369,7 +386,7 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 0,
)
: CustomBottomSheetContainer(
label: (widget.isUpdate ? 'Update Assessment Details' : 'Add Assessment Details'),
label: (widget.isUpdate ? TranslationBase.of(context).updateAssessmentDetails : TranslationBase.of(context).addAssessmentDetails),
onTap: () async {
setState(() {
isFormSubmitted = true;
@ -388,24 +405,31 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
);
}
submitAssessment({required SOAPViewModel model, required MySelectedAssessment mySelectedAssessment, bool isUpdate = false}) async {
submitAssessment({SOAPViewModel? model, MySelectedAssessment? mySelectedAssessment, bool isUpdate = false}) async {
Map<String, dynamic> profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
GifLoaderDialogUtils.showMyDialog(context);
if (isUpdate) {
PatchAssessmentReqModel patchAssessmentReqModel = PatchAssessmentReqModel(
PostAssessmentRequestUpdateModel patchAssessmentReqModel = PostAssessmentRequestUpdateModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId: mySelectedAssessment.selectedDiagnosisCondition!.id,
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType!.id,
icdcode10Id: mySelectedAssessment.selectedICD!.code,
prevIcdCode10ID: mySelectedAssessment.icdCode10ID);
createdByName: doctorProfile.doctorName,
createdBy: doctorProfile.doctorID,
icdCodeDetails: [
new IcdCodeDetailsUpdate(
remarks: mySelectedAssessment!.remark,
complexDiagnosis: complexDiagnosis,
conditionId: mySelectedAssessment!.selectedDiagnosisCondition!.id,
prevIcdCode10ID: mySelectedAssessment.icdCode10ID,
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType!.id,
icdcode10Id: mySelectedAssessment.selectedICD!.code)
]);
await model.patchAssessment(patchAssessmentReqModel);
await model?.patchAssessment(patchAssessmentReqModel);
} else {
Map<String, dynamic> profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostAssessmentRequestModel postAssessmentRequestModel = new PostAssessmentRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
@ -414,16 +438,16 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
createdBy: doctorProfile.doctorID,
icdCodeDetails: [
new IcdCodeDetails(
remarks: mySelectedAssessment.remark,
complexDiagnosis: true,
conditionId: mySelectedAssessment.selectedDiagnosisCondition!.id,
remarks: mySelectedAssessment!.remark,
complexDiagnosis: complexDiagnosis,
conditionId: mySelectedAssessment!.selectedDiagnosisCondition!.id,
diagnosisTypeId: mySelectedAssessment.selectedDiagnosisType!.id,
icdcode10Id: mySelectedAssessment.selectedICD!.code)
]);
await model.postAssessment(postAssessmentRequestModel);
await model?.postAssessment(postAssessmentRequestModel);
}
GifLoaderDialogUtils.hideDialog(context);
if (model.state == ViewState.ErrorLocal) {
if (model!.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
Map<String, dynamic> profile = await sharedPref.getObj(DOCTOR_PROFILE);

@ -39,7 +39,7 @@ class UpdateAssessmentPage extends StatefulWidget {
class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements AssessmentCallBack {
bool isAssessmentExpand = false;
List<MySelectedAssessment> mySelectedAssessmentList = [];
bool isPrescriptionOrder =false;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -48,7 +48,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
onModelReady: (model) async {
model.setAssessmentCallBack(this);
mySelectedAssessmentList.clear();
await model.isPrescriptionOrderCreated(widget.patientInfo);
await model.onUpdateAssessmentStepStart(widget.patientInfo);
if (model.patientAssessmentList.isNotEmpty) {
@ -324,11 +324,20 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
),
InkWell(
onTap: () {
openAssessmentDialog(context, isUpdate: true, assessment: assessment, model: model);
if(model.isPrescriptionOrder && assessment.selectedDiagnosisType!.id ==2) {
Utils.showErrorToast(TranslationBase.of(context).principalDiagnosisCannot);
}else{
openAssessmentDialog(
context, isUpdate: true,
assessment: assessment,
model: model);
}
},
child: Icon(
DoctorApp.edit,
size: 18,
color: model.isPrescriptionOrder && assessment.selectedDiagnosisType!.id ==2 ? Colors.grey : Colors.black ,
),
)
],
@ -384,9 +393,15 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
nextFunction(model) {
if (mySelectedAssessmentList.isEmpty) {
Utils.showErrorToast(TranslationBase.of(context).assessmentErrorMsg);
} else {
} else if(!checkPrimaryDiagnosis()) {
Utils.showErrorToast(TranslationBase.of(context).onePrimaryDiagnosis);
}else{
widget.changeLoadingState(true);
widget.changePageViewIndex(3);
}
}
bool checkPrimaryDiagnosis(){
List<MySelectedAssessment> type = mySelectedAssessmentList.where((element) => element.selectedDiagnosisType!.id==2).toList();
return type.isEmpty ? false : true;
}
}

@ -14,6 +14,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../widgets/dialog/confirm_dialog.dart';
import 'drug_to_drug.dart';
class AddDrugWidget extends StatefulWidget {
@ -81,40 +82,85 @@ class _AddDrugWidgetState extends State<AddDrugWidget> {
: CustomBottomSheetContainer(
label: TranslationBase.of(context).addMedication,
onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
await widget.medicineModel!.postPrescription(
isLocalBusy: true,
icdCode: widget.medicineModel!.patientAssessmentList.isNotEmpty
? widget.medicineModel!.patientAssessmentList[0].icdCode10ID!.isEmpty
? "test"
: widget.medicineModel!.patientAssessmentList[0].icdCode10ID.toString()
: "test",
dose: widget.strength,
doseUnit:
widget.medicineModel!.itemMedicineListUnit.length == 1 ? widget.medicineModel!.itemMedicineListUnit[0]['parameterCode'].toString() : widget.units['parameterCode'].toString(),
patient: widget.patient,
doseTimeIn: widget.doseTime['id'].toString(),
model: widget.modelPrescription,
duration: widget.duration['id'].toString(),
frequency: widget.medicineModel!.itemMedicineList.length == 1 ? widget.medicineModel!.itemMedicineList[0]['parameterCode'].toString() : widget.frequency['parameterCode'].toString(),
route:
widget.medicineModel!.itemMedicineListRoute.length == 1 ? widget.medicineModel!.itemMedicineListRoute[0]['parameterCode'].toString() : widget.route['parameterCode'].toString(),
drugId: widget.selectedMedication!.itemId.toString(),
strength: widget.strength,
indication: widget.indication,
instruction: widget.instruction,
doseTime: widget.selectedDate,
);
if (widget.medicineModel!.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Utils.showErrorToast(widget.medicineModel!.error);
} else if (widget.modelPrescription!.state == ViewState.Idle) {
await widget.modelPrescription!.getPrescriptionListNew(appNo: widget.patient!.appointmentNo, mrn: widget.patient!.patientMRN, isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(TranslationBase.of(context).medicationHasBeenAdded);
Navigator.of(context).pop();
Navigator.of(context).pop();
}
showDialog(
context: context,
builder: (BuildContext context2) {
return ConfirmationDialog(
title: TranslationBase.of(context2).afterOrderCreation,
onTapGrant: () async {
GifLoaderDialogUtils.showMyDialog(context);
await widget.medicineModel!.postPrescription(
isLocalBusy: true,
icdCode: widget.medicineModel!
.patientAssessmentList.isNotEmpty
? widget
.medicineModel
!.patientAssessmentList[0]
.icdCode10ID!
.isEmpty
? "test"
: widget.medicineModel!
.patientAssessmentList![0].icdCode10ID
.toString()
: "test",
dose: widget.strength,
doseUnit:
widget.medicineModel!.itemMedicineListUnit
.length ==
1
? widget
.medicineModel
!.itemMedicineListUnit[0]
['parameterCode']
.toString()
: widget.units['parameterCode']
.toString(),
patient: widget.patient,
doseTimeIn: widget.doseTime['id'].toString(),
model: widget.modelPrescription,
duration: widget.duration['id'].toString(),
frequency: widget.medicineModel!.itemMedicineList
.length ==
1
? widget.medicineModel!
.itemMedicineList![0]['parameterCode']
.toString()
: widget.frequency['parameterCode']
.toString(),
route: widget.medicineModel!.itemMedicineListRoute
.length ==
1
? widget.medicineModel!
.itemMedicineListRoute![0]['parameterCode']
.toString()
: widget.route['parameterCode'].toString(),
drugId:
widget.selectedMedication!.itemId.toString(),
strength: widget.strength,
indication: widget.indication,
instruction: widget.instruction,
doseTime: widget.selectedDate,
);
if (widget.medicineModel!.state ==
ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Utils.showErrorToast(widget.medicineModel!.error);
} else if (widget.modelPrescription!.state ==
ViewState.Idle) {
await widget.modelPrescription
!.getPrescriptionListNew(
appNo: widget.patient!.appointmentNo,
mrn: widget.patient!.patientMRN,
isLocalBusy: true);
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast(
TranslationBase.of(context)
.medicationHasBeenAdded);
Navigator.of(context).pop();
Navigator.of(context).pop();
}
});
});
},
),
);

@ -24,6 +24,7 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
import '../../../core/model/SOAP/master_key_model.dart';
import '../../../widgets/transitions/slide_up_page.dart';
import 'add_drug/add_drug_widget.dart';
@ -49,7 +50,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
String? durationError;
String? unitError;
String? strengthError;
String? icdCodeError;
int? selectedType;
TextEditingController strengthController = TextEditingController();
@ -81,6 +82,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
dynamic uom;
dynamic box;
dynamic x;
dynamic icdCode;
TextEditingController icdNameController = TextEditingController();
List<MasterKeyModel> icdCodeList =[];
@override
void initState() {
getIcdCodeData();
super.initState();
}
setSelectedType(int val) {
setState(() {
@ -88,6 +97,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
});
}
getIcdCodeData() async{
await widget.prescriptionViewModel.getIcd10DISESECode(patient: widget.patient, itemID:widget.selectedMedication.itemId );
icdCodeList = List.from(widget.prescriptionViewModel.icd10DeseaseItems);
}
onVoiceText() async {
new SpeechToText(context: context).showAlertDialog(context);
var lang = TranslationBase.of(AppGlobal.CONTEX).locale.languageCode;
@ -269,9 +282,85 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
});
}),
SizedBox(height: spaceBetweenTextFields),
if (widget.medicineViewModel.patientAssessmentList.isNotEmpty)
widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty ?
// PrescriptionTextFiled(
// hintText: TranslationBase.of(context).nameOrICD,
// elementError: icdCodeError,
// element: icdCode,
// elementList: widget.prescriptionViewModel.icd10DeseaseItems,
// keyId: 'codeId',
// keyName: 'asciiDesc',
// okFunction: (selectedValue) {
// setState(() {
// icdCode = selectedValue;
// });
// })
Column(
children:[ InkWell(
onTap: widget.prescriptionViewModel.icd10DeseaseItems != null
? () {
icdCodeList = List.from(widget.prescriptionViewModel.icd10DeseaseItems);
setState(() {
icdCode = null;
icdNameController.text = '';
});
}
: null,
child: AppTextFieldCustom(
validationError: icdCodeError,
onChanged: (text){
icdCodeList = List.from(widget.prescriptionViewModel.icd10DeseaseItems);
setState(() {
icdNameController.text;
});
},
height: Utils.getTextFieldHeight(),
onClick: widget.prescriptionViewModel.icd10DeseaseItems != null
? () {
setState(() {
icdCode = null;
icdNameController.text = '';
});
}
: null,
hintText: TranslationBase.of(context).nameOrICD,
maxLines: 1,
minLines: 1,
controller: icdNameController,
enabled:true,
isTextFieldHasSuffix: true, onFieldSubmitted: () { },
)),
icdCodeList.isNotEmpty && icdNameController.text.isNotEmpty ? Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.4, //height to 9% of screen height,
child:ListView.builder(
shrinkWrap: true,
itemCount:icdCodeList.length,
itemBuilder: (context, index) {
return InkWell(child:ListTile(
title: AppText( widget.prescriptionViewModel.icd10DeseaseItems[index].asciiDesc + " / " + widget.prescriptionViewModel.icd10DeseaseItems[index].codeId.toString(), fontSize: 12.0)),
onTap: (){
icdCode = widget.prescriptionViewModel.icd10DeseaseItems[index];
icdNameController.text = widget.prescriptionViewModel.icd10DeseaseItems[index].asciiDesc;
widget.medicineViewModel.patientAssessmentList[0].icdCode10ID = widget.prescriptionViewModel.icd10DeseaseItems[index].codeId;
widget.medicineViewModel.patientAssessmentList[0].asciiDesc = widget.prescriptionViewModel.icd10DeseaseItems[index].asciiDesc;
icdCodeList.clear();
setState(() {
});
}
);
},
)) :SizedBox()
])
: widget.medicineViewModel.patientAssessmentList.isNotEmpty ?
Container(
height: screenSize.height * 0.070,
height: screenSize.height * 0.068,
width: double.infinity,
color: Colors.white,
child: Row(
@ -298,8 +387,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
),
],
),
),
) :SizedBox(),
SizedBox(height: spaceBetweenTextFields),
SizedBox(height: 10,),
Container(
color: Colors.transparent,
child: InkWell(
@ -512,6 +602,12 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
} else {
strengthError = null;
}
if ( icdNameController.text == "" && widget.prescriptionViewModel.icd10DeseaseItems.isNotEmpty) {
icdCodeError = TranslationBase.of(context).fieldRequired;
} else {
icdCodeError = null;
}
});
}
formKey.currentState!.save();

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
@ -26,7 +27,9 @@ class NewPrescriptionsPage extends StatelessWidget {
bool isFromLiveCare = routeArgs['isFromLiveCare'];
return BaseView<PrescriptionViewModel>(
onModelReady: (model) async {
model.getPrescriptionListNew(mrn: patient.patientMRN, appNo: patient.appointmentNo ?? 0);
await model.getPrescriptionListNew(
mrn: patient.patientMRN, appNo: patient.appointmentNo);
await model.isPrincipalCovered(patient: patient);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
@ -45,6 +48,8 @@ class NewPrescriptionsPage extends StatelessWidget {
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@ -57,7 +62,11 @@ class NewPrescriptionsPage extends StatelessWidget {
],
),
),
if ((patient.patientStatusType != null && patient.patientStatusType == 43) || (isFromLiveCare && patient.appointmentNo != null))
!model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(),
SizedBox(height: 20,),
if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) ||
(isFromLiveCare && patient.appointmentNo != null))
AddNewOrder(
onTap: () {
Navigator.push(

@ -14,6 +14,8 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart';
import 'package:flutter/material.dart';
import '../../widgets/dialog/confirm_dialog.dart';
import '../../widgets/transitions/slide_up_page.dart';
import 'entity_list_checkbox_search_widget.dart';
class AddProcedurePage extends StatefulWidget {
@ -177,26 +179,36 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
: CustomBottomSheetContainer(
label: procedureType.getAddButtonTitle(context),
onTap: () async {
{
GifLoaderDialogUtils.showMyDialog(context);
if (entityList.isEmpty == true) {
DrAppToastMsg.showErrorToast(
TranslationBase.of(context).fillTheMandatoryProcedureDetails,
);
GifLoaderDialogUtils.hideDialog(context);
return;
}
GifLoaderDialogUtils.showMyDialog(context);
await widget.model.preparePostProcedure(
orderType: selectedType,
entityList: entityList,
patient: patient,
remarks: remarksController.text,
procedureType: ProcedureType.PROCEDURE,
isLocalBusy: true,
showDialog(
context: context,
builder: (BuildContext context) {
return ConfirmationDialog(title:TranslationBase.of(context).afterOrderCreation,
onTapGrant: () async{
GifLoaderDialogUtils.showMyDialog(context);
await widget.model.preparePostProcedure(
orderType: selectedType.toString(),
entityList: entityList,
patient: patient,
remarks: remarksController.text,
procedureType: ProcedureType.PROCEDURE,
isLocalBusy: true,
);
GifLoaderDialogUtils.hideDialog(context);
});
},
);
GifLoaderDialogUtils.hideDialog(context);
}
}),
),
);

@ -17,6 +17,7 @@ import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils
import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
import 'package:flutter/material.dart';
import '../../widgets/shared/app_texts_widget.dart';
import '../../widgets/shared/errors/error_message.dart';
import 'base_add_procedure_tab_page.dart';
@ -37,13 +38,17 @@ class ProcedureScreen extends StatelessWidget {
bool isFromLiveCare = routeArgs['isFromLiveCare'];
bool isInpatient = routeArgs['isInpatient'];
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getProcedure(
mrn: patient.patientId,
patientType: patientType,
appointmentNo: patient.appointmentNo),
builder:
(BuildContext context, ProcedureViewModel model, Widget? child) =>
AppScaffold(
onModelReady: (model) {
model.getProcedure(
mrn: patient.patientId,
patientType: patientType,
appointmentNo: patient.appointmentNo);
model.isPrincipalCovered(patient: patient);
},
builder: (BuildContext context, ProcedureViewModel model, Widget? child) =>
AppScaffold(
isShowAppBar: true,
backgroundColor: Colors.grey[100]!,
baseViewModel: model,
@ -91,6 +96,9 @@ class ProcedureScreen extends StatelessWidget {
},
label: TranslationBase.of(context).addMoreProcedure,
),
!model.isPrincipalCovered_ ? Center(child: AppText(TranslationBase.of(context).principalCoveredOrNot,color: Colors.red, textAlign: TextAlign.center, )) :SizedBox(),
SizedBox(height: 20,),
if (model.procedureList.isNotEmpty)
ListView.builder(
scrollDirection: Axis.vertical,

@ -1456,6 +1456,13 @@ class TranslationBase {
String get dateFrom => localizedValues['dateFrom']![locale.languageCode]!;
String get searchFindSchedule => localizedValues['searchFindSchedule']![locale.languageCode]!;
String get onePrimaryDiagnosis => localizedValues['onePrimaryDiagnosis']![locale.languageCode]!;
String get principalDiagnosisCannot => localizedValues['principalDiagnosisCannot']![locale.languageCode]!;
String get afterOrderCreation => localizedValues['afterOrderCreation']![locale.languageCode]!;
String get principalCoveredOrNot => localizedValues['principalCoveredOrNot']![locale.languageCode]!;
String get complexDiagnosis => localizedValues['complexDiagnosis']![locale.languageCode]!;
String get updateAssessmentDetails =>
localizedValues['updateAssessmentDetails']![locale.languageCode]!;
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -26,7 +26,7 @@ class Utils {
get currentLanguage => null;
static showConfirmationDialog(BuildContext context, String message, Function okFunction) {
static showConfirmationDialog(BuildContext context, String message, Function okFunction, {bool isShowCancelButton = true}) {
return showDialog(
context: context,
barrierDismissible: false, // user must tap button!
@ -47,14 +47,18 @@ class Utils {
fontColor: Colors.white,
color: AppGlobal.appGreenColor,
),
AppButton(
onPressed: () {
Navigator.of(context).pop();
},
title: TranslationBase.of(context).cancel,
fontColor: Colors.white,
color: Colors.red[600],
SizedBox(
height: 30,
),
if (isShowCancelButton)
AppButton(
onPressed: () {
Navigator.of(context).pop();
},
title: TranslationBase.of(context).cancel,
fontColor: Colors.white,
color: Colors.red[600],
),
],
),
],

@ -0,0 +1,40 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import '../../utils/translations_delegate_base_utils.dart';
class ConfirmationDialog extends StatefulWidget {
final String? title;
final Function? onTapGrant;
ConfirmationDialog({this.title, this.onTapGrant});
@override
_ConfirmationDialogState createState() => _ConfirmationDialogState();
}
class _ConfirmationDialogState extends State<ConfirmationDialog> {
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text("Alert"),
content: Text(widget.title!),
actions: [
TextButton(
child: Text(TranslationBase.of(context).cancel),
onPressed: () {
Navigator.pop(context);
},
),
TextButton(
child: Text(TranslationBase.of(context).ok),
onPressed: () {
Navigator.pop(context);
widget.onTapGrant!();
},
)
],
);
}
}

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/provider/robot_provider.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/utils/extenstions_utils.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
@ -62,21 +63,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
@override
void initState() {
streamSubscription = event.controller.stream.listen((p) {
if ((p['searchText'] != 'null' &&
p['searchText'] != null &&
p['searchText'] != "" &&
isClosed == false)) {
setState(() {
searchText = p['searchText'];
SpeechToText.closeAlertDialog(context);
});
} else if (p['searchText'] == 'null') {
setState(() {
searchText = p['searchText'];
});
}
});
startStreamListener();
super.initState();
}
@ -104,9 +91,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
child: Container(
margin: EdgeInsets.all(20),
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(width: 2, color: Colors.red)),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 2, color: Colors.red)),
child: Icon(
Icons.mic,
color: Colors.blue,
@ -135,8 +120,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
? Center(
child: InkWell(
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[300]!)),
decoration: BoxDecoration(border: Border.all(color: Colors.grey[300]!)),
padding: EdgeInsets.all(5),
child: AppText(
'Try Again',
@ -160,7 +144,23 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
@override
void dispose() {
super.dispose();
widget.dispose();
streamSubscription.cancel();
super.dispose();
}
void startStreamListener() {
streamSubscription = event.controller.stream.listen((p) {
if ((p['searchText'] != 'null' && p['searchText'] != null && p['searchText'] != "" && isClosed == false && mounted)) {
setState(() {
searchText = p['searchText'];
// SpeechToText.closeAlertDialog(context);
});
} else if (p['searchText'] == 'null' && mounted) {
setState(() {
searchText = p['searchText'];
});
}
});
}
}

Loading…
Cancel
Save