Merge branch 'development' into video_stream_fix_bugs

# Conflicts:
#	lib/screens/patients/profile/profile_screen/patient_profile_screen.dart
merge-requests/755/head
mosazaid 3 years ago
commit e1c4721ac1

@ -607,14 +607,17 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
400,
600
)
recordContainer.visibility = View.VISIBLE
} else {
dialog?.window?.setLayout(
300,
300
)
recordContainer.visibility = View.GONE
}
isCircle = !isCircle
if (mSubscriber != null) {
(mSubscriber!!.renderer as DynamicVideoRenderer).enableThumbnailCircle(isCircle)
} else {

@ -25,9 +25,10 @@ class BaseAppClient {
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
bool isAllowAny = false,bool isLiveCare = false}) async {
bool isAllowAny = false,
bool isLiveCare = false}) async {
String url;
if(isLiveCare)
if (isLiveCare)
url = BASE_URL_LIVE_CARE + endPoint;
else
url = BASE_URL + endPoint;
@ -38,17 +39,14 @@ class BaseAppClient {
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'] == null) body['DoctorID'] = doctorProfile?.doctorID;
if (body['DoctorID'] == "") body['DoctorID'] = null;
if (body['EditedBy'] == null)
body['EditedBy'] = doctorProfile?.doctorID;
if (body['EditedBy'] == null) body['EditedBy'] = doctorProfile?.doctorID;
if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile?.projectID;
}
if (body['ClinicID'] == null)
body['ClinicID'] = doctorProfile?.clinicID;
if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile?.clinicID;
}
if (body['DoctorID'] == '') {
body['DoctorID'] = null;
@ -56,7 +54,7 @@ class BaseAppClient {
if (body['EditedBy'] == '') {
body.remove("EditedBy");
}
if(body['TokenID'] == null){
if (body['TokenID'] == null) {
body['TokenID'] = token ?? '';
}
// body['TokenID'] = "@dm!n" ?? '';
@ -75,18 +73,18 @@ class BaseAppClient {
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = body['PatientOutSA'] ?? 0; // PATIENT_OUT_SA;
if (body['VidaAuthTokenID'] == null) {
body['VidaAuthTokenID'] =
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
}
if (body['VidaRefreshTokenID'] == null) {
body['VidaRefreshTokenID'] =
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
}
int projectID = await sharedPref.getInt(PROJECT_ID);
if (projectID == 2 || projectID == 3)
body['PatientOutSA'] = true;
else if((body.containsKey('facilityId') && body['facilityId']==2 || body['facilityId']==3)|| body['ProjectID']==2 || body['ProjectID']==3)
body['PatientOutSA'] = true;
else if ((body.containsKey('facilityId') && body['facilityId'] == 2 || body['facilityId'] == 3) ||
body['ProjectID'] == 2 ||
body['ProjectID'] == 3)
body['PatientOutSA'] = true;
else
body['PatientOutSA'] = false;
@ -98,28 +96,21 @@ class BaseAppClient {
var asd2;
if (await Helpers.checkConnection()) {
final response = await http.post(url,
body: json.encode(body),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
body: json.encode(body), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) {
onFailure(Helpers.generateContactAdminMsg(), statusCode);
} else {
var parsed = json.decode(response.body.toString());
if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
}
if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) {
onFailure(getError(parsed), statusCode);
} else if (!isAllowAny) {
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX,
listen: false)
.logout();
await Provider.of<AuthenticationViewModel>(AppGlobal.CONTEX, listen: false).logout();
Helpers.showErrorToast('Your session expired Please login again');
locator<NavigationService>().pushNamedAndRemoveUntil(ROOT);
@ -154,14 +145,10 @@ class BaseAppClient {
String url = BASE_URL + endPoint;
try {
Map<String, String> headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
};
Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
String token = await sharedPref.getString(TOKEN);
var languageID =
await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en');
body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null
? body['SetupID']
@ -181,12 +168,11 @@ class BaseAppClient {
: PATIENT_OUT_SA_PATIENT_REQ;
if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] =
body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend']
: IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
? body['isDentalAllowedBackend'] != null
? body['isDentalAllowedBackend']
: IS_DENTAL_ALLOWED_BACKEND
: IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2;
@ -208,9 +194,7 @@ class BaseAppClient {
: PATIENT_TYPE_ID;
body['TokenID'] = body.containsKey('TokenID') ? body['TokenID'] : token;
body['PatientID'] = body['PatientID'] != null
? body['PatientID']
: patient.patientId ?? patient.patientMRN;
body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : patient.patientId ?? patient.patientMRN;
body['PatientOutSA'] = 0; //user['OutSA']; //TODO change it
body['SessionID'] = SESSION_ID; //getSe
@ -225,8 +209,7 @@ class BaseAppClient {
print("Body : ${json.encode(body)}");
if (await Helpers.checkConnection()) {
final response = await http.post(url.trim(),
body: json.encode(body), headers: headers);
final response = await http.post(url.trim(), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -238,8 +221,7 @@ class BaseAppClient {
onSuccess(parsed, statusCode);
} else {
if (parsed['ErrorType'] == 4) {
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'],
parsed['AndroidLink'], parsed['IOSLink']);
helpers.navigateToUpdatePage(parsed['ErrorEndUserMessage'], parsed['AndroidLink'], parsed['IOSLink']);
}
if (parsed['IsAuthenticated'] == null) {
if (parsed['isSMSSent'] == true) {
@ -255,28 +237,20 @@ class BaseAppClient {
onFailure(getError(parsed), statusCode);
}
}
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
} else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
} else if (parsed['MessageStatus'] == 2 &&
parsed['IsAuthenticated']) {
} else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) {
if (parsed['SameClinicApptList'] != null) {
onSuccess(parsed, statusCode);
} else {
if (parsed['message'] == null &&
parsed['ErrorEndUserMessage'] == null) {
if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) {
if (parsed['ErrorSearchMsg'] == null) {
onFailure("Server Error found with no available message",
statusCode);
onFailure("Server Error found with no available message", statusCode);
} else {
onFailure(parsed['ErrorSearchMsg'], statusCode);
}
} else {
onFailure(
parsed['message'] ??
parsed['ErrorEndUserMessage'] ??
parsed['ErrorMessage'],
statusCode);
onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
} else {
@ -286,9 +260,7 @@ class BaseAppClient {
if (parsed['message'] != null) {
onFailure(parsed['message'] ?? parsed['message'], statusCode);
} else {
onFailure(
parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
statusCode);
onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode);
}
}
}
@ -311,12 +283,8 @@ class BaseAppClient {
if (parsed["ValidationErrors"]["ValidationErrors"] != null &&
parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
for (var i = 0;
i < parsed["ValidationErrors"]["ValidationErrors"].length;
i++) {
error = error +
parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] +
"\n";
for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) {
error = error + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n";
}
}
}

@ -12,24 +12,15 @@ const Map<String, Map<String, String>> localizedValues = {
'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'},
'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'},
'mySchedule': {'en': 'Schedule', 'ar': 'جدولي'},
'errorNoSchedule': {
'en': 'You don\'t have any Schedule',
'ar': 'ليس لديك أي جدول زمني'
},
'errorNoSchedule': {'en': 'You don\'t have any Schedule', 'ar': 'ليس لديك أي جدول زمني'},
'verify': {'en': 'VERIFY', 'ar': 'تحقق'},
'referralDoctor': {'en': 'Referral Doctor', 'ar': 'الطبيب المُحول إليه'},
'referringClinic': {'en': 'Referring Clinic', 'ar': 'العيادة المُحول إليها'},
'frequency': {'en': 'Frequency', 'ar': 'نوع التحويلا'},
'priority': {'en': 'Priority', 'ar': 'الأولوية'},
'maxResponseTime': {'en': 'Max Response Time', 'ar': 'الوقت الأقصى للرد'},
'clinicDetailsandRemarks': {
'en': 'Clinic Details and Remarks',
'ar': 'ملاحضات وتفاصيل العيادة'
},
'answerSuggestions': {
'en': 'Answer/Suggestions',
'ar': 'ملاحضات وتفاصيل العيادة'
},
'clinicDetailsandRemarks': {'en': 'Clinic Details and Remarks', 'ar': 'ملاحضات وتفاصيل العيادة'},
'answerSuggestions': {'en': 'Answer/Suggestions', 'ar': 'ملاحضات وتفاصيل العيادة'},
'outPatients': {'en': 'Out Patient', 'ar': 'المريض الخارجي'},
'myOutPatient': {'en': 'My OutPatients', 'ar': 'المريض الخارجي'},
'myOutPatient_2lines': {'en': 'My\nOutPatients', 'ar': 'المريض\nالخارجي'},
@ -72,20 +63,14 @@ const Map<String, Map<String, String>> localizedValues = {
'patientFile': {'en': 'Patient File', 'ar': 'ملف المريض'},
'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'},
'search': {'en': 'Search', 'ar': 'بحث '},
'onlyArrivedPatient': {
'en': 'Only Arrived Patient',
'ar': 'المريض الذي حضر للموعد'
},
'onlyArrivedPatient': {'en': 'Only Arrived Patient', 'ar': 'المريض الذي حضر للموعد'},
'searchMedicineNameHere': {'en': 'Search Medicine ', 'ar': 'ابحث هنا'},
'youCanFind': {'en': 'You Can Find ', 'ar': 'تستطيع ان تجد '},
'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'},
'qr': {'en': 'QR', 'ar': 'QR'},
'reader': {'en': 'Reader', 'ar': 'قارىء رمز ال'},
'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'},
'scanQrCode': {
'en': 'scan Qr code to retrieve patient profile',
'ar': 'مسح رمزاال QR لاسترداد ملف تعريف المريض '
},
'scanQrCode': {'en': 'scan Qr code to retrieve patient profile', 'ar': 'مسح رمزاال QR لاسترداد ملف تعريف المريض '},
'scanQr': {'en': 'Scan Qr', 'ar': 'اقراء ال QR'},
'profile': {'en': 'Profile', 'ar': 'ملفي الشخصي'},
'gender': {'en': 'Gender', 'ar': 'الجنس'},
@ -110,49 +95,28 @@ const Map<String, Map<String, String>> localizedValues = {
'bloodPressure': {'en': 'Blood Pressure', 'ar': 'ضغط الدم'},
'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'},
'painScale': {'en': 'Pain Scale', 'ar': 'مقياس الألم'},
'errorNoVitalSign': {
'en': 'You don\'t have any Vital Sign',
'ar': 'ليس لديك اي اعراض حيوية'
},
'errorNoVitalSign': {'en': 'You don\'t have any Vital Sign', 'ar': 'ليس لديك اي اعراض حيوية'},
'labOrders': {'en': 'Lab Orders', 'ar': 'الفحوصات الطبية'},
'errorNoLabOrders': {
'en': 'You don\'t have any lab orders',
'ar': 'ليس لديك اي فحوصات طبية'
},
'errorNoLabOrders': {'en': 'You don\'t have any lab orders', 'ar': 'ليس لديك اي فحوصات طبية'},
'answerThePatient': {'en': 'answer the patient', 'ar': 'اجب المريض '},
'pleaseEnterAnswer': {
'en': 'please enter answer',
'ar': 'الرجاء ادخال اجابة '
},
'pleaseEnterAnswer': {'en': 'please enter answer', 'ar': 'الرجاء ادخال اجابة '},
'replay': {'en': 'Reply', 'ar': 'تاكيد'},
'progressNote': {'en': 'Progress Note', 'ar': 'ملاحظة التقدم'},
'progress': {'en': 'Progress', 'ar': 'التقدم'},
'note': {'en': 'Note', 'ar': 'ملاحظة'},
'searchNote': {'en': 'Search Note', 'ar': 'بحث عن ملاحظة'},
'errorNoProgressNote': {
'en': 'You don\'t have any Progress Note',
'ar': 'ليس لديك اي ملاحظة تقدم '
},
'errorNoProgressNote': {'en': 'You don\'t have any Progress Note', 'ar': 'ليس لديك اي ملاحظة تقدم '},
'invoiceNo:': {'en': 'Invoice No :', 'ar': 'رقم الفاتورة'},
'generalResult': {'en': 'General Result ', 'ar': 'النتيجة العامة'},
'description': {'en': 'Description', 'ar': 'الوصف'},
'value': {'en': 'Value', 'ar': 'القيمة'},
'range': {'en': 'Range', 'ar': 'النطاق'},
'enterId': {'en': 'User ID', 'ar': 'معرف المستخدم'},
'pleaseEnterYourID': {
'en': 'Please enter your ID',
'ar': 'الرجاء ادخال الهوية'
},
'pleaseEnterYourID': {'en': 'Please enter your ID', 'ar': 'الرجاء ادخال الهوية'},
'enterPassword': {'en': 'Password', 'ar': 'كلمه السر'},
'pleaseEnterPassword': {
'en': 'Please Enter Password',
'ar': 'الرجاء ادخال الرقم السري'
},
'pleaseEnterPassword': {'en': 'Please Enter Password', 'ar': 'الرجاء ادخال الرقم السري'},
'selectYourProject': {'en': 'Branch', 'ar': 'فرع'},
'pleaseEnterYourProject': {
'en': 'Please Enter Your Project',
'ar': 'الرجاء ادخال مستشفى'
},
'pleaseEnterYourProject': {'en': 'Please Enter Your Project', 'ar': 'الرجاء ادخال مستشفى'},
'login': {'en': 'Login', 'ar': 'تسجيل دخول'},
'drSulaimanAlHabib': {'en': 'Dr Sulaiman Al Habib', 'ar': 'د.سليمان الحبيب'},
'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'},
@ -179,10 +143,7 @@ const Map<String, Map<String, String>> localizedValues = {
'youWillReceiveA': {'en': 'You will receive a', 'ar': 'سوف تتلقى '},
'loginCode': {'en': 'Login Code', 'ar': 'رمز تسجيل دخول'},
'smsBy': {'en': 'By SMS', 'ar': 'عن طريق رسالة قصيرة'},
'pleaseEnterTheCode': {
'en': 'Please enter the code',
'ar': 'الرجاء ادخال الرمز'
},
'pleaseEnterTheCode': {'en': 'Please enter the code', 'ar': 'الرجاء ادخال الرمز'},
'youDon\'tHaveAnyPatient': {
'en': 'No data found for the selected search criteria',
'ar': 'لا توجد بيانات لمعايير البحث المختارة'
@ -194,14 +155,8 @@ const Map<String, Map<String, String>> localizedValues = {
'tomorrow': {'en': 'Tomorrow', 'ar': 'الغد'},
'nextWeek': {'en': 'Next Week', 'ar': 'الاسبوع القادم'},
'all': {'en': 'All', 'ar': 'الجميع'},
'errorNoInsuranceApprovals': {
'en': 'You don\'t have any Insurance Approvals',
'ar': 'ليس لديك اي موفقات تأمين'
},
'searchInsuranceApprovals': {
'en': 'Search InsuranceApprovals',
'ar': 'بحث عن موافقات التأمين'
},
'errorNoInsuranceApprovals': {'en': 'You don\'t have any Insurance Approvals', 'ar': 'ليس لديك اي موفقات تأمين'},
'searchInsuranceApprovals': {'en': 'Search InsuranceApprovals', 'ar': 'بحث عن موافقات التأمين'},
'status': {'en': 'STATUS', 'ar': 'الحالة'},
'expiryDate': {'en': 'EXPIRY DATE', 'ar': 'تاريخ الانتهاء'},
'producerName': {'en': 'PRODUCER NAME', 'ar': 'اسم المنتج'},
@ -214,19 +169,10 @@ const Map<String, Map<String, String>> localizedValues = {
'routine': {'en': 'Routine', 'ar': 'روتيني'},
'send': {'en': 'Send', 'ar': 'ارسال'},
'referralFrequency': {'en': 'Referral Frequency:', 'ar': 'تواتر الحالة:'},
'selectReferralFrequency': {
'en': 'Select Referral Frequency:',
'ar': 'اختار تواتر الحالة:'
},
'clinicalDetailsAndRemarks': {
'en': 'Clinical Details and Remarks',
'ar': 'التفاصيل السرسرية والملاحظات'
},
'selectReferralFrequency': {'en': 'Select Referral Frequency:', 'ar': 'اختار تواتر الحالة:'},
'clinicalDetailsAndRemarks': {'en': 'Clinical Details and Remarks', 'ar': 'التفاصيل السرسرية والملاحظات'},
'remarks': {'en': 'Remarks', 'ar': 'ملاحظات'},
'pleaseFill': {
'en': 'Please fill all fields..!',
'ar': 'الرجاء ملأ جميع الحقول..!'
},
'pleaseFill': {'en': 'Please fill all fields..!', 'ar': 'الرجاء ملأ جميع الحقول..!'},
'replay2': {'en': 'Reply', 'ar': 'رد الطبيب'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدليات'},
@ -238,10 +184,7 @@ const Map<String, Map<String, String>> localizedValues = {
'searchOrders': {'en': 'Search Orders', 'ar': ' بحث عن الطلبات'},
'prescriptionDetails': {'en': 'Prescription Details', 'ar': 'تفاصبل الوصفة'},
'prescriptionInfo': {'en': 'Prescription Info', 'ar': 'معلومات الوصفة'},
'errorNoOrders': {
'en': 'You don\'t have any Orders',
'ar': 'لا يوجد لديك اي طلبات'
},
'errorNoOrders': {'en': 'You don\'t have any Orders', 'ar': 'لا يوجد لديك اي طلبات'},
'livecare': {'en': 'Live Care', 'ar': 'Live Care'},
'beingBad': {'en': 'being bad', 'ar': 'سيء'},
'beingGreat': {'en': 'being great', 'ar': 'رائع'},
@ -252,26 +195,14 @@ const Map<String, Map<String, String>> localizedValues = {
'endcallwithcharge': {'en': 'End with charge', 'ar': 'ينتهي مع الشحن'},
'endcall': {'en': 'End Call', 'ar': 'إنهاء المكالمة'},
'transfertoadmin': {'en': 'Transfer to admin', 'ar': 'نقل إلى المسؤول'},
"searchMedicineImageCaption": {
'en': 'Type the medicine name to search',
'ar': ' اكتب اسم الدواء للبحث'
},
"searchMedicineImageCaption": {'en': 'Type the medicine name to search', 'ar': ' اكتب اسم الدواء للبحث'},
"type": {'en': 'Type ', 'ar': 'اكتب'},
"fromDate": {'en': 'From Date', 'ar': 'من تاريخ'},
"toDate": {'en': 'To Date', 'ar': 'الى تاريخ'},
"searchPatientImageCaptionTitle": {
'en': 'SEARCH PATIENT',
'ar': 'البحث عن المريض'
},
"searchPatientImageCaptionBody": {
'en': 'Add Details Of Patient To search',
'ar': ' أضف تفاصيل المريض للبحث'
},
"searchPatientImageCaptionTitle": {'en': 'SEARCH PATIENT', 'ar': 'البحث عن المريض'},
"searchPatientImageCaptionBody": {'en': 'Add Details Of Patient To search', 'ar': ' أضف تفاصيل المريض للبحث'},
"welcome": {'en': 'Welcome', 'ar': ' أهلا بك'},
'youDoNotHaveAnyItem': {
'en': 'You don\'t have any Items',
'ar': 'لا يوجد اي نتائج'
},
'youDoNotHaveAnyItem': {'en': 'You don\'t have any Items', 'ar': 'لا يوجد اي نتائج'},
'typeMedicineName': {'en': 'Type Medicine Name', 'ar': 'اكتب اسم الدواء'},
'moreThan3Letter': {
'en': 'Medicine Name Should Be More Than 3 letter',
@ -298,20 +229,14 @@ const Map<String, Map<String, String>> localizedValues = {
'bed': {'en': 'BED:', 'ar': 'السرير'},
'next': {'en': 'Next', 'ar': 'التالي'},
'previous': {'en': 'Previous', 'ar': 'السابق'},
'healthRecordInformation': {
'en': 'HEALTH RECORD INFORMATION',
'ar': 'معلومات السجل الصحي'
},
'healthRecordInformation': {'en': 'HEALTH RECORD INFORMATION', 'ar': 'معلومات السجل الصحي'},
"prevoius-sickleave-issed": {
"en": "Total previous sick leave issued by the doctor",
"ar": "مجموع الإجازات المرضية السابقة التي أصدرها الطبيب"
},
'clinicSelect': {'en': "Select Clinic", 'ar': 'اختار عيادة'},
'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'},
"empty-message": {
"en": "Please enter this field",
"ar": "يرجى ادخال هذا الحقل"
},
"empty-message": {"en": "Please enter this field", "ar": "يرجى ادخال هذا الحقل"},
'no-sickleve-applied': {
'en': "No sick leave available, apply Now",
'ar': 'لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن'
@ -326,19 +251,13 @@ const Map<String, Map<String, String>> localizedValues = {
'leave-start-date': {'en': "Leave start date", 'ar': 'تاريخ بدء المغادرة'},
'days-sick-leave': {'en': "DAYS OF SICK LEAVE", 'ar': 'أيام الإجازة المرضية'},
'extend': {'en': "Extend", 'ar': 'تمديد'},
'extend-sickleave': {
'en': "EXTEND SICK LEAVE",
'ar': 'قم بتمديد الإجازة المرضية'
},
'extend-sickleave': {'en': "EXTEND SICK LEAVE", 'ar': 'قم بتمديد الإجازة المرضية'},
"chiefComplaintLength": {
"en": "Chief Complaint length should be greater than 25",
"ar": "يجب أن يكون طول شكوى الرئيس أكبر من 25"
},
'patient-target': {'en': 'Target Patient', 'ar': 'الهدف المريض'},
'no-priscription-listed': {
'en': 'No Prescription Listed',
'ar': 'لا وصفة طبية مدرجة'
},
'no-priscription-listed': {'en': 'No Prescription Listed', 'ar': 'لا وصفة طبية مدرجة'},
'referTo': {'en': "Refer To", 'ar': 'محال إلى'},
'referredFrom': {'en': "From : ", 'ar': ' : من'},
'branch': {'en': "Branch", 'ar': 'الفرع'},
@ -353,15 +272,9 @@ const Map<String, Map<String, String>> localizedValues = {
'summaryReport': {'en': "Summary", 'ar': 'موجز'},
'accept': {'en': "ACCEPT", 'ar': 'قبول'},
'reject': {'en': "REJECT", 'ar': 'رفض'},
'noAppointmentsErrorMsg': {
'en': "There is no appointments for at this date",
'ar': 'لا توجد مواعيد في هذا التاريخ'
},
'noAppointmentsErrorMsg': {'en': "There is no appointments for at this date", 'ar': 'لا توجد مواعيد في هذا التاريخ'},
'referralPatient': {'en': 'Referral Patient', 'ar': 'المريض المحال '},
'noPrescriptionListed': {
'en': 'NO PRESCRIPTION LISTED',
'ar': 'لم يتم سرد أي وصف'
},
'noPrescriptionListed': {'en': 'NO PRESCRIPTION LISTED', 'ar': 'لم يتم سرد أي وصف'},
'addNow': {'en': 'ADD Now', 'ar': 'اضف الآن'},
'orderType': {'en': 'Order Type', 'ar': 'نوع الطلب'},
'strength': {'en': 'Strength', 'ar': 'شدة'},
@ -371,14 +284,8 @@ const Map<String, Map<String, String>> localizedValues = {
'instruction': {'en': 'Instructions', 'ar': 'إرشادات'},
'addMedication': {'en': 'ADD MEDICATION', 'ar': 'اضف الدواء'},
'route': {'en': 'Route', 'ar': 'المسار'},
'reschedule-leave': {
'en': 'Reschedule and leaves',
'ar': 'إعادة الجدولة والأوراق'
},
'no-reschedule-leave': {
'en': 'No Reschedule and leaves',
'ar': 'لا إعادة جدولة ويغادر'
},
'reschedule-leave': {'en': 'Reschedule and leaves', 'ar': 'إعادة الجدولة والأوراق'},
'no-reschedule-leave': {'en': 'No Reschedule and leaves', 'ar': 'لا إعادة جدولة ويغادر'},
'weight': {'en': "Weight", 'ar': 'الوزن'},
'kg': {'en': "kg", 'ar': 'كغ'},
'height': {'en': "Height", 'ar': 'الطول'},
@ -400,10 +307,7 @@ const Map<String, Map<String, String>> localizedValues = {
'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'},
'respBeats': {'en': 'RESP (beats/minute)', 'ar': ' (دقة/دقيقة)التنفس'},
'patternOfRespiration': {'en': "Pattern Of Respiration", 'ar': 'نمط التنفس'},
'bloodPressureDiastoleAndSystole': {
'en': 'Blood Pressure (Sys, Dias)',
'ar': 'ضغط الدم (العظمى, الصغرى)'
},
'bloodPressureDiastoleAndSystole': {'en': 'Blood Pressure (Sys, Dias)', 'ar': 'ضغط الدم (العظمى, الصغرى)'},
'cuffLocation': {'en': "Cuff Location", 'ar': 'موقع الكف'},
'cuffSize': {'en': "Cuff Size", 'ar': 'حجم الكف'},
'patientPosition': {'en': "Patient Position", 'ar': 'موقع المريض'},
@ -414,73 +318,37 @@ const Map<String, Map<String, String>> localizedValues = {
'to': {'en': "To", 'ar': 'إلى'},
'coveringDoctor': {'en': "Covering Doctor: ", 'ar': ' :تغطية دكتور'},
'requestLeave': {'en': 'Request Leave', 'ar': 'طلب إجازة'},
'pleaseEnterDate': {
'en': 'Please enter leave start date',
'ar': 'الرجاء إدخال تاريخ بدء الإجازة'
},
'pleaseEnterNoOfDays': {
'en': 'Please enter sick leave days',
'ar': 'الرجاء إدخال أيام الإجازة المرضية'
},
'pleaseEnterRemarks': {
'en': 'Please enter remarks',
'ar': 'الرجاء إدخال الملاحظات'
},
'pleaseEnterDate': {'en': 'Please enter leave start date', 'ar': 'الرجاء إدخال تاريخ بدء الإجازة'},
'pleaseEnterNoOfDays': {'en': 'Please enter sick leave days', 'ar': 'الرجاء إدخال أيام الإجازة المرضية'},
'pleaseEnterRemarks': {'en': 'Please enter remarks', 'ar': 'الرجاء إدخال الملاحظات'},
'update': {'en': 'Update', 'ar': 'تحديث'},
'admission': {'en': "Admission", 'ar': 'قبول'},
'request': {'en': "Request", 'ar': 'طلب'},
'admissionRequest': {'en': "Admission Request", 'ar': 'طلب قبول'},
'patientDetails': {'en': "Patient Details", 'ar': 'تفاصيل المريض'},
'specialityAndDoctorDetail': {
'en': "SPECIALITY AND DOCTOR DETAILS",
'ar': 'تفاصيل التخصص والطبيب'
},
'specialityAndDoctorDetail': {'en': "SPECIALITY AND DOCTOR DETAILS", 'ar': 'تفاصيل التخصص والطبيب'},
'referringDate': {'en': "Referring Date", 'ar': 'تاريخ الإحالة'},
'referringDoctor': {'en': "Referring Doctor", 'ar': 'دكتور الإحالة'},
'otherInformation': {'en': "Other Information", 'ar': 'معلومات أخرى'},
'expectedDays': {'en': "Expected Days", 'ar': 'الأيام المتوقعة'},
'expectedAdmissionDate': {
'en': "Expected Admission Date",
'ar': 'تاريخ القبول المتوقع'
},
'expectedAdmissionDate': {'en': "Expected Admission Date", 'ar': 'تاريخ القبول المتوقع'},
'admissionDate': {'en': "Admission Date", 'ar': 'تاريخ القبول'},
// 'emergencyAdmission': {'en': "EMERGENCY ADMISSION", 'ar': 'دخول الطوارئ'},
'isSickLeaveRequired': {
'en': "Is Sick Leave Required",
'ar': 'هل الإجازة المرضية مطلوبة'
},
'isSickLeaveRequired': {'en': "Is Sick Leave Required", 'ar': 'هل الإجازة المرضية مطلوبة'},
'patientPregnant': {'en': "Patient Pregnant", 'ar': 'المريض حامل'},
'treatmentLine': {
'en': "Main line of treatment",
'ar': 'الخط الرئيسي للعلاج'
},
'treatmentLine': {'en': "Main line of treatment", 'ar': 'الخط الرئيسي للعلاج'},
'ward': {'en': "Ward", 'ar': 'رعاية'},
'preAnesthesiaReferred': {
'en': "PRE ANESTHESIA REFERRED",
'ar': 'الاحالة قبل التخدير'
},
'preAnesthesiaReferred': {'en': "PRE ANESTHESIA REFERRED", 'ar': 'الاحالة قبل التخدير'},
'admissionType': {'en': "Admission Type", 'ar': 'نوع القبول'},
'diagnosis': {'en': "Diagnosis", 'ar': 'التشخيص'},
'allergies': {'en': "Allergies", 'ar': 'الحساسية'},
'preOperativeOrders': {
'en': "Pre Operative Orders",
'ar': 'أوامر ما قبل العملية'
},
'elementForImprovement': {
'en': "Element For Improvement",
'ar': 'عنصر للتحسين'
},
'preOperativeOrders': {'en': "Pre Operative Orders", 'ar': 'أوامر ما قبل العملية'},
'elementForImprovement': {'en': "Element For Improvement", 'ar': 'عنصر للتحسين'},
'dischargeDate': {'en': "Discharge Date", 'ar': 'تاريخ التفريغ'},
'dietType': {'en': "Diet Type", 'ar': 'نوع النظام الغذائي'},
'dietTypeRemarks': {
'en': "Remarks on diet type",
'ar': 'ملاحظات على نوع النظام الغذائي'
},
'dietTypeRemarks': {'en': "Remarks on diet type", 'ar': 'ملاحظات على نوع النظام الغذائي'},
'save': {'en': "SAVE", 'ar': 'حفظ'},
'postPlansEstimatedCost': {
'en': "POST PLANS & ESTIMATED COST",
'ar': 'خطط البريد والتكلفة المقدرة'
},
'postPlansEstimatedCost': {'en': "POST PLANS & ESTIMATED COST", 'ar': 'خطط البريد والتكلفة المقدرة'},
'postPlans': {'en': "POST PLANS", 'ar': 'خطط البريد'},
'ucaf': {'en': "UCAF", 'ar': 'UCAF'},
'emergencyCase': {'en': "Emergency Case", 'ar': 'حالة طارئة'},
@ -495,19 +363,13 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "Patient Feels pain in his back and cough",
'ar': 'يشعر المريض بألم في ظهره ويسعل'
},
'additionalTextComplaints': {
'en': "Additional text to add about Complaints",
'ar': 'نص إضافي لإضافته حول الشكاوى'
},
'additionalTextComplaints': {'en': "Additional text to add about Complaints", 'ar': 'نص إضافي لإضافته حول الشكاوى'},
'otherConditions': {'en': "OTHER CONDITIONS", 'ar': 'شروط أخرى'},
'other': {'en': "Other", 'ar': 'أخرى'},
'how': {'en': "How", 'ar': 'كيف'},
'when': {'en': "When", 'ar': 'متى'},
'where': {'en': "Where", 'ar': 'أين'},
'specifyPossibleLineManagement': {
'en': "Specify possible line of management",
'ar': 'حدد خط الإدارة المحتمل'
},
'specifyPossibleLineManagement': {'en': "Specify possible line of management", 'ar': 'حدد خط الإدارة المحتمل'},
'significantSigns': {'en': "SIGNIFICANT SIGNS", 'ar': 'علامات مهمة'},
'backAbdomen': {'en': "Back : Abdomen", 'ar': 'الظهر: البطن'},
'reasons': {'en': "Reasons", 'ar': 'الأسباب'},
@ -517,20 +379,11 @@ const Map<String, Map<String, String>> localizedValues = {
'addChiefComplaints': {'en': "Add Chief Complaints", 'ar': ' اضافه الشكاوى'},
'histories': {'en': "Histories", 'ar': 'التاريخ المرضي'},
'allergiesSoap': {'en': "Allergies", 'ar': 'الحساسية'},
'historyOfPresentIllness': {
'en': "History of Present Illness",
'ar': 'تاريخ المرض الحالي'
},
'requiredMsg': {
'en': "Please add required field correctly",
'ar': "الرجاء إضافة الحقل المطلوب بشكل صحيح"
},
'historyOfPresentIllness': {'en': "History of Present Illness", 'ar': 'تاريخ المرض الحالي'},
'requiredMsg': {'en': "Please add required field correctly", 'ar': "الرجاء إضافة الحقل المطلوب بشكل صحيح"},
'addHistory': {'en': "Add History", 'ar': "اضافه تاريخ مرضي"},
'searchHistory': {'en': "Search History", 'ar': " البحث"},
'addSelectedHistories': {
'en': "Add Selected Histories",
'ar': " اضافه تاريخ مرضي"
},
'addSelectedHistories': {'en': "Add Selected Histories", 'ar': " اضافه تاريخ مرضي"},
'addAllergies': {'en': "Add Allergies", 'ar': "أضف الحساسية"},
'itemExist': {'en': "This item already exist", 'ar': "هذا العنصر موجود"},
'selectAllergy': {'en': "Select Allergy", 'ar': "أختر الحساسية"},
@ -538,18 +391,9 @@ const Map<String, Map<String, String>> localizedValues = {
'leaveCreated': {'en': "Leave has been created", 'ar': "تم إنشاء الإجازة"},
'medications': {'en': "Medications", 'ar': "الأدوية"},
'procedures': {'en': "Procedures", 'ar': "الإجراءات"},
'vitalSignEmptyMsg': {
'en': "There is no vital signs for this patient",
'ar': "لا توجد علامات حيوية لهذا المريض"
},
'referralEmptyMsg': {
'en': "There is no referral data",
'ar': "لا توجد بيانات إحالة"
},
'referralSuccessMsg': {
'en': "You make referral successfully",
'ar': "You make referral successfully"
},
'vitalSignEmptyMsg': {'en': "There is no vital signs for this patient", 'ar': "لا توجد علامات حيوية لهذا المريض"},
'referralEmptyMsg': {'en': "There is no referral data", 'ar': "لا توجد بيانات إحالة"},
'referralSuccessMsg': {'en': "You make referral successfully", 'ar': "You make referral successfully"},
'fromTime': {'en': "From Time", 'ar': "من وقت"},
'toTime': {'en': "To Time", 'ar': "الى وقت"},
'diagnoseType': {'en': "Diagnose Type", 'ar': "نوع التشخيص"},
@ -560,18 +404,9 @@ const Map<String, Map<String, String>> localizedValues = {
'codeNo': {'en': "Code #", 'ar': "# الرمز"},
'covered': {'en': "Covered", 'ar': "مغطى"},
'approvalRequired': {'en': "Approval Required", 'ar': "الموافقة مطلوبة"},
'uncoveredByDoctor': {
'en': "Uncovered By Doctor",
'ar': "غير مغطى من قبل الدكتور"
},
'chiefComplaintEmptyMsg': {
'en': "There is no Chief Complaint",
'ar': "ليس هناك شكوى رئيس"
},
"more-verify": {
"en": "More Verification Options",
"ar": "المزيد من خيارات التحقق"
},
'uncoveredByDoctor': {'en': "Uncovered By Doctor", 'ar': "غير مغطى من قبل الدكتور"},
'chiefComplaintEmptyMsg': {'en': "There is no Chief Complaint", 'ar': "ليس هناك شكوى رئيس"},
"more-verify": {"en": "More Verification Options", "ar": "المزيد من خيارات التحقق"},
"welcome-back": {"en": "Welcome back!", "ar": "مرحبا بعودتك!"},
"account-info": {
"en": "Would you like to login with current username?",
@ -588,38 +423,24 @@ const Map<String, Map<String, String>> localizedValues = {
"verify-with-sms": {"en": " SMS", "ar": "الرسائل القصيرة"},
"verify-with-whatsapp": {"en": "WhatsApp", "ar": " الواتس اب"},
"verify-with": {"en": "Verify through ", "ar": " الواتس اب"},
"last-login": {
"en": "Last login details:",
"ar": "تفاصيل تسجيل الدخول الأخير:"
},
"last-login": {"en": "Last login details:", "ar": "تفاصيل تسجيل الدخول الأخير:"},
"last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"},
"verify-fingerprint": {
"en":
"To activate the fingerprint login service, please verify data by using one of the following options.",
"ar":
"لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
"en": "To activate the fingerprint login service, please verify data by using one of the following options.",
"ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات"
},
"verification_message": {
"en": "Please enter the Verification Code sent to",
"ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى"
},
"validation_message": {
"en": "The verification code expires in",
"ar": "تنتهي صلاحية رمز التحقق خلال"
},
"validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"},
'addAssessment': {'en': "Add Assessment", 'ar': "أضف التقييم"},
'assessment': {'en': "Assessment", 'ar': " التقييم"},
'physicalSystemExamination': {
'en': "Physical System / Examination",
'ar': "الفحص البدني / النظام"
},
'physicalSystemExamination': {'en': "Physical System / Examination", 'ar': "الفحص البدني / النظام"},
'searchExamination': {'en': "Search Examination", 'ar': "فحص البحث"},
'addExamination': {'en': "Add Examination", 'ar': "اضافه"},
'doc': {'en': "Doc : ", 'ar': " د : "},
'patientNoDetailErrMsg': {
'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض"
},
'patientNoDetailErrMsg': {'en': "There is no detail for this patient", 'ar': "لا توجد تفاصيل لهذا المريض"},
'allergicTO': {'en': "ALLERGIC TO ", 'ar': " حساس من"},
'normal': {'en': "Normal", 'ar': "عادي"},
'abnormal': {'en': "Abnormal", 'ar': " غير عادي"},
@ -638,49 +459,25 @@ const Map<String, Map<String, String>> localizedValues = {
'visitDate': {'en': "Visit Date", 'ar': "تاريخ الزيارة"},
'test': {'en': "Procedures/Test", 'ar': "عمليات/تحاليل"},
'regular': {'en': "Regular", 'ar': "اعتيادي"},
'addMoreProcedure': {
'en': "Add More Procedures",
'ar': "اضف المزيد من العمليات"
},
'addMoreProcedure': {'en': "Add More Procedures", 'ar': "اضف المزيد من العمليات"},
'searchProcedures': {'en': "Search Procedures", 'ar': "البحث في العمليات"},
'selectProcedures': {'en': "Select procedure", 'ar': "اختر العملية"},
'procedureCategorise': {
'en': "Select Procedure Category",
'ar': "اختر صنف العمليات "
},
'addSelectedProcedures': {
'en': "add Selected Procedures",
'ar': "اضافة العمليات المختارة "
},
'addProcedures': {
'en': "Add Procedure",
'ar': "اضافة العمليات"
},
'procedureCategorise': {'en': "Select Procedure Category", 'ar': "اختر صنف العمليات "},
'addSelectedProcedures': {'en': "add Selected Procedures", 'ar': "اضافة العمليات المختارة "},
'addProcedures': {'en': "Add Procedure", 'ar': "اضافة العمليات"},
'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"},
'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"},
'nameOrICD': {'en': "Name or ICD", 'ar': "الاسم او  ICD"},
'dType': {'en': "Type", 'ar': "النوع"},
'addAssessmentDetails': {
'en': "Add Assessment Details",
'ar': "أضف تفاصيل التقييم"
},
'addAssessmentDetails': {'en': "Add Assessment Details", 'ar': "أضف تفاصيل التقييم"},
'progressNoteSOAP': {'en': "Progress Note", 'ar': "ملاحظة التقدم"},
'addProgressNote': {'en': "Add Progress Note", 'ar': "أضف ملاحظة التقدم"},
'createdBy': {'en': "Created By :", 'ar': "أضيفت من قبل : "},
'editedBy': {'en': "Edited By :", 'ar': "عدلت من قبل : "},
'currentMedications': {'en': "Current Medications", 'ar': "الأدوية الحالية"},
'noItem': {
'en': "No items exists in this list",
'ar': "لا توجد عناصر في هذه القائمة"
},
'postUcafSuccessMsg': {
'en': "UCAF request send successfully",
'ar': "تم ارسال طلب UCAF بنجاح"
},
'vitalSignDetailEmpty': {
'en': "There is no data for this vital sign",
'ar': "لا توجد بيانات لهذه العلامة الحيوية"
},
'noItem': {'en': "No items exists in this list", 'ar': "لا توجد عناصر في هذه القائمة"},
'postUcafSuccessMsg': {'en': "UCAF request send successfully", 'ar': "تم ارسال طلب UCAF بنجاح"},
'vitalSignDetailEmpty': {'en': "There is no data for this vital sign", 'ar': "لا توجد بيانات لهذه العلامة الحيوية"},
'onlyOfftimeHoliday': {
'en': "You can only apply holiday or offtime from mobile app",
'ar': "يمكنك فقط تطبيق عطلة أو إجازة من تطبيق الهاتف"
@ -696,10 +493,7 @@ const Map<String, Map<String, String>> localizedValues = {
'en': "You have to add at least one examination.",
'ar': "يجب عليك إضافة الفحص واحد على الأقل."
},
'progressNoteErrorMsg': {
'en': "You have to add progress Note.",
'ar': "يجب عليك إضافة ملاحظة التقدم."
},
'progressNoteErrorMsg': {'en': "You have to add progress Note.", 'ar': "يجب عليك إضافة ملاحظة التقدم."},
'chiefComplaintErrorMsg': {
'en': "You have to add chief complaint fields correctly .",
'ar': "يجب عليك إضافة حقول شكوى الرئيس بشكل صحيح"
@ -724,41 +518,20 @@ const Map<String, Map<String, String>> localizedValues = {
'clinicSearch': {'en': "Search Clinic", 'ar': "بحث عن عيادة"},
'doctorSearch': {'en': "Search Doctor", 'ar': "بحث عن طبيب"},
'referralResponse': {
'en': "Referral Response : ",
'ar': " : استجابة الإحالة"
},
'referralResponse': {'en': "Referral Response : ", 'ar': " : استجابة الإحالة"},
'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"},
'diagnosisDetail': {'en': "Diagnosis Details", 'ar': "تفاصيل التشخيص"},
'referralSuccessMsgAccept': {
'en': "Referral Accepted Successfully",
'ar': "تم قبول الإحالة بنجاح"
},
'referralSuccessMsgReject': {
'en': "Referral Rejected Successfully",
'ar': "تم رفض الإحالة بنجاح"
},
'sickLeaveComments': {
'en': "Sick leave comments",
'ar': "تعليقات إجازة مرضية"
},
'referralSuccessMsgAccept': {'en': "Referral Accepted Successfully", 'ar': "تم قبول الإحالة بنجاح"},
'referralSuccessMsgReject': {'en': "Referral Rejected Successfully", 'ar': "تم رفض الإحالة بنجاح"},
'sickLeaveComments': {'en': "Sick leave comments", 'ar': "تعليقات إجازة مرضية"},
'pastMedicalHistory': {'en': "Past medical history", 'ar': "التاريخ الطبي"},
'pastSurgicalHistory': {
'en': "Past surgical history",
'ar': "التاريخ الجراحي"
},
'pastSurgicalHistory': {'en': "Past surgical history", 'ar': "التاريخ الجراحي"},
'complications': {'en': "Complications", 'ar': "المضاعفات"},
'floor': {'en': "Floor", 'ar': "الطابق"},
'roomCategory': {'en': "Room category", 'ar': "فئة الغرفة"},
'otherDepartmentsInterventions': {
'en': "Other departments interventions",
'ar': "تدخلات الأقسام الأخرى"
},
'otherDepartmentsInterventions': {'en': "Other departments interventions", 'ar': "تدخلات الأقسام الأخرى"},
'otherProcedure': {'en': "Other procedure", 'ar': "إجراء آخر"},
'admissionRequestSuccessMsg': {
'en': "Admission Request Created Successfully",
'ar': "تم إنشاء طلب القبول بنجاح"
},
'admissionRequestSuccessMsg': {'en': "Admission Request Created Successfully", 'ar': "تم إنشاء طلب القبول بنجاح"},
// 'icd': {'en': "ICD", 'ar': " "},
'orderNo': {'en': "Order No : ", 'ar': "رقم الطلب"},
'infoStatus': {'en': "Info Status", 'ar': "حالة المعلومات"},
@ -772,10 +545,7 @@ const Map<String, Map<String, String>> localizedValues = {
'ptientsreferral': {'en': "Patient's Referrals", 'ar': "إحالات المريض"},
'myPatientsReferral': {'en': "Patient's\nReferrals", 'ar': "إحالات\nالمريض"},
'arrivalpatient': {'en': "Arrival Patients", 'ar': "المرضى القادمون"},
'searchmedicinepatient': {
'en': "Search patient or Medicines",
'ar': "ابحث عن المريض أو الأدوية"
},
'searchmedicinepatient': {'en': "Search patient or Medicines", 'ar': "ابحث عن المريض أو الأدوية"},
'appointmentDate': {'en': "Appointment Date", 'ar': "تاريخ الموعد"},
'arrived_p': {'en': "Arrived", 'ar': "وصل"},
'details': {'en': 'Details', 'ar': 'التفاصيل'},
@ -783,30 +553,18 @@ const Map<String, Map<String, String>> localizedValues = {
"out-patient": {"en": "OutPatient", "ar": "عيادات خارجية"},
"BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"},
"labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"},
"sendSuc": {
"en": "A copy has been sent to the email",
"ar": "تم إرسال نسخة إلى البريد الإلكتروني"
},
"sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
"noDataAvailable": {
"en": "No data available",
"ar": " لا يوجد بيانات متاحة "
},
"noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "},
"show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"},
"open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"},
'fileNumber': {'en': "File Number: ", 'ar': "رقم الملف : "},
'searchPatient-name': {
'en': 'Search Name, Medical File, Phone Number',
'ar': "اسم البحث ، الملف الطبي ، رقم الهاتف"
},
'searchPatient-name': {'en': 'Search Name, Medical File, Phone Number', 'ar': "اسم البحث ، الملف الطبي ، رقم الهاتف"},
'reschedule': {'en': 'Reschedule', 'ar': 'إعادة الجدولة'},
'leaves': {'en': 'Leaves', 'ar': 'يغادر'},
"totalApproval": {
"en": "Total approval unused",
"ar": "اجمالي الموافقات الغير مستخدمة"
},
"totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"},
"procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"},
"unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "},
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
@ -815,32 +573,17 @@ const Map<String, Map<String, String>> localizedValues = {
"prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
"notes": {"en": "Notes", "ar": "ملاحظات"},
"dailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"},
"searchWithOther": {
"en": "Search With Other Criteria",
"ar": "البحث بمعايير أخرى"
},
"hideOtherCriteria": {
"en": "Hide Other Criteria",
"ar": "إخفاء المعايير الأخرى"
},
"applyForReschedule": {
"en": "Apply for leave or reschedule",
"ar": "تقدم بطلب للحصول على إجازة أو إعادة جدولة"
},
"searchWithOther": {"en": "Search With Other Criteria", "ar": "البحث بمعايير أخرى"},
"hideOtherCriteria": {"en": "Hide Other Criteria", "ar": "إخفاء المعايير الأخرى"},
"applyForReschedule": {"en": "Apply for leave or reschedule", "ar": "تقدم بطلب للحصول على إجازة أو إعادة جدولة"},
"startDate": {"en": "Start Date: ", "ar": " :تاريخ البدء"},
"endDate": {"en": "End Date: ", "ar": " :تاريخ الانتهاء"},
"add-reschedule": {"en": "Add reschedule", "ar": "أضف إعادة الجدولة"},
"update-reschedule": {"en": "Update reschedule", "ar": "تحديث إعادة الجدولة"},
"sick_leave": {"en": "Sick Leave", "ar": "إجازة مرضية"},
"addSickLeaveRequest": {
"en": "Add Sick Leave Request",
"ar": "إضافة طلب إجازة مرضية"
},
"extendSickLeaveRequest": {
"en": "Extend Sick Leave Request",
"ar": "تمديد طلب الإجازة المرضية"
},
"addSickLeaveRequest": {"en": "Add Sick Leave Request", "ar": "إضافة طلب إجازة مرضية"},
"extendSickLeaveRequest": {"en": "Extend Sick Leave Request", "ar": "تمديد طلب الإجازة المرضية"},
"accepted": {"en": "Accepted", "ar": "وافقت"},
"cancelled": {"en": "Cancelled", "ar": "ألغيت"},
"unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"},
@ -850,16 +593,10 @@ const Map<String, Map<String, String>> localizedValues = {
"remove": {"en": "Remove", "ar": "حذف"},
"changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"},
"newSchedule": {"en": "New Schedule", "ar": "جدول جديد"},
"enter_credentials": {
"en": "Enter the user credentials below",
"ar": "أدخل بيانات اعتماد المستخدم أدناه"
},
"enter_credentials": {"en": "Enter the user credentials below", "ar": "أدخل بيانات اعتماد المستخدم أدناه"},
"step": {"en": "Step", "ar": "خطوة"},
"fieldRequired": {"en": "This field is required", "ar": "هذه الخانة مطلوبه"},
"applyOrRescheduleLeave": {
"en": "Apply Reschedule Leave",
"ar": "التقدم بطلب أو إعادة جدولة الإجازة"
},
"applyOrRescheduleLeave": {"en": "Apply Reschedule Leave", "ar": "التقدم بطلب أو إعادة جدولة الإجازة"},
"myQRCode": {"en": "My QR Code", "ar": " كود QR "},
"patientIDMobilenational": {
"en": "Patient ID, National ID, Mobile Number",
@ -874,68 +611,35 @@ const Map<String, Map<String, String>> localizedValues = {
"try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'},
"refClinic": {"en": "Ref Clinic", "ar": "العيادة المرجعية"},
"acknowledged": {"en": "Acknowledged", "ar": "إقرار"},
"didntCatch": {
"en": "Didn't catch that. Try Speaking again",
"ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى"
},
"didntCatch": {"en": "Didn't catch that. Try Speaking again", "ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى"},
"showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"},
"viewProfile": {"en": "View Profile", "ar": "إعرض الملف"},
"pleaseEnterProcedure": {
"en": "Please Enter Procedure",
"ar": "الرجاء إدخال الإجراء "
},
"pleaseEnterProcedure": {"en": "Please Enter Procedure", "ar": "الرجاء إدخال الإجراء "},
"fillTheMandatoryProcedureDetails": {
"en": "Fill The Mandatory Procedure Details",
"ar": "املأ تفاصيل الإجراء الإلزامي"
},
"atLeastThreeCharacters": {
"en": "At least three Characters",
"ar": "ثلاثة أحرف على الأقل "
},
"searchProcedureHere": {
"en": "Search Procedure here...",
"ar": "إجراء البحث هنا ... "
},
"noInsuranceApprovalFound": {
"en": "No Insurance Approval Found",
"ar": "لم يتم العثور على موافقة التأمين"
},
"atLeastThreeCharacters": {"en": "At least three Characters", "ar": "ثلاثة أحرف على الأقل "},
"searchProcedureHere": {"en": "Search Procedure here...", "ar": "إجراء البحث هنا ... "},
"noInsuranceApprovalFound": {"en": "No Insurance Approval Found", "ar": "لم يتم العثور على موافقة التأمين"},
"procedure": {"en": "Procedure", "ar": "عملية"},
"stopDate": {"en": "Stop Date", "ar": "تاريخ التوقف"},
"processed": {"en": "processed", "ar": "معالجتها"},
"direction": {"en": "Direction", "ar": "إشراف"},
"refill": {"en": "Refill", "ar": "اعادة تعبئه"},
"medicationHasBeenAdded": {
"en": "Medication has been added",
"ar": "تمت إضافة الدواء"
},
"newPrescriptionOrder": {
"en": "New Prescription Order",
"ar": "طلب وصفة طبية جديد "
},
"pleaseFillAllFields": {
"en": "Please Fill All Fields",
"ar": "لو سمحت أملأ كل الحقول"
},
"medicationHasBeenAdded": {"en": "Medication has been added", "ar": "تمت إضافة الدواء"},
"newPrescriptionOrder": {"en": "New Prescription Order", "ar": "طلب وصفة طبية جديد "},
"pleaseFillAllFields": {"en": "Please Fill All Fields", "ar": "لو سمحت أملأ كل الحقول"},
"narcoticMedicineCanOnlyBePrescribedFromVida": {
"en": "Narcotic medicine can only be prescribed from VIDA",
"ar": "لا يمكن وصف الأدوية المخدرة إلا من VIDA "
},
"only5DigitsAllowedForStrength": {
"en": "Only 5 Digits allowed for strength",
"ar": "يسمح فقط بـ 5 أرقام للقوة"
},
"only5DigitsAllowedForStrength": {"en": "Only 5 Digits allowed for strength", "ar": "يسمح فقط بـ 5 أرقام للقوة"},
"unit": {"en": "Unit", "ar": "وحدة"},
"boxQuantity": {"en": "Box Quantity", "ar": "كمية الصندوق "},
"orderTestOr": {"en": "Order Test or", "ar": "اطلب اختبار أو"},
"applyForRadiologyOrder": {
"en": "Apply for Radiology Order",
"ar": "التقدم بطلب للحصول على طلب الأشعة "
},
"applyForNewLabOrder": {
"en": "Apply for New Lab Order",
"ar": "تقدم بطلب جديد للمختبر الأشعة"
},
"applyForRadiologyOrder": {"en": "Apply for Radiology Order", "ar": "التقدم بطلب للحصول على طلب الأشعة "},
"applyForNewLabOrder": {"en": "Apply for New Lab Order", "ar": "تقدم بطلب جديد للمختبر الأشعة"},
"addLabOrder": {"en": "Add Lab Order", "ar": "إضافة طلب معمل"},
"addRadiologyOrder": {"en": "Add Radiology Order", "ar": "إضافة اشعة"},
"newRadiologyOrder": {"en": "New Radiology Order", "ar": "طلب الأشعة الجديد"},
@ -947,26 +651,14 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Apply for New Prescriptions Order",
"ar": "التقدم بطلب للحصول على وصفات طبية جديدة "
},
"noPrescriptionsFound": {
"en": "No Prescriptions Found",
"ar": "لم يتم العثور على وصفات طبية"
},
"noMedicalFileFound": {
"en": "No Medical File Found",
"ar": "لم يتم العثور على ملف طبي"
},
"noPrescriptionsFound": {"en": "No Prescriptions Found", "ar": "لم يتم العثور على وصفات طبية"},
"noMedicalFileFound": {"en": "No Medical File Found", "ar": "لم يتم العثور على ملف طبي"},
"insurance22": {"en": "Insurance", "ar": "موافقات"},
"approvals22": {"en": "Approvals", "ar": "التامين"},
"severe": {"en": "Severe", "ar": "الشدة"},
"graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"},
"addNewOrderSheet": {
"en": "Add a New Order Sheet",
"ar": "أضف ورقة طلب جديدة"
},
"addNewProgressNote": {
"en": "Add a New Progress Note",
"ar": "أضف ملاحظة تقدم جديدة"
},
"addNewOrderSheet": {"en": "Add a New Order Sheet", "ar": "أضف ورقة طلب جديدة"},
"addNewProgressNote": {"en": "Add a New Progress Note", "ar": "أضف ملاحظة تقدم جديدة"},
"notePending": {"en": "Pending", "ar": "قيد الانتظار"},
"noteCanceled": {"en": "Canceled", "ar": "ألغيت"},
"noteVerified": {"en": "Verified", "ar": "تم التحقق"},

@ -13,10 +13,10 @@ class PatientSearchRequestModel {
String mobileNo;
String identificationNo;
int nursingStationID;
int clinicID=0;
int clinicID = 0;
PatientSearchRequestModel(
{this.doctorID ,
{this.doctorID,
this.firstName = "0",
this.middleName = "0",
this.lastName = "0",
@ -29,7 +29,8 @@ class PatientSearchRequestModel {
this.from = "0",
this.to = "0",
this.clinicID,
this.nursingStationID = 0,this.projectID});
this.nursingStationID = 0,
this.projectID});
PatientSearchRequestModel.fromJson(Map<String, dynamic> json) {
doctorID = json['DoctorID'];
@ -65,7 +66,7 @@ class PatientSearchRequestModel {
data['IdentificationNo'] = this.identificationNo;
//data['NursingStationID'] = this.nursingStationID;
data['ClinicID'] = this.clinicID;
data['ProjectID'] =this.projectID;
data['ProjectID'] = this.projectID;
return data;
}
}

@ -33,9 +33,9 @@ class VideoCallService extends BaseService {
DoctorProfileModel doctorProfile =
await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen(
kToken: startCallRes.openTokenID,
kSessionId: startCallRes.openSessionID,
kApiKey: '46209962',
kToken: startCallRes.openTokenID,//"T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==",
kSessionId: startCallRes.openSessionID,// "1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg",
kApiKey: '46209962' ,// '47247954'
vcId: patient.vcId,
isRecording: isRecording,
patientName: patient.fullName ??
@ -49,6 +49,7 @@ class VideoCallService extends BaseService {
DrAppToastMsg.showErrorToast(error);
},
onCallConnected: onCallConnected,
onCallDisconnected: onCallDisconnected,
onCallEnd: () {
WidgetsBinding.instance.addPostFrameCallback((_) async {
GifLoaderDialogUtils.showMyDialog(

@ -11,10 +11,10 @@ class ScanQrService extends BaseService {
hasError = false;
await getDoctorProfile();
// if (isMyInpatient) {
// requestModel.doctorID = doctorProfile.doctorID;
// } else {
requestModel.doctorID = 0;
// if (isMyInpatient) {
// requestModel.doctorID = doctorProfile.doctorID;
// } else {
requestModel.doctorID = 0;
//}
await baseAppClient.post(

@ -17,7 +17,8 @@ class PatientSearchViewModel extends BaseViewModel {
SpecialClinicsService _specialClinicsService = locator<SpecialClinicsService>();
List<PatiantInformtion> get patientList => _outPatientService.patientList;
List<GetSpecialClinicalCareMappingListResponseModel> get specialClinicalCareMappingList => _specialClinicsService.specialClinicalCareMappingList;
List<GetSpecialClinicalCareMappingListResponseModel> get specialClinicalCareMappingList =>
_specialClinicsService.specialClinicalCareMappingList;
List<PatiantInformtion> filterData = [];
@ -29,14 +30,10 @@ class PatientSearchViewModel extends BaseViewModel {
if (strExist) {
filterData = [];
for (var i = 0; i < _outPatientService.patientList.length; i++) {
String firstName =
_outPatientService.patientList[i].firstName.toUpperCase();
String lastName =
_outPatientService.patientList[i].lastName.toUpperCase();
String mobile =
_outPatientService.patientList[i].mobileNumber.toUpperCase();
String patientID =
_outPatientService.patientList[i].patientId.toString();
String firstName = _outPatientService.patientList[i].firstName.toUpperCase();
String lastName = _outPatientService.patientList[i].lastName.toUpperCase();
String mobile = _outPatientService.patientList[i].mobileNumber.toUpperCase();
String patientID = _outPatientService.patientList[i].patientId.toString();
if (firstName.contains(str.toUpperCase()) ||
lastName.contains(str.toUpperCase()) ||
@ -52,8 +49,7 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
getOutPatient(PatientSearchRequestModel patientSearchRequestModel,
{bool isLocalBusy = false}) async {
getOutPatient(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async {
if (isLocalBusy) {
setState(ViewState.BusyLocal);
} else {
@ -75,21 +71,19 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
sortOutPatient({bool isDes = false}){
if(isDes)
filterData= filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>b.appointmentDateWithDateTimeForm.compareTo(a.appointmentDateWithDateTimeForm));
sortOutPatient({bool isDes = false}) {
if (isDes)
filterData = filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>b.appointmentDateWithDateTimeForm.compareTo(a.appointmentDateWithDateTimeForm));
else
filterData= filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>a.appointmentDateWithDateTimeForm.compareTo(b.appointmentDateWithDateTimeForm));
filterData = filterData.reversed.toList();
// filterData.sort((PatiantInformtion a, PatiantInformtion b)=>a.appointmentDateWithDateTimeForm.compareTo(b.appointmentDateWithDateTimeForm));
setState(ViewState.Idle);
}
getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel,
{bool isLocalBusy = false}) async {
getPatientFileInformation(PatientSearchRequestModel patientSearchRequestModel, {bool isLocalBusy = false}) async {
setState(ViewState.Busy);
await _outPatientService
.getPatientFileInformation(patientSearchRequestModel);
await _outPatientService.getPatientFileInformation(patientSearchRequestModel);
if (_outPatientService.hasError) {
error = _outPatientService.error;
setState(ViewState.Error);
@ -108,31 +102,21 @@ class PatientSearchViewModel extends BaseViewModel {
String dateTo;
String dateFrom;
if (OutPatientFilterType.Previous == outPatientFilterType) {
selectedFromDate = DateTime(
DateTime.now().year, DateTime.now().month - 1, DateTime.now().day);
selectedToDate = DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
selectedFromDate = DateTime(DateTime.now().year, DateTime.now().month - 1, DateTime.now().day);
selectedToDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day - 1);
dateTo = AppDateUtils.convertDateToFormat(selectedToDate, 'yyyy-MM-dd');
dateFrom = AppDateUtils.convertDateToFormat(selectedFromDate, 'yyyy-MM-dd');
} else if (OutPatientFilterType.NextWeek == outPatientFilterType) {
dateTo = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 6),
'yyyy-MM-dd');
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 6), 'yyyy-MM-dd');
dateFrom = AppDateUtils.convertDateToFormat(
DateTime(DateTime.now().year, DateTime.now().month,
DateTime.now().day + 1),
'yyyy-MM-dd');
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1), 'yyyy-MM-dd');
} else {
dateFrom = AppDateUtils.convertDateToFormat(
DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd');
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd');
dateTo = AppDateUtils.convertDateToFormat(
DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day),
'yyyy-MM-dd');
DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day), 'yyyy-MM-dd');
}
PatientSearchRequestModel currentModel = PatientSearchRequestModel();
currentModel.patientID = patientSearchRequestModel.patientID;
@ -146,32 +130,29 @@ class PatientSearchViewModel extends BaseViewModel {
filterData = _outPatientService.patientList;
}
PatientInPatientService _inPatientService =
locator<PatientInPatientService>();
PatientInPatientService _inPatientService = locator<PatientInPatientService>();
List<PatiantInformtion> get inPatientList => _inPatientService.inPatientList;
List<PatiantInformtion> get myIinPatientList =>
_inPatientService.myInPatientList;
List<PatiantInformtion> get myIinPatientList => _inPatientService.myInPatientList;
List<PatiantInformtion> filteredInPatientItems = List();
Future getInPatientList(PatientSearchRequestModel requestModel,
{bool isMyInpatient = false, bool isLocalBusy = false}) async {
await getDoctorProfile();
if(isLocalBusy) {
if (isLocalBusy) {
setState(ViewState.BusyLocal);
} else{
} else {
setState(ViewState.Busy);
}
if (inPatientList.length == 0)
await _inPatientService.getInPatientList(requestModel, false);
if (inPatientList.length == 0) await _inPatientService.getInPatientList(requestModel, false);
if (_inPatientService.hasError) {
error = _inPatientService.error;
if(isLocalBusy) {
if (isLocalBusy) {
setState(ViewState.ErrorLocal);
} else{
setState(ViewState.Error);
} else {
setState(ViewState.Error);
}
} else {
// setDefaultInPatientList();
@ -179,11 +160,13 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
sortInPatient({bool isDes = false}){
if(isDes)
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b)=>b.admissionDateWithDateTimeForm.compareTo(a.admissionDateWithDateTimeForm));
sortInPatient({bool isDes = false}) {
if (isDes)
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b) =>
b.admissionDateWithDateTimeForm.compareTo(a.admissionDateWithDateTimeForm));
else
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b)=>a.admissionDateWithDateTimeForm.compareTo(b.admissionDateWithDateTimeForm));
filteredInPatientItems.sort((PatiantInformtion a, PatiantInformtion b) =>
a.admissionDateWithDateTimeForm.compareTo(b.admissionDateWithDateTimeForm));
setState(ViewState.Idle);
}
@ -195,9 +178,6 @@ class PatientSearchViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
void clearPatientList() {
_inPatientService.inPatientList = [];
_inPatientService.myInPatientList = [];
@ -228,9 +208,7 @@ class PatientSearchViewModel extends BaseViewModel {
}
}
getSpecialClinicalCareMappingList(clinicId,
{bool isLocalBusy = false}) async {
getSpecialClinicalCareMappingList(clinicId, {bool isLocalBusy = false}) async {
if (isLocalBusy) {
setState(ViewState.BusyLocal);
} else {

@ -153,117 +153,104 @@ class PatiantInformtion {
this.status,
this.vcId,
this.voipToken,
this.admissionDateWithDateTimeForm, this.appointmentDateWithDateTimeForm});
this.admissionDateWithDateTimeForm,
this.appointmentDateWithDateTimeForm});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
PatiantInformtion(
patientDetails: json['patientDetails'] != null
? new PatiantInformtion.fromJson(json['patientDetails'])
: null,
projectId: json["ProjectID"] ?? json["projectID"],
clinicId: json["ClinicID"] ?? json["clinicID"],
doctorId: json["DoctorID"] ?? json["doctorID"],
patientId: json["PatientID"] != null
? json["PatientID"] is String
? int.parse(json["PatientID"])
: json["PatientID"]
: json["patientID"] ?? json['patientMRN'] ?? json['PatientMRN'],
doctorName: json["DoctorName"] ?? json["doctorName"],
doctorNameN: json["DoctorNameN"] ?? json["doctorNameN"],
firstName: json["FirstName"] ?? json["firstName"],
middleName: json["MiddleName"] ?? json["middleName"],
lastName: json["LastName"] ?? json["lastName"],
firstNameN: json["FirstNameN"] ?? json["firstNameN"],
middleNameN: json["MiddleNameN"] ?? json["middleNameN"],
lastNameN: json["LastNameN"] ?? json["lastNameN"],
gender: json["Gender"] != null
? json["Gender"] is String
? int.parse(json["Gender"])
: json["Gender"]
: json["gender"],
fullName: json["fullName"] ?? json["fullName"] ?? json["PatientName"],
fullNameN:
json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"],
dateofBirth: json["DateofBirth"] ?? json["dob"] ?? json['DateOfBirth'],
nationalityId: json["NationalityID"] ?? json["nationalityID"],
mobileNumber: json["MobileNumber"] ?? json["mobileNumber"],
emailAddress: json["EmailAddress"] ?? json["emailAddress"],
patientIdentificationNo:
json["PatientIdentificationNo"] ?? json["patientIdentificationNo"],
//TODO make 7 dynamic when the backend retrun it in patient arrival
patientType: json["PatientType"] ?? json["patientType"] ?? 1,
admissionNo: json["AdmissionNo"] ?? json["admissionNo"],
admissionDate: json["AdmissionDate"] ?? json["admissionDate"],
createdOn: json["CreatedOn"] ?? json["CreatedOn"],
roomId: json["RoomID"] ?? json["roomID"],
bedId: json["BedID"] ?? json["bedID"],
nursingStationId: json["NursingStationID"] ?? json["nursingStationID"],
description: json["Description"] ?? json["description"],
clinicDescription:
json["ClinicDescription"] ?? json["clinicDescription"],
clinicDescriptionN:
json["ClinicDescriptionN"] ?? json["clinicDescriptionN"],
nationalityName: json["NationalityName"] ??
json["nationalityName"] ??
json['NationalityName'],
nationalityNameN: json["NationalityNameN"] ??
json["nationalityNameN"] ??
json['NationalityNameN'],
age: json["Age"] ?? json["age"],
genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"] ?? '',
startTime: json["startTime"] ?? json['StartTime'],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'],
appointmentTypeId:
json['appointmentTypeId'] ?? json['appointmentTypeid'],
arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'],
clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'],
doctorDetails: json['doctorDetails'],
endTime: json['endTime'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'],
fallRiskScore: json['fallRiskScore'],
isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ??
json['PatientMRN'] ??
(json["PatientID"] != null
? int?.parse(json["PatientID"].toString())
: json["patientID"] != null ? int?.parse(
json["patientID"].toString()) : json["patientId"] != null ? int
?.parse(json["patientId"].toString()) : ''),
visitType: json['visitType'] ?? json['visitType'] ?? json['visitType'],
nationalityFlagURL:
json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
patientStatusType:
json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId:
json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'],
dischargeDate: json['DischargeDate'],
status: json['Status'],
vcId: json['VC_ID'],
arrivalTime: json['ArrivalTime'],
arrivalTimeD: json['ArrivalTimeD'],
callStatus: json['CallStatus'],
callStatusDisc: json['CallStatusDisc'],
callTypeID: json['CallTypeID'],
clientRequestID: json['ClientRequestID'],
clinicName: json['ClinicName'],
consoltationEnd: json['ConsoltationEnd'],
consultationNotes: json['ConsultationNotes'],
patientStatus: json['PatientStatus'],
voipToken: json['VoipToken'],
admissionDateWithDateTimeForm: json["AdmissionDate"] != null
? AppDateUtils.convertStringToDate(json["AdmissionDate"])
: json["admissionDate"] != null ? AppDateUtils.convertStringToDate(
json["admissionDate"]) : null,
appointmentDateWithDateTimeForm: json["AppointmentDate"]!= null?AppDateUtils.convertStringToDate(json["AppointmentDate"]):null
);
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
patientDetails: json['patientDetails'] != null ? new PatiantInformtion.fromJson(json['patientDetails']) : null,
projectId: json["ProjectID"] ?? json["projectID"],
clinicId: json["ClinicID"] ?? json["clinicID"],
doctorId: json["DoctorID"] ?? json["doctorID"],
patientId: json["PatientID"] != null
? json["PatientID"] is String
? int.parse(json["PatientID"])
: json["PatientID"]
: json["patientID"] ?? json['patientMRN'] ?? json['PatientMRN'],
doctorName: json["DoctorName"] ?? json["doctorName"],
doctorNameN: json["DoctorNameN"] ?? json["doctorNameN"],
firstName: json["FirstName"] ?? json["firstName"],
middleName: json["MiddleName"] ?? json["middleName"],
lastName: json["LastName"] ?? json["lastName"],
firstNameN: json["FirstNameN"] ?? json["firstNameN"],
middleNameN: json["MiddleNameN"] ?? json["middleNameN"],
lastNameN: json["LastNameN"] ?? json["lastNameN"],
gender: json["Gender"] != null
? json["Gender"] is String
? int.parse(json["Gender"])
: json["Gender"]
: json["gender"],
fullName: json["fullName"] ?? json["fullName"] ?? json["PatientName"],
fullNameN: json["fullNameN"] ?? json["fullNameN"] ?? json["PatientName"],
dateofBirth: json["DateofBirth"] ?? json["dob"] ?? json['DateOfBirth'],
nationalityId: json["NationalityID"] ?? json["nationalityID"],
mobileNumber: json["MobileNumber"] ?? json["mobileNumber"],
emailAddress: json["EmailAddress"] ?? json["emailAddress"],
patientIdentificationNo: json["PatientIdentificationNo"] ?? json["patientIdentificationNo"],
//TODO make 7 dynamic when the backend retrun it in patient arrival
patientType: json["PatientType"] ?? json["patientType"] ?? 1,
admissionNo: json["AdmissionNo"] ?? json["admissionNo"],
admissionDate: json["AdmissionDate"] ?? json["admissionDate"],
createdOn: json["CreatedOn"] ?? json["CreatedOn"],
roomId: json["RoomID"] ?? json["roomID"],
bedId: json["BedID"] ?? json["bedID"],
nursingStationId: json["NursingStationID"] ?? json["nursingStationID"],
description: json["Description"] ?? json["description"],
clinicDescription: json["ClinicDescription"] ?? json["clinicDescription"],
clinicDescriptionN: json["ClinicDescriptionN"] ?? json["clinicDescriptionN"],
nationalityName: json["NationalityName"] ?? json["nationalityName"] ?? json['NationalityName'],
nationalityNameN: json["NationalityNameN"] ?? json["nationalityNameN"] ?? json['NationalityNameN'],
age: json["Age"] ?? json["age"],
genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"],
appointmentDate: json["AppointmentDate"] ?? '',
startTime: json["startTime"] ?? json['StartTime'],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId'] ?? json['appointmentTypeid'],
arrivedOn: json['ArrivedOn'] ?? json['arrivedOn'] ?? json['ArrivedOn'],
clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'],
dischargeStatus: json['dischargeStatus'],
doctorDetails: json['doctorDetails'],
endTime: json['endTime'],
episodeNo: json['episodeNo'] ?? json['EpisodeID'] ?? json['EpisodeNo'],
fallRiskScore: json['fallRiskScore'],
isSigned: json['isSigned'],
medicationOrders: json['medicationOrders'],
nationality: json['nationality'] ?? json['NationalityNameN'],
patientMRN: json['patientMRN'] ??
json['PatientMRN'] ??
(json["PatientID"] != null
? int?.parse(json["PatientID"].toString())
: json["patientID"] != null
? int?.parse(json["patientID"].toString())
: json["patientId"] != null
? int?.parse(json["patientId"].toString())
: ''),
visitType: json['visitType'] ?? json['visitType'] ?? json['visitType'],
nationalityFlagURL: json['NationalityFlagURL'] ?? json['NationalityFlagURL'],
patientStatusType: json['patientStatusType'] ?? json['PatientStatusType'],
visitTypeId: json['visitTypeId'] ?? json['visitTypeId'] ?? json['visitTypeid'],
startTimes: json['StartTime'] ?? json['StartTime'],
dischargeDate: json['DischargeDate'],
status: json['Status'],
vcId: json['VC_ID'],
arrivalTime: json['ArrivalTime'],
arrivalTimeD: json['ArrivalTimeD'],
callStatus: json['CallStatus'],
callStatusDisc: json['CallStatusDisc'],
callTypeID: json['CallTypeID'],
clientRequestID: json['ClientRequestID'],
clinicName: json['ClinicName'],
consoltationEnd: json['ConsoltationEnd'],
consultationNotes: json['ConsultationNotes'],
patientStatus: json['PatientStatus'],
voipToken: json['VoipToken'],
admissionDateWithDateTimeForm: json["AdmissionDate"] != null
? AppDateUtils.convertStringToDate(json["AdmissionDate"])
: json["admissionDate"] != null
? AppDateUtils.convertStringToDate(json["admissionDate"])
: null,
appointmentDateWithDateTimeForm:
json["AppointmentDate"] != null ? AppDateUtils.convertStringToDate(json["AppointmentDate"]) : null);
}

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/home/dashboard_slider-item-widget.dart';
import 'package:doctor_app_flutter/screens/home/dashboard_swipe_widget.dart';
@ -28,6 +29,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:sticky_headers/sticky_headers/widget.dart';
import '../../routes.dart';
import '../../widgets/shared/app_texts_widget.dart';
class HomeScreen extends StatefulWidget {
@ -288,7 +290,8 @@ class _HomeScreenState extends State<HomeScreen> {
child: ListView(
scrollDirection: Axis.horizontal,
children: [
...homePatientsCardsWidget(model, projectsProvider),
...homePatientsCardsWidget(
model, projectsProvider),
])),
SizedBox(
height: 20,
@ -306,7 +309,8 @@ class _HomeScreenState extends State<HomeScreen> {
);
}
List<Widget> homePatientsCardsWidget(DashboardViewModel model,projectsProvider) {
List<Widget> homePatientsCardsWidget(
DashboardViewModel model, projectsProvider) {
colorIndex = 0;
List<Color> backgroundColors = List(3);
@ -334,6 +338,22 @@ class _HomeScreenState extends State<HomeScreen> {
text:
"${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}",
onTap: () {
// 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(
@ -355,8 +375,10 @@ class _HomeScreenState extends State<HomeScreen> {
Navigator.push(
context,
FadePage(
page: PatientInPatientScreen(specialClinic: model.getSpecialClinic(clinicId??projectsProvider
.doctorClinicsList[0].clinicID),),
page: PatientInPatientScreen(
specialClinic: model.getSpecialClinic(
clinicId ?? projectsProvider.doctorClinicsList[0].clinicID),
),
),
);
},
@ -394,14 +416,12 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.referral_1,
textColor: textColors[colorIndex],
text: TranslationBase.of(context)
.myPatientsReferral,
text: TranslationBase.of(context).myPatientsReferral,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PatientReferralScreen(),
builder: (context) => PatientReferralScreen(),
),
);
},
@ -413,14 +433,12 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.search,
textColor: textColors[colorIndex],
text: TranslationBase.of(context)
.searchPatientDashBoard,
text: TranslationBase.of(context).searchPatientDashBoard,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PatientSearchScreen(),
builder: (context) => PatientSearchScreen(),
));
},
));
@ -431,14 +449,12 @@ class _HomeScreenState extends State<HomeScreen> {
backgroundIconColor: backgroundIconColors[colorIndex],
cardIcon: DoctorApp.search_medicines,
textColor: textColors[colorIndex],
text: TranslationBase.of(context)
.searchMedicineDashboard,
text: TranslationBase.of(context).searchMedicineDashboard,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicineSearchScreen(),
builder: (context) => MedicineSearchScreen(),
));
},
));

@ -20,12 +20,10 @@ class InsuranceApprovalScreenNew extends StatefulWidget {
InsuranceApprovalScreenNew({this.appointmentNo});
@override
_InsuranceApprovalScreenNewState createState() =>
_InsuranceApprovalScreenNewState();
_InsuranceApprovalScreenNewState createState() => _InsuranceApprovalScreenNewState();
}
class _InsuranceApprovalScreenNewState
extends State<InsuranceApprovalScreenNew> {
class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -39,11 +37,9 @@ class _InsuranceApprovalScreenNewState
? (model) => model.getInsuranceInPatient(mrn: patient.patientId)
: patient.appointmentNo != null
? (model) => model.getInsuranceApproval(patient,
appointmentNo: int.parse(patient?.appointmentNo.toString()) ,
projectId: patient.projectId)
appointmentNo: int.parse(patient?.appointmentNo.toString()), projectId: patient.projectId)
: (model) => model.getInsuranceApproval(patient),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
appBar: PatientProfileAppBar(
patient,
isInpatient: isInpatient,
@ -96,8 +92,7 @@ class _InsuranceApprovalScreenNewState
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InsuranceApprovalsDetails(
builder: (context) => InsuranceApprovalsDetails(
patient: patient,
indexInsurance: index,
patientType: patientType,
@ -106,27 +101,14 @@ class _InsuranceApprovalScreenNewState
},
child: DoctorCardInsurance(
patientOut: "In Patient",
profileUrl: model
.insuranceApprovalInPatient[index]
.doctorImage,
clinic: model
.insuranceApprovalInPatient[index]
.clinicName,
doctorName: model
.insuranceApprovalInPatient[index]
.doctorName,
branch: model
.insuranceApprovalInPatient[index]
.approvalNo
.toString(),
profileUrl: model.insuranceApprovalInPatient[index].doctorImage,
clinic: model.insuranceApprovalInPatient[index].clinicName,
doctorName: model.insuranceApprovalInPatient[index].doctorName,
branch: model.insuranceApprovalInPatient[index].approvalNo.toString(),
isPrescriptions: true,
approvalStatus: model
.insuranceApprovalInPatient[index]
.approvalStatusDescption ??
'',
branch2: model
.insuranceApprovalInPatient[index]
.projectName,
approvalStatus:
model.insuranceApprovalInPatient[index].approvalStatusDescption ?? '',
branch2: model.insuranceApprovalInPatient[index].projectName,
),
),
),
@ -143,8 +125,7 @@ class _InsuranceApprovalScreenNewState
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context)
.noInsuranceApprovalFound),
child: AppText(TranslationBase.of(context).noInsuranceApprovalFound),
),
SizedBox(
height: 150.0,
@ -171,8 +152,7 @@ class _InsuranceApprovalScreenNewState
Row(
children: [
AppText(
TranslationBase.of(context)
.insurance22,
TranslationBase.of(context).insurance22,
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
@ -182,8 +162,7 @@ class _InsuranceApprovalScreenNewState
Row(
children: [
AppText(
TranslationBase.of(context)
.approvals22,
TranslationBase.of(context).approvals22,
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
@ -200,8 +179,7 @@ class _InsuranceApprovalScreenNewState
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InsuranceApprovalsDetails(
builder: (context) => InsuranceApprovalsDetails(
patient: patient,
indexInsurance: index,
patientType: patientType,
@ -209,24 +187,14 @@ class _InsuranceApprovalScreenNewState
);
},
child: DoctorCardInsurance(
patientOut: model.insuranceApproval[index]
.patientDescription,
profileUrl: model
.insuranceApproval[index].doctorImage,
clinic: model
.insuranceApproval[index].clinicName,
doctorName: model
.insuranceApproval[index].doctorName,
branch: model
.insuranceApproval[index].approvalNo
.toString(),
patientOut: model.insuranceApproval[index].patientDescription,
profileUrl: model.insuranceApproval[index].doctorImage,
clinic: model.insuranceApproval[index].clinicName,
doctorName: model.insuranceApproval[index].doctorName,
branch: model.insuranceApproval[index].approvalNo.toString(),
isPrescriptions: true,
approvalStatus: model
.insuranceApproval[index]
.approvalStatusDescption ??
'',
branch2: model
.insuranceApproval[index].projectName,
approvalStatus: model.insuranceApproval[index].approvalStatusDescption ?? '',
branch2: model.insuranceApproval[index].projectName,
),
),
),
@ -243,8 +211,7 @@ class _InsuranceApprovalScreenNewState
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(TranslationBase.of(context)
.noInsuranceApprovalFound),
child: AppText(TranslationBase.of(context).noInsuranceApprovalFound),
)
],
),

@ -105,15 +105,13 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
decoration: TextFieldsUtils.containerBorderDecoration(Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: _times.map((item) {
bool _isActive =
_times[_activeLocation] == item ? true : false;
bool _isActive = _times[_activeLocation] == item ? true : false;
return Expanded(
child: InkWell(
@ -133,8 +131,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
await model.getPatientBasedOnDate(
item: item,
selectedPatientType: widget.selectedPatientType,
patientSearchRequestModel:
widget.patientSearchRequestModel,
patientSearchRequestModel: widget.patientSearchRequestModel,
isSearchWithKeyInfo: widget.isSearchWithKeyInfo,
outPatientFilterType: outPatientFilterType);
GifLoaderDialogUtils.hideDialog(context);
@ -142,16 +139,11 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration:
TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive
? Color(0xFFD02127)
: Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
decoration: TextFieldsUtils.containerBorderDecoration(
_isActive ? Color(0xFFD02127 /*B8382B*/) : Color(0xFFEAEAEA),
_isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -159,22 +151,16 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive
? Colors.white
: Color(0xFF2B353E),
color: _isActive ? Colors.white : Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
_isActive &&
_activeLocation != 0 &&
model.state == ViewState.Idle
_isActive && _activeLocation != 0 && model.state == ViewState.Idle
? Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.symmetric(
horizontal: 5),
margin: EdgeInsets.symmetric(horizontal: 5),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(50),
borderRadius: BorderRadius.circular(50),
),
constraints: BoxConstraints(
minWidth: 20,
@ -182,9 +168,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
),
child: new Text(
model.filterData.length.toString(),
style: new TextStyle(
color: Colors.red,
fontSize: 10),
style: new TextStyle(color: Colors.red, fontSize: 10),
textAlign: TextAlign.center,
),
)
@ -210,71 +194,59 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
color: HexColor("#CCCCCC"),
),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Padding(
padding: EdgeInsets.only(left: 10, top: 10),
child: AppText(
TranslationBase.of(context).searchPatientName,
fontSize: 13,
)),
Stack(
children: [
Padding(
padding: EdgeInsets.only(left: 10, top: 10),
child: AppText(
TranslationBase.of(context).searchPatientName,
fontSize: 13,
)),
Stack(
children: [
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
_activeLocation != 0
? DoctorApp.filter_1
: FontAwesomeIcons.slidersH,
color: Colors.black,
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: _activeLocation != 0
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder:
(BuildContext context) =>
FilterDatePage(
outPatientFilterType:
outPatientFilterType,
patientSearchViewModel:
model,
)));
},
),
onChanged: (String str) {
model.searchData(str);
}),
Positioned(
right: 25,
child: IconButton(
icon: Icon(
isSortDes
? FontAwesomeIcons.sortAmountDown
: FontAwesomeIcons.sortAmountUp,
color: Colors.black,
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: () {
model.sortOutPatient(isDes: isSortDes);
isSortDes = !isSortDes;
},
AppTextFormField(
// focusNode: focusProject,
controller: _controller,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(
_activeLocation != 0 ? DoctorApp.filter_1 : FontAwesomeIcons.slidersH,
color: Colors.black,
),
)
],
),
])),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: _activeLocation != 0
? null
: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => FilterDatePage(
outPatientFilterType: outPatientFilterType,
patientSearchViewModel: model,
)));
},
),
onChanged: (String str) {
model.searchData(str);
}),
Positioned(
right: 25,
child: IconButton(
icon: Icon(
isSortDes ? FontAwesomeIcons.sortAmountDown : FontAwesomeIcons.sortAmountUp,
color: Colors.black,
),
iconSize: 20,
padding: EdgeInsets.only(bottom: 30),
onPressed: () {
model.sortOutPatient(isDes: isSortDes);
isSortDes = !isSortDes;
},
),
)
],
),
])),
SizedBox(
height: 10.0,
),
@ -283,8 +255,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
child: model.filterData.isEmpty
? Center(
child: ErrorMessage(
error: TranslationBase.of(context)
.youDontHaveAnyPatient,
error: TranslationBase.of(context).youDontHaveAnyPatient,
),
)
: ListView.builder(
@ -293,11 +264,8 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
itemCount: model.filterData.length,
itemBuilder: (BuildContext ctxt, int index) {
if (_activeLocation != 0 ||
(model.filterData[index].patientStatusType !=
null &&
model.filterData[index]
.patientStatusType ==
43))
(model.filterData[index].patientStatusType != null &&
model.filterData[index].patientStatusType == 43))
return Padding(
padding: EdgeInsets.all(8.0),
child: PatientCard(
@ -308,20 +276,16 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
isInpatient: widget.isInpatient,
onTap: () {
// TODO change the parameter to daynamic
Navigator.of(context).pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": model.filterData[index],
"patientType": "1",
"from": widget
.patientSearchRequestModel.from,
"to": widget
.patientSearchRequestModel.from,
"isSearch": false,
"isInpatient": false,
"arrivalType": "7",
"isSearchAndOut": false,
});
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": model.filterData[index],
"patientType": "1",
"from": widget.patientSearchRequestModel.from,
"to": widget.patientSearchRequestModel.from,
"isSearch": false,
"isInpatient": false,
"arrivalType": "7",
"isSearchAndOut": false,
});
},
// isFromSearch: widget.isSearch,
),

@ -35,9 +35,9 @@ class MedicalReportPage extends StatelessWidget {
return BaseView<PatientMedicalReportViewModel>(
onModelReady: (model) async {
await model.getMedicalReportList(patient);
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
// if (model.state == ViewState.ErrorLocal) {
// DrAppToastMsg.showErrorToast(model.error);
// }
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
@ -73,18 +73,16 @@ class MedicalReportPage extends StatelessWidget {
),
AddNewOrder(
onTap: () {
if (model.hasOnHold()) {
Helpers.showErrorToast(
"Please Verified the on hold report to be able to add new one");
} else {
Navigator.of(context)
.pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD
});
}
// if (model.hasOnHold()) {
// Helpers.showErrorToast("Please Verified the on hold report to be able to add new one");
// } else
Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD
});
},
label: TranslationBase.of(context).createNewMedicalReport,
),
@ -94,33 +92,27 @@ class MedicalReportPage extends StatelessWidget {
(index) => InkWell(
onTap: () {
if (model.medicalReportList[index].status == 1) {
Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_INSERT,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'medicalReport': model.medicalReportList[index]
});
Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'medicalReport': model.medicalReportList[index]
});
} else {
Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_DETAIL,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD,
'medicalReport': model.medicalReportList[index]
});
Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_DETAIL, arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD,
'medicalReport': model.medicalReportList[index]
});
}
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 8),
child: CardWithBgWidget(
hasBorder: false,
bgColor: model.medicalReportList[index].status == 1
? Color(0xFFCC9B14)
: Colors.green[700],
bgColor: model.medicalReportList[index].status == 1 ? Color(0xFFCC9B14) : Colors.green[700],
widget: Column(
children: [
Row(
@ -132,11 +124,8 @@ class MedicalReportPage extends StatelessWidget {
AppText(
model.medicalReportList[index].status == 1
? TranslationBase.of(context).onHold
: TranslationBase.of(context)
.verified,
color: model.medicalReportList[index]
.status ==
1
: TranslationBase.of(context).verified,
color: model.medicalReportList[index].status == 1
? Color(0xFFCC9B14)
: Colors.green[700],
fontSize: 1.4 * SizeConfig.textMultiplier,
@ -144,10 +133,8 @@ class MedicalReportPage extends StatelessWidget {
),
AppText(
projectViewModel.isArabic
? model.medicalReportList[index]
.doctorNameN
: model.medicalReportList[index]
.doctorName,
? model.medicalReportList[index].doctorNameN
: model.medicalReportList[index].doctorName,
fontSize: 1.9 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
@ -177,16 +164,12 @@ class MedicalReportPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(
left: 0, top: 4, right: 8, bottom: 0),
margin: EdgeInsets.only(left: 0, top: 4, right: 8, bottom: 0),
child: LargeAvatar(
name: projectViewModel.isArabic
? model.medicalReportList[index]
.doctorNameN
: model.medicalReportList[index]
.doctorName,
url: model.medicalReportList[index]
.doctorImageURL,
? model.medicalReportList[index].doctorNameN
: model.medicalReportList[index].doctorName,
url: model.medicalReportList[index].doctorImageURL,
),
width: 50,
height: 50,
@ -194,27 +177,20 @@ class MedicalReportPage extends StatelessWidget {
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
projectViewModel.isArabic
? model.medicalReportList[index]
.projectNameN
: model.medicalReportList[index]
.projectName,
fontSize:
1.6 * SizeConfig.textMultiplier,
? model.medicalReportList[index].projectNameN
: model.medicalReportList[index].projectName,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0xFF2E303A),
),
AppText(
projectViewModel.isArabic
? model.medicalReportList[index]
.clinicNameN
: model.medicalReportList[index]
.clinicName,
fontSize:
1.6 * SizeConfig.textMultiplier,
? model.medicalReportList[index].clinicNameN
: model.medicalReportList[index].clinicName,
fontSize: 1.6 * SizeConfig.textMultiplier,
color: Color(0xFF2E303A),
),
],
@ -227,10 +203,7 @@ class MedicalReportPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.end,
children: [
Icon(
model.medicalReportList[index].status ==
1
? DoctorApp.edit_1
:EvaIcons.eye ,
model.medicalReportList[index].status == 1 ? DoctorApp.edit_1 : EvaIcons.eye,
),
],
),

@ -35,8 +35,7 @@ class PatientProfileScreen extends StatefulWidget {
_PatientProfileScreenState createState() => _PatientProfileScreenState();
}
class _PatientProfileScreenState extends State<PatientProfileScreen>
with SingleTickerProviderStateMixin {
class _PatientProfileScreenState extends State<PatientProfileScreen> with SingleTickerProviderStateMixin {
PatiantInformtion patient;
bool isFromSearch = false;
@ -56,8 +55,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
int _activeTab = 0;
StreamController<String> videoCallDurationStreamController;
Stream<String> videoCallDurationStream = (() async*{})();
Stream<String> videoCallDurationStream = (() async* {})();
@override
void initState() {
_tabController = TabController(length: 2, vsync: this);
@ -93,10 +91,10 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
if (routeArgs.containsKey("isSearchAndOut")) {
isSearchAndOut = routeArgs['isSearchAndOut'];
}
if(routeArgs.containsKey("isFromLiveCare")) {
if (routeArgs.containsKey("isFromLiveCare")) {
isFromLiveCare = routeArgs['isFromLiveCare'];
}
if(routeArgs.containsKey("isCallFinished")) {
if (routeArgs.containsKey("isCallFinished")) {
isCallFinished = routeArgs['isCallFinished'];
}
if (isInpatient)
@ -106,7 +104,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
}
StreamSubscription callTimer;
callConnected(){
callConnected() {
callTimer = CountdownTimer(Duration(minutes: 90), Duration(seconds: 1)).listen(null)
..onDone(() {
callTimer.cancel();
@ -117,7 +115,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
});
}
callDisconnected(){
callDisconnected() {
callTimer.cancel();
videoCallDurationStreamController.sink.add(null);
@ -130,40 +128,38 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
return BaseView<LiveCarePatientViewModel>(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false,
body: Column(
children: [
Stack(
children: [
Column(
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false,
body: Column(
children: [
Stack(
children: [
Column(
children: [
PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType,
videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null && patient.patientStatusType == 43)
? 210
: isDischargedPatient
? 240
: 0,
isDischargedPatient: isDischargedPatient),
Container(
height: !isSearchAndOut
? isDischargedPatient
? MediaQuery.of(context).size.height * 0.64
: MediaQuery.of(context).size.height * 0.65
: MediaQuery.of(context).size.height * 0.69,
child: ListView(
children: [
PatientProfileHeaderNewDesignAppBar(
patient, arrivalType ?? '0', patientType,
videoCallDurationStream: videoCallDurationStream,
isInpatient: isInpatient,
isFromLiveCare: isFromLiveCare,
height: (patient.patientStatusType != null &&
patient.patientStatusType == 43)
? 210
: isDischargedPatient
? 240
: 0,
isDischargedPatient: isDischargedPatient),
Container(
height: !isSearchAndOut
? isDischargedPatient
? MediaQuery.of(context).size.height * 0.64
: MediaQuery.of(context).size.height * 0.65
: MediaQuery.of(context).size.height * 0.69,
child: ListView(
children: [
Container(
child: isSearchAndOut
? ProfileGridForSearch(
patient: patient,
child: isSearchAndOut
? ProfileGridForSearch(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
isInpatient: isInpatient,
@ -178,8 +174,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
isInpatient: isInpatient,
from: from,
to: to,
isDischargedPatient:
isDischargedPatient,
isDischargedPatient: isDischargedPatient,
isFromSearch: isFromSearch,
)
: ProfileGridForOther(
@ -202,8 +197,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
),
if (isFromLiveCare
? patient.episodeNo != null
: patient.patientStatusType != null &&
patient.patientStatusType == 43)
: patient.patientStatusType != null && patient.patientStatusType == 43)
BaseView<SOAPViewModel>(
onModelReady: (model) async {},
builder: (_, model, w) => Positioned(
@ -231,156 +225,139 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
icon: Image.asset(
"assets/images/create-episod.png",
color: Colors.white,
height: 30,
),
onPressed: () async {
if ((isFromLiveCare && patient.appointmentNo != null ) || patient.patientStatusType == 43) {
PostEpisodeReqModel
postEpisodeReqModel =
PostEpisodeReqModel(
appointmentNo:
int.parse(patient.appointmentNo.toString()),
patientMRN:
patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(
context);
await model.postEpisode(
postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(
context);
patient.episodeNo =
model.episodeID;
Navigator.of(context).pushNamed(
CREATE_EPISODE,
arguments: {
'patient': patient
});
}
},
),
if (patient.episodeNo != 0)
AppButton(
title:
"${TranslationBase
.of(context)
.update}\n${TranslationBase
.of(context)
.episode}",
color:
isFromLiveCare
? Colors.red.shade700
: patient.patientStatusType ==
43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
hPadding: 20,
fontWeight: FontWeight.normal,
fontSize: 1.6,
icon: Image.asset(
"assets/images/modilfy-episode.png",
color: Colors.white,
height: 30,
),
onPressed: () {
if ((isFromLiveCare && patient.appointmentNo != null && patient.appointmentNo != 0) ||
patient.patientStatusType ==
43) {
Navigator.of(context).pushNamed(
UPDATE_EPISODE,
arguments: {
'patient': patient
});
}
}),
],
height: 30,
),
onPressed: () async {
if ((isFromLiveCare && patient.appointmentNo != null) ||
patient.patientStatusType == 43) {
PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel(
appointmentNo: int.parse(patient.appointmentNo.toString()),
patientMRN: patient.patientMRN);
GifLoaderDialogUtils.showMyDialog(context);
await model.postEpisode(postEpisodeReqModel);
GifLoaderDialogUtils.hideDialog(context);
patient.episodeNo = model.episodeID;
Navigator.of(context)
.pushNamed(CREATE_EPISODE, arguments: {'patient': patient});
}
},
),
)),
],
),
],
),
bottomSheet: isFromLiveCare ? Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
if (patient.episodeNo != 0)
AppButton(
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: isFromLiveCare
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700
: Colors.grey.shade700,
fontColor: Colors.white,
vPadding: 8,
radius: 30,
hPadding: 20,
fontWeight: FontWeight.normal,
fontSize: 1.6,
icon: Image.asset(
"assets/images/modilfy-episode.png",
color: Colors.white,
height: 30,
),
onPressed: () {
if ((isFromLiveCare &&
patient.appointmentNo != null &&
patient.appointmentNo != 0) ||
patient.patientStatusType == 43) {
Navigator.of(context)
.pushNamed(UPDATE_EPISODE, arguments: {'patient': patient});
}
}),
],
),
)),
],
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
],
),
bottomSheet: isFromLiveCare
? Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
fontWeight: FontWeight.w700,
color: isCallFinished?Colors.red[600]:Colors.green[600],
title: isCallFinished?
TranslationBase.of(context).endCall:
TranslationBase.of(context).initiateCall,
disabled: isCallStarted || model.state == ViewState.BusyLocal,
onPressed: () async {
// Navigator.push(context, MaterialPageRoute(
// builder: (BuildContext context) =>
// EndCallScreen(patient:patient)));
if(isCallFinished) {
Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => EndCallScreen(patient:patient)));
} else {
GifLoaderDialogUtils.showMyDialog(context);
await model.startCall( isReCall : false, vCID: patient.vcId);
if(model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
await model.getDoctorProfile();
patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
patient.episodeNo = 0;
setState(() {
isCallStarted = true;
});
GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, model.startCallRes.isRecording, callConnected, callDisconnected);
});
}
}
// AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
// locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
// });
height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
fontWeight: FontWeight.w700,
color: isCallFinished ? Colors.red[600] : Colors.green[600],
title: isCallFinished
? TranslationBase.of(context).endCall
: TranslationBase.of(context).initiateCall,
disabled: isCallStarted || model.state == ViewState.BusyLocal,
onPressed: () async {
// Navigator.push(context, MaterialPageRoute(
// builder: (BuildContext context) =>
// EndCallScreen(patient:patient)));
if (isCallFinished) {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => EndCallScreen(patient: patient)));
} else {
GifLoaderDialogUtils.showMyDialog(context);
await model.startCall(isReCall: false, vCID: patient.vcId);
if (model.state == ViewState.ErrorLocal) {
GifLoaderDialogUtils.hideDialog(context);
Helpers.showErrorToast(model.error);
} else {
await model.getDoctorProfile();
patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
patient.episodeNo = 0;
setState(() {
isCallStarted = true;
});
GifLoaderDialogUtils.hideDialog(context);
AppPermissionsUtils.requestVideoCallPermission(
context: context,
onTapGrant: () {
locator<VideoCallService>()
.openVideo(model.startCallRes, patient, model.startCallRes.isRecording, callConnected, callDisconnected);
});
}
}
},
// AppPermissionsUtils.requestVideoCallPermission(
// context: context,
// onTapGrant: () {
// locator<VideoCallService>()
// .openVideo(model.startCallRes, patient, true, callConnected, callDisconnected);
// });
},
),
),
),
),
),
),
SizedBox(
height: 5,
SizedBox(
height: 5,
),
],
),
],
),
) : null,
),
)
: null,
),
);
}
}
@ -394,12 +371,7 @@ class AvatarWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.08), offset: Offset(0.0, 5.0), blurRadius: 16.0)],
borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC),
),

@ -36,7 +36,8 @@ class UpdateObjectivePage extends StatefulWidget {
this.changePageViewIndex,
this.mySelectedExamination,
this.patientInfo,
this.changeLoadingState, this.currentIndex});
this.changeLoadingState,
this.currentIndex});
@override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -45,8 +46,7 @@ class UpdateObjectivePage extends StatefulWidget {
class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
bool isSysExaminationExpand = false;
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
@ -61,98 +61,89 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
widget.mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()));
onModelReady: (model) async {
widget.mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel = GetPhysicalExamReqModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()));
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) {
await model
.getMasterLookup(MasterKeysService.PhysicalExamination);
}
model.patientPhysicalExamList.forEach((element) {
MasterKeyModel examMaster = model.getOneMasterKey(
masterKeys: MasterKeysService.PhysicalExamination,
id: element.examId,
);
MySelectedExamination tempEam = MySelectedExamination(
selectedExamination: examMaster,
remark: element.remarks,
isNormal: element.isNormal,
createdBy: element.createdBy,
notExamined: element.notExamined,
isNew: element.isNew,
isAbnormal: element.isAbnormal);
widget.mySelectedExamination.add(tempEam);
});
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
model.patientPhysicalExamList.forEach((element) {
MasterKeyModel examMaster = model.getOneMasterKey(
masterKeys: MasterKeysService.PhysicalExamination,
id: element.examId,
);
MySelectedExamination tempEam = MySelectedExamination(
selectedExamination: examMaster,
remark: element.remarks,
isNormal: element.isNormal,
createdBy: element.createdBy,
notExamined: element.notExamined,
isNew: element.isNew,
isAbnormal: element.isAbnormal);
widget.mySelectedExamination.add(tempEam);
});
}
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SOAPStepHeader(
currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle:
TranslationBase.of(context).physicalSystemExamination,
onTap: () {
setState(() {
isSysExaminationExpand = !isSysExaminationExpand;
});
},
child: Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addExamination}",onTap: () {
openExaminationList(context);
},),
Column(
children:
widget.mySelectedExamination.map((examination) {
return ExaminationItemCard(examination, () {
removeExamination(
examination.selectedExamination);
});
}).toList(),
)
],
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).physicalSystemExamination,
onTap: () {
setState(() {
isSysExaminationExpand = !isSysExaminationExpand;
});
},
child: Column(
children: [
SOAPOpenItems(
label: "${TranslationBase.of(context).addExamination}",
onTap: () {
openExaminationList(context);
},
),
Column(
children: widget.mySelectedExamination.map((examination) {
return ExaminationItemCard(examination, () {
removeExamination(examination.selectedExamination);
});
}).toList(),
)
],
),
isExpanded: isSysExaminationExpand,
),
isExpanded: isSysExaminationExpand,
),
SizedBox(height: MediaQuery
.of(context)
.size
.height * 0.12,)
],
SizedBox(
height: MediaQuery.of(context).size.height * 0.12,
)
],
),
),
),
),
),
bottomSheet:
Container(
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: 80,
width: double.infinity,
@ -161,50 +152,48 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
)
,
),
SizedBox(width: 5,),
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 5,
),
),
],
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
),
),
),
),),
),
SizedBox(
height: 5,
),
],
),)
),
),
)),
);
}
@ -213,40 +202,36 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostPhysicalExamRequestModel postPhysicalExamRequestModel =
new PostPhysicalExamRequestModel();
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
[];
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = [];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
.add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
: exam.isAbnormal
? 2
: 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '',
createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
examId: exam.selectedExamination.id,
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
: exam.isAbnormal
? 2
: 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
});
if (model.patientPhysicalExamList.isEmpty) {
@ -268,10 +253,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
}
removeExamination(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> history = widget.mySelectedExamination
.where((element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
Iterable<MySelectedExamination> history = widget.mySelectedExamination.where((element) =>
masterKey.id == element.selectedExamination.id && masterKey.typeId == element.selectedExamination.typeId);
if (history.length > 0)
setState(() {
@ -316,11 +299,7 @@ class AddExaminationDailog extends StatefulWidget {
final Function addSelectedExamination;
final Function(MasterKeyModel) removeExamination;
const AddExaminationDailog(
{Key key,
this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination})
const AddExaminationDailog({Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination})
: super(key: key);
@override
@ -335,8 +314,7 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model
.getMasterLookup(MasterKeysService.PhysicalExamination);
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) => AppScaffold(
@ -346,21 +324,19 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: Container(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
]),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold,
fontSize: 16,
),
SizedBox(
height: 16,
),
]),
))),
)),
);

@ -45,11 +45,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
bool isAddProgress = true;
bool isProgressExpanded = true;
TextEditingController progressNoteController =
TextEditingController(text: null);
TextEditingController progressNoteController = TextEditingController(text: null);
BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor) {
BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
@ -64,33 +62,32 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
@override
void initState() {
super.initState();
if(widget.patientProgressNote.planNote !=null ){
if (widget.patientProgressNote.planNote != null) {
setState(() {
isAddProgress = false;
});
}
}
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel(
appointmentNo: int.parse(widget.patientInfo.appointmentNo),
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(), editedBy: '', doctorID: '');
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel(
appointmentNo: int.parse(widget.patientInfo.appointmentNo),
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '',
doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers
.parseHtmlString(model.patientProgressNoteList[0].planNote);
widget.patientProgressNote.planNote = progressNoteController.text;
widget.patientProgressNote.createdByName = model.patientProgressNoteList[0].createdByName;
widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn;
widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn;
widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName;
progressNoteController.text = Helpers.parseHtmlString(model.patientProgressNoteList[0].planNote);
widget.patientProgressNote.planNote = progressNoteController.text;
widget.patientProgressNote.createdByName = model.patientProgressNoteList[0].createdByName;
widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn;
widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn;
widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName;
setState(() {
isAddProgress = false;
});
@ -98,267 +95,254 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.90,
child: Column(
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
SizedBox(height: 10,),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).progressNote
,
onTap: () {
setState(() {
isProgressExpanded = !isProgressExpanded;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(isAddProgress)
Container(
margin:
EdgeInsets.only(left: 10, right: 10, top: 15),
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).progressNote,
controller: progressNoteController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
widget.patientProgressNote.planNote = value;
},
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
isShowAppBar: false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.90,
child: Column(
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex: widget.changePageViewIndex),
SizedBox(
height: 10,
),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).progressNote,
onTap: () {
setState(() {
isProgressExpanded = !isProgressExpanded;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (isAddProgress)
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).progressNote,
controller: progressNoteController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value) {
widget.patientProgressNote.planNote = value;
},
),
),
SizedBox(
height: 9,
),
SizedBox(
height: 9,
),
if ( widget.patientProgressNote.planNote != null&& !isAddProgress)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText('Appointment No: ',fontSize: 12,),
AppText(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,),
],
),
AppText(
widget.patientProgressNote.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w600,
fontSize: 14,
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText('Condition: ',
fontSize: 12,),
AppText(
widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
],
),
AppText(
widget.patientProgressNote.createdOn !=null?AppDateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: AppText(
progressNoteController.text,
fontSize: 10,
if (widget.patientProgressNote.planNote != null && !isAddProgress)
Container(
margin: EdgeInsets.only(
left: 5,
right: 5,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
'Appointment No: ',
fontSize: 12,
),
AppText(
widget.patientProgressNote.appointmentNo ?? '',
fontWeight: FontWeight.w600,
),
],
),
),
InkWell(
onTap: (){
setState(() {
isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
});
},
child: Icon(DoctorApp.edit,size: 18,))
],
),
],
),
)
],
),
],
AppText(
widget.patientProgressNote.createdOn != null
? AppDateUtils.getDayMonthYearDateFormatted(
DateTime.parse(widget.patientProgressNote.createdOn))
: AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
'Condition: ',
fontSize: 12,
),
AppText(widget.patientProgressNote.mName ?? '',
fontWeight: FontWeight.w600),
],
),
AppText(
widget.patientProgressNote.createdOn != null
? AppDateUtils.getHour(
DateTime.parse(widget.patientProgressNote.createdOn))
: AppDateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: AppText(
progressNoteController.text,
fontSize: 10,
),
),
InkWell(
onTap: () {
setState(() {
isAddProgress = true;
widget.changePageViewIndex(3, isChangeState: false);
});
},
child: Icon(
DoctorApp.edit,
size: 18,
))
],
),
],
),
)
],
),
],
),
isExpanded: isProgressExpanded,
),
isExpanded: isProgressExpanded,
),
],
],
),
),
),
),
),
bottomSheet:
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
),
height: 80,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(2);
},
)
,
),
SizedBox(width: 5,),
Expanded(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
disabled: progressNoteController.text.isEmpty,
onPressed: () async {
if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) {
Map profile =
await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile =
DoctorProfileModel.fromJson(profile);
setState(() {
widget.patientProgressNote.createdByName =
widget.patientProgressNote
.createdByName ??
doctorProfile.doctorName;
widget.patientProgressNote.editedByName =
doctorProfile.doctorName;
widget.patientProgressNote.createdOn =
DateTime.now().toString();
widget.patientProgressNote.planNote =
progressNoteController.text;
isAddProgress = !isAddProgress;
});
submitPlan(model);
} else {
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast(TranslationBase.of(context)
.progressNoteErrorMsg);
}
},
),
),
],
),
),
),),
SizedBox(
height: 5,
),
],
),)
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: 80,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(2);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
disabled: progressNoteController.text.isEmpty,
onPressed: () async {
if (progressNoteController.text.isNotEmpty) {
if (isAddProgress) {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
setState(() {
widget.patientProgressNote.createdByName =
widget.patientProgressNote.createdByName ?? doctorProfile.doctorName;
widget.patientProgressNote.editedByName = doctorProfile.doctorName;
widget.patientProgressNote.createdOn = DateTime.now().toString();
widget.patientProgressNote.planNote = progressNoteController.text;
isAddProgress = !isAddProgress;
});
submitPlan(model);
} else {
Navigator.of(context).pop();
}
} else {
Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);
}
},
),
),
],
),
),
),
),
SizedBox(
height: 5,
),
],
),
)),
);
}
submitPlan(SOAPViewModel model) async {
submitPlan(SOAPViewModel model) async {
if (progressNoteController.text.isNotEmpty) {
PostProgressNoteRequestModel postProgressNoteRequestModel = new PostProgressNoteRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
planNote: widget.patientProgressNote.planNote, doctorID: '', editedBy: '');
planNote: widget.patientProgressNote.planNote,
doctorID: '',
editedBy: '');
if(model.patientProgressNoteList.isEmpty){
if (model.patientProgressNoteList.isEmpty) {
await model.postProgressNote(postProgressNoteRequestModel);
}else {
} else {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
postProgressNoteRequestModel.editedBy =doctorProfile.doctorID;
postProgressNoteRequestModel.editedBy = doctorProfile.doctorID;
await model.patchProgressNote(postProgressNoteRequestModel);
}
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
} else {
widget.changePageViewIndex(4,isChangeState:false);
widget.changePageViewIndex(4, isChangeState: false);
}
} else {
Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);
}
}
}

@ -33,14 +33,16 @@ class UpdateSubjectivePage extends StatefulWidget {
final List<MySelectedAllergy> myAllergiesList;
final List<MySelectedHistory> myHistoryList;
final PatiantInformtion patientInfo;
final int currentIndex;
final int currentIndex;
UpdateSubjectivePage(
{Key key,
this.changePageViewIndex,
this.myAllergiesList,
this.myHistoryList,
this.patientInfo, this.changeLoadingState, this.currentIndex});
this.patientInfo,
this.changeLoadingState,
this.currentIndex});
@override
_UpdateSubjectivePageState createState() => _UpdateSubjectivePageState();
@ -67,7 +69,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
doctorID: '',
editedBy: '');
await model.getPatientHistories(getHistoryReqModel,isFirst: true);
await model.getPatientHistories(getHistoryReqModel, isFirst: true);
if (model.patientHistoryList.isNotEmpty) {
if (model.historyFamilyList.isEmpty) {
@ -84,62 +86,50 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}
model.patientHistoryList.forEach((element) {
if (element.historyType ==
MasterKeysService.HistoryFamily.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistoryFamily.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistoryFamily,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
}
if (element.historyType ==
MasterKeysService.HistoryMedical.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistoryMedical.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistoryMedical,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
}
if (element.historyType ==
MasterKeysService.HistorySports.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistorySports.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistorySports,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
}
if (element.historyType ==
MasterKeysService.HistorySurgical.getMasterKeyService()) {
if (element.historyType == MasterKeysService.HistorySurgical.getMasterKeyService()) {
MasterKeyModel history = model.getOneMasterKey(
masterKeys: MasterKeysService.HistorySurgical,
id: element.historyId,
);
if (history != null) {
MySelectedHistory mySelectedHistory = MySelectedHistory(
selectedHistory: history,
isChecked: element.isChecked,
remark: element.remarks);
MySelectedHistory mySelectedHistory =
MySelectedHistory(selectedHistory: history, isChecked: element.isChecked, remark: element.remarks);
widget.myHistoryList.add(mySelectedHistory);
}
@ -157,23 +147,18 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP);
if (model.patientAllergiesList.isNotEmpty) {
if (model.allergiesList.isEmpty)
await model.getMasterLookup(MasterKeysService.Allergies);
if (model.allergySeverityList.isEmpty)
await model.getMasterLookup(MasterKeysService.AllergySeverity);
if (model.allergiesList.isEmpty) await model.getMasterLookup(MasterKeysService.Allergies);
if (model.allergySeverityList.isEmpty) await model.getMasterLookup(MasterKeysService.AllergySeverity);
model.patientAllergiesList.forEach((element) {
MasterKeyModel selectedAllergy = model.getOneMasterKey(
masterKeys: MasterKeysService.Allergies,
id: element.allergyDiseaseId,
typeId: element.allergyDiseaseType);
masterKeys: MasterKeysService.Allergies, id: element.allergyDiseaseId, typeId: element.allergyDiseaseType);
MasterKeyModel selectedAllergySeverity;
if (element.severity == 0) {
selectedAllergySeverity = MasterKeyModel(
id: 0,
typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: '');
id: 0, typeId: MasterKeysService.AllergySeverity.getMasterKeyService(), nameAr: '', nameEn: '');
} else {
selectedAllergySeverity = model.getOneMasterKey(
selectedAllergySeverity = model.getOneMasterKey(
masterKeys: MasterKeysService.AllergySeverity,
id: element.severity,
);
@ -185,8 +170,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
createdBy: element.createdBy,
remark: element.remarks,
selectedAllergySeverity: selectedAllergySeverity);
if (selectedAllergy != null && selectedAllergySeverity != null)
widget.myAllergiesList.add(mySelectedAllergy);
if (selectedAllergy != null && selectedAllergySeverity != null) widget.myAllergiesList.add(mySelectedAllergy);
});
}
}
@ -198,33 +182,30 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.myAllergiesList.clear();
widget.myHistoryList.clear();
GetChiefComplaintReqModel getChiefComplaintReqModel =
GetChiefComplaintReqModel(
patientMRN: widget.patientInfo.patientMRN,
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo,
doctorID: '');
GetChiefComplaintReqModel getChiefComplaintReqModel = GetChiefComplaintReqModel(
patientMRN: widget.patientInfo.patientMRN,
appointmentNo: int.parse(widget.patientInfo.appointmentNo.toString()),
episodeId: widget.patientInfo.episodeNo,
episodeID: widget.patientInfo.episodeNo,
doctorID: '');
await model.getPatientChiefComplaint(getChiefComplaintReqModel);
if (model.patientChiefComplaintList.isNotEmpty) {
isChiefExpand = true;
complaintsController.text = Helpers.parseHtmlString(
model.patientChiefComplaintList[0].chiefComplaint);
complaintsController.text = Helpers.parseHtmlString(model.patientChiefComplaintList[0].chiefComplaint);
illnessController.text = model.patientChiefComplaintList[0].hopi;
medicationController.text =!(model.patientChiefComplaintList[0].currentMedication).isNotEmpty ? model.patientChiefComplaintList[0].currentMedication + '\n \n':model.patientChiefComplaintList[0].currentMedication;
medicationController.text = !(model.patientChiefComplaintList[0].currentMedication).isNotEmpty
? model.patientChiefComplaintList[0].currentMedication + '\n \n'
: model.patientChiefComplaintList[0].currentMedication;
}
await getHistory(model);
await getAllergies(model);
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -234,12 +215,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context)
.chiefComplaints
,
headerTitle: TranslationBase.of(context).chiefComplaints,
onTap: () {
setState(() {
isChiefExpand = !isChiefExpand;
@ -259,12 +237,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox(
height: 30,
),
ExpandableSOAPWidget(
headerTitle: TranslationBase
.of(context)
.histories,
headerTitle: TranslationBase.of(context).histories,
isRequired: false,
onTap: () {
setState(() {
@ -272,22 +246,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
});
},
child: Column(
children: [
UpdateHistoryWidget(myHistoryList: widget.myHistoryList)
],
children: [UpdateHistoryWidget(myHistoryList: widget.myHistoryList)],
),
isExpanded: isHistoryExpand,
),
SizedBox(
height: 30,
),
ExpandableSOAPWidget(
headerTitle: TranslationBase
.of(context)
.allergiesSoap
,
headerTitle: TranslationBase.of(context).allergiesSoap,
isRequired: false,
onTap: () {
setState(() {
@ -296,8 +263,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
},
child: Column(
children: [
UpdateAllergiesWidget(myAllergiesList: widget
.myAllergiesList,),
UpdateAllergiesWidget(
myAllergiesList: widget.myAllergiesList,
),
SizedBox(
height: 30,
),
@ -306,7 +274,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
isExpanded: isAllergiesExpand,
),
SizedBox(
height:MediaQuery.of(context).size.height * 0.16,
height: MediaQuery.of(context).size.height * 0.16,
),
],
),
@ -319,9 +287,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: 80,
width: double.infinity,
@ -330,38 +296,35 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox(
height: 10,
),
Container(child:
FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color:Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(
model: model,
myAllergiesList: widget.myAllergiesList,
myHistoryList: widget.myHistoryList);
},
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(
model: model, myAllergiesList: widget.myAllergiesList, myHistoryList: widget.myHistoryList);
},
),
),
),
),),
),
SizedBox(
height: 5,
),
],
),),
),
),
),
);
}
addSubjectiveInfo({SOAPViewModel model,
List<MySelectedAllergy> myAllergiesList,
List<MySelectedHistory> myHistoryList}) async {
addSubjectiveInfo(
{SOAPViewModel model, List<MySelectedAllergy> myAllergiesList, List<MySelectedHistory> myHistoryList}) async {
formKey.currentState.save();
formKey.currentState.validate();
@ -391,66 +354,49 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.changeLoadingState(true);
widget.changePageViewIndex(1);
} else {
setState(() {
if (complaintsController.text.isEmpty) {
complaintsControllerError = TranslationBase
.of(context)
.emptyMessage;
complaintsControllerError = TranslationBase.of(context).emptyMessage;
} else if (complaintsController.text.length < 25) {
complaintsControllerError = TranslationBase
.of(context)
.chiefComplaintLength;
complaintsControllerError = TranslationBase.of(context).chiefComplaintLength;
}
if (illnessController.text.isEmpty) {
illnessControllerError = TranslationBase
.of(context)
.emptyMessage;
illnessControllerError = TranslationBase.of(context).emptyMessage;
}
if (medicationController.text.isEmpty) {
medicationControllerError = TranslationBase
.of(context)
.emptyMessage;
medicationControllerError = TranslationBase.of(context).emptyMessage;
}
});
Helpers.showErrorToast(TranslationBase
.of(context)
.chiefComplaintErrorMsg);
Helpers.showErrorToast(TranslationBase.of(context).chiefComplaintErrorMsg);
}
}
postAllergy(
{List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async {
PostAllergyRequestModel postAllergyRequestModel =
new PostAllergyRequestModel();
postAllergy({List<MySelectedAllergy> myAllergiesList, SOAPViewModel model}) async {
PostAllergyRequestModel postAllergyRequestModel = new PostAllergyRequestModel();
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
widget.myAllergiesList.forEach((allergy) {
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
null)
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == null)
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: allergy.createdBy??doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
isChecked: allergy.isChecked,
isUpdatedByNurse: false));
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id,
allergyDiseaseType: allergy.selectedAllergy.typeId,
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
severity: allergy.selectedAllergySeverity.id,
remarks: allergy.remark,
createdBy: allergy.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(),
isChecked: allergy.isChecked,
isUpdatedByNurse: false));
});
if (model.patientAllergiesList.isEmpty) {
await model.postAllergy(postAllergyRequestModel);
@ -464,20 +410,17 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
appointmentNo: widget.patientInfo.appointmentNo,
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy : true);
await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy: true);
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
}
postHistories(
{List<MySelectedHistory> myHistoryList, SOAPViewModel model}) async {
PostHistoriesRequestModel postHistoriesRequestModel =
new PostHistoriesRequestModel(doctorID: '');
postHistories({List<MySelectedHistory> myHistoryList, SOAPViewModel model}) async {
PostHistoriesRequestModel postHistoriesRequestModel = new PostHistoriesRequestModel(doctorID: '');
widget.myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = [];
if (postHistoriesRequestModel.listMedicalHistoryVM == null) postHistoriesRequestModel.listMedicalHistoryVM = [];
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
@ -489,14 +432,12 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
));
});
if (model.patientHistoryList.isEmpty) {
await model.postHistories(postHistoriesRequestModel);
} else {
await model.patchHistories(postHistoriesRequestModel);
}
if (model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error);
}
@ -504,20 +445,18 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
postChiefComplaint({SOAPViewModel model}) async {
formKey.currentState.save();
if(formKey.currentState.validate()){
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
new PostChiefComplaintRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
chiefComplaint: complaintsController.text,
currentMedication: medicationController.text,
hopi: illnessController.text,
isLactation: false,
ispregnant: false,
doctorID: '',
numberOfWeeks: 0);
if (formKey.currentState.validate()) {
PostChiefComplaintRequestModel postChiefComplaintRequestModel = new PostChiefComplaintRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
chiefComplaint: complaintsController.text,
currentMedication: medicationController.text,
hopi: illnessController.text,
isLactation: false,
ispregnant: false,
doctorID: '',
numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) {
postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel);
@ -527,8 +466,3 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}
}
}

@ -592,9 +592,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
child: AppTextFieldCustom(
hintText: TranslationBase.of(context).boxQuantity,
isTextFieldHasSuffix: false,
dropDownText: box != null?
model.boxQuintity.toString()
: null,
dropDownText: box != null ? model.boxQuintity.toString() : null,
enabled: false,
),
),

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save