Merge branch 'development' into 'tasks-translation'

# Conflicts:
#   lib/screens/prescription/add_prescription_form.dart
merge-requests/269/head
hussam alhababieh 5 years ago
commit 3c55af7adc

Binary file not shown.

@ -96,8 +96,9 @@ class BaseAppClient {
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (!parsed['IsAuthenticated']) { if (!parsed['IsAuthenticated']) {
await helpers.logout(); onFailure(getError(parsed), statusCode);
helpers.showErrorToast('Your session expired Please login agian'); //await helpers.logout();
//helpers.showErrorToast('Your session expired Please login agian');
} else if (parsed['MessageStatus'] == 1) { } else if (parsed['MessageStatus'] == 1) {
if (!parsed['IsAuthenticated']) if (!parsed['IsAuthenticated'])
onFailure(getError(parsed), statusCode); onFailure(getError(parsed), statusCode);

@ -7,7 +7,7 @@ const Map<String, Map<String, String>> localizedValues = {
'theDoctor': {'en': 'Doctor', 'ar': 'الطبيب'}, 'theDoctor': {'en': 'Doctor', 'ar': 'الطبيب'},
'reply': {'en': 'Reply', 'ar': 'رد'}, 'reply': {'en': 'Reply', 'ar': 'رد'},
'time': {'en': 'Time', 'ar': 'الوقت'}, 'time': {'en': 'Time', 'ar': 'الوقت'},
'fileNo': {'en': 'File No:', 'ar': 'رقم الملف:'}, 'fileNo': {'en': 'File No : ', 'ar': 'رقم الملف :'},
'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'}, 'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'},
'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'}, 'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'},
'mySchedule': {'en': 'Schedule', 'ar': 'جدولي'}, 'mySchedule': {'en': 'Schedule', 'ar': 'جدولي'},
@ -329,7 +329,7 @@ const Map<String, Map<String, String>> localizedValues = {
'referredFrom': {'en': "Referred From", 'ar': 'محال من'}, 'referredFrom': {'en': "Referred From", 'ar': 'محال من'},
'branch': {'en': "Branch", 'ar': 'الفرع'}, 'branch': {'en': "Branch", 'ar': 'الفرع'},
'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'}, 'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'},
'appointmentNo': {'en': "Appointment #:", 'ar': '# الموعد:'}, 'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'},
'refer': {'en': "REFER", 'ar': 'إحالة'}, 'refer': {'en': "REFER", 'ar': 'إحالة'},
'rejected': {'en': "Rejected", 'ar': 'مرفوض'}, 'rejected': {'en': "Rejected", 'ar': 'مرفوض'},
'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'}, 'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'},
@ -582,14 +582,14 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'searchExamination': {'en': "Search Examination", 'ar': "فحص البحث"}, 'searchExamination': {'en': "Search Examination", 'ar': "فحص البحث"},
'addExamination': {'en': "Add Examination", 'ar': "اضافه"}, 'addExamination': {'en': "Add Examination", 'ar': "اضافه"},
'doc': {'en': "Doc :", 'ar': " د: "}, 'doc': {'en': "Doc : ", 'ar': " د : "},
'patientNoDetailErrMsg': { 'patientNoDetailErrMsg': {
'en': "There is no detail for this patient", 'en': "There is no detail for this patient",
'ar': "لا توجد تفاصيل لهذا المريض" 'ar': "لا توجد تفاصيل لهذا المريض"
}, },
'allergicTO': {'en': "ALLERGIC TO ", 'ar':" حساس من" }, 'allergicTO': {'en': "ALLERGIC TO ", 'ar': " حساس من"},
'normal': {'en': "Normal", 'ar':"عادي" }, 'normal': {'en': "Normal", 'ar': "عادي"},
'abnormal': {'en': "Abnormal", 'ar':" غير عادي" }, 'abnormal': {'en': "Abnormal", 'ar': " غير عادي"},
"systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"},
"diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"},
"mass": {"en": "Mass", "ar": "كتلة"}, "mass": {"en": "Mass", "ar": "كتلة"},
@ -620,19 +620,50 @@ const Map<String, Map<String, String>> localizedValues = {
}, },
'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"}, 'updateProcedure': {'en': "Update Procedure", 'ar': "تحديث العملية"},
'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"}, 'orderProcedure': {'en': "order procedure", 'ar': "طلب العمليات"},
'nameOrICD': {'en': "Name or ICD", 'ar':"الاسم او  ICD" }, 'nameOrICD': {'en': "Name or ICD", 'ar': "الاسم او  ICD"},
'dType': {'en': "Type", 'ar':"النوع" }, 'dType': {'en': "Type", 'ar': "النوع"},
'addAssessmentDetails': {'en': "Add Assessment Details", 'ar':"أضف تفاصيل التقييم" }, 'addAssessmentDetails': {
'progressNoteSOAP': {'en': "Progress Note", 'ar':"ملاحظة التقدم" }, 'en': "Add Assessment Details",
'addProgressNote': {'en': "Add Progress Note", 'ar':"أضف ملاحظة التقدم" }, 'ar': "أضف تفاصيل التقييم"
'createdBy': {'en': "Created By :", 'ar':"أضيفت : " }, },
'editedBy': {'en': "Edited By :", 'ar':"عدلت : " }, 'progressNoteSOAP': {'en': "Progress Note", 'ar': "ملاحظة التقدم"},
'currentMedications': {'en': "Current Medications", 'ar':"الأدوية الحالية" }, 'addProgressNote': {'en': "Add Progress Note", 'ar': "أضف ملاحظة التقدم"},
'noItem': {'en': "No items exists in this list", 'ar':"لا توجد عناصر في هذه القائمة" }, 'createdBy': {'en': "Created By :", 'ar': "أضيفت : "},
'postUcafSuccessMsg': {'en': "UCAF request send successfully", 'ar':"تم ارسال طلب UCAF بنجاح" }, 'editedBy': {'en': "Edited By :", 'ar': "عدلت : "},
'vitalSignDetailEmpty': {'en': "There is no data for this vital sign", 'ar':"لا توجد بيانات لهذه العلامة الحيوية" }, 'currentMedications': {'en': "Current Medications", 'ar': "الأدوية الحالية"},
'assessmentErrorMsg': {'en': "You have to add at least one assessment.", 'ar':"يجب عليك إضافة تقييم واحد على الأقل." }, 'noItem': {
'examinationErrorMsg': {'en': "You have to add at least one examination.", 'ar':"يجب عليك إضافة الفحص واحد على الأقل." }, 'en': "No items exists in this list",
'progressNoteErrorMsg': {'en': "You have to add progress Note.", 'ar':"يجب عليك إضافة ملاحظة التقدم." }, 'ar': "لا توجد عناصر في هذه القائمة"
'chiefComplaintErrorMsg': {'en': "You have to add chief complaint fields correctly .", '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': "يمكنك فقط تطبيق عطلة أو إجازة من تطبيق الهاتف"
},
'active': {'en': "Active", 'ar': "نشيط"},
'hold': {'en': "Hold", 'ar': "معلق"},
'loading': {'en': "Loading...", 'ar': "جار التحميل..."},
'assessmentErrorMsg': {
'en': "You have to add at least one assessment.",
'ar': "يجب عليك إضافة تقييم واحد على الأقل."
},
'examinationErrorMsg': {
'en': "You have to add at least one examination.",
'ar': "يجب عليك إضافة الفحص واحد على الأقل."
},
'progressNoteErrorMsg': {
'en': "You have to add progress Note.",
'ar': "يجب عليك إضافة ملاحظة التقدم."
},
'chiefComplaintErrorMsg': {
'en': "You have to add chief complaint fields correctly .",
'ar': "يجب عليك إضافة حقول شكوى الرئيس بشكل صحيح"
},
}; };

@ -217,7 +217,9 @@ class SOAPService extends LookupService {
await baseAppClient.post (GET_ALLERGY, await baseAppClient.post (GET_ALLERGY,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
print("Success");
patientAllergiesList.clear(); patientAllergiesList.clear();
response['List_Allergies']['entityList'].forEach((v) { response['List_Allergies']['entityList'].forEach((v) {
patientAllergiesList.add(GetAllergiesResModel.fromJson(v)); patientAllergiesList.add(GetAllergiesResModel.fromJson(v));
}); });

@ -120,7 +120,60 @@ class PrescriptionService extends BaseService {
List<PrescriptionModel> prescription) async { List<PrescriptionModel> prescription) async {
Map<String, dynamic> request = { Map<String, dynamic> request = {
"Prescription": { "Prescription": {
"objPatientInfo": {"Gender": patient.gender, "Age": patient.age}, "objPatientInfo": {"Gender": "Male", "Age": "21/06/1967"},
"objVitalSign": {"Height": "180", "Weight": "37"},
"objPrescriptionItems": [
{
"DrugId": "83-20-00-30-20-03-03",
"DrugName": "WARFARIN 1 MG TAB 28'S (N)",
"Dose": "1",
"DoseType": "04",
"Unit": "actuation(s)",
"FrequencyType": "1/3/Day",
"Duration": "3/Day",
"IsScreen": "true"
},
{
"DrugId": "64-20-00-10-00-03-15",
"DrugName": "PANADOL 500 MG TAB 24'S(DIS)",
"Dose": "1",
"DoseType": "04",
"Unit": "MG",
"FrequencyType": "3/1/Day",
"Duration": "4/Day",
"RouteID": "24",
"IsScreen": "true"
}
],
"objAllergies": {
"Allergy": {
"objProperties": {"Id": "26", "Name": "phenoxymethylpenicillin"}
}
},
"objDiagnosis": {
"Diagnosis": {
"objProperties": {"Id": "A01.1", "Name": "Paratyphoid fever A"}
}
},
"IsDoctor": "false",
"IsPharmacist": "false"
},
"IPAdress": "10.10.10.10",
"Channel": 9,
"LanguageID": 2,
"VersionID": 5.3,
"SessionID": "BlUSkYymTt",
"IsLoginForDoctorApp": true,
"PatientOutSA": 0,
"TokenID": "@dm!n",
"OutSA": true
};
Map<String, dynamic> requestN = {
"Prescription": {
"objPatientInfo": {
"Gender": patient.gender == 1 ? 'Male' : 'Female',
"Age": patient.age
},
"objVitalSign": {"Height": vital.heightCm, "Weight": vital.weightKg}, "objVitalSign": {"Height": vital.heightCm, "Weight": vital.weightKg},
"objPrescriptionItems": prescription[0].entityList, "objPrescriptionItems": prescription[0].entityList,
"objAllergies": allergy, "objAllergies": allergy,

@ -100,7 +100,7 @@ class SickLeaveService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: {'PatientMRN': patientMRN}, body: {'PatientMRN': patientMRN, "Status": 0},
); );
} }

@ -237,13 +237,18 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP,
Future getPatientAllergy(GeneralGetReqForSOAP generalGetReqForSOAP) async { {isLocalBusy = false}) async {
if (isLocalBusy) {
setState(ViewState.Busy); setState(ViewState.BusyLocal);
} else
setState(ViewState.Busy);
await _SOAPService.getPatientAllergy(generalGetReqForSOAP); await _SOAPService.getPatientAllergy(generalGetReqForSOAP);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {
error = _SOAPService.error; error = _SOAPService.error;
if (isLocalBusy) {
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Error); setState(ViewState.Error);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);

@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/patient_service.dart'; import 'package:doctor_app_flutter/core/service/patient_service.dart';
import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart'; import 'package:doctor_app_flutter/models/patient/lab_orders/lab_orders_res_model.dart';
import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_report_for_in_patient.dart';
import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart'; import 'package:doctor_app_flutter/models/patient/prescription/prescription_res_model.dart';
@ -56,16 +55,13 @@ class PatientViewModel extends BaseViewModel {
} else { } else {
setState(ViewState.Busy); setState(ViewState.Busy);
} }
return _patientService.getPatientList(patient, patientType);
if (_patientService.hasError) { if (_patientService.hasError) {
error = _patientService.error; error = _patientService.error;
if (isBusyLocal) { setState(ViewState.Error);
setState(ViewState.ErrorLocal); }
} else { return _patientService.getPatientList(patient, patientType);
setState(ViewState.Error);
}
} else
setState(ViewState.Idle);
} }
Future getPatientVitalSign(patient) async { Future getPatientVitalSign(patient) async {

@ -114,18 +114,17 @@ class ProjectViewModel with ChangeNotifier {
} }
void getProfile() async { void getProfile() async {
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
// DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile);
// ProfileReqModel docInfo = new ProfileReqModel( ProfileReqModel docInfo = new ProfileReqModel(
// doctorID: doctorProfile.doctorID, doctorID: doctorProfile.doctorID,
// clinicID: doctorProfile.clinicID, clinicID: doctorProfile.clinicID,
// license: true, license: true,
// projectID: doctorProfile.projectID, projectID: doctorProfile.projectID,
// tokenID: '', );
// languageID: 2);
Provider.of<AuthViewModel>(AppGlobal.CONTEX, listen: false) Provider.of<AuthViewModel>(AppGlobal.CONTEX, listen: false)
.getDocProfiles(ProfileReqModel().toJson()) .getDocProfiles(docInfo.toJson())
.then((res) async { .then((res) async {
sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]); sharedPref.setObj(DOCTOR_PROFILE, res['DoctorProfileList'][0]);
}).catchError((err) { }).catchError((err) {

@ -412,6 +412,20 @@
"leaves" "leaves"
] ]
}, },
{
"uid": "4477771717c5280f9030b8e410040eda",
"css": "search_patient-1",
"code": 59465,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M1142.7 436.8A165.2 165.2 0 1 0 1307.8 601.9 165.4 165.4 0 0 0 1142.7 436.8ZM1142.7 748.8A146.9 146.9 0 1 1 1289.5 601.9 147 147 0 0 1 1142.7 748.8ZM1023.4 611.1H1041.7A110.3 110.3 0 0 1 1151.8 500.9V482.7A128.5 128.5 0 0 0 1023.4 611.1ZM1476.4 883.8L1489.3 870.9 1357.9 739.4 1345 752.4 1322 729.4A219.8 219.8 0 1 0 1270.1 781.5L1293.1 804.5 1280.2 817.4 1411.4 948.7 1424.4 935.7 1306 817.3 1357.9 765.4ZM1142.6 803.9A201.9 201.9 0 1 1 1344.4 602 202.2 202.2 0 0 1 1142.6 803.9ZM1306 791.3L1284.7 770.1A220.1 220.1 0 0 0 1310.7 744.1L1332.1 765.5ZM48.4 483.9H301.4A96.4 96.4 0 0 1 276.7 346.5 305.1 305.1 0 0 1 257.9 242V201.9A201.8 201.8 0 0 1 564.5 29.2 201.8 201.8 0 0 1 871 201.8V205.4L887 177.2 957.1 299.9A80.6 80.6 0 0 1 869.7 417.5 96.9 96.9 0 0 1 785.1 499.2 226.4 226.4 0 0 1 645.1 662.2V696.2L780.4 720.8A267.4 267.4 0 0 1 999.9 983.9V999.9H129V983.9A267.4 267.4 0 0 1 348.6 720.8L483.9 696.2V662.3A224.6 224.6 0 0 1 396.8 602.3C396 602.6 395.1 602.8 394.3 603.1A92.8 92.8 0 0 1 352.9 612.9H48.4A48.4 48.4 0 0 1 0 564.5V532.3A48.4 48.4 0 0 1 48.4 483.9ZM339.5 465.8C339.3 461.1 338.7 456.4 338.7 451.7V341A64.2 64.2 0 0 0 339.5 465.7ZM838.7 242V201.9A169.6 169.6 0 0 0 575.1 60.8L564.5 67.8 554 60.8A169.6 169.6 0 0 0 290.3 201.9V242A273.2 273.2 0 0 0 302.3 322.2 96.2 96.2 0 0 1 338.7 308.1V282.4L403.2 234V193.5A32.3 32.3 0 0 1 435.5 161.3H693.5A32.3 32.3 0 0 1 725.8 193.5V233.9L790.3 282.3V307.8A95.4 95.4 0 0 1 810.8 313.9 78.8 78.8 0 0 1 817 299.9L837.7 263.6C838.3 256.4 838.7 249.2 838.7 242ZM435.5 290.4H693.6V193.5H435.5ZM887.9 387.2A47.6 47.6 0 0 0 929.3 316L887.1 242.2 844.9 315.9A47.6 47.6 0 0 0 887.6 387.1ZM838.8 403.2A79.4 79.4 0 0 1 807.4 348.1 63.2 63.2 0 0 0 790.4 340.9V451.6C790.4 456.4 790 461 789.7 465.7A64.5 64.5 0 0 0 838.7 403.2ZM758.1 451.6V298.4L725.9 274.3V290.4A32.3 32.3 0 0 1 693.6 322.6H435.5A32.3 32.3 0 0 1 403.2 290.4V274.3L370.9 298.4V451.6A195.2 195.2 0 0 0 374.4 486.4 92.8 92.8 0 0 1 394.3 493.6 60.6 60.6 0 0 0 421.2 500H532.2A48.4 48.4 0 1 1 532.2 596.7H436.9A193.2 193.2 0 0 0 758.1 451.6ZM532.3 564.5A16 16 0 1 0 532.3 532.2H516.3V564.5ZM637.4 727.6A80.7 80.7 0 0 1 583.6 771.6 64.5 64.5 0 0 0 645.1 806.4C680.7 806.4 709.6 784.7 709.6 758A36.4 36.4 0 0 0 704.4 739.7ZM161.8 967.8H967.2A235 235 0 0 0 774.7 752.6L740.8 746.5A64.8 64.8 0 0 1 742 758.2C742 802.6 698.6 838.8 645.2 838.8A102.9 102.9 0 0 1 564.6 802.6 102.9 102.9 0 0 1 483.9 838.7C430.4 838.7 387.1 802.5 387.1 758.1A65.9 65.9 0 0 1 388.2 746.4L354.4 752.6A235 235 0 0 0 161.8 967.8ZM424.5 739.9A36.4 36.4 0 0 0 419.4 758.2C419.4 784.9 448.3 806.6 483.9 806.6A64.5 64.5 0 0 0 545.4 771.8 80.6 80.6 0 0 1 491.6 727.7ZM516 677.4V693.4A48.4 48.4 0 1 0 612.8 693.4V672.1A222.6 222.6 0 0 1 516 672.1ZM379.6 574.3A92.9 92.9 0 0 1 421 564.5H483.9V532.3H421.2A93.1 93.1 0 0 1 379.9 522.5 60.6 60.6 0 0 0 352.9 516H129V580.5H352.9A60.6 60.6 0 0 0 379.9 574.3ZM32.1 564.5A16 16 0 0 0 48.1 580.5H96.8V516H48.4A16 16 0 0 0 32.4 532ZM524.9 368.4L507 341.5 410.3 406.1 428.2 432.9ZM718.5 405.8L621.8 341.3 603.9 368.1 700.6 432.7Z",
"width": 1489
},
"search": [
"search_patient"
]
},
{ {
"uid": "740f78c2b53c8cc100a8b0d283bbd34f", "uid": "740f78c2b53c8cc100a8b0d283bbd34f",
"css": "home_icon-1", "css": "home_icon-1",

@ -1,5 +1,5 @@
/// Flutter icons DoctorApp /// Flutter icons DoctorApp
/// Copyright (C) 2020 by original authors @ fluttericon.com, fontello.com /// Copyright (C) 2021 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello. /// This font was generated by FlutterIcon.com, which is derived from Fontello.
/// ///
/// To use this font, place it in your fonts/ directory and include the /// To use this font, place it in your fonts/ directory and include the
@ -11,7 +11,7 @@
/// fonts: /// fonts:
/// - asset: fonts/DoctorApp.ttf /// - asset: fonts/DoctorApp.ttf
/// ///
/// ///
/// ///
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
@ -19,64 +19,36 @@ class DoctorApp {
DoctorApp._(); DoctorApp._();
static const _kFontFam = 'DoctorApp'; static const _kFontFam = 'DoctorApp';
static const String _kFontPkg = null; static const _kFontPkg = null;
static const IconData female_icon = static const IconData female_icon = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData male = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData male = static const IconData reject_icon = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home_icon_active = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData reject_icon = static const IconData menu_icon = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData menu_icon_active = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_icon_active = static const IconData message_icon = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData message_icon_active = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu_icon = static const IconData scdedule_icon_active = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData schedule_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu_icon_active = static const IconData discharge_patient = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData approved_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData message_icon = static const IconData pending_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData in_patient_white = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData message_icon_active = static const IconData lab_results = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData home_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData scdedule_icon_active = static const IconData operations = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData out_patient = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData schedule_icon = static const IconData patient = IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData qr_code = IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData discharge_patient = static const IconData radiology = IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData referral = IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData approved_icon = static const IconData search_patient = IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData mail = IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pending_icon = static const IconData medicine_search = IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData referred = IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData in_patient_white = static const IconData sync_icon = IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData drawer_icon = IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results = static const IconData leaves = IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData search_patient_1 = IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_icon =
IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData operations =
IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData out_patient =
IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData patient =
IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_code =
IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData radiology =
IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral =
IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_patient =
IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData mail =
IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medicine_search =
IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referred =
IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData sync_icon =
IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData drawer_icon =
IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
} }

@ -11,6 +11,7 @@ class GetAllergiesResModel {
bool isUpdatedByNurse; bool isUpdatedByNurse;
int severity; int severity;
String severityName; String severityName;
String remarks;
GetAllergiesResModel( GetAllergiesResModel(
{this.allergyDiseaseId, {this.allergyDiseaseId,
@ -24,7 +25,7 @@ class GetAllergiesResModel {
this.isChecked, this.isChecked,
this.isUpdatedByNurse, this.isUpdatedByNurse,
this.severity, this.severity,
this.severityName}); this.severityName, this.remarks=''});
GetAllergiesResModel.fromJson(Map<String, dynamic> json) { GetAllergiesResModel.fromJson(Map<String, dynamic> json) {
allergyDiseaseId = json['allergyDiseaseId']; allergyDiseaseId = json['allergyDiseaseId'];
@ -39,6 +40,7 @@ class GetAllergiesResModel {
isUpdatedByNurse = json['isUpdatedByNurse']; isUpdatedByNurse = json['isUpdatedByNurse'];
severity = json['severity']; severity = json['severity'];
severityName = json['severityName']; severityName = json['severityName'];
remarks = json['remarks'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -55,6 +57,7 @@ class GetAllergiesResModel {
data['isUpdatedByNurse'] = this.isUpdatedByNurse; data['isUpdatedByNurse'] = this.isUpdatedByNurse;
data['severity'] = this.severity; data['severity'] = this.severity;
data['severityName'] = this.severityName; data['severityName'] = this.severityName;
data['remarks'] = this.remarks;
return data; return data;
} }
} }

@ -42,6 +42,7 @@ class PatiantInformtion {
int patientMRN; int patientMRN;
String admissionNo; String admissionNo;
String admissionDate; String admissionDate;
String createdOn;
String roomId; String roomId;
String bedId; String bedId;
String nursingStationId; String nursingStationId;
@ -77,6 +78,7 @@ class PatiantInformtion {
this.patientType, this.patientType,
this.admissionNo, this.admissionNo,
this.admissionDate, this.admissionDate,
this.createdOn,
this.roomId, this.roomId,
this.bedId, this.bedId,
this.nursingStationId, this.nursingStationId,
@ -129,6 +131,7 @@ class PatiantInformtion {
patientType: json["PatientType"]?? json["patientType"], patientType: json["PatientType"]?? json["patientType"],
admissionNo: json["AdmissionNo"]?? json["admissionNo"], admissionNo: json["AdmissionNo"]?? json["admissionNo"],
admissionDate: json["AdmissionDate"]?? json["admissionDate"], admissionDate: json["AdmissionDate"]?? json["admissionDate"],
createdOn: json["CreatedOn"]?? json["CreatedOn"],
roomId: json["RoomID"]?? json["roomID"], roomId: json["RoomID"]?? json["roomID"],
bedId: json["BedID"]?? json["bedID"], bedId: json["BedID"]?? json["bedID"],
nursingStationId: json["NursingStationID"]?? json["nursingStationID"], nursingStationId: json["NursingStationID"]?? json["nursingStationID"],
@ -158,10 +161,4 @@ class PatiantInformtion {
patientMRN :json['patientMRN'] ?? json['PatientMRN'], patientMRN :json['patientMRN'] ?? json['PatientMRN'],
); );
} }

@ -6,15 +6,17 @@ class GetPatientArrivalListRequestModel {
int pageIndex; int pageIndex;
int pageSize; int pageSize;
int clinicID; int clinicID;
int patientMRN;
GetPatientArrivalListRequestModel( GetPatientArrivalListRequestModel(
{this.vidaAuthTokenID, {this.vidaAuthTokenID,
this.from, this.from,
this.to, this.to,
this.doctorID, this.doctorID,
this.pageIndex, this.pageIndex,
this.pageSize, this.pageSize,
this.clinicID}); this.clinicID,
this.patientMRN});
GetPatientArrivalListRequestModel.fromJson(Map<String, dynamic> json) { GetPatientArrivalListRequestModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID']; vidaAuthTokenID = json['VidaAuthTokenID'];
@ -24,6 +26,7 @@ class GetPatientArrivalListRequestModel {
pageIndex = json['PageIndex']; pageIndex = json['PageIndex'];
pageSize = json['PageSize']; pageSize = json['PageSize'];
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
patientMRN = json['PatientMRN'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -35,6 +38,8 @@ class GetPatientArrivalListRequestModel {
data['PageSize'] = this.pageSize; data['PageSize'] = this.pageSize;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN;
return data; return data;
} }

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -120,18 +121,9 @@ class _LoginsreenState extends State<Loginsreen> {
), ),
], ],
) )
// : Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: <Widget>[
// AuthHeader(loginType.unknownUser),
// KnownUserLogin(),
// ],
// ),
])) ]))
]) ])
: Center(child: CircularProgressIndicator()), : Center(child: AppLoaderWidget()),
), ),
)); ));
} }

@ -116,7 +116,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
IsLoginForDoctorApp: true, IsLoginForDoctorApp: true,
PatientOutSA: false); PatientOutSA: false);
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
//onModelReady: (model) => model.getDashboard(), onModelReady: (model) => model.getDashboard(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
@ -804,7 +804,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
children: <Widget>[ children: <Widget>[
Center( Center(
child: Icon( child: Icon(
DoctorApp.search_patient, DoctorApp.search_patient_1,
size: 50, size: 50,
color: Colors.black, color: Colors.black,
), ),

@ -4,6 +4,7 @@ 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/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -34,57 +35,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Padding( PatientPageHeaderWidget(patient),
padding: EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
size: 70,
color: Colors.white,
),
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 5.0,
),
AppText(
patient.age.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
AppText(
"ALLERGIC TO: FOOD, ASPIRIN",
color: Color(0xFFB9382C),
fontWeight: FontWeight.bold,
),
],
)
],
),
),
Divider( Divider(
height: 1.0, height: 1.0,
thickness: 1.0, thickness: 1.0,

@ -117,7 +117,7 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if(model.allMedicationList.isNotEmpty) if(model.allMedicationList.length == 0)
await model.getMedicationList(); await model.getMedicationList();
}, },
builder: (_, model, w) => builder: (_, model, w) =>
@ -214,13 +214,15 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
.startsWith(input.toLowerCase()), .startsWith(input.toLowerCase()),
) )
: TextField( : TextField(
minLines: 2,
maxLines: 2,
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
TranslationBase TranslationBase
.of(context) .of(context)
.searchMedicineNameHere, .searchMedicineNameHere,
_selectedMedication != null _selectedMedication != null
? _selectedMedication.description + ? _selectedMedication.description +
('${_selectedMedication.genericName}') (' (${_selectedMedication.genericName} )')
: null, : null,
true, true,
icon: EvaIcons.search), icon: EvaIcons.search),
@ -245,72 +247,6 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
], ],
), ),
), ),
Column(
children: [
Container(
margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase
.of(context)
.youCanFind +
model.pharmacyItemsList.length
.toString() +
" " +
TranslationBase
.of(context)
.itemsInSearch,
fontWeight: FontWeight.bold,
),
],
),
),
Container(
height: MediaQuery
.of(context)
.size
.height * 0.35,
child: Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.pharmacyItemsList == null
? 0
: model.pharmacyItemsList.length,
itemBuilder: (BuildContext context,
int index) {
return InkWell(
child: MedicineItemWidget(
label: model.pharmacyItemsList[index]
["ItemDescription"],
url: model.pharmacyItemsList[index]
["ImageSRCUrl"],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID:
model.pharmacyItemsList[
index]["ItemID"],
url: model
.pharmacyItemsList[
index]["ImageSRCUrl"]),
),
);
},
);
},
),
),
),
],
),
], ],
), ),
), ),
@ -337,10 +273,19 @@ class _MedicineSearchState extends State<MedicineSearchScreen> {
return; return;
} }
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
Navigator.push(
await model.getMedicineItem(_selectedMedication.description); context,
GifLoaderDialogUtils.hideDialog(context); MaterialPageRoute(
builder: (context) =>
PharmaciesListScreen(
itemID:_selectedMedication.itemId,
selectedMedication: _selectedMedication,
),
),
);
// await model.getMedicineItem(_selectedMedication.description);
// GifLoaderDialogUtils.hideDialog(context);
} }

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medicine_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
@ -22,9 +23,11 @@ class PharmaciesListScreen extends StatefulWidget {
final int itemID; final int itemID;
final String url; final String url;
final GetMedicationResponseModel selectedMedication;
// In the constructor, require a item id. // In the constructor, require a item id.
PharmaciesListScreen({Key key, @required this.itemID, this.url}) PharmaciesListScreen(
{Key key, @required this.itemID, this.url, this.selectedMedication})
: super(key: key); : super(key: key);
@override @override
@ -49,18 +52,25 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);
return BaseView<MedicineViewModel>( return BaseView<MedicineViewModel>(
onModelReady: (model) => model.getPharmaciesList(widget.itemID), onModelReady: (model) async {
builder: (_, model, w) => AppScaffold( await model.getPharmaciesList(widget.selectedMedication.itemId);
baseViewModel: model, await model.getMedicineItem(widget.selectedMedication.description);
appBarTitle: TranslationBase.of(context).pharmaciesList,
body: Container( },
height: SizeConfig.screenHeight, builder: (_, model, w) =>
child: ListView( AppScaffold(
shrinkWrap: true, baseViewModel: model,
scrollDirection: Axis.vertical, appBarTitle: TranslationBase
physics: const AlwaysScrollableScrollPhysics(), .of(context)
children: <Widget>[ .pharmaciesList,
model.pharmaciesList.length > 0 body: Container(
height: SizeConfig.screenHeight,
child: ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[
model.pharmaciesList.length > 0 && model.pharmacyItemsList.length > 0
? RoundedContainer( ? RoundedContainer(
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -69,9 +79,10 @@ class _PharmaciesListState extends State<PharmaciesListScreen> {
child: ClipRRect( child: ClipRRect(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(7)), BorderRadius.all(Radius.circular(7)),
child: widget.url != null child: model.pharmacyItemsList[0]
["ImageSRCUrl"]!= null
? Image.network( ? Image.network(
widget.url, model.pharmacyItemsList[0]["ImageSRCUrl"],
height: height:
SizeConfig.imageSizeMultiplier * SizeConfig.imageSizeMultiplier *
21, 21,

@ -262,7 +262,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
GetPatientArrivalListRequestModel getPatientArrivalListRequestModel; GetPatientArrivalListRequestModel getPatientArrivalListRequestModel;
if (val2 == 7) { if (val2 == 7) {
getPatientArrivalListRequestModel = GetPatientArrivalListRequestModel( getPatientArrivalListRequestModel = GetPatientArrivalListRequestModel(
from: patient.From, to: patient.To, pageIndex: 0, pageSize: 0); from: patient.From, to: patient.To, pageIndex: 0, pageSize: 0,patientMRN: patient.getPatientID);
} }
model model

@ -860,10 +860,11 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
title: TranslationBase.of(context) title: TranslationBase.of(context)
.addMedication, .addMedication,
onPressed: () { onPressed: () {
formKey.currentState.save(); // formKey.currentState.save();
Navigator.pop(context); // Navigator.pop(context);
//openDrugToDrug(); // openDrugToDrug();
if (route == null || if (strength == null ||
route == null ||
frequency == null || frequency == null ||
indication == null || indication == null ||
doseTime == null || doseTime == null ||

@ -210,7 +210,7 @@ class AddRescheduleLeavScreen extends StatelessWidget {
], ],
), ),
), ),
(item.status == 1) (item.status == 2)
? Expanded( ? Expanded(
flex: 1, flex: 1,
child: IconButton( child: IconButton(

@ -54,8 +54,8 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
var clinicID; var clinicID;
var fromTime; var fromTime;
var toTime; var toTime;
TextEditingController _controller4; TextEditingController _controller4 = new TextEditingController();
TextEditingController _controller5; TextEditingController _controller5 = new TextEditingController();
void _presentDatePicker(id) { void _presentDatePicker(id) {
var date = new DateTime.now(); var date = new DateTime.now();
var initialDate = id == 'fromDate' var initialDate = id == 'fromDate'
@ -718,10 +718,16 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
? TranslationBase.of(context).update ? TranslationBase.of(context).update
: TranslationBase.of(context).add, : TranslationBase.of(context).add,
onPressed: () { onPressed: () {
if (widget.isUpdate == true) { if (offTime == '1' || offTime == '2') {
updateRecheduleLeave(model2); if (widget.isUpdate == true) {
updateRecheduleLeave(model2);
} else {
addRecheduleLeave(model2);
}
} else { } else {
addRecheduleLeave(model2); DrAppToastMsg.showErrorToast(
TranslationBase.of(context)
.onlyOfftimeHoliday);
} }
}, },
), ),
@ -750,9 +756,21 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
this.profile = p; this.profile = p;
if (widget.updateData != null) { if (widget.updateData != null) {
this.clinicID = widget.updateData.clinicId; this.clinicID = widget.updateData.clinicId;
final df = new DateFormat('HH:mm:ss');
final dateFormat = new DateFormat('yyyy-MM-dd');
_toDateController.text = widget.updateData.dateTimeFrom; _toDateController.text =
_toDateController2.text = widget.updateData.dateTimeTo; dateFormat.format(DateTime.parse(widget.updateData.dateTimeFrom));
//df.format(DateTime.parse(widget.updateData.dateTimeFrom));
this.fromTime =
df.format(DateTime.parse(widget.updateData.dateTimeFrom));
this.toTime = df.format(DateTime.parse(widget.updateData.dateTimeTo));
_toDateController2.text =
dateFormat.format(DateTime.parse(widget.updateData.dateTimeTo));
_controller5.text = toTime;
_controller4.text = fromTime;
toDate = _toDateController2.text;
fromDate = _toDateController.text;
} }
}); });
} }
@ -827,20 +845,29 @@ class _RescheduleLeaveScreen extends State<RescheduleLeaveScreen> {
} }
updateRecheduleLeave(model) { updateRecheduleLeave(model) {
final df = new DateFormat('yyyy-MM-ddThh:mm:ss'); final df = new DateFormat('yyyy-MM-ddTHH:MM:ss');
final dateFormat = new DateFormat('yyyy-MM-dd'); final dateFormat = new DateFormat('yyyy-MM-dd');
var fromDates = fromDate;
var toDates = toDate;
if (offTime == '1') { if (offTime == '1') {
fromDate = dateFormat.format(fromDate) + 'T' + fromTime + '00'; fromDate = df.format(DateTime.parse(fromDates)) +
toDate = dateFormat.format(fromDate) + 'T' + toTime + '00'; 'T' +
fromTime +
':' +
DateTime.now().second.toString();
toDate = df.format(DateTime.parse(fromDates)) +
'T' +
toTime +
':' +
DateTime.now().second.toString();
} else { } else {
fromDate = df.format(fromDate); fromDate = df.format(fromDates);
toDate = df.format(toDate); toDate = df.format(toDates);
} }
Map<String, dynamic> request = { Map<String, dynamic> request = {
"Requisition": { "Requisition": {
"requisitionNo": 0, "requisitionNo": widget.updateData.requisitionNo,
"requisitionType": offTime, "requisitionType": offTime,
"clinicId": this.profile['ClinicID'], "clinicId": this.profile['ClinicID'],
"doctorId": this.profile['DoctorID'], "doctorId": this.profile['DoctorID'],

@ -56,20 +56,22 @@ class AddSickLeavScreen extends StatelessWidget {
item.status == 1 item.status == 1
? TranslationBase.of( ? TranslationBase.of(
context) context)
.approved .hold
: item.status == 2 : item.status == 2
? TranslationBase.of( ? TranslationBase.of(
context) context)
.extended .active
: TranslationBase.of( : TranslationBase.of(
context) context)
.pending, .all,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,
), ),
color: item.status == 1 color: item.status == 1
? Colors.green ? Colors.yellow[800]
: Colors.yellow[800], : item.status == 2
? Colors.green
: Colors.black,
), ),
Row( Row(
children: [ children: [
@ -96,7 +98,7 @@ class AddSickLeavScreen extends StatelessWidget {
), ),
Row(children: [ Row(children: [
AppText( AppText(
item.remarks, item.remarks ?? "",
) )
]), ]),
], ],

@ -317,7 +317,7 @@ class Helpers {
listOfHours.forEach((element) { listOfHours.forEach((element) {
WorkingHours workingHours = WorkingHours(); WorkingHours workingHours = WorkingHours();
var from = element.substring( var from = element.substring(
element.indexOf('m ') + 2, element.indexOf('To') - 2); element.indexOf('m ') + 2, element.indexOf('To') - 1);
workingHours.from = from.trim(); workingHours.from = from.trim();
var to = element.substring(element.indexOf('To') + 2); var to = element.substring(element.indexOf('To') + 2);
workingHours.to = to.trim(); workingHours.to = to.trim();

@ -997,11 +997,9 @@ class TranslationBase {
String get orderProcedure => String get orderProcedure =>
localizedValues['orderProcedure'][locale.languageCode]; localizedValues['orderProcedure'][locale.languageCode];
String get nameOrICD => String get nameOrICD => localizedValues['nameOrICD'][locale.languageCode];
localizedValues['nameOrICD'][locale.languageCode];
String get dType => String get dType => localizedValues['dType'][locale.languageCode];
localizedValues['dType'][locale.languageCode];
String get addAssessmentDetails => String get addAssessmentDetails =>
localizedValues['addAssessmentDetails'][locale.languageCode]; localizedValues['addAssessmentDetails'][locale.languageCode];
@ -1012,19 +1010,21 @@ class TranslationBase {
String get addProgressNote => String get addProgressNote =>
localizedValues['addProgressNote'][locale.languageCode]; localizedValues['addProgressNote'][locale.languageCode];
String get createdBy => String get createdBy => localizedValues['createdBy'][locale.languageCode];
localizedValues['createdBy'][locale.languageCode];
String get editedBy => String get editedBy => localizedValues['editedBy'][locale.languageCode];
localizedValues['editedBy'][locale.languageCode];
String get currentMedications => String get currentMedications =>
localizedValues['currentMedications'][locale.languageCode]; localizedValues['currentMedications'][locale.languageCode];
String get noItem => String get noItem => localizedValues['noItem'][locale.languageCode];
localizedValues['noItem'][locale.languageCode];
String get postUcafSuccessMsg => String get postUcafSuccessMsg =>
localizedValues['postUcafSuccessMsg'][locale.languageCode]; localizedValues['postUcafSuccessMsg'][locale.languageCode];
String get vitalSignDetailEmpty => String get vitalSignDetailEmpty =>
localizedValues['vitalSignDetailEmpty'][locale.languageCode]; localizedValues['vitalSignDetailEmpty'][locale.languageCode];
String get onlyOfftimeHoliday =>
localizedValues['onlyOfftimeHoliday'][locale.languageCode];
String get active => localizedValues['active'][locale.languageCode];
String get hold => localizedValues['hold'][locale.languageCode];
String get loading => localizedValues['loading'][locale.languageCode];
String get assessmentErrorMsg => String get assessmentErrorMsg =>
localizedValues['assessmentErrorMsg'][locale.languageCode]; localizedValues['assessmentErrorMsg'][locale.languageCode];

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:doctor_app_flutter/lookups/hospital_lookup.dart';
import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart';
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
@ -41,7 +42,7 @@ class _LoginFormState extends State<LoginForm> {
bool _isInit = true; bool _isInit = true;
FocusNode focusPass = FocusNode(); FocusNode focusPass = FocusNode();
FocusNode focusProject = FocusNode(); FocusNode focusProject = FocusNode();
HospitalViewModel projectsProv;
var userInfo = UserModel( var userInfo = UserModel(
userID: '', userID: '',
password: '', password: '',
@ -56,24 +57,13 @@ class _LoginFormState extends State<LoginForm> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
initPlatformState();
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
authProv = Provider.of<AuthViewModel>(context);
if (_isInit) {
if (projectsList.length == 0) {
getProjectsList();
}
}
_isInit = false;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
authProv = Provider.of<AuthViewModel>(context);
projectsProv = Provider.of<HospitalViewModel>(context);
getProjects();
return Form( return Form(
key: loginFormKey, key: loginFormKey,
child: Container( child: Container(
@ -128,25 +118,33 @@ class _LoginFormState extends State<LoginForm> {
}, },
), ),
buildSizedBox(), buildSizedBox(),
TextFormField( projectsList.length > 0
focusNode: focusProject, ? TextFormField(
controller: projectIdController, focusNode: focusProject,
onTap: () { controller: projectIdController,
helpers.showCupertinoPicker( onTap: () {
context, projectsList, 'Name', onSelectProject); helpers.showCupertinoPicker(
}, context, projectsList, 'Name', onSelectProject);
showCursor: false, },
readOnly: true, showCursor: false,
decoration: buildInputDecoration( readOnly: true,
context, decoration: buildInputDecoration(
TranslationBase.of(context).selectYourProject, context,
'assets/images/password_icon.png'), TranslationBase.of(context).selectYourProject,
validator: (value) { 'assets/images/password_icon.png'),
if (value.isEmpty) { validator: (value) {
return TranslationBase.of(context).pleaseEnterYourProject; if (value.isEmpty) {
} return TranslationBase.of(context)
return null; .pleaseEnterYourProject;
}), }
return null;
})
: TextFormField(
readOnly: true,
decoration: buildInputDecoration(
context,
TranslationBase.of(context).loading,
'assets/images/password_icon.png')),
buildSizedBox(), buildSizedBox(),
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -325,8 +323,9 @@ class _LoginFormState extends State<LoginForm> {
} }
getProjectsList() { getProjectsList() {
HospitalViewModel projectsProv = Provider.of<HospitalViewModel>(context); //showLoading();
projectsProv.getProjectsList().then((res) { projectsProv.getProjectsList().then((res) {
//hideLoading();
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
projectsList = res['ListProject']; projectsList = res['ListProject'];
@ -371,4 +370,13 @@ class _LoginFormState extends State<LoginForm> {
hideLoading() { hideLoading() {
Navigator.pop(context); Navigator.pop(context);
} }
getProjects() {
if (_isInit) {
if (projectsList.length == 0) {
getProjectsList();
}
}
_isInit = false;
}
} }

@ -71,6 +71,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
void initState() { void initState() {
super.initState(); super.initState();
_loggedUserFuture = getSharedPref(); _loggedUserFuture = getSharedPref();
_getAvailableBiometrics();
} }
Future<void> getSharedPref() async { Future<void> getSharedPref() async {
@ -117,199 +118,188 @@ class _VerificationMethodsState extends State<VerificationMethods> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
height: SizeConfig.realScreenHeight * 0.6, // height: SizeConfig.realScreenHeight * 0.6,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
user != null && isMoreOption == false user != null && isMoreOption == false
? Column( ? Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.spaceEvenly,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.welcomeBack + .welcomeBack +
' ' + ' ' +
user.doctorName, user.doctorName,
fontSize: fontSize:
SizeConfig.textMultiplier * 3.5, SizeConfig.textMultiplier * 3.5,
), ),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context).accountInfo,
.accountInfo, fontSize:
fontSize: SizeConfig.textMultiplier * 2.5,
SizeConfig.textMultiplier * 2.5, ),
), SizedBox(
SizedBox( height: 20,
height: 20, ),
), Card(
Card( color: Colors.grey[300],
color: Colors.grey[300], child: Row(
child: Row( children: <Widget>[
children: <Widget>[ Flexible(
Flexible( child: ListTile(
child: ListTile( title: Text(
title: Text( TranslationBase.of(context)
.lastLoginAt,
textAlign: TextAlign.center,
overflow:
TextOverflow.ellipsis,
),
subtitle: Text(
user.editedOn != null
? formatDate(Helpers
.convertStringToDate(
user.editedOn))
: user.createdOn != null
? formatDate(Helpers
.convertStringToDate(user
.createdOn))
: '--',
overflow:
TextOverflow.ellipsis,
textAlign:
TextAlign.center),
)),
Flexible(
child: ListTile(
title: Text(
TranslationBase.of(context) TranslationBase.of(context)
.lastLoginAt, .lastLoginWith,
textAlign: TextAlign.center,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow.ellipsis,
), textAlign:
subtitle: Text( TextAlign.center),
user.editedOn != null subtitle: Text(
? formatDate(Helpers getType(user.logInTypeID,
.convertStringToDate( context),
user overflow:
.editedOn)) TextOverflow.ellipsis,
: user.createdOn != textAlign:
null TextAlign.center),
? formatDate(Helpers ))
.convertStringToDate(user ],
.createdOn)) )),
: '--', ],
overflow: )
TextOverflow.ellipsis, : Column(
textAlign: mainAxisAlignment:
TextAlign.center), MainAxisAlignment.spaceEvenly,
)), crossAxisAlignment:
Flexible( CrossAxisAlignment.start,
child: ListTile( children: <Widget>[
title: Text( this.onlySMSBox == false
TranslationBase.of( ? AppText(
context) TranslationBase.of(context)
.lastLoginWith, .verifyLoginWith,
overflow: fontSize:
TextOverflow.ellipsis, SizeConfig.textMultiplier *
textAlign: 3.5,
TextAlign.center), textAlign: TextAlign.left,
subtitle: Text( )
getType(user.logInTypeID, : AppText(
context), TranslationBase.of(context)
overflow: .verifyFingerprint2,
TextOverflow.ellipsis, fontSize:
textAlign: SizeConfig.textMultiplier *
TextAlign.center), 2.5,
)) textAlign: TextAlign.start,
], ),
)), ]),
], user != null && isMoreOption == false
) ? Column(
: Column( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: crossAxisAlignment:
MainAxisAlignment.spaceEvenly, CrossAxisAlignment.start,
crossAxisAlignment: children: <Widget>[
CrossAxisAlignment.start, Row(
children: <Widget>[
this.onlySMSBox == false
? AppText(
TranslationBase.of(context)
.verifyLoginWith,
fontSize: SizeConfig
.textMultiplier *
3.5,
textAlign: TextAlign.left,
)
: AppText(
TranslationBase.of(context)
.verifyFingerprint2,
fontSize: SizeConfig
.textMultiplier *
2.5,
textAlign: TextAlign.start,
),
]),
user != null && isMoreOption == false
? Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: InkWell(
onTap: () => {
authenticateUser(
3,
BiometricType
.face
.index,
authProv)
},
child: getButton(
user.logInTypeID,
authProv))),
Expanded(
child:
getButton(5, authProv))
])
])
: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: getButton(
3, authProv)),
Expanded(
child: getButton(
4, authProv))
],
)
: SizedBox(),
Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: child: InkWell(
getButton(1, authProv)), onTap: () => {
authenticateUser(
3,
BiometricType
.face.index,
authProv)
},
child: getButton(
user.logInTypeID,
authProv))),
Expanded( Expanded(
child: getButton(2, authProv)) child: getButton(5, authProv))
], ])
), ])
]), : Column(
Expanded( mainAxisAlignment: MainAxisAlignment.start,
flex: 1, crossAxisAlignment:
child: Column( CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
onlySMSBox == false
? Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: getButton(
3, authProv)),
Expanded(
child: getButton(
4, authProv))
],
)
: SizedBox(),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: getButton(1, authProv)),
Expanded(
child: getButton(2, authProv))
],
),
]),
// )
],
),
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
user != null
? Row(
children: <Widget>[ children: <Widget>[
user != null Expanded(
? Row( child: Button(
children: <Widget>[ title: TranslationBase.of(context)
Expanded( .useAnotherAccount,
child: Button( onTap: () {
title: Navigator.of(context).pushNamed(LOGIN);
TranslationBase.of(context) },
.useAnotherAccount, )),
onTap: () {
Navigator.of(context)
.pushNamed(LOGIN);
},
)),
],
)
: SizedBox(),
], ],
), )
) : SizedBox(),
], ],
)) ),
], ],
), ),
)); ));
@ -499,9 +489,10 @@ class _VerificationMethodsState extends State<VerificationMethods> {
authenticateUser(3, BiometricType.fingerprint.index, authProv) authenticateUser(3, BiometricType.fingerprint.index, authProv)
}, },
child: RoundedContainer( child: RoundedContainer(
backgroundColor: BiometricType.fingerprint.index == 1 backgroundColor:
? Colors.white checkIfBiometricAvailable(BiometricType.fingerprint)
: Colors.white.withOpacity(.7), ? Colors.white
: Colors.white.withOpacity(.7),
borderColor: Colors.grey, borderColor: Colors.grey,
showBorder: true, showBorder: true,
child: Padding( child: Padding(
@ -566,9 +557,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
}) })
}, },
child: RoundedContainer( child: RoundedContainer(
backgroundColor: BiometricType.fingerprint.index == 1 backgroundColor: Colors.white,
? Colors.white
: Colors.white.withOpacity(.7),
borderColor: Colors.grey, borderColor: Colors.grey,
showBorder: true, showBorder: true,
child: Padding( child: Padding(
@ -756,11 +745,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
getDocProfiles(clinic, authProv); getDocProfiles(clinic, authProv);
} }
} else { } else {
//changeLoadingStata(false); Navigator.pop(context);
helpers.showErrorToast(res['ErrorEndUserMessage']); helpers.showErrorToast(res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
//changeLoadingStata(false); Navigator.pop(context);
helpers.showErrorToast(err); helpers.showErrorToast(err);
}); });
} }

@ -24,13 +24,15 @@ class MyScheduleWidget extends StatelessWidget {
Column( Column(
children: [ children: [
Divider( Divider(
height: 10, height: 1,
color: Colors.grey, color: Colors.grey,
thickness: 1.0, thickness: 1.0,
), ),
Text('${workingHoursTable.date.day}')
], ],
), ),
SizedBox(
height: 10,
),
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
@ -50,44 +52,19 @@ class MyScheduleWidget extends StatelessWidget {
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( SizedBox(
children: <Widget>[ height: 5,
Column( ),
crossAxisAlignment: CrossAxisAlignment.start, AppText(
children: <Widget>[ work.from + ' - ' + work.to,
SizedBox( fontSize: 2.0 * SizeConfig.textMultiplier,
height: 5, fontWeight: FontWeight.w300,
),
AppText(
work.from + ' - ',
fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
AppText(
work.to,
fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
),
],
),
],
) )
], ],
), ),
); );
}).toList(), }).toList(),
), ),
SizedBox(
width: 8,
)
], ],
), ),
), ),

@ -52,7 +52,7 @@ class SMSOTP {
String errorMsg; String errorMsg;
ProjectViewModel projectProvider; ProjectViewModel projectProvider;
String displayTime = ''; String displayTime = '';
bool isClosed = false;
displayDialog(BuildContext context) async { displayDialog(BuildContext context) async {
return showDialog( return showDialog(
context: context, context: context,
@ -65,6 +65,7 @@ class SMSOTP {
IconButton( IconButton(
icon: Icon(Icons.close), icon: Icon(Icons.close),
onPressed: () { onPressed: () {
this.isClosed = true;
Navigator.pop(context); Navigator.pop(context);
this.onFailure(); this.onFailure();
}, },
@ -307,7 +308,7 @@ class SMSOTP {
timer = Future.delayed(Duration(seconds: 1), () { timer = Future.delayed(Duration(seconds: 1), () {
if (this.remainingTime > 0) { if (this.remainingTime > 0) {
startTimer(setState); if (isClosed == false) startTimer(setState);
} else { } else {
Navigator.pop(context); Navigator.pop(context);
} }

@ -91,7 +91,7 @@ class PatientPageHeaderWidget extends StatelessWidget {
), ),
], ],
), ),
model.patientAllergiesList.isNotEmpty ?AppText( model.patientAllergiesList.isNotEmpty && model.getAllergicNames(projectViewModel.isArabic)!='' ?AppText(
TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic), TranslationBase.of(context).allergicTO +" : "+model.getAllergicNames(projectViewModel.isArabic),
color: Color(0xFFB9382C), color: Color(0xFFB9382C),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

@ -94,7 +94,7 @@ class PatientProfileWidget extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
width: 20, width: 4,
), ),
AppText( AppText(
patient.patientId.toString(), patient.patientId.toString(),
@ -254,8 +254,8 @@ class PatientProfileWidget extends StatelessWidget {
), ),
Expanded( Expanded(
child: AppText( child: AppText(
patient.admissionDate != null patient.createdOn != null
? "${DateUtils.convertDateFromServerFormat(patient.admissionDate, 'EEEE dd, MMMM yyyy hh:mm a')}" ? "${DateUtils.convertDateFromServerFormat(patient.createdOn, 'EEEE dd, MMMM yyyy hh:mm a')}"
: "", : "",
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
@ -310,10 +310,10 @@ class PatientProfileWidget extends StatelessWidget {
), ),
), ),
AppText( AppText(
patient.admissionDate != null patient.createdOn != null
? DateUtils ? DateUtils
.differenceBetweenServerDateAndCurrent( .differenceBetweenServerDateAndCurrent(
patient.admissionDate) patient.createdOn)
: "", : "",
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,

@ -91,14 +91,13 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).lab, nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result, nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'), icon: 'lab.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6) PatientProfileButton(
PatientProfileButton( key: key,
key: key, patient: patient,
patient: patient, route: MEDICAL_FILE,
route: MEDICAL_FILE, nameLine1: TranslationBase.of(context).previewHealth,
nameLine1: TranslationBase.of(context).previewHealth, nameLine2: TranslationBase.of(context).summaryReport,
nameLine2: TranslationBase.of(context).summaryReport, icon: 'radiology-1.png'),
icon: 'radiology-1.png'),
if (selectedPatientType != 0 && if (selectedPatientType != 0 &&
selectedPatientType != 5 && selectedPatientType != 5 &&
selectedPatientType != 7) selectedPatientType != 7)
@ -149,7 +148,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).orders, nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).list, nameLine2: TranslationBase.of(context).list,
icon: 'radiology-1.png'), icon: 'radiology-1.png'),
if (selectedPatientType != 0 && selectedPatientType != 5) if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -181,6 +181,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
selectedAllergy: selectedAllergy, selectedAllergy: selectedAllergy,
isChecked: element.isChecked, isChecked: element.isChecked,
createdBy: element.createdBy, createdBy: element.createdBy,
remark: element.remarks,
selectedAllergySeverity: selectedAllergySeverity); selectedAllergySeverity: selectedAllergySeverity);
if (selectedAllergy != null && selectedAllergySeverity != null) if (selectedAllergy != null && selectedAllergySeverity != null)
widget.myAllergiesList.add(mySelectedAllergy); widget.myAllergiesList.add(mySelectedAllergy);
@ -522,7 +523,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM == if (postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM ==
null) null)
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = []; postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM = [];
//TODO: make static value dynamic
postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add( postAllergyRequestModel.listHisProgNotePatientAllergyDiseaseVM.add(
ListHisProgNotePatientAllergyDiseaseVM( ListHisProgNotePatientAllergyDiseaseVM(
allergyDiseaseId: allergy.selectedAllergy.id, allergyDiseaseId: allergy.selectedAllergy.id,
@ -545,6 +545,14 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
await model.patchAllergy(postAllergyRequestModel); await model.patchAllergy(postAllergyRequestModel);
} }
GeneralGetReqForSOAP generalGetReqForSOAP = GeneralGetReqForSOAP(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo,
doctorID: '',
editedBy: '');
await model.getPatientAllergy(generalGetReqForSOAP, isLocalBusy : true);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} }

@ -1,5 +1,6 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart'; import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -8,6 +9,7 @@ import 'package:doctor_app_flutter/models/SOAP/GetAssessmentReqModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_assement.dart';
import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.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/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -263,7 +265,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
MainAxisAlignment.start, MainAxisAlignment.start,
children: [ children: [
AppText( AppText(
TranslationBase.of(context).dType+':', TranslationBase.of(context).dType+' : ',
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -330,7 +332,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
children: [ children: [
AppText( AppText(
"ICD: ".toUpperCase(), "ICD : ".toUpperCase(),
fontWeight: FontWeight fontWeight: FontWeight
.bold, .bold,
fontSize: 16, fontSize: 16,
@ -788,7 +790,11 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
helpers helpers
.showErrorToast(model.error); .showErrorToast(model.error);
} else { } else {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code; mySelectedAssessment.icdCode10ID = mySelectedAssessment.selectedICD.code;
mySelectedAssessment.doctorName = doctorProfile.doctorName;
if (!isUpdate) { if (!isUpdate) {
// widget.mySelectedAssessmentList.add(mySelectedAssessment); // widget.mySelectedAssessmentList.add(mySelectedAssessment);

@ -132,7 +132,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
), ),
Column( Column(
children: [ children: [
if(widget.patientProgressNote==null) if(widget.patientProgressNote.planNote == null)
Container( Container(
margin: margin:
EdgeInsets.only(left: 10, right: 10, top: 15), EdgeInsets.only(left: 10, right: 10, top: 15),
@ -161,7 +161,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
if (progressNoteController.text !='') if ( widget.patientProgressNote.planNote != null)
Container( Container(
margin: margin:
EdgeInsets.only(left: 5, right: 5, top: 15), EdgeInsets.only(left: 5, right: 5, top: 15),
@ -308,12 +308,16 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
planNote: progressNoteController.text, doctorID: '', editedBy: ''); planNote: widget.patientProgressNote.planNote, doctorID: '', editedBy: '');
if(model.patientProgressNoteList.isEmpty){ if(model.patientProgressNoteList.isEmpty){
await model.postProgressNote(postProgressNoteRequestModel); await model.postProgressNote(postProgressNoteRequestModel);
}else { }else {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
postProgressNoteRequestModel.editedBy =doctorProfile.doctorID;
await model.patchProgressNote(postProgressNoteRequestModel); await model.patchProgressNote(postProgressNoteRequestModel);
} }
@ -335,12 +339,12 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
context: context, context: context,
builder: (context) { builder: (context) {
return FractionallySizedBox( return FractionallySizedBox(
heightFactor: 0.5, heightFactor: 0.6,
child: Container( child: Container(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: ListView(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 16, height: 16,
@ -355,6 +359,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
), ),
Container( Container(
margin: EdgeInsets.only(left: 0, right: 0, top: 15), margin: EdgeInsets.only(left: 0, right: 0, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).addProgressNote, hintText: TranslationBase.of(context).addProgressNote,
fontSize: 13.5, fontSize: 13.5,
@ -383,6 +388,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName??doctorProfile.doctorName; widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName??doctorProfile.doctorName;
widget.patientProgressNote.editedByName=doctorProfile.doctorName; widget.patientProgressNote.editedByName=doctorProfile.doctorName;
widget.patientProgressNote.createdOn= DateTime.now().toString() ; widget.patientProgressNote.createdOn= DateTime.now().toString() ;
widget.patientProgressNote.planNote = progressNoteController.text;
setState(() { setState(() {
print(progressNoteController.text); print(progressNoteController.text);
}); });

@ -37,6 +37,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel(); GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel();
changePageViewIndex(pageIndex) { changePageViewIndex(pageIndex) {
changeLoadingState(true);
_controller.jumpToPage(pageIndex); _controller.jumpToPage(pageIndex);
} }

@ -1,3 +1,4 @@
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/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -26,6 +27,7 @@ class AppDrawer extends StatefulWidget {
class _AppDrawerState extends State<AppDrawer> { class _AppDrawerState extends State<AppDrawer> {
bool _isInit = true; bool _isInit = true;
Helpers helpers = new Helpers(); Helpers helpers = new Helpers();
ProjectViewModel projectsProvider;
// @override // @override
// void didChangeDependencies() { // void didChangeDependencies() {
// super.didChangeDependencies(); // super.didChangeDependencies();
@ -38,6 +40,7 @@ class _AppDrawerState extends State<AppDrawer> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AuthViewModel authProvider = Provider.of(context); AuthViewModel authProvider = Provider.of(context);
projectsProvider = Provider.of(context);
return RoundedContainer( return RoundedContainer(
child: Container( child: Container(
color: Colors.white, color: Colors.white,
@ -84,7 +87,13 @@ class _AppDrawerState extends State<AppDrawer> {
)) ))
: SizedBox(), : SizedBox(),
AppText( AppText(
"Director of medical records", //TODO: Make The Dr Title Dynamic and check overflow issue. projectsProvider.isArabic
? authProvider
.doctorProfile.titleDescriptionN ??
""
: authProvider
.doctorProfile?.titleDescription ??
"",
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.black87), color: Colors.black87),
RaisedButton( RaisedButton(

@ -1,11 +1,12 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_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/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import '../../widgets/shared/app_loader_widget.dart'; import '../../widgets/shared/app_loader_widget.dart';
import 'app_texts_widget.dart'; import 'app_texts_widget.dart';
import 'network_base_view.dart'; import 'network_base_view.dart';
@ -64,20 +65,21 @@ class AppScaffold extends StatelessWidget {
children: <Widget>[body, buildAppLoaderWidget(isLoading)]) children: <Widget>[body, buildAppLoaderWidget(isLoading)])
: Center( : Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
"assets/images/undraw_connected_world_wuay.png", "assets/images/undraw_connected_world_wuay.png",
height: 250, height: 250,
), ),
AppText('No Internet Connection') AppText('No Internet Connection')
], ],
), ),
)); ),
);
} }
Widget buildAppLoaderWidget(bool isloading) { Widget buildAppLoaderWidget(bool isLoading) {
return isloading ? AppLoaderWidget() : Container(); return isLoading ? AppLoaderWidget() : Container();
} }
} }

Loading…
Cancel
Save