Conflicts:
	lib/config/config.dart
	lib/core/service/base/lookup-service.dart
pull/199/head
Elham Rababah 6 years ago
commit edef444534

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -65,8 +65,8 @@ class BaseAppClient {
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
body['PatientOutSA'] = 0; // PATIENT_OUT_SA; body['PatientOutSA'] = 0; // PATIENT_OUT_SA;
body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
body['VidaRefreshTokenID'] = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); body['VidaRefreshTokenID'] =
await sharedPref.getString(VIDA_REFRESH_TOKEN_ID);
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");

@ -24,8 +24,7 @@ const PATIENT_GET_LIST_REFERAL_URL =
"Services/Lists.svc/REST/GetList_STPReferralFrequency"; "Services/Lists.svc/REST/GetList_STPReferralFrequency";
const PATIENT_GET_CLINIC_BY_PROJECT_URL = const PATIENT_GET_CLINIC_BY_PROJECT_URL =
"Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; "Services/DoctorApplication.svc/REST/GetClinicsByProjectID";
const PROJECT_GET_INFO = const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo";
"Services/DoctorApplication.svc/REST/GetProjectInfo";
const GET_PROJECTS = 'Services/Lists.svc/REST/GetProjectForDoctorAPP'; const GET_PROJECTS = 'Services/Lists.svc/REST/GetProjectForDoctorAPP';
const GET_PATIENT_VITAL_SIGN = const GET_PATIENT_VITAL_SIGN =
@ -90,20 +89,35 @@ const MEMBER_CHECK_ACTIVATION_CODE_NEW =
const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP =
'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp';
const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles'; const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles';
const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin'; const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin';
const END_CALL = 'LiveCareApi/DoctorApp/EndCall'; const END_CALL = 'LiveCareApi/DoctorApp/EndCall';
const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge'; const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge';
const GET_DASHBOARD =
'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI';
const GET_SICKLEAVE_STATISTIC =
'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
const GET_PRESCRIPTION_LIST =
'Services/DoctorApplication.svc/REST/GetPrescription';
const POST_PRESCRIPTION_LIST =
'Services/DoctorApplication.svc/REST/PostPrescription';
const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST = const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList'; 'Services/DoctorApplication.svc/REST/PatientArrivalList';
// SOAP // SOAP
const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies';
const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; const GET_MASTER_LOOKUP_LIST =
'Services/DoctorApplication.svc/REST/GetMasterLookUpList';
const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies';
const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory';
const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint';
@ -120,7 +134,8 @@ var SERVICES_PATIANT = [
"GtMyReferredPatient", "GtMyReferredPatient",
"GtMyDischargeReferralPatient", "GtMyDischargeReferralPatient",
"GtMyTomorrowPatient", "GtMyTomorrowPatient",
"GtMyReferralPatient" "GtMyReferralPatient",
"PatientArrivalList"
]; ];
var SERVICES_PATIANT2 = [ var SERVICES_PATIANT2 = [
"List_MyOutPatient", "List_MyOutPatient",
@ -138,7 +153,8 @@ var SERVICES_PATIANT_HEADER = [
"Referred", "Referred",
"Referral Discharge", "Referral Discharge",
"Tomorrow", "Tomorrow",
"Referral" "Referral",
"Arrived"
]; ];
var SERVICES_PATIANT_HEADER_AR = [ var SERVICES_PATIANT_HEADER_AR = [
"المريض الخارجي", "المريض الخارجي",
@ -147,7 +163,8 @@ var SERVICES_PATIANT_HEADER_AR = [
"المريض المحول الي", "المريض المحول الي",
"المريض المحال المعافى", "المريض المحال المعافى",
"مريض الغد", "مريض الغد",
"المريض المحول مني" "المريض المحول مني",
"وصل المريض"
]; ];
//****************** //******************
@ -163,11 +180,13 @@ const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;
const PATIENT_OUT_SA = false; const PATIENT_OUT_SA = false;
const VIDA_AUTH =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiMmI5ZTZlYmYtZmYzMC00ZmEyLTgwYjUtZGJlODM2MmZlNmNhIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1NzU3MTYiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwNzk3Mjk1MCwiZXhwIjoxNjA4ODM2OTUwLCJpYXQiOjE2MDc5NzI5NTB9.nHDltbMuIA3o4Gqa7mQ88fowDy6Oey9fG1zF45dumec';
/// Timer Info /// Timer Info
const TIMER_MIN = 10; const TIMER_MIN = 10;
class AppGlobal { class AppGlobal {
static var CONTEX; static var CONTEX;
static Color appPrimaryColor =Color(0xFFB9382C); static Color appPrimaryColor = Color(0xFFB9382C);
} }

@ -1,4 +1,4 @@
const Map<String, Map<String, String>> localizedValues = { const Map<String, Map<String, String>> localizedValues = {
'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'}, 'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'},
'settings': {'en': 'Settings', 'ar': 'الاعدادات'}, 'settings': {'en': 'Settings', 'ar': 'الاعدادات'},
'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'},
@ -202,7 +202,10 @@ const Map<String, Map<String, String>> localizedValues = {
'routine': {'en': 'Routine', 'ar': 'روتيني'}, 'routine': {'en': 'Routine', 'ar': 'روتيني'},
'send': {'en': 'Send', 'ar': 'ارسال'}, 'send': {'en': 'Send', 'ar': 'ارسال'},
'referralFrequency': {'en': 'Referral Frequency:', 'ar': 'تواتر الحالة:'}, 'referralFrequency': {'en': 'Referral Frequency:', 'ar': 'تواتر الحالة:'},
'selectReferralFrequency': {'en': 'Select Referral Frequency:', 'ar': 'اختار تواتر الحالة:'}, 'selectReferralFrequency': {
'en': 'Select Referral Frequency:',
'ar': 'اختار تواتر الحالة:'
},
'clinicalDetailsAndRemarks': { 'clinicalDetailsAndRemarks': {
'en': 'Clinical Details and Remarks', 'en': 'Clinical Details and Remarks',
'ar': 'التفاصيل السرسرية والملاحظات' 'ar': 'التفاصيل السرسرية والملاحظات'
@ -258,17 +261,21 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'لا يوجد اي نتائج' 'ar': 'لا يوجد اي نتائج'
}, },
'typeMedicineName': {'en': 'Type Medicine Name', 'ar': 'اكتب اسم الدواء'}, 'typeMedicineName': {'en': 'Type Medicine Name', 'ar': 'اكتب اسم الدواء'},
'moreThan3Letter': { 'moreThan3Letter': {
'en': 'Medicine Name Should Be More Than 3 letter', 'en': 'Medicine Name Should Be More Than 3 letter',
'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف' 'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف'
}, },
'gender2': {'en': 'Gender: ', 'ar': 'الجنس: '}, 'gender2': {'en': 'Gender: ', 'ar': 'الجنس: '},
'age2': {'en': 'Age: ', 'ar': 'العمر: '}, 'age2': {'en': 'Age: ', 'ar': 'العمر: '},
'replySuccessfully': { 'replySuccessfully': {'en': 'Reply Successfully', 'ar': 'تم الرد بنجاح'},
'en': 'Reply Successfully', "sick-leaves": {"en": "Patient Sick Leave", "ar": "الاجازات المرضية"},
'ar': 'تم الرد بنجاح' "patient-sick": {"en": "Patient Sick", "ar": "المرضية"},
}, "leave": {"en": "Leave", "ar": "غادر"},
"submit": {"en": "Submit", "ar": "ارسال"},
"doc-name": {"en": "Doctor Name", "ar": "اسم الطبيب"},
"clinicname": {"en": "Clinic Name", "ar": "اسم العيادة"},
"sick-leave-date": {"en": "Sick leave date ", "ar": "تاريخ الاجازة."},
"sick-leave-days": {"en": "Sick leave days", "ar": "عدد ايام الاجازة."},
'admissionDetail': {'en': 'ADMISSION DETAIL: ', 'ar': 'تفاصيل القبول: '}, 'admissionDetail': {'en': 'ADMISSION DETAIL: ', 'ar': 'تفاصيل القبول: '},
'dateTime': {'en': 'DATE / TIME:', 'ar': 'التاريخ / الوقت:'}, 'dateTime': {'en': 'DATE / TIME:', 'ar': 'التاريخ / الوقت:'},
'admissionNo': {'en': 'ADMISSION #: ', 'ar': 'قبول #:'}, 'admissionNo': {'en': 'ADMISSION #: ', 'ar': 'قبول #:'},
@ -277,23 +284,49 @@ const Map<String, Map<String, String>> localizedValues = {
'room': {'en': 'ROOM:', 'ar': 'الغرفة'}, 'room': {'en': 'ROOM:', 'ar': 'الغرفة'},
'bed': {'en': 'BED:', 'ar': 'السرير'}, 'bed': {'en': 'BED:', 'ar': 'السرير'},
'next': {'en': 'Next', 'ar': 'التالي'}, 'next': {'en': 'Next', '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': 'اختار عيادة'}, 'clinicSelect': {'en': "Select Clinic", 'ar': 'اختار عيادة'},
'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'}, 'doctorSelect': {'en': "Select Doctor", 'ar': 'اختار طبيب'},
"empty-message": { "empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"},
"en": "Please enter Value", 'no-sickleve-applied': {
"ar": "يرجى ادخال القيمه" 'en': "No sick leave applied",
},"chiefComplaintLength": { 'ar': 'لم تطبق إجازة مرضية'
},
'applynow': {'en': "Apply Now", 'ar': 'قدم الآن'},
'add-sickleave': {'en': "ADD SICK LEAVE", 'ar': 'أضف إجازة مرضية'},
'add': {'en': "Add", 'ar': 'أضف'},
'approved': {'en': "Approved", 'ar': 'وافق'},
'extended': {'en': "Extended", 'ar': 'وسعوا'},
'pending': {'en': "Pending", 'ar': 'قيد الانتظار'},
'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': 'قم بتمديد الإجازة المرضية'
},
"chiefComplaintLength": {
"en": "Chief Complaint length should be greater than 25", "en": "Chief Complaint length should be greater than 25",
"ar": "يجب أن يكون طول شكوى الرئيس أكبر من 25" "ar": "يجب أن يكون طول شكوى الرئيس أكبر من 25"
}, },
'patient-target': {'en': 'Target Patient', 'ar': 'الهدف المريض'},
'no-priscription-listed': {
'en': 'No Prescription Listed',
'ar': 'لا وصفة طبية مدرجة'
},
'referTo': {'en': "Refer To", 'ar': 'محال إلى'}, 'referTo': {'en': "Refer To", 'ar': 'محال إلى'},
'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': 'إحالة'},
'approved': {'en': "Approved", 'ar': 'موافق عليه'},
'rejected': {'en': "Rejected", 'ar': 'مرفوض'}, 'rejected': {'en': "Rejected", 'ar': 'مرفوض'},
'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'}, 'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'},
'otherBranch': {'en': "Other Branch", 'ar': 'فرع آخر'}, 'otherBranch': {'en': "Other Branch", 'ar': 'فرع آخر'},
@ -302,5 +335,22 @@ const Map<String, Map<String, String>> localizedValues = {
'summaryReport': {'en': "Summary Report", 'ar': 'تقرير موجز'}, 'summaryReport': {'en': "Summary Report", 'ar': 'تقرير موجز'},
'accept': {'en': "ACCEPT", 'ar': 'قبول'}, 'accept': {'en': "ACCEPT", 'ar': 'قبول'},
'reject': {'en': "REJECT", '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': 'لم يتم سرد أي وصف'
},
'addNow': {'en': 'ADD Now', 'ar': 'اضف الآن'},
'orderType': {'en': 'Order Type', 'ar': 'نوع الطلب'},
'strength': {'en': 'Strength', 'ar': 'شدة'},
'doseTime': {'en': 'Dose Time', 'ar': 'وقت الجرعة'},
'indication': {'en': 'Indication', 'ar': 'دواعي الاستخدام'},
'duration': {'en': 'Duration', 'ar': 'المدة الزمنية'},
'instruction': {'en': 'Instructions', 'ar': 'إرشادات'},
'addMedication': {'en': 'ADD MEDICATION', 'ar': 'اضف الدواء'},
'route': {'en': 'Route', 'ar': 'المسار'},
}; };

@ -9,3 +9,4 @@ final APP_Language = 'language';
final DOCTOR_PROFILE = 'doctorProfile'; final DOCTOR_PROFILE = 'doctorProfile';
final LIVE_CARE_PATIENT = 'livecare-patient-profile'; final LIVE_CARE_PATIENT = 'livecare-patient-profile';
final LOGGED_IN_USER = 'loggedUser'; final LOGGED_IN_USER = 'loggedUser';
final DASHBOARD_DATA = 'dashboard-data';

@ -0,0 +1,106 @@
class PostPrescriptionReqModel {
String vidaAuthTokenID;
int clinicID;
int episodeID;
int appointmentNo;
int patientMRN;
List<PrescriptionRequestModel> prescriptionRequestModel;
PostPrescriptionReqModel(
{this.vidaAuthTokenID =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiYTYxZjAyZjItNzUwZS00MTZkLWEzOTQtZTRjZmViZGVjMDE5IiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUzNTIiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODUzMDAyNywiZXhwIjoxNjA5Mzk0MDI3LCJpYXQiOjE2MDg1MzAwMjd9.M1NTREPgz5vQH_GTZ_KGb0xQW5HEDs47AtNR3jbqnms",
this.clinicID = 1,
this.episodeID = 200012117,
this.appointmentNo = 2016054573,
this.patientMRN = 3120690,
this.prescriptionRequestModel});
PostPrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
clinicID = json['ClinicID'];
episodeID = json['EpisodeID'];
appointmentNo = json['AppointmentNo'];
patientMRN = json['PatientMRN'];
if (json['prescriptionRequestModel'] != null) {
prescriptionRequestModel = new List<PrescriptionRequestModel>();
json['prescriptionRequestModel'].forEach((v) {
prescriptionRequestModel.add(new PrescriptionRequestModel.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['ClinicID'] = this.clinicID;
data['EpisodeID'] = this.episodeID;
data['AppointmentNo'] = this.appointmentNo;
data['PatientMRN'] = this.patientMRN;
if (this.prescriptionRequestModel != null) {
data['prescriptionRequestModel'] =
this.prescriptionRequestModel.map((v) => v.toJson()).toList();
}
return data;
}
}
class PrescriptionRequestModel {
int itemId;
String doseStartDate;
int duration;
int dose;
int doseUnitId;
int route;
int frequency;
int doseTime;
bool covered;
bool approvalRequired;
String remarks;
String icdcode10Id;
PrescriptionRequestModel(
{this.itemId = 4,
this.doseStartDate = "2020-12-20T13:07:41.769Z",
this.duration = 2,
this.dose = 1,
this.doseUnitId = 1,
this.route = 1,
this.frequency = 1,
this.doseTime = 1,
this.covered = true,
this.approvalRequired = true,
this.remarks = "test1",
this.icdcode10Id = "test3"});
PrescriptionRequestModel.fromJson(Map<String, dynamic> json) {
itemId = json['itemId'];
doseStartDate = json['doseStartDate'];
duration = json['duration'];
dose = json['dose'];
doseUnitId = json['doseUnitId'];
route = json['route'];
frequency = json['frequency'];
doseTime = json['doseTime'];
covered = json['covered'];
approvalRequired = json['approvalRequired'];
remarks = json['remarks'];
icdcode10Id = json['icdcode10Id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['itemId'] = this.itemId;
data['doseStartDate'] = this.doseStartDate;
data['duration'] = this.duration;
data['dose'] = this.dose;
data['doseUnitId'] = this.doseUnitId;
data['route'] = this.route;
data['frequency'] = this.frequency;
data['doseTime'] = this.doseTime;
data['covered'] = this.covered;
data['approvalRequired'] = this.approvalRequired;
data['remarks'] = this.remarks;
data['icdcode10Id'] = this.icdcode10Id;
return data;
}
}

@ -0,0 +1,157 @@
class PrescriptionModel {
List<EntityList> entityList;
dynamic rowcount;
dynamic statusMessage;
PrescriptionModel({this.entityList, this.rowcount, this.statusMessage});
PrescriptionModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) {
entityList = new List<EntityList>();
json['entityList'].forEach((v) {
entityList.add(new EntityList.fromJson(v));
});
}
rowcount = json['rowcount'];
statusMessage = json['statusMessage'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.entityList != null) {
data['entityList'] = this.entityList.map((v) => v.toJson()).toList();
}
data['rowcount'] = this.rowcount;
data['statusMessage'] = this.statusMessage;
return data;
}
}
class EntityList {
dynamic appointmentNo;
dynamic clinicName;
dynamic createdBy;
dynamic createdOn;
dynamic doctorName;
dynamic doseDailyQuantity;
dynamic doseDailyUnitID;
dynamic doseDetail;
dynamic doseDurationDays;
dynamic doseTimingID;
dynamic episodeID;
dynamic frequencyID;
dynamic icdCode10ID;
dynamic indication;
dynamic isDispensed;
dynamic isMedicineCovered;
dynamic isSIG;
dynamic medicationName;
dynamic medicationPrice;
dynamic medicineCode;
dynamic orderTypeDescription;
dynamic qty;
dynamic quantity;
dynamic remarks;
dynamic routeID;
dynamic startDate;
dynamic status;
dynamic stopDate;
dynamic uom;
EntityList(
{this.appointmentNo,
this.clinicName,
this.createdBy,
this.createdOn,
this.doctorName,
this.doseDailyQuantity,
this.doseDailyUnitID,
this.doseDetail,
this.doseDurationDays,
this.doseTimingID,
this.episodeID,
this.frequencyID,
this.icdCode10ID,
this.indication,
this.isDispensed,
this.isMedicineCovered,
this.isSIG,
this.medicationName,
this.medicationPrice,
this.medicineCode,
this.orderTypeDescription,
this.qty,
this.quantity,
this.remarks,
this.routeID,
this.startDate,
this.status,
this.stopDate,
this.uom});
EntityList.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
clinicName = json['clinicName'];
createdBy = json['createdBy'];
createdOn = json['createdOn'];
doctorName = json['doctorName'];
doseDailyQuantity = json['doseDailyQuantity'];
doseDailyUnitID = json['doseDailyUnitID'];
doseDetail = json['doseDetail'];
doseDurationDays = json['doseDurationDays'];
doseTimingID = json['doseTimingID'];
episodeID = json['episodeID'];
frequencyID = json['frequencyID'];
icdCode10ID = json['icdCode10ID'];
indication = json['indication'];
isDispensed = json['isDispensed'];
isMedicineCovered = json['isMedicineCovered'];
isSIG = json['isSIG'];
medicationName = json['medicationName'];
medicationPrice = json['medicationPrice'];
medicineCode = json['medicineCode'];
orderTypeDescription = json['orderTypeDescription'];
qty = json['qty'];
quantity = json['quantity'];
remarks = json['remarks'];
routeID = json['routeID'];
startDate = json['startDate'];
status = json['status'];
stopDate = json['stopDate'];
uom = json['uom'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['clinicName'] = this.clinicName;
data['createdBy'] = this.createdBy;
data['createdOn'] = this.createdOn;
data['doctorName'] = this.doctorName;
data['doseDailyQuantity'] = this.doseDailyQuantity;
data['doseDailyUnitID'] = this.doseDailyUnitID;
data['doseDetail'] = this.doseDetail;
data['doseDurationDays'] = this.doseDurationDays;
data['doseTimingID'] = this.doseTimingID;
data['episodeID'] = this.episodeID;
data['frequencyID'] = this.frequencyID;
data['icdCode10ID'] = this.icdCode10ID;
data['indication'] = this.indication;
data['isDispensed'] = this.isDispensed;
data['isMedicineCovered'] = this.isMedicineCovered;
data['isSIG'] = this.isSIG;
data['medicationName'] = this.medicationName;
data['medicationPrice'] = this.medicationPrice;
data['medicineCode'] = this.medicineCode;
data['orderTypeDescription'] = this.orderTypeDescription;
data['qty'] = this.qty;
data['quantity'] = this.quantity;
data['remarks'] = this.remarks;
data['routeID'] = this.routeID;
data['startDate'] = this.startDate;
data['status'] = this.status;
data['stopDate'] = this.stopDate;
data['uom'] = this.uom;
return data;
}
}

@ -0,0 +1,18 @@
class PrescriptionReqModel {
String vidaAuthTokenID;
dynamic patientMRN;
PrescriptionReqModel({this.vidaAuthTokenID, this.patientMRN});
PrescriptionReqModel.fromJson(Map<String, dynamic> json) {
vidaAuthTokenID = json['VidaAuthTokenID'];
patientMRN = json['PatientMRN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['PatientMRN'] = this.patientMRN;
return data;
}
}

@ -0,0 +1,89 @@
class GetProcedureModel {
List<EntityList> entityList;
int rowcount;
dynamic statusMessage;
GetProcedureModel({this.entityList, this.rowcount, this.statusMessage});
GetProcedureModel.fromJson(Map<String, dynamic> json) {
if (json['entityList'] != null) {
entityList = new List<EntityList>();
json['entityList'].forEach((v) {
entityList.add(new EntityList.fromJson(v));
});
}
rowcount = json['rowcount'];
statusMessage = json['statusMessage'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.entityList != null) {
data['entityList'] = this.entityList.map((v) => v.toJson()).toList();
}
data['rowcount'] = this.rowcount;
data['statusMessage'] = this.statusMessage;
return data;
}
}
class EntityList {
bool allowedClinic;
String category;
String categoryID;
String genderValidation;
String group;
String orderedValidation;
int price;
String procedureId;
String procedureName;
String specialPermission;
String subGroup;
String template;
EntityList(
{this.allowedClinic,
this.category,
this.categoryID,
this.genderValidation,
this.group,
this.orderedValidation,
this.price,
this.procedureId,
this.procedureName,
this.specialPermission,
this.subGroup,
this.template});
EntityList.fromJson(Map<String, dynamic> json) {
allowedClinic = json['allowedClinic'];
category = json['category'];
categoryID = json['categoryID'];
genderValidation = json['genderValidation'];
group = json['group'];
orderedValidation = json['orderedValidation'];
price = json['price'];
procedureId = json['procedureId'];
procedureName = json['procedureName'];
specialPermission = json['specialPermission'];
subGroup = json['subGroup'];
template = json['template'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['allowedClinic'] = this.allowedClinic;
data['category'] = this.category;
data['categoryID'] = this.categoryID;
data['genderValidation'] = this.genderValidation;
data['group'] = this.group;
data['orderedValidation'] = this.orderedValidation;
data['price'] = this.price;
data['procedureId'] = this.procedureId;
data['procedureName'] = this.procedureName;
data['specialPermission'] = this.specialPermission;
data['subGroup'] = this.subGroup;
data['template'] = this.template;
return data;
}
}

@ -0,0 +1,40 @@
class GetProcedureReqModel {
int clinicId;
int patientMRN;
int pageSize;
int pageIndex;
List<String> search;
dynamic categoryId;
String vidaAuthTokenID;
GetProcedureReqModel(
{this.clinicId,
this.patientMRN,
this.pageSize,
this.pageIndex,
this.search,
this.categoryId,
this.vidaAuthTokenID});
GetProcedureReqModel.fromJson(Map<String, dynamic> json) {
clinicId = json['ClinicId'];
patientMRN = json['PatientMRN'];
pageSize = json['PageSize'];
pageIndex = json['PageIndex'];
search = json['Search'].cast<String>();
categoryId = json['CategoryId'];
vidaAuthTokenID = json['VidaAuthTokenID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicId'] = this.clinicId;
data['PatientMRN'] = this.patientMRN;
data['PageSize'] = this.pageSize;
data['PageIndex'] = this.pageIndex;
data['Search'] = this.search;
data['CategoryId'] = this.categoryId;
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
return data;
}
}

@ -0,0 +1,87 @@
class PostProcedureReqModel {
int patientMRN;
int appointmentNo;
int episodeID;
List<Procedures> procedures;
String vidaAuthTokenID;
PostProcedureReqModel(
{this.patientMRN,
this.appointmentNo,
this.episodeID,
this.procedures,
this.vidaAuthTokenID});
PostProcedureReqModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
episodeID = json['EpisodeID'];
if (json['Procedures'] != null) {
procedures = new List<Procedures>();
json['Procedures'].forEach((v) {
procedures.add(new Procedures.fromJson(v));
});
}
vidaAuthTokenID = json['VidaAuthTokenID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['EpisodeID'] = this.episodeID;
if (this.procedures != null) {
data['Procedures'] = this.procedures.map((v) => v.toJson()).toList();
}
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
return data;
}
}
class Procedures {
String procedure;
String category;
List<Controls> controls;
Procedures({this.procedure, this.category, this.controls});
Procedures.fromJson(Map<String, dynamic> json) {
procedure = json['Procedure'];
category = json['Category'];
if (json['Controls'] != null) {
controls = new List<Controls>();
json['Controls'].forEach((v) {
controls.add(new Controls.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Procedure'] = this.procedure;
data['Category'] = this.category;
if (this.controls != null) {
data['Controls'] = this.controls.map((v) => v.toJson()).toList();
}
return data;
}
}
class Controls {
String code;
String controlValue;
Controls({this.code, this.controlValue});
Controls.fromJson(Map<String, dynamic> json) {
code = json['Code'];
controlValue = json['ControlValue'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['Code'] = this.code;
data['ControlValue'] = this.controlValue;
return data;
}
}

@ -5,7 +5,6 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'base_service.dart'; import 'base_service.dart';
class LookupService extends BaseService { class LookupService extends BaseService {
List<MasterKeyModel> listOfAllergies = []; List<MasterKeyModel> listOfAllergies = [];
List<MasterKeyModel> get allergySeverityList => _allergySeverityList; List<MasterKeyModel> get allergySeverityList => _allergySeverityList;
@ -26,11 +25,12 @@ class LookupService extends BaseService {
List<MasterKeyModel> get historySurgicalList => _historySurgicalList; List<MasterKeyModel> get historySurgicalList => _historySurgicalList;
List<MasterKeyModel> _historySurgicalList = []; List<MasterKeyModel> _historySurgicalList = [];
List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> get physicalExaminationList => _physicalExaminationList; List<MasterKeyModel> get physicalExaminationList => _physicalExaminationList;
List<MasterKeyModel> _physicalExaminationList = []; List<MasterKeyModel> _physicalExaminationList = [];
List<MasterKeyModel> listOfPhysiotherapyGoals = []; // List<MasterKeyModel> listOfPhysiotherapyGoals = [];
List<MasterKeyModel> listOfDiagnosisType = []; List<MasterKeyModel> listOfDiagnosisType = [];
List<MasterKeyModel> listOfDiagnosisCondition = []; List<MasterKeyModel> listOfDiagnosisCondition = [];
@ -41,12 +41,12 @@ class LookupService extends BaseService {
}; };
await baseAppClient.post(GET_MASTER_LOOKUP_LIST, await baseAppClient.post(GET_MASTER_LOOKUP_LIST,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
setMasterLookupInCorrectArray( setMasterLookupInCorrectArray(
response['MasterLookUpList']['entityList'], masterKeys); response['MasterLookUpList']['entityList'], masterKeys);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
setMasterLookupInCorrectArray(entryList, MasterKeysService masterKeys) { setMasterLookupInCorrectArray(entryList, MasterKeysService masterKeys) {
@ -54,63 +54,55 @@ class LookupService extends BaseService {
case MasterKeysService.Allergies: case MasterKeysService.Allergies:
listOfAllergies.clear(); listOfAllergies.clear();
entryList.forEach((v) { entryList.forEach((v) {
listOfAllergies listOfAllergies.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.HistoryFamily: case MasterKeysService.HistoryFamily:
_historyFamilyList.clear(); _historyFamilyList.clear();
entryList.forEach((v) { entryList.forEach((v) {
_historyFamilyList _historyFamilyList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.HistoryMedical: case MasterKeysService.HistoryMedical:
_historyMedicalList.clear(); _historyMedicalList.clear();
entryList.forEach((v) { entryList.forEach((v) {
_historyMedicalList _historyMedicalList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.HistorySocial: case MasterKeysService.HistorySocial:
historySocialList.clear(); historySocialList.clear();
entryList.forEach((v) { entryList.forEach((v) {
historySocialList historySocialList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.HistorySports: case MasterKeysService.HistorySports:
_historySportList.clear(); _historySportList.clear();
entryList.forEach((v) { entryList.forEach((v) {
_historySportList _historySportList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v)); });
}); break; break;
case MasterKeysService.HistorySurgical: case MasterKeysService.HistorySurgical:
_historySurgicalList.clear(); _historySurgicalList.clear();
entryList.forEach((v) { entryList.forEach((v) {
_historySurgicalList _historySurgicalList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.PhysicalExamination: case MasterKeysService.PhysicalExamination:
_physicalExaminationList.clear(); _physicalExaminationList.clear();
entryList.forEach((v) { entryList.forEach((v) {
_physicalExaminationList _physicalExaminationList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.AllergySeverity: case MasterKeysService.AllergySeverity:
_allergySeverityList.clear(); _allergySeverityList.clear();
entryList.forEach((v) { entryList.forEach((v) {
_allergySeverityList _allergySeverityList.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
case MasterKeysService.physiotherapyGoals: case MasterKeysService.physiotherapyGoals:
listOfPhysiotherapyGoals.clear(); listOfPhysiotherapyGoals.clear();
entryList.forEach((v) { entryList.forEach((v) {
listOfPhysiotherapyGoals listOfPhysiotherapyGoals.add(MasterKeyModel.fromJson(v));
.add(MasterKeyModel.fromJson(v));
}); });
break; break;
@ -130,4 +122,4 @@ class LookupService extends BaseService {
break; break;
} }
} }
} }

@ -0,0 +1,31 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
class DashboardService extends BaseService {
List<DashboardModel> _dashboardItemsList = [];
List<DashboardModel> get dashboardItemsList => _dashboardItemsList;
// DashboardModel _dashboard = DashboardModel();
Future getDashboard() async {
hasError = false;
await baseAppClient.post(
GET_DASHBOARD,
onSuccess: (dynamic response, int statusCode) {
_dashboardItemsList.clear();
response['listDoctorDashboarKPI'].forEach((v) {
_dashboardItemsList.add(DashboardModel.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: {
// "VidaAuthTokenID":
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODA0IiwianRpIjoiZDYxZmM5MTQtZWFhYy00YjQ4LTgyMmEtMmE3OTNlZDMzZGYwIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMjgwNCIsIk5hbWUiOiJNVUhBTU1BRCBBWkFNIiwiRW1wbG95ZWVJZCI6IjE0ODUiLCJGYWNpbGl0eUdyb3VwSWQiOiIwMTAyNjYiLCJGYWNpbGl0eUlkIjoiMTUiLCJQaGFyYW1jeUZhY2lsaXR5SWQiOiI1NSIsIklTX1BIQVJNQUNZX0NPTk5FQ1RFRCI6IlRydWUiLCJEb2N0b3JJZCI6IjE0ODUiLCJTRVNTSU9OSUQiOiIyMTU3NTgwOCIsIkNsaW5pY0lkIjoiMyIsInJvbGUiOlsiU0VDVVJJVFkgQURNSU5JU1RSQVRPUlMiLCJTRVRVUCBBRE1JTklTVFJBVE9SUyIsIkNFTydTIiwiRVhFQ1VUSVZFIERJUkVDVE9SUyIsIk1BTkFHRVJTIiwiU1VQRVJWSVNPUlMiLCJDTElFTlQgU0VSVklDRVMgQ09PUkRJTkFUT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIFNVUEVSVklTT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIE1BTkdFUlMiLCJIRUFEIE5VUlNFUyIsIkRPQ1RPUlMiLCJDSElFRiBPRiBNRURJQ0FMIFNUQUZGUyIsIkJJTy1NRURJQ0FMIFRFQ0hOSUNJQU5TIiwiQklPLU1FRElDQUwgRU5HSU5FRVJTIiwiQklPLU1FRElDQUwgREVQQVJUTUVOVCBIRUFEUyIsIklUIEhFTFAgREVTSyIsIkFETUlOSVNUUkFUT1JTIiwiTEFCIEFETUlOSVNUUkFUT1IiLCJMQUIgVEVDSE5JQ0lBTiIsIkJVU0lORVNTIE9GRklDRSBTVEFGRiIsIkZJTkFOQ0UgQUNDT1VOVEFOVFMiLCJQSEFSTUFDWSBTVEFGRiIsIkFDQ09VTlRTIFNUQUZGIiwiTEFCIFJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiSU5QQVRJRU5UIEJJTExJTkcgU1VQRVJWSVNPUiIsIkxEUi1PUiBOVVJTRVMiLCJBRE1JU1NJT04gU1RBRkYiLCJIRUxQIERFU0sgQURNSU4iLCJBUFBST1ZBTCBTVEFGRiIsIklOUEFUSUVOVCBCSUxMSU5HIENPT1JESU5BVE9SIiwiQklMTElORyBTVEFGRiIsIkNPTlNFTlQgIiwiQ29uc2VudCAtIERlbnRhbCIsIldFQkVNUiJdLCJuYmYiOjE2MDgwMjg0NzQsImV4cCI6MTYwODg5MjQ3NCwiaWF0IjoxNjA4MDI4NDc0fQ.8OJcy6vUuPnNTi_qSjip8YCrFdaRLtJKbNKXcMtnQxk"
},
);
}
}

@ -63,6 +63,10 @@ class PatientService extends BaseService {
// TODO: replace var with model // TODO: replace var with model
var _doctorsList = []; var _doctorsList = [];
var _arrivedList = [];
get arrivedList => _arrivedList;
get doctorsList => _doctorsList; get doctorsList => _doctorsList;
// TODO: replace var with model // TODO: replace var with model
@ -275,7 +279,7 @@ class PatientService extends BaseService {
); );
} }
Future getPatientInsuranceApprovals(patient) async { Future getPatientInsuranceApprovals(patient) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
@ -292,7 +296,7 @@ class PatientService extends BaseService {
); );
} }
Future getPatientProgressNote(patient) async { Future getPatientProgressNote(patient) async {
hasError = false; hasError = false;
await baseAppClient.post( await baseAppClient.post(
@ -309,7 +313,6 @@ class PatientService extends BaseService {
); );
} }
Future getClinicsList() async { Future getClinicsList() async {
hasError = false; hasError = false;
@ -327,7 +330,6 @@ class PatientService extends BaseService {
); );
} }
Future getReferralFrequancyList() async { Future getReferralFrequancyList() async {
hasError = false; hasError = false;
@ -362,19 +364,19 @@ class PatientService extends BaseService {
); );
} }
// TODO send the total model insted of each parameter // TODO send the total model insted of each parameter
Future referToDoctor({String selectedDoctorID, Future referToDoctor(
String selectedClinicID, {String selectedDoctorID,
int admissionNo, String selectedClinicID,
String extension, int admissionNo,
String priority, String extension,
String frequency, String priority,
String referringDoctorRemarks, String frequency,
int patientID, String referringDoctorRemarks,
int patientTypeID, int patientID,
String roomID, int patientTypeID,
int projectID}) async { String roomID,
int projectID}) async {
hasError = false; hasError = false;
// TODO Change it to use it when we implement authentication user // TODO Change it to use it when we implement authentication user
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
@ -408,4 +410,21 @@ class PatientService extends BaseService {
body: _referToDoctorRequest.toJson(), body: _referToDoctorRequest.toJson(),
); );
} }
Future getArrivedList() async {
hasError = false;
await baseAppClient.post(
ARRIVED_PATIENT_URL,
onSuccess: (dynamic response, int statusCode) {
_arrivedList = [];
_arrivedList = response['"patientArrivalList": '];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: _doctorsByClinicIdRequest.toJson(),
);
}
} }

@ -0,0 +1,45 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/prescription_req_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class PrescriptionService extends BaseService {
List<PrescriptionModel> _prescriptionList = List();
List<PrescriptionModel> get prescriptionList => _prescriptionList;
PrescriptionReqModel _prescriptionReqModel = PrescriptionReqModel(
patientMRN: 1231755,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyODA0IiwianRpIjoiNzNiNmUyZDctMjA0ZC00NzAyLTkxMDYtODE3MzI3OTZkYzI5IiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMjgwNCIsIk5hbWUiOiJNVUhBTU1BRCBBWkFNIiwiRW1wbG95ZWVJZCI6IjE0ODUiLCJGYWNpbGl0eUdyb3VwSWQiOiIwMTAyNjYiLCJGYWNpbGl0eUlkIjoiMTUiLCJQaGFyYW1jeUZhY2lsaXR5SWQiOiI1NSIsIklTX1BIQVJNQUNZX0NPTk5FQ1RFRCI6IlRydWUiLCJEb2N0b3JJZCI6IjE0ODUiLCJTRVNTSU9OSUQiOiIyMTU3NjIwOSIsIkNsaW5pY0lkIjoiMyIsInJvbGUiOlsiU0VDVVJJVFkgQURNSU5JU1RSQVRPUlMiLCJTRVRVUCBBRE1JTklTVFJBVE9SUyIsIkNFTydTIiwiRVhFQ1VUSVZFIERJUkVDVE9SUyIsIk1BTkFHRVJTIiwiU1VQRVJWSVNPUlMiLCJDTElFTlQgU0VSVklDRVMgQ09PUkRJTkFUT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIFNVUEVSVklTT1JTIiwiQ0xJRU5UIFNFUlZJQ0VTIE1BTkdFUlMiLCJIRUFEIE5VUlNFUyIsIkRPQ1RPUlMiLCJDSElFRiBPRiBNRURJQ0FMIFNUQUZGUyIsIkJJTy1NRURJQ0FMIFRFQ0hOSUNJQU5TIiwiQklPLU1FRElDQUwgRU5HSU5FRVJTIiwiQklPLU1FRElDQUwgREVQQVJUTUVOVCBIRUFEUyIsIklUIEhFTFAgREVTSyIsIkFETUlOSVNUUkFUT1JTIiwiTEFCIEFETUlOSVNUUkFUT1IiLCJMQUIgVEVDSE5JQ0lBTiIsIkJVU0lORVNTIE9GRklDRSBTVEFGRiIsIkZJTkFOQ0UgQUNDT1VOVEFOVFMiLCJQSEFSTUFDWSBTVEFGRiIsIkFDQ09VTlRTIFNUQUZGIiwiTEFCIFJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiSU5QQVRJRU5UIEJJTExJTkcgU1VQRVJWSVNPUiIsIkxEUi1PUiBOVVJTRVMiLCJBRE1JU1NJT04gU1RBRkYiLCJIRUxQIERFU0sgQURNSU4iLCJBUFBST1ZBTCBTVEFGRiIsIklOUEFUSUVOVCBCSUxMSU5HIENPT1JESU5BVE9SIiwiQklMTElORyBTVEFGRiIsIkNPTlNFTlQgIiwiQ29uc2VudCAtIERlbnRhbCIsIldFQkVNUiJdLCJuYmYiOjE2MDgyMzY2MjAsImV4cCI6MTYwOTEwMDYyMCwiaWF0IjoxNjA4MjM2NjIwfQ.z4Lh0dCRr9GWXvaTo7x5GPV7R5z8ONyh3-0uk3PXMu8",
);
PostPrescriptionReqModel _postPrescriptionReqModel =
PostPrescriptionReqModel();
Future getPrescription() async {
hasError = false;
_prescriptionList.clear();
await baseAppClient.post(GET_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) {
_prescriptionList
.add(PrescriptionModel.fromJson(response['PrescriptionList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _prescriptionReqModel.toJson());
}
Future postPrescription() async {
hasError = false;
//_prescriptionList.clear();
await baseAppClient.post(POST_PRESCRIPTION_LIST,
onSuccess: (dynamic response, int statusCode) {
_prescriptionList
.add(PrescriptionModel.fromJson(response['PrescriptionList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _postPrescriptionReqModel.toJson());
}
}

@ -0,0 +1,48 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/model/procedure/post_procedure_req_model.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
class ProcedureService extends BaseService {
List<GetProcedureModel> _procedureList = List();
List<GetProcedureModel> get procedureList => _procedureList;
GetProcedureReqModel _getProcedureReqModel = GetProcedureReqModel(
clinicId: 0,
pageSize: 10,
pageIndex: 1,
patientMRN: 0,
//categoryId: null,
vidaAuthTokenID:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxNDg1IiwianRpIjoiZjQ4YTk0OTQtYTczZS00MDI3LWI2MjgtNzc4MjAwMzUyYWEzIiwiZW1haWwiOiJNb2hhbWVkLlJlc3dhbkBjbG91ZHNvbHV0aW9uLXNhLmNvbSIsImlkIjoiMTQ4NSIsIk5hbWUiOiJTSEFLRVJBIFBBUlZFRU4gKFVTRUQgQlkgRVNFUlZJQ0VTKSIsIkVtcGxveWVlSWQiOiIxNDg1IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiIxNDg1IiwiU0VTU0lPTklEIjoiMjE1ODUyMTAiLCJDbGluaWNJZCI6IjMiLCJyb2xlIjoiRE9DVE9SUyIsIm5iZiI6MTYwODM2NDU2OCwiZXhwIjoxNjA5MjI4NTY4LCJpYXQiOjE2MDgzNjQ1Njh9.YLbvq5nxPn8o9ZYkcbc5YAX7Jy23Mm0s33oRmE8GHDI",
search: ["lab"],
);
PostProcedureReqModel _postProcedureReqModel = PostProcedureReqModel();
Future getProcedure() async {
hasError = false;
_procedureList.clear();
await baseAppClient.post(GET_PROCEDURE_LIST,
onSuccess: (dynamic response, int statusCode) {
_procedureList.add(GetProcedureModel.fromJson(response['ProcedureList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _getProcedureReqModel.toJson());
}
Future postProcedure() async {
hasError = false;
_procedureList.clear();
await baseAppClient.post(POST_PROCEDURE_LIST,
onSuccess: (dynamic response, int statusCode) {
_procedureList.add(GetProcedureModel.fromJson(response['ProcedureList']));
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _postProcedureReqModel.toJson());
}
}

@ -0,0 +1,93 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
// import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
class SickLeaveService extends BaseService {
Map get sickLeavestatisitics => _statistics;
Map _statistics = {};
List<GetAllSickLeaveResponse> get getAllSickLeave => _getAllsickLeave;
List<GetAllSickLeaveResponse> _getAllsickLeave = [];
Future getStatistics(appoNo, patientMRN) async {
hasError = false;
await baseAppClient.post(
GET_SICKLEAVE_STATISTIC,
onSuccess: (dynamic response, int statusCode) {
print(response);
_statistics = {};
_statistics = response['SickLeaveStatistics'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: {"PatientMRN": patientMRN, "AppointmentNo": appoNo},
);
}
Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async {
addSickLeaveRequest.appointmentNo = '2016054661';
addSickLeaveRequest.patientMRN = '3120746';
hasError = false;
await baseAppClient.post(
ADD_SICK_LEAVE,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
print(response);
// _statistics = {};
// _statistics = response['SickLeaveStatistics'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: addSickLeaveRequest.toJson(),
);
}
Future extendSickLeave(GetAllSickLeaveResponse request) async {
var extendSickLeaveRequest = ExtendSickLeaveRequest();
extendSickLeaveRequest.patientMRN =
request.patientMRN.toString(); //'3120746';
extendSickLeaveRequest.previousRequestNo = request.requestNo.toString();
extendSickLeaveRequest.noOfDays = request.noOfDays.toString();
extendSickLeaveRequest.remarks = request.remarks;
hasError = false;
await baseAppClient.post(
EXTEND_SICK_LEAVE,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
print(response);
// _statistics = {};
// _statistics = response['SickLeaveStatistics'];
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: extendSickLeaveRequest.toJson(),
);
}
Future getSickLeave() async {
hasError = false;
await baseAppClient.post(
GET_SICK_LEAVE,
onSuccess: (dynamic response, int statusCode) {
Future.value(response);
_getAllsickLeave.clear();
response['SickLeavesList']['entityList'].forEach((v) {
_getAllsickLeave.add(GetAllSickLeaveResponse.fromJson(v));
});
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
},
body: {'PatientMRN': 3120772},
);
}
}

@ -19,17 +19,16 @@ class AuthViewModel with ChangeNotifier {
bool isLoading = true; bool isLoading = true;
DoctorProfileModel doctorProfile; DoctorProfileModel doctorProfile;
BaseAppClient baseAppClient = BaseAppClient(); BaseAppClient baseAppClient = BaseAppClient();
setDoctorProfile(DoctorProfileModel profileModel){ setDoctorProfile(DoctorProfileModel profileModel) {
doctorProfile = profileModel; doctorProfile = profileModel;
notifyListeners(); notifyListeners();
} }
AuthViewModel() { AuthViewModel() {
getUserAuthentication(); getUserAuthentication();
} }
getUserAuthentication() async { getUserAuthentication() async {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (profile != null) { if (profile != null) {
doctorProfile = new DoctorProfileModel.fromJson(profile); doctorProfile = new DoctorProfileModel.fromJson(profile);
@ -195,7 +194,8 @@ class AuthViewModel with ChangeNotifier {
await baseAppClient.post(GET_DOC_PROFILES, await baseAppClient.post(GET_DOC_PROFILES,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
doctorProfile = DoctorProfileModel.fromJson(response['DoctorProfileList'][0]); doctorProfile =
DoctorProfileModel.fromJson(response['DoctorProfileList'][0]);
selectedClinicName = selectedClinicName =
response['DoctorProfileList'][0]['ClinicDescription']; response['DoctorProfileList'][0]['ClinicDescription'];
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {

@ -0,0 +1,21 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/dasboard_service.dart';
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class DashboardViewModel extends BaseViewModel {
DashboardService _dashboardService = locator<DashboardService>();
get dashboardItemsList => _dashboardService.dashboardItemsList;
Future getDashboard() async {
setState(ViewState.Busy);
await _dashboardService.getDashboard();
if (_dashboardService.hasError) {
error = _dashboardService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -248,4 +248,14 @@ class PatientViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getArrivedList() async {
setState(ViewState.Busy);
await _patientService.getArrivedList();
if (_patientService.hasError) {
error = _patientService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
} }

@ -0,0 +1,38 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
class PrescriptionViewModel extends BaseViewModel {
bool hasError = false;
PrescriptionService _prescriptionService = locator<PrescriptionService>();
List<PrescriptionModel> get prescriptionList =>
_prescriptionService.prescriptionList;
Future getPrescription() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _prescriptionService.getPrescription();
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
Future postPrescription() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _prescriptionService.postPrescription();
if (_prescriptionService.hasError) {
error = _prescriptionService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -0,0 +1,23 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/procedure/get_procedure_model.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart';
class ProcedureViewModel extends BaseViewModel {
bool hasError = false;
ProcedureService _procedureService = locator<ProcedureService>();
List<GetProcedureModel> get procedureList => _procedureService.procedureList;
Future getProcedure() async {
hasError = false;
//_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy);
await _procedureService.getProcedure();
if (_procedureService.hasError) {
error = _procedureService.error;
setState(ViewState.ErrorLocal);
} else
setState(ViewState.Idle);
}
}

@ -0,0 +1,54 @@
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/service/medicine_service.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/extend_sick_leave_request.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class SickLeaveViewModel extends BaseViewModel {
SickLeaveService _sickLeaveService = locator<SickLeaveService>();
get sickLeaveStatistics => _sickLeaveService.sickLeavestatisitics;
get getAllSIckLeave => _sickLeaveService.getAllSickLeave;
Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async {
setState(ViewState.Busy);
await _sickLeaveService.addSickLeave(addSickLeaveRequest);
if (_sickLeaveService.hasError) {
error = _sickLeaveService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future extendSickLeave(GetAllSickLeaveResponse extendSickLeaveRequest) async {
setState(ViewState.Busy);
await _sickLeaveService.extendSickLeave(extendSickLeaveRequest);
if (_sickLeaveService.hasError) {
error = _sickLeaveService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future preSickLeaveStatistics(appoNo, patientMRN) async {
setState(ViewState.Busy);
await _sickLeaveService.getStatistics(appoNo, patientMRN);
if (_sickLeaveService.hasError) {
error = _sickLeaveService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getSickLeave() async {
setState(ViewState.Busy);
await _sickLeaveService.getSickLeave();
if (_sickLeaveService.hasError) {
error = _sickLeaveService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/screens/dashboard_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/message_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/message_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/services_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/services_screen.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart';
import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart';
@ -40,9 +41,7 @@ class _LandingPageState extends State<LandingPage> {
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
backgroundColor: HexColor('#515B5D'), backgroundColor: HexColor('#515B5D'),
textTheme: TextTheme( textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
headline6:
TextStyle(color: Colors.white)),
title: Text(getText(currentTab).toUpperCase()), title: Text(getText(currentTab).toUpperCase()),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -66,7 +65,8 @@ class _LandingPageState extends State<LandingPage> {
builder: Builder(builder: (context) => DashboardScreen()), builder: Builder(builder: (context) => DashboardScreen()),
), ),
MessagesScreen(), MessagesScreen(),
MyScheduleScreen(), //MyScheduleScreen(),
NewPrescriptionScreen(),
ServicesScreen() ServicesScreen()
], ],
), ),

@ -1,5 +1,13 @@
import 'package:doctor_app_flutter/core/service/dasboard_service.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/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/procedure_service.dart';
import 'package:doctor_app_flutter/core/service/sickleave_service.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
import 'core/service/SOAP_service.dart'; import 'core/service/SOAP_service.dart';
@ -28,8 +36,12 @@ void setupLocator() {
locator.registerLazySingleton(() => ReferredPatientService()); locator.registerLazySingleton(() => ReferredPatientService());
locator.registerLazySingleton(() => MedicineService()); locator.registerLazySingleton(() => MedicineService());
locator.registerLazySingleton(() => PatientService()); locator.registerLazySingleton(() => PatientService());
locator.registerLazySingleton(() => DashboardService());
locator.registerLazySingleton(() => SickLeaveService());
locator.registerLazySingleton(() => SOAPService()); locator.registerLazySingleton(() => SOAPService());
locator.registerLazySingleton(() => PatientReferralService()); locator.registerLazySingleton(() => PatientReferralService());
locator.registerLazySingleton(() => PrescriptionService());
locator.registerLazySingleton(() => ProcedureService());
/// View Model /// View Model
locator.registerFactory(() => DoctorReplayViewModel()); locator.registerFactory(() => DoctorReplayViewModel());
@ -38,6 +50,10 @@ void setupLocator() {
locator.registerFactory(() => ReferredPatientViewModel()); locator.registerFactory(() => ReferredPatientViewModel());
locator.registerFactory(() => MedicineViewModel()); locator.registerFactory(() => MedicineViewModel());
locator.registerFactory(() => PatientViewModel()); locator.registerFactory(() => PatientViewModel());
locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => SickLeaveViewModel());
locator.registerFactory(() => SOAPViewModel()); locator.registerFactory(() => SOAPViewModel());
locator.registerFactory(() => PatientReferralViewModel()); locator.registerFactory(() => PatientReferralViewModel());
locator.registerFactory(() => PrescriptionViewModel());
locator.registerFactory(() => ProcedureViewModel());
} }

@ -10,6 +10,7 @@ const PATIENT_TYPE = const [
}, },
{"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"}, {"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"},
{"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"}, {"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"},
{"text": "Arrived", "text_ar": "وصل", "val": "7"},
]; ];
const LOCATIONS = const [ const LOCATIONS = const [

@ -0,0 +1,70 @@
class DashboardModel {
String kPIName;
int displaySequence;
List<Summaryoptions> summaryoptions;
DashboardModel({this.kPIName, this.displaySequence, this.summaryoptions});
DashboardModel.fromJson(Map<String, dynamic> json) {
kPIName = json['KPIName'];
displaySequence = json['displaySequence'];
if (json['summaryoptions'] != null) {
summaryoptions = new List<Summaryoptions>();
json['summaryoptions'].forEach((v) {
summaryoptions.add(new Summaryoptions.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['KPIName'] = this.kPIName;
data['displaySequence'] = this.displaySequence;
if (this.summaryoptions != null) {
data['summaryoptions'] =
this.summaryoptions.map((v) => v.toJson()).toList();
}
return data;
}
}
class Summaryoptions {
String kPIParameter;
String captionColor;
bool isCaptionBold;
bool isValueBold;
int order;
int value;
String valueColor;
Summaryoptions(
{this.kPIParameter,
this.captionColor,
this.isCaptionBold,
this.isValueBold,
this.order,
this.value,
this.valueColor});
Summaryoptions.fromJson(Map<String, dynamic> json) {
kPIParameter = json['KPIParameter'];
captionColor = json['captionColor'];
isCaptionBold = json['isCaptionBold'];
isValueBold = json['isValueBold'];
order = json['order'];
value = json['value'];
valueColor = json['valueColor'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['KPIParameter'] = this.kPIParameter;
data['captionColor'] = this.captionColor;
data['isCaptionBold'] = this.isCaptionBold;
data['isValueBold'] = this.isValueBold;
data['order'] = this.order;
data['value'] = this.value;
data['valueColor'] = this.valueColor;
return data;
}
}

@ -5,10 +5,14 @@ class ListDoctorWorkingHoursTable {
String dayName; String dayName;
String workingHours; String workingHours;
ListDoctorWorkingHoursTable({this.date, this.dayName, this.workingHours}); ListDoctorWorkingHoursTable({
this.date,
this.dayName,
this.workingHours,
});
ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) { ListDoctorWorkingHoursTable.fromJson(Map<String, dynamic> json) {
date = Helpers.convertStringToDate(json['Date']) ; date = Helpers.convertStringToDate(json['Date']);
dayName = json['DayName']; dayName = json['DayName'];
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
} }
@ -18,6 +22,7 @@ class ListDoctorWorkingHoursTable {
data['Date'] = this.date; data['Date'] = this.date;
data['DayName'] = this.dayName; data['DayName'] = this.dayName;
data['WorkingHours'] = this.workingHours; data['WorkingHours'] = this.workingHours;
return data; return data;
} }
} }
@ -25,6 +30,5 @@ class ListDoctorWorkingHoursTable {
class WorkingHours { class WorkingHours {
String from; String from;
String to; String to;
WorkingHours({this.from,this.to}); WorkingHours({this.from, this.to});
} }

@ -0,0 +1,32 @@
class AddSickLeaveRequest {
String patientMRN;
String appointmentNo;
String startDate;
String noOfDays;
String remarks;
AddSickLeaveRequest(
{this.patientMRN,
this.appointmentNo,
this.startDate,
this.noOfDays,
this.remarks});
AddSickLeaveRequest.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
appointmentNo = json['AppointmentNo'];
startDate = json['StartDate'];
noOfDays = json['NoOfDays'];
remarks = json['Remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo;
data['StartDate'] = this.startDate;
data['NoOfDays'] = this.noOfDays;
data['Remarks'] = this.remarks;
return data;
}
}

@ -0,0 +1,25 @@
class ExtendSickLeaveRequest {
String patientMRN;
String previousRequestNo;
String noOfDays;
String remarks;
ExtendSickLeaveRequest(
{this.patientMRN, this.previousRequestNo, this.noOfDays, this.remarks});
ExtendSickLeaveRequest.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN'];
previousRequestNo = json['PreviousRequestNo'];
noOfDays = json['NoOfDays'];
remarks = json['Remarks'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN;
data['PreviousRequestNo'] = this.previousRequestNo;
data['NoOfDays'] = this.noOfDays;
data['Remarks'] = this.remarks;
return data;
}
}

@ -0,0 +1,44 @@
class GetAllSickLeaveResponse {
int appointmentNo;
bool isExtendedLeave;
int noOfDays;
int patientMRN;
String remarks;
int requestNo;
String startDate;
int status;
GetAllSickLeaveResponse(
{this.appointmentNo,
this.isExtendedLeave,
this.noOfDays,
this.patientMRN,
this.remarks,
this.requestNo,
this.startDate,
this.status});
GetAllSickLeaveResponse.fromJson(Map<String, dynamic> json) {
appointmentNo = json['appointmentNo'];
isExtendedLeave = json['isExtendedLeave'];
noOfDays = json['noOfDays'];
patientMRN = json['patientMRN'];
remarks = json['remarks'];
requestNo = json['requestNo'];
startDate = json['startDate'];
status = json['status'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['appointmentNo'] = this.appointmentNo;
data['isExtendedLeave'] = this.isExtendedLeave;
data['noOfDays'] = this.noOfDays;
data['patientMRN'] = this.patientMRN;
data['remarks'] = this.remarks;
data['requestNo'] = this.requestNo;
data['startDate'] = this.startDate;
data['status'] = this.status;
return data;
}
}

@ -7,7 +7,10 @@ import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/live_care/video_call.dart'; import 'package:doctor_app_flutter/screens/live_care/video_call.dart';
import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/add_SOAP_index.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/add_SOAP_index.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/auth/change_password_screen.dart';
@ -40,6 +43,7 @@ import 'screens/doctor/doctor_reply_screen.dart';
import 'screens/live_care/panding_list.dart'; import 'screens/live_care/panding_list.dart';
import 'screens/patients/profile/referral/my-referral-detail-screen.dart'; import 'screens/patients/profile/referral/my-referral-detail-screen.dart';
import 'screens/patients/profile/referral/refer-patient-screen.dart'; import 'screens/patients/profile/referral/refer-patient-screen.dart';
import 'screens/prescription/prescription_screen.dart';
const String INIT_ROUTE = ROOT; const String INIT_ROUTE = ROOT;
const String ROOT = 'root'; const String ROOT = 'root';
@ -74,13 +78,17 @@ const String PATIENT_ORDERS = 'patients/patient_orders';
const String PATIENT_INSURANCE_APPROVALS = const String PATIENT_INSURANCE_APPROVALS =
'patients/patient_insurance_approvals'; 'patients/patient_insurance_approvals';
const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details';
const String CREATE_EPISODE = 'patients/create-episode'; const String CREATE_EPISODE = 'patients/create-episode';
const String BODY_MEASUREMENTS = 'patients/body-measurements'; const String BODY_MEASUREMENTS = 'patients/body-measurements';
const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details';
// const String VIDEO_CALL = 'video-call'; // const String VIDEO_CALL = 'video-call';
const String LIVECARE_PENDING_LIST = 'livecare-pendinglist'; const String LIVECARE_PENDING_LIST = 'livecare-pendinglist';
const String ORDER_PRESCRIPTION = 'prescription/prescriptionsss';
const String ORDER_PROCEDURE = 'procedure/procedure';
// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox'; // const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox';
const String PATIENT_SICKLEAVE = 'patients/patient_sickleave';
const String ADD_SICKLEAVE = 'add-sickleave';
var routes = { var routes = {
ROOT: (_) => RootPage(), ROOT: (_) => RootPage(),
HOME: (_) => LandingPage(), HOME: (_) => LandingPage(),
@ -113,11 +121,17 @@ var routes = {
PATIENT_ORDERS: (_) => PatientsOrdersScreen(), PATIENT_ORDERS: (_) => PatientsOrdersScreen(),
PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(),
VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(),
CREATE_EPISODE:(_)=>AddSOAPIndex(), CREATE_EPISODE: (_) => AddSOAPIndex(),
BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(), BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(),
IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(), IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(),
// VIDEO_CALL: (_) => VideoCallPage(patientData: null), // VIDEO_CALL: (_) => VideoCallPage(patientData: null),
LIVECARE_PENDING_LIST: (_) => LiveCarePandingListScreen(), LIVECARE_PENDING_LIST: (_) => LiveCarePandingListScreen(),
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox(),
PATIENT_SICKLEAVE: (_) => SickLeaveScreen(),
ADD_SICKLEAVE: (_) => AddSickLeavScreen(),
ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(),
ORDER_PROCEDURE: (_) => ProcedureScreen(),
// LIVECARE_END_DIALOG: (_) => EndCallDialogBox() // LIVECARE_END_DIALOG: (_) => EndCallDialogBox()
MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(),
}; };

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_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/models/doctor/clinic_model.dart'; import 'package:doctor_app_flutter/models/doctor/clinic_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
@ -7,6 +9,7 @@ import 'package:doctor_app_flutter/models/doctor/profile_req_Model.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/core/viewModel/hospital_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/hospital_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/patients/profile/referral/my-referral-patient-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
@ -18,7 +21,7 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import '../routes.dart'; import '../routes.dart';
import '../widgets/shared/app_texts_widget.dart'; import '../widgets/shared/app_texts_widget.dart';
import 'doctor/doctor_reply_screen.dart'; import 'doctor/doctor_reply_screen.dart';
@ -47,7 +50,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
ProjectViewModel projectsProvider; ProjectViewModel projectsProvider;
var _isInit = true; var _isInit = true;
DoctorProfileModel profile; DoctorProfileModel profile;
bool isExpanded = false;
String isInpatient = "";
void didChangeDependencies() async { void didChangeDependencies() async {
super.didChangeDependencies(); super.didChangeDependencies();
if (_isInit) { if (_isInit) {
@ -72,11 +76,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
} }
return SafeArea( return BaseView<DashboardViewModel>(
bottom: true, onModelReady: (model) => model.getDashboard(),
child: AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
isLoading: isLoading,
body: ListView(children: [ body: ListView(children: [
Column( Column(
children: <Widget>[ children: <Widget>[
@ -92,43 +96,86 @@ class _DashboardScreenState extends State<DashboardScreen> {
actionList: projectsProvider.doctorClinicsList); actionList: projectsProvider.doctorClinicsList);
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Column(
child: AppText(
authProvider.selectedClinicName != null
? authProvider.selectedClinicName
: authProvider
.doctorProfile.clinicDescription,
fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.white,
textAlign: TextAlign.center,
),
alignment: projectsProvider.isArabic
? Alignment.topRight
: Alignment.topLeft,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row(
children: <Widget>[
AppText(
TranslationBase.of(context).welcome,
fontSize:
SizeConfig.textMultiplier * 1.7,
color: Colors.white,
)
],
),
SizedBox(
height: 4,
),
InkWell( InkWell(
child: Container( onTap: () async {
margin: EdgeInsets.only( showCupertinoPicker(
left: 5, decKey: '',
top: projectsProvider.isArabic context: context,
? 0 actionList: projectsProvider
: 5, .doctorClinicsList);
right: 10, },
bottom: projectsProvider.isArabic child: Row(
? 15 mainAxisAlignment:
: 7), MainAxisAlignment.spaceBetween,
child: Icon( children: <Widget>[
DoctorApp.sync_icon, Container(
color: Colors.white, child: AppText(
size: SizeConfig.textMultiplier * 1.8, authProvider.selectedClinicName !=
)), null
? authProvider
.selectedClinicName
: authProvider.doctorProfile
.clinicDescription,
fontSize:
SizeConfig.textMultiplier *
1.7,
color: Colors.white,
textAlign: TextAlign.center,
),
alignment: projectsProvider.isArabic
? Alignment.topRight
: Alignment.topLeft,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
InkWell(
child: Container(
margin: EdgeInsets.only(
left: 5,
top: projectsProvider
.isArabic
? 0
: 5,
right: 10,
bottom: projectsProvider
.isArabic
? 15
: 7),
child: Icon(
DoctorApp.sync_icon,
color: Colors.white,
size: SizeConfig
.textMultiplier *
1.8,
)),
),
],
),
]),
), ),
], ],
), ),
@ -137,179 +184,437 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
Container( Container(
color: Colors.white, color: Colors.white,
height: 90, height: this.isExpanded ? 150 : 110,
), ),
], ],
), ),
Positioned( Positioned(
right: 9.0, right: 9.0,
left: 9, left: 9,
bottom: 19, bottom: 15,
child: Container( child: ExpandableCardContainer(
decoration: BoxDecoration( expandedChild: Container(
color: HexColor("#DED8CF"), margin: EdgeInsets.only(left: 10, right: 10),
borderRadius: BorderRadius.all( height: MediaQuery.of(context).orientation ==
Radius.circular(10.0), Orientation.portrait
), ? MediaQuery.of(context).size.height * 0.22
), : MediaQuery.of(context).size.height * 0.25,
margin: EdgeInsets.only(left: 10, right: 10), width: double.infinity,
height: 140, child: Row(
width: double.infinity, mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Row( crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.center, DashboardItem(
children: <Widget>[ onTap: () {
Divider(), setState(() {
Padding( this.isExpanded = false;
padding: const EdgeInsets.only( });
top: 8.0, bottom: 8, right: 40, left: 8), },
child: CircularPercentIndicator( child: Padding(
radius: 100, padding: const EdgeInsets.all(8.0),
animation: true, child: Column(
animationDuration: 1200, children: [
lineWidth: 7.0, Row(
percent: .75, children: [
center: Column( Expanded(
mainAxisAlignment: MainAxisAlignment.center, child: Column(
children: <Widget>[ children: [
AppText( AppText(
"38", model.dashboardItemsList
fontSize: SizeConfig.textMultiplier * 3.7, .length >
color: HexColor('#5D4C35'), 0
fontWeight: FontWeight.bold, ? isInpatient == 'in'
), ? model
AppText( .dashboardItemsList[
TranslationBase.of(context).outPatients, 0]
fontWeight: FontWeight.normal, .summaryoptions[0]
fontSize: SizeConfig.textMultiplier * 1.4, .value
color: HexColor('#5D4C35'), .toString()
), : model
], .dashboardItemsList[
1]
.summaryoptions[0]
.value
.toString()
: "",
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 24,
),
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[0]
.kPIParameter
: model
.dashboardItemsList[
1]
.summaryoptions[0]
.kPIParameter
: "",
//'My Admitted Patient',
color: Colors.white,
textAlign: TextAlign.center,
fontSize: 12,
)
],
)),
Expanded(
child: Column(
children: [
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[1]
.value
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[1]
.value
.toString()
: "",
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 28,
),
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[1]
.kPIParameter
: model
.dashboardItemsList[
1]
.summaryoptions[1]
.kPIParameter
: "",
color: Colors.white,
textAlign: TextAlign.center,
fontSize: 12,
)
],
)),
Expanded(
child: Column(
children: [
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[2]
.value
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[2]
.value
.toString()
: "",
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 28),
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[2]
.kPIParameter
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[2]
.kPIParameter
.toString()
: "",
color: Colors.white,
fontSize: 12,
textAlign: TextAlign.center)
],
))
],
),
Row(
children: [
Expanded(
child: Column(
children: [
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[3]
.value
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[3]
.value
.toString()
: "",
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 28),
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[3]
.kPIParameter
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[3]
.kPIParameter
.toString()
: "",
color: Colors.white,
fontSize: 12,
textAlign: TextAlign.center)
],
)),
Expanded(
child: Column(
children: [
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[
4]
.value
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[
4]
.value
.toString()
: "",
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 28),
AppText(
model.dashboardItemsList
.length >
0
? isInpatient == 'in'
? model
.dashboardItemsList[
0]
.summaryoptions[
4]
.kPIParameter
.toString()
: model
.dashboardItemsList[
1]
.summaryoptions[
4]
.kPIParameter
.toString()
: "",
color: Colors.white,
fontSize: 12,
textAlign: TextAlign.center)
],
),
),
Expanded(
child: Container(),
)
],
)
],
)),
imageName: '5.png',
color: HexColor('#B8382C'),
hasBorder: false,
width: MediaQuery.of(context).size.width * 0.9,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.22
: MediaQuery.of(context).size.height * 0.25,
), ),
circularStrokeCap: CircularStrokeCap.butt, ],
backgroundColor: Colors.blueGrey[100],
progressColor: HexColor('#B8382C'),
),
), ),
Container( ),
child: Table( collapsedChild: Container(
defaultColumnWidth: FixedColumnWidth( margin: EdgeInsets.only(left: 10, right: 10),
MediaQuery.of(context).size.width / 5), height: MediaQuery.of(context).orientation ==
// border: TableBorder.all( Orientation.portrait
// color: Colors.black26, ? MediaQuery.of(context).size.height * 0.15
// width: 1, : MediaQuery.of(context).size.height * 0.25,
// style: BorderStyle.solid), width: double.infinity,
border: TableBorder.symmetric( child: Row(
inside: BorderSide( mainAxisAlignment: MainAxisAlignment.spaceBetween,
width: 0.5, crossAxisAlignment: CrossAxisAlignment.start,
color: HexColor('#5D4C35'), children: <Widget>[
), DashboardItem(
), onTap: () {
children: [ setState(() {
TableRow( this.isExpanded = true;
children: [ this.isInpatient = 'in';
TableCell( });
child: Center( },
child: Column( child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).arrived, model.dashboardItemsList.length > 0
fontSize: ? getPatientCount(
SizeConfig.textMultiplier * 1.5, model.dashboardItemsList[0])
color: HexColor('#5D4C35'), : "",
),
AppText(
"23",
fontSize: fontSize:
SizeConfig.textMultiplier * 2.7, SizeConfig.textMultiplier * 6,
color: HexColor('#5D4C35'), color: Colors.white,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 6,
), ),
Flexible(
child: AppText(
TranslationBase.of(context).inPatient,
color: Colors.white,
textOverflow: TextOverflow.ellipsis,
)),
], ],
), ),
)), Padding(
TableCell( padding: EdgeInsets.all(5),
child: Column( child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
children: [
Icon(
DoctorApp.in_patient_white,
size: 35,
color: Colors.white,
)
],
))
],
),
),
imageName: '4.png',
color: HexColor('#B8382C'),
hasBorder: false,
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.15
: MediaQuery.of(context).size.height * 0.25,
),
DashboardItem(
onTap: () {
setState(() {
isExpanded = true;
this.isInpatient = 'out';
});
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of(context).er, model.dashboardItemsList.length > 0
fontSize: ? getPatientCount(
SizeConfig.textMultiplier * 1.5, model.dashboardItemsList[1])
color: HexColor('#5D4C35'), : "",
),
AppText(
"03",
fontSize: fontSize:
SizeConfig.textMultiplier * 2.7, SizeConfig.textMultiplier * 6,
color: HexColor('#5D4C35'), color: Colors.white,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 6,
), ),
Flexible(
child: AppText(
TranslationBase.of(context)
.outPatients,
color: Colors.white,
textOverflow: TextOverflow.ellipsis,
)),
], ],
), ),
), Padding(
], padding: EdgeInsets.all(5),
// child: Column(
), mainAxisAlignment:
TableRow(children: [ MainAxisAlignment.end,
TableCell( children: [
child: Column( Icon(
children: <Widget>[ DoctorApp.out_patient,
SizedBox( size: 35,
height: 6, color: Colors.white,
), )
AppText( ],
TranslationBase.of(context).notArrived, ))
fontSize: ],
SizeConfig.textMultiplier * 1.5,
color: HexColor('#5D4C35'),
),
AppText(
"15",
fontSize:
SizeConfig.textMultiplier * 2.7,
color: HexColor('#5D4C35'),
fontWeight: FontWeight.bold,
),
],
),
),
TableCell(
child: Column(
children: <Widget>[
SizedBox(
height: 6,
),
AppText(
TranslationBase.of(context).walkIn,
fontSize:
SizeConfig.textMultiplier * 1.5,
color: HexColor('#5D4C35'),
),
AppText(
"04",
fontSize:
SizeConfig.textMultiplier * 2.7,
color: HexColor('#5D4C35'),
fontWeight: FontWeight.bold,
),
],
),
), ),
]), ),
], imageName: '5.png',
), color: HexColor('#B8382C'),
hasBorder: false,
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.15
: MediaQuery.of(context).size.height * 0.25,
),
],
), ),
Divider(), ),
], isExpanded: isExpanded,
), ))
),
)
]), ]),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.90, widthFactor: 0.90,
@ -335,16 +640,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(bottom: 10), // margin: EdgeInsets.only(bottom: 10),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
"08", model.dashboardItemsList.length > 0
? getPatientCount(
model.dashboardItemsList[7])
: "",
fontSize: SizeConfig.textMultiplier * 6, fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white, color: Colors.white,
), ),
AppText( AppText(
TranslationBase.of(context).labResult, TranslationBase.of(context)
.targetPatient,
textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
) )
], ],
@ -372,7 +682,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
"10", model.dashboardItemsList.length > 0
? getPatientCount(
model.dashboardItemsList[6])
: "",
fontSize: SizeConfig.textMultiplier * 6, fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white, color: Colors.white,
), ),
@ -405,7 +718,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
"05", model.dashboardItemsList.length > 0
? getPatientCount(
model.dashboardItemsList[2])
: "",
fontSize: SizeConfig.textMultiplier * 6, fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white, color: Colors.white,
), ),
@ -426,99 +742,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
SizedBox( SizedBox(
height: 15, height: 15,
), ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
DashboardItem(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
children: <Widget>[
Icon(
DoctorApp.in_patient_white,
size: 40,
color: Colors.white,
),
],
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
AppText(
"14",
fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white,
),
AppText(
TranslationBase.of(context).inPatient,
color: Colors.white,
)
],
)
],
),
),
imageName: '4.png',
color: HexColor('#B8382C'),
hasBorder: false,
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.13
: MediaQuery.of(context).size.height * 0.25,
),
DashboardItem(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
children: <Widget>[
Icon(
DoctorApp.operations,
size: 40,
color: Colors.white,
),
],
),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
AppText(
"07",
fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white,
),
AppText(
TranslationBase.of(context).operations,
color: Colors.white,
)
],
)
],
),
),
imageName: '5.png',
color: HexColor('#B8382C'),
hasBorder: false,
width: MediaQuery.of(context).size.width * 0.44,
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.13
: MediaQuery.of(context).size.height * 0.25,
),
],
),
SizedBox(
height: 15,
),
Row( Row(
children: <Widget>[ children: <Widget>[
AppText( AppText(
@ -834,6 +1057,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
this.isLoading = val; this.isLoading = val;
}); });
} }
getPatientCount(DashboardModel inPatientCount) {
int value = 0;
inPatientCount.summaryoptions.forEach((result) => {value += result.value});
return value.toString();
}
} }
// TODO Move to it file // TODO Move to it file
@ -895,3 +1125,28 @@ class DashboardItem extends StatelessWidget {
); );
} }
} }
class ExpandableCardContainer extends StatefulWidget {
final bool isExpanded;
final Widget collapsedChild;
final Widget expandedChild;
const ExpandableCardContainer(
{Key key, this.isExpanded, this.collapsedChild, this.expandedChild})
: super(key: key);
@override
_ExpandableCardContainerState createState() =>
_ExpandableCardContainerState();
}
class _ExpandableCardContainerState extends State<ExpandableCardContainer> {
@override
Widget build(BuildContext context) {
return new AnimatedContainer(
duration: new Duration(milliseconds: 1000),
curve: Curves.easeInOut,
child: widget.isExpanded ? widget.expandedChild : widget.collapsedChild,
);
}
}

@ -545,7 +545,7 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
), ),
], ],
), ),
) ),
], ],
)); ));
} }

@ -246,24 +246,13 @@ class _PatientsScreenState extends State<PatientsScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
_locations = [ _locations = [
TranslationBase TranslationBase.of(context).all,
.of(context) TranslationBase.of(context).today,
.all, TranslationBase.of(context).tomorrow,
TranslationBase TranslationBase.of(context).nextWeek,
.of(context)
.today,
TranslationBase
.of(context)
.tomorrow,
TranslationBase
.of(context)
.nextWeek,
]; ];
projectsProvider = Provider.of(context); projectsProvider = Provider.of(context);
final routeArgs = ModalRoute final routeArgs = ModalRoute.of(context).settings.arguments as Map;
.of(context)
.settings
.arguments as Map;
patient = routeArgs['patientSearchForm']; patient = routeArgs['patientSearchForm'];
@ -301,397 +290,394 @@ class _PatientsScreenState extends State<PatientsScreen> {
}); });
}); });
}, },
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold( appBarTitle: patientTypeTitle,
appBarTitle: patientTypeTitle, body: _isLoading
body: _isLoading ? DrAppCircularProgressIndeicator()
? DrAppCircularProgressIndeicator() : _isError
: _isError
? DrAppEmbeddedError(error: error) ? DrAppEmbeddedError(error: error)
: lItems == null || lItems.length == 0 : lItems == null || lItems.length == 0
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: TranslationBase error:
.of(context) TranslationBase.of(context).youDontHaveAnyPatient)
.youDontHaveAnyPatient) : Container(
: Container( child: ListView(
child: ListView( scrollDirection: Axis.vertical,
scrollDirection: Axis.vertical, children: <Widget>[
children: <Widget>[ Container(
Container( child: lItems == null
child: lItems == null ? Column(
? Column( crossAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ Container(
Container( child: Center(
child: Center( child: Padding(
child: Padding( padding: const EdgeInsets.fromLTRB(
padding: const EdgeInsets.fromLTRB( 0, 0, 0, 0), //250
0, 0, 0, 0), //250 child:
child: DrAppCircularProgressIndeicator(),
DrAppCircularProgressIndeicator(), )),
)),
),
],
)
: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context)
.size
.height *
0.03),
child: SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient"
? _locationBar(context)
: Container(),
),
SizedBox(height: 18.5),
Container(
width: SizeConfig.screenWidth * 0.9,
height: SizeConfig.screenHeight * 0.05,
child: TextField(
controller: _controller,
onChanged: (String str) {
this.searchData(str);
},
decoration: buildInputDecoration(
context,
TranslationBase.of(context)
.searchPatient),
), ),
), ],
SizedBox( )
height: 10.0, : Column(
), children: <Widget>[
Divider( Padding(
thickness: 0.8, padding: EdgeInsets.only(
color: Color(0xffCCCCCC), top: MediaQuery.of(context)
), .size
Container( .height *
decoration: BoxDecoration( 0.03),
color: Color(0Xffffffff), child: SERVICES_PATIANT2[
borderRadius: int.parse(patientType)] ==
BorderRadius.circular(20)), "List_MyOutPatient"
margin: EdgeInsets.fromLTRB(0, 0, 0, 0), ? _locationBar(context)
child: (responseModelList.length > 0) : Container(),
? Column( ),
// mainAxisAlignment: MainAxisAlignment.center, SizedBox(height: 18.5),
children: responseModelList.map( Container(
(PatiantInformtion item) { width: SizeConfig.screenWidth * 0.9,
return Container( height:
decoration: SizeConfig.screenHeight * 0.05,
myBoxDecoration(), child: TextField(
child: InkWell( controller: _controller,
child: Row( onChanged: (String str) {
children: <Widget>[ this.searchData(str);
Column( },
mainAxisAlignment: decoration: buildInputDecoration(
MainAxisAlignment context,
.start, TranslationBase.of(context)
children: <Widget>[ .searchPatient),
Padding( ),
padding: EdgeInsets ),
.only( SizedBox(
left: height: 10.0,
12.0), ),
child: Divider(
Container( thickness: 0.8,
decoration: color: Color(0xffCCCCCC),
BoxDecoration( ),
boxShadow: [ Container(
BoxShadow( decoration: BoxDecoration(
color: Color.fromRGBO( color: Color(0Xffffffff),
0, borderRadius:
0, BorderRadius.circular(20)),
0, margin:
0.08), EdgeInsets.fromLTRB(0, 0, 0, 0),
offset: Offset( child: (responseModelList.length > 0)
0.0, ? Column(
5.0), // mainAxisAlignment: MainAxisAlignment.center,
blurRadius: children: responseModelList
16.0) .map((PatiantInformtion
], item) {
borderRadius: return Container(
BorderRadius.all( decoration:
Radius.circular(35.0)), myBoxDecoration(),
color: Color( child: InkWell(
0xffCCCCCC), child: Row(
), children: <Widget>[
width: 70, Column(
height: 70, mainAxisAlignment:
child: Icon( MainAxisAlignment
item.genderDescription == .start,
"Male" children: <
? DoctorApp Widget>[
.male Padding(
: DoctorApp padding: EdgeInsets
.female_icon, .only(
size: 70, left:
color: Colors 12.0),
.white, child:
Container(
decoration:
BoxDecoration(
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),
),
width: 70,
height: 70,
child: Icon(
item.genderDescription ==
"Male"
? DoctorApp
.male
: DoctorApp
.female_icon,
size: 70,
color: Colors
.white,
),
), ),
), ),
), ],
], ),
),
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: [ children: [
Column( Column(
children: [ children: [
SizedBox( SizedBox(
height: height:
10.0, 10.0,
),
Padding(
padding: EdgeInsets.symmetric(
vertical:
5.5,
horizontal:
22.5),
child:
AppText(
item.firstName +
" " +
item.lastName,
fontSize:
2.0 *
SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
), ),
), Padding(
], padding: EdgeInsets.symmetric(
), vertical:
Row( 5.5,
mainAxisAlignment: horizontal:
MainAxisAlignment 22.5),
.spaceAround, child:
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
Wrap(
children: [
AppText( AppText(
TranslationBase.of(context).fileNo, item.firstName +
fontSize: 1.8 * SizeConfig.textMultiplier, " " +
fontWeight: FontWeight.bold, item.lastName,
backGroundcolor: Colors.white,
),
AppText(
item.patientId.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
),
],
),
SizedBox(
height:
2.5,
),
AppText(
'NATIONALITY: ' +
item.nationalityName.toString(),
fontSize: fontSize:
1.8 * SizeConfig.textMultiplier, 2.0 * SizeConfig.textMultiplier,
fontWeight: fontWeight:
FontWeight.bold, FontWeight.bold,
backGroundcolor: backGroundcolor:
Colors.white, Colors.white,
), ),
SizedBox( ),
height: ],
15.5, ),
), Row(
SERVICES_PATIANT2[int.parse(patientType)] == mainAxisAlignment:
"List_MyOutPatient" MainAxisAlignment
? Row( .spaceAround,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: <Widget>[ Column(
Container( crossAxisAlignment:
height: 15, CrossAxisAlignment.start,
width: 60, children: <
decoration: BoxDecoration( Widget>[
borderRadius: BorderRadius.circular(25), Wrap(
color: HexColor("#20A169"), children: [
AppText(
TranslationBase.of(context).fileNo,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
),
AppText(
item.patientId.toString(),
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
),
],
),
SizedBox(
height:
2.5,
),
AppText(
'NATIONALITY: ' +
item.nationalityName.toString(),
fontSize:
1.8 * SizeConfig.textMultiplier,
fontWeight:
FontWeight.bold,
backGroundcolor:
Colors.white,
),
SizedBox(
height:
15.5,
),
SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient"
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: HexColor("#20A169"),
),
child: AppText(
item.startTime,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
), ),
child: AppText( SizedBox(
item.startTime, width: 3.5,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
), ),
), Container(
SizedBox( child: AppText(
width: 3.5, convertDateFormat2(item.appointmentDate.toString()),
), fontSize: 1.5 * SizeConfig.textMultiplier,
Container( fontWeight: FontWeight.bold,
child: AppText( ),
convertDateFormat2(item.appointmentDate.toString()),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
), SizedBox(
SizedBox( height: 0.5,
height: 0.5, )
) ],
], )
) : SizedBox(
: SizedBox( height: 5,
height: 5, ),
],
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
children: <
Widget>[
SizedBox(
height:
0.5,
),
SizedBox(
height:
0,
),
Wrap(
children: [
AppText(
TranslationBase.of(context).age2,
fontSize: 1.8 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
), ),
], AppText(
), item.age.toString(),
Column( fontSize: 1.8 * SizeConfig.textMultiplier,
crossAxisAlignment: fontWeight: FontWeight.w300,
CrossAxisAlignment backGroundcolor: Colors.white,
.start, ),
// mainAxisAlignment: ],
// MainAxisAlignment ),
// .spaceBetween, SizedBox(
children: < height:
Widget>[ 2.5,
SizedBox( ),
height: Wrap(
0.5, children: [
), AppText(
SizedBox( TranslationBase.of(context).gender2,
height: fontSize: 1.8 * SizeConfig.textMultiplier,
0, fontWeight: FontWeight.bold,
), backGroundcolor: Colors.white,
Wrap( ),
children: [ AppText(
AppText( item.gender.toString() == '1' ? 'Male' : 'Female',
TranslationBase.of(context).age2, fontSize: 1.8 * SizeConfig.textMultiplier,
fontSize: 1.8 * SizeConfig.textMultiplier, fontWeight: FontWeight.w300,
fontWeight: FontWeight.bold, backGroundcolor: Colors.white,
backGroundcolor: Colors.white, ),
), ],
AppText( ),
item.age.toString(), SizedBox(
fontSize: 1.8 * SizeConfig.textMultiplier, height:
fontWeight: FontWeight.w300, 8,
backGroundcolor: Colors.white, ),
), SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient"
], ? Row(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
SizedBox( children: <Widget>[
height: Container(
2.5, height: 15,
), width: 60,
Wrap( decoration: BoxDecoration(
children: [ borderRadius: BorderRadius.circular(25),
AppText( color: HexColor("#20A169"),
TranslationBase.of(context).gender2, ),
fontSize: 1.8 * SizeConfig.textMultiplier, child: AppText(
fontWeight: FontWeight.bold, item.startTime,
backGroundcolor: Colors.white, color: Colors.white,
), fontSize: 1.5 * SizeConfig.textMultiplier,
AppText( textAlign: TextAlign.center,
item.gender.toString() == '1' ? 'Male' : 'Female', fontWeight: FontWeight.bold,
fontSize: 1.8 * SizeConfig.textMultiplier, ),
fontWeight: FontWeight.w300,
backGroundcolor: Colors.white,
),
],
),
SizedBox(
height:
8,
),
SERVICES_PATIANT2[int.parse(patientType)] ==
"List_MyOutPatient"
? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
height: 15,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
color: HexColor("#20A169"),
), ),
child: AppText( SizedBox(
item.startTime, width: 3.5,
color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
), ),
), Container(
SizedBox( child: AppText(
width: 3.5, convertDateFormat2(item.appointmentDate.toString()),
), fontSize: 1.5 * SizeConfig.textMultiplier,
Container( fontWeight: FontWeight.bold,
child: AppText( ),
convertDateFormat2(item.appointmentDate.toString()),
fontSize: 1.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
), SizedBox(
SizedBox( height: 25.5,
height: 25.5, ),
), ],
], )
) : SizedBox(
: SizedBox( height: 15,
height: 15, ),
), ],
], ),
), ],
], ),
), ],
], ),
), ),
), // Divider(color: Colors.grey)
// Divider(color: Colors.grey) ],
], ),
onTap: () {
Navigator.of(context)
.pushNamed(
PATIENTS_PROFILE,
arguments: {
"patient": item
});
},
), ),
onTap: () { );
Navigator.of(context) }).toList(),
.pushNamed( )
PATIENTS_PROFILE, : Center(
arguments: { child: DrAppEmbeddedError(
"patient": item error: TranslationBase.of(
}); context)
}, .youDontHaveAnyPatient),
), ),
);
}).toList(),
)
: Center(
child: DrAppEmbeddedError(
error: TranslationBase.of(
context)
.youDontHaveAnyPatient),
), ),
), ],
], ),
), )
) ],
], ),
), ),
), ),
),); );
} }
InputDecoration buildInputDecoration(BuildContext context, hint) { InputDecoration buildInputDecoration(BuildContext context, hint) {
@ -761,7 +747,6 @@ class _PatientsScreenState extends State<PatientsScreen> {
), ),
), ),
onTap: () { onTap: () {
filterBooking(item.toString()); filterBooking(item.toString());
setState(() { setState(() {

@ -52,7 +52,7 @@ class _ReferPatientState extends State<ReferPatientScreen> {
onModelReady: (model) => model.getClinicsList(), onModelReady: (model) => model.getClinicsList(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).myReferralPatient, appBarTitle: TranslationBase.of(context).referralPatient,
body: model.clinicsList == null body: model.clinicsList == null
? DrAppEmbeddedError(error: 'Something Wrong!') ? DrAppEmbeddedError(error: 'Something Wrong!')
: SingleChildScrollView( : SingleChildScrollView(
@ -263,9 +263,9 @@ class _ReferPatientState extends State<ReferPatientScreen> {
Widget priorityBar(BuildContext _context, Size screenSize) { Widget priorityBar(BuildContext _context, Size screenSize) {
List<String> _priorities = [ List<String> _priorities = [
TranslationBase.of(context).veryUrgent, TranslationBase.of(context).veryUrgent.toUpperCase(),
TranslationBase.of(context).urgent, TranslationBase.of(context).urgent.toUpperCase(),
TranslationBase.of(context).routine, TranslationBase.of(context).routine.toUpperCase(),
]; ];
return Container( return Container(
height: screenSize.height * 0.070, height: screenSize.height * 0.070,

@ -0,0 +1,212 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/livecare/transfer_to_admin.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_warnings.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
void addPrescriptionForm(context) {
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
final double spaceBetweenTextFileds = 12;
showModalBottomSheet(
isScrollControlled: true,
context: context,
builder: (BuildContext bc) {
return SingleChildScrollView(
child: Container(
height: 700,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
AppText(
TranslationBase.of(context).medicines.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: spaceBetweenTextFileds,
),
Container(
child: Form(
key: _formKey,
child: Column(
//mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText:
TranslationBase.of(context).searchMedicine,
borderColor: Colors.white,
textInputType: TextInputType.text,
inputFormatter: ONLY_LETTERS,
),
),
SizedBox(
height: spaceBetweenTextFileds,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).orderType,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).strength,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).route,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).frequency,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).doseTime,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).indication,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).fromDate,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: TranslationBase.of(context).duration,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText:
TranslationBase.of(context).instruction,
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(height: spaceBetweenTextFileds),
Container(
margin:
EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title:
TranslationBase.of(context).addMedication,
onPressed: () {
Navigator.pop(context);
prescriptionWarning(context);
},
),
],
),
),
],
),
),
),
],
),
),
),
);
});
}

@ -0,0 +1,405 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/prescription/add_prescription_form.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class NewPrescriptionScreen extends StatefulWidget {
@override
_NewPrescriptionScreenState createState() => _NewPrescriptionScreenState();
}
class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
int testNum = 0;
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescription(),
builder: (BuildContext context, PrescriptionViewModel model,
Widget child) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescription,
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container(
child: Column(
children: [
Padding(
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,
),
if (model.prescriptionList.length > 0)
Row(
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
),
AppText(
patient.patientId.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
],
)
],
),
),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
if (model.prescriptionList.length != 0)
SizedBox(
height: model.prescriptionList[0].rowcount == 0
? 200.0
: 10.0),
//model.prescriptionList == null
if (model.prescriptionList.length != 0)
model.prescriptionList[0].rowcount == 0
? Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: () {
addPrescriptionForm(context);
//model.postPrescription();
},
child: CircleAvatar(
radius: 65,
backgroundColor: Color(0XFFB8382C),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.white,
child: Icon(
Icons.add,
color: Colors.black,
size: 45.0,
),
),
),
),
SizedBox(
height: 15.0,
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context)
.noPrescriptionListed,
color: Colors.black,
fontWeight: FontWeight.w900,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).addNow,
color: Color(0XFFB8382C),
fontWeight: FontWeight.w900,
),
],
),
],
)
: Padding(
padding: EdgeInsets.all(12.0),
child: NetworkBaseView(
baseViewModel: model,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
InkWell(
child: Container(
height: 50.0,
width: 450.0,
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey),
borderRadius:
BorderRadius.circular(10.0),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
' Add more medication',
fontWeight: FontWeight.w100,
fontSize: 12.5,
),
Icon(
Icons.add,
color: Color(0XFFB8382C),
)
],
),
),
),
onTap: () {
addPrescriptionForm(context);
},
),
SizedBox(
height: 15.0,
),
...List.generate(
model.prescriptionList[0].rowcount,
(index) => Container(
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Container(
height:
MediaQuery.of(context)
.size
.height *
0.2,
width:
MediaQuery.of(context)
.size
.width *
0.09,
child: Column(
children: [
AppText(
'8\nDEC',
color: Colors.green,
)
],
),
),
Container(
height:
MediaQuery.of(context)
.size
.height *
0.24,
width:
MediaQuery.of(context)
.size
.width *
0.81,
child: Column(
children: [
Row(
children: [
AppText(
'Start Date:',
fontWeight:
FontWeight
.w900,
fontSize: 15.0,
),
AppText(
model
.prescriptionList[
0]
.entityList[
index]
.startDate,
fontSize: 11.0,
),
SizedBox(
width: 6.0,
),
AppText(
'Order Type:',
fontWeight:
FontWeight
.w900,
fontSize: 15.0,
),
AppText(
model
.prescriptionList[
0]
.entityList[
index]
.orderTypeDescription,
fontSize: 13.0,
),
],
),
SizedBox(
height: 2.5,
),
Row(
children: [
Container(
child: Expanded(
child:
AppText(
model
.prescriptionList[
0]
.entityList[
index]
.medicationName,
),
),
)
],
),
Row(
children: [
Expanded(
child: AppText(
model
.prescriptionList[
0]
.entityList[
index]
.doseDetail,
fontSize:
13.0,
),
)
],
),
SizedBox(
height: 3.0,
),
Row(
children: [
AppText(
'Indication: ',
fontWeight:
FontWeight
.w900,
),
Expanded(
child: AppText(
model
.prescriptionList[
0]
.entityList[
index]
.indication,
fontSize:
12.9),
)
],
),
SizedBox(
height: 15.0,
),
Row(
children: [
AppText(
model
.prescriptionList[
0]
.entityList[
index]
.doctorName,
fontWeight:
FontWeight
.w900,
)
],
),
Row(
children: [
AppText(model
.prescriptionList[
0]
.entityList[
index]
.remarks),
],
),
SizedBox(
height: 15.0,
),
Divider(
height: 0,
thickness: 1.0,
color: Colors.grey,
),
// SizedBox(
// height: 40,
// ),
],
),
),
],
),
],
),
),
),
],
),
),
)
],
),
),
),
)),
);
}
}

@ -0,0 +1,168 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
void prescriptionWarning(context) {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext bc) {
return SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Container(
height: 600,
child: Column(
children: [
...List.generate(
5,
(index) => Container(
child: ExpansionTile(
title: AppText('Prescription warning and alerts(0)'),
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
AppText(
'DOSESCREENINGRESULTFORETCETC',
color: Color(0XFFB8382C),
)
],
)
],
),
),
),
SizedBox(
height: 10.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border:
Border.all(width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: 'Remarks',
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(
height: 95.0,
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'CONTINUE',
onPressed: () {
Navigator.pop(context);
authorizationForm(context);
},
),
],
),
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
color: Colors.white,
title: 'remove',
fontColor: Colors.red,
onPressed: () {
Navigator.pop(context);
prescriptionWarning(context);
},
),
],
),
),
],
),
),
));
});
}
void authorizationForm(context) {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext bc) {
return Container(
height: 500,
child: Form(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Prescription authorization'.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 30.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: 'Auth ID',
borderColor: Colors.white,
textInputType: TextInputType.number,
inputFormatter: ONLY_NUMBERS,
),
),
SizedBox(
height: 12.0,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: 'Password',
borderColor: Colors.white,
textInputType: TextInputType.text,
inputFormatter: ONLY_LETTERS,
obscureText: true,
),
),
SizedBox(
height: 190.0,
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: 'CONTINUE',
onPressed: () {
Navigator.pop(context);
authorizationForm(context);
},
),
],
),
),
],
),
),
));
});
}

@ -0,0 +1,440 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class ProcedureScreen extends StatefulWidget {
@override
_ProcedureScreenState createState() => _ProcedureScreenState();
}
class _ProcedureScreenState extends State<ProcedureScreen> {
int testNum = 1;
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getProcedure(),
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
appBarTitle: 'ORDER PROCEDURE',
body: NetworkBaseView(
baseViewModel: model,
child: SingleChildScrollView(
child: Container(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(12.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: 20,
),
AppText(
patient.patientId.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
),
],
)
],
),
),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
if (model.procedureList.length != 0)
SizedBox(
height: model.procedureList[0].rowcount == 0
? 200.0
: 10.0),
//model.prescriptionList == null
if (model.procedureList.length != 0)
model.procedureList[0].rowcount == 0
? Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: () {
addSelectedProcedure(context);
//model.postPrescription();
},
child: CircleAvatar(
radius: 65,
backgroundColor: Color(0XFFB8382C),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.white,
child: Icon(
Icons.add,
color: Colors.black,
size: 45.0,
),
),
),
),
SizedBox(
height: 15.0,
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
'NO ORDER FOR PROCEDURE LISTED',
color: Colors.black,
fontWeight: FontWeight.w900,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).addNow,
color: Color(0XFFB8382C),
fontWeight: FontWeight.w900,
),
],
),
],
)
: Padding(
padding: EdgeInsets.all(16.0),
child: NetworkBaseView(
baseViewModel: model,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
InkWell(
child: Container(
height: 50.0,
width: 450.0,
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey),
borderRadius:
BorderRadius.circular(10.0),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
' Add more procedure',
fontWeight: FontWeight.w100,
fontSize: 12.5,
),
Icon(
Icons.add,
color: Color(0XFFB8382C),
)
],
),
),
),
onTap: () {
addSelectedProcedure(context);
},
),
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(
// Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// child: AppTextFormField(
// labelText: 'Add more procedure',
// borderColor: Colors.white,
// //suffixIcon: Icons.search,
//
// //textInputType: TextInputType.number,
// inputFormatter: ONLY_NUMBERS,
// onTap: () {
// addSelectedProcedure(context);
// },
// ),
// ),
SizedBox(
height: 35.0,
),
...List.generate(
model.procedureList[0].rowcount,
(index) => Container(
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Container(
height: 120.0,
width: 45.0,
child: Column(
children: [
AppText(
'8\nDEC',
color: Colors.green,
)
],
),
),
Container(
height: 120,
width: 325.0,
child: Column(
children: [
Row(
children: [
AppText(
'Code #: ',
fontWeight:
FontWeight
.w900,
fontSize: 15.0,
),
AppText(
model
.procedureList[
0]
.entityList[
index]
.procedureId
.toString(),
fontSize: 13.0,
),
SizedBox(
width: 12.0,
),
AppText(
'Order Type: ',
fontWeight:
FontWeight
.w900,
fontSize: 15.0,
),
AppText(
'Urgent',
fontSize: 13.0,
color:
Colors.red,
),
],
),
Row(
children: [
Container(
child: Expanded(
child:
AppText(
model
.procedureList[
0]
.entityList[
index]
.procedureName,
fontWeight:
FontWeight
.w800,
),
),
)
],
),
Row(
children: [
AppText(
'Price: ',
fontWeight:
FontWeight
.w900,
),
Expanded(
child: AppText(
model
.procedureList[
0]
.entityList[
index]
.price
.toString(),
fontSize:
13.0),
)
],
),
SizedBox(
height: 10.0,
),
Row(
children: [
AppText(
'Some short remark about the procedure',
fontSize: 13.5,
),
],
),
SizedBox(
height: 10.0,
),
Divider(
height: 5.0,
thickness: 1.0,
color: Colors.grey,
)
// SizedBox(
// height: 40,
// ),
],
),
),
Container(
width: 30,
height: 120,
child: Column(
children: [
Icon(Icons.edit)
],
),
)
],
),
],
),
),
),
],
),
),
)
],
),
),
),
)),
);
}
}
void addSelectedProcedure(context) {
showModalBottomSheet(
context: context,
builder: (BuildContext bc) {
return SingleChildScrollView(
child: Container(
height: 490,
child: Padding(
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
'Select Procedure'.toUpperCase(),
fontWeight: FontWeight.w900,
),
SizedBox(
height: 9.0,
),
Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
child: AppTextFormField(
labelText: 'Add Delected Procedures'.toUpperCase(),
borderColor: Colors.white,
textInputType: TextInputType.text,
inputFormatter: ONLY_LETTERS,
),
),
SizedBox(
height: 280.0,
),
Container(
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context).addMedication,
// onPressed: () {
// Navigator.pop(context);
// prescriptionWarning(context);
// },
),
],
),
),
],
)
],
),
),
),
);
});
}

@ -0,0 +1,192 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class AddSickLeavScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<SickLeaveViewModel>(
onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).sickleave,
body: model.getAllSIckLeave.length > 0
? SingleChildScrollView(
child: Column(
children: model.getAllSIckLeave
.map<Widget>((GetAllSickLeaveResponse item) {
return CardWithBgWidgetNew(
widget: Column(
children: [
Container(
padding: EdgeInsets.only(left: 10, right: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
flex: 4,
child: Wrap(
// mainAxisAlignment:
// MainAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.all(3),
child: AppText(
item.status == 1
? TranslationBase.of(
context)
.approved
: item.status == 2
? TranslationBase
.of(context)
.extended
: TranslationBase
.of(context)
.pending,
fontWeight: FontWeight.bold,
color: Colors.white,
),
color: item.status == 1
? Colors.green
: Colors.yellow[800],
),
Row(
children: [
AppText(
TranslationBase.of(
context)
.leaveStartDate +
' ',
fontWeight:
FontWeight.bold,
),
Flexible(
child: Text(
item.startDate,
overflow:
TextOverflow.ellipsis,
))
],
),
AppText(
item.noOfDays.toString() +
' ' +
TranslationBase.of(
context)
.daysSickleave,
fontWeight: FontWeight.bold,
),
Row(children: [
AppText(
item.remarks,
)
]),
],
),
SizedBox(
width: 20,
),
],
),
),
(item.status == 1 || item.status == 2)
? Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.open_in_full,
size: 40,
),
// color: Colors.green, //Colors.black,
onPressed: () => {
openSickLeave(context, true,
extendedData: item)
},
))
: SizedBox(),
],
)),
SizedBox(
height: 20,
),
Divider(
height: 1,
),
],
));
}).toList(),
),
)
: new Builder(builder: (context) {
return Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(40),
decoration: BoxDecoration(
border: Border.all(
color: HexColor('#B8382C'), width: 4),
borderRadius:
BorderRadius.all(Radius.circular(100))),
child: IconButton(
icon: Icon(
Icons.add,
size: 35,
),
onPressed: () {
openSickLeave(
context,
false,
);
}),
),
Padding(
child: AppText(
TranslationBase.of(context).noSickLeaveApplied,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10),
),
AppText(
TranslationBase.of(context).applyNow,
fontWeight: FontWeight.bold,
color: HexColor('#B8382C'),
)
],
),
));
}),
));
}
openSickLeave(BuildContext context, isExtend,
{GetAllSickLeaveResponse extendedData}) {
showModalBottomSheet(
context: context,
builder: (context) {
return new Container(
child: SickLeaveScreen(
appointmentNo: extendedData.appointmentNo,
patientMRN: extendedData.patientMRN,
isExtended: isExtend,
extendedData: extendedData,
));
});
}
}

@ -0,0 +1,379 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart';
import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/text_validator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart';
Helpers helpers = Helpers();
class SickLeaveScreen extends StatefulWidget {
final bool isExtended;
final GetAllSickLeaveResponse extendedData;
final appointmentNo;
final patientMRN;
SickLeaveScreen(
{this.appointmentNo,
this.patientMRN,
this.isExtended = false,
this.extendedData});
@override
_SickLeaveScreenState createState() => _SickLeaveScreenState();
}
class _SickLeaveScreenState extends State<SickLeaveScreen> {
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
TextEditingController _toDateController = new TextEditingController();
String _selectedClinic;
Map profile = {};
AddSickLeaveRequest addSickLeave = AddSickLeaveRequest();
void _presentDatePicker(id) {
showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(2019),
lastDate: DateTime.now(),
).then((pickedDate) {
if (pickedDate == null) {
return;
}
setState(() {
// var selectedDate = DateFormat.yMd().format(pickedDate);
final df = new DateFormat('yyyy-MM-dd');
addSickLeave.startDate = df.format(pickedDate);
_toDateController.text = addSickLeave.startDate;
//addSickLeave.startDate = selectedDate;
});
});
}
@override
void initState() {
getProfile();
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<PatientViewModel>(
onModelReady: (model) => model.getClinicsList(),
builder: (_, model, w) => BaseView<SickLeaveViewModel>(
onModelReady: (model2) => model2.preSickLeaveStatistics(
widget.appointmentNo, widget.patientMRN),
builder: (_, model2, w) => AppScaffold(
baseViewModel: model2,
isShowAppBar: false,
body: Center(
child: Container(
margin: EdgeInsets.only(top: 10),
child: FractionallySizedBox(
widthFactor: 0.9,
child: ListView(
children: [
Padding(
child: AppText(
widget.isExtended == true
? TranslationBase.of(context)
.extendSickLeave
: TranslationBase.of(context)
.addSickLeave,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10)),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppTextFormField(
borderColor: Colors.white,
onChanged: (value) {
addSickLeave.noOfDays = value;
},
hintText: widget.extendedData != null
? widget.extendedData.noOfDays
.toString()
: TranslationBase.of(context)
.sickLeaveDays,
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_NUMBERS)
]),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).sickLeaveDate,
// fontSize: 10,
// ),
AppTextFormField(
hintText: widget.extendedData != null
? widget.extendedData.startDate
: TranslationBase.of(context)
.sickLeaveDate,
borderColor: Colors.white,
prefix: IconButton(
icon: Icon(Icons.calendar_today)),
textInputType: TextInputType.number,
controller: _toDateController,
onTap: () {
_presentDatePicker('_selectedToDate');
},
inputFormatter: ONLY_DATE,
onChanged: (value) {
addSickLeave.startDate = value;
}),
],
)),
Container(
margin: EdgeInsets.only(
top: 10, left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0,
color: HexColor("#CCCCCC"))),
width: double.infinity,
child: Padding(
padding: EdgeInsets.only(
top: SizeConfig.widthMultiplier * 0.9,
bottom: SizeConfig.widthMultiplier * 0.9,
right: SizeConfig.widthMultiplier * 3,
left: SizeConfig.widthMultiplier * 3),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).clinicName,
// fontSize: 10,
// ),
Row(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
// add Expanded to have your dropdown button fill remaining space
child: DropdownButtonHideUnderline(
child: new IgnorePointer(
ignoring: true,
child: DropdownButton(
isExpanded: true,
value: getClinicName(
model) ??
"",
iconSize: 40,
elevation: 16,
selectedItemBuilder:
(BuildContext
context) {
return model
.getClinicNameList()
.map((item) {
return Row(
mainAxisSize:
MainAxisSize
.max,
children: <Widget>[
AppText(
item,
fontSize: SizeConfig
.textMultiplier *
2.1,
),
],
);
}).toList();
},
onChanged: (newValue) =>
{},
items: model
.getClinicNameList()
.map((item) {
return DropdownMenuItem(
value:
item.toString(),
child: Text(
item,
textAlign:
TextAlign.end,
),
);
}).toList(),
))),
),
],
)
],
),
)),
model2.sickLeaveStatistics[
'recommendedSickLeaveDays'] !=
null
? Padding(
child: AppText(
model2.sickLeaveStatistics[
'recommendedSickLeaveDays'],
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10),
)
: SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).doctorName,
// fontSize: 10,
// ),
new IgnorePointer(
ignoring: true,
child: AppTextFormField(
readOnly: true,
hintText: profile['DoctorName'],
borderColor: Colors.white,
onSaved: (value) {},
// validator: (value) {
// return TextValidator().validateName(value);
// },
inputFormatter: ONLY_NUMBERS))
],
),
),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(6.0)),
border: Border.all(
width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// AppText(
// TranslationBase.of(context).remarks,
// fontSize: 10,
// ),
AppTextFormField(
borderColor: Colors.white,
hintText: widget.extendedData != null
? widget.extendedData.remarks
: TranslationBase.of(context).remarks,
onChanged: (value) {
addSickLeave.remarks = value;
},
validator: (value) {
// return TextValidator().validateName(value);
},
inputFormatter: ONLY_LETTERS)
],
),
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 5),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: widget.isExtended == true
? TranslationBase.of(context).extend
: TranslationBase.of(context).add,
onPressed: () {
if (widget.isExtended) {
model2
.extendSickLeave(
widget.extendedData)
.then((value) => (value) {
print(value);
});
} else {
model2
.addSickLeave(addSickLeave)
.then((value) => print(value));
}
},
),
],
),
),
// Column(
// children: [
// Texts(TranslationBase.of(context)
// .previousSickLeaveIssue +
// ' ')
// ],
// )
],
),
),
),
),
)));
}
getProfile() async {
Map p = await sharedPref.getObj(DOCTOR_PROFILE);
setState(() {
this.profile = p;
});
}
getClinicName(model) {
var clinicInfo = model.clinicsList
.where((i) => i['ClinicID'] == this.profile['ClinicID'])
.toList();
return clinicInfo.length > 0 ? clinicInfo[0]['ClinicDescription'] : "";
}
}

@ -33,7 +33,8 @@ class TranslationBase {
String get mobileNo => localizedValues['mobileNo'][locale.languageCode]; String get mobileNo => localizedValues['mobileNo'][locale.languageCode];
String get replySuccessfully => localizedValues['replySuccessfully'][locale.languageCode]; String get replySuccessfully =>
localizedValues['replySuccessfully'][locale.languageCode];
String get messagesScreenToolbarTitle => String get messagesScreenToolbarTitle =>
localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; localizedValues['messagesScreenToolbarTitle'][locale.languageCode];
@ -79,8 +80,11 @@ class TranslationBase {
localizedValues['patientServices'][locale.languageCode]; localizedValues['patientServices'][locale.languageCode];
String get searchMedicine => String get searchMedicine =>
localizedValues['searchMedicine'][locale.languageCode]; localizedValues['searchMedicine'][locale.languageCode];
String get myReferralPatient => localizedValues['myReferralPatient'][locale.languageCode]; String get myReferralPatient =>
String get referPatient => localizedValues['referPatient'][locale.languageCode]; localizedValues['myReferralPatient'][locale.languageCode];
String get referPatient =>
localizedValues['referPatient'][locale.languageCode];
String get myReferral => localizedValues['myReferral'][locale.languageCode]; String get myReferral => localizedValues['myReferral'][locale.languageCode];
String get myReferredPatient => String get myReferredPatient =>
localizedValues['myReferredPatient'][locale.languageCode]; localizedValues['myReferredPatient'][locale.languageCode];
@ -107,8 +111,10 @@ class TranslationBase {
String get profile => localizedValues['profile'][locale.languageCode]; String get profile => localizedValues['profile'][locale.languageCode];
String get gender => localizedValues['gender'][locale.languageCode]; String get gender => localizedValues['gender'][locale.languageCode];
String get clinic => localizedValues['clinic'][locale.languageCode]; String get clinic => localizedValues['clinic'][locale.languageCode];
String get clinicSelect => localizedValues['clinicSelect'][locale.languageCode]; String get clinicSelect =>
String get doctorSelect => localizedValues['doctorSelect'][locale.languageCode]; localizedValues['clinicSelect'][locale.languageCode];
String get doctorSelect =>
localizedValues['doctorSelect'][locale.languageCode];
String get hospital => localizedValues['hospital'][locale.languageCode]; String get hospital => localizedValues['hospital'][locale.languageCode];
String get speciality => localizedValues['speciality'][locale.languageCode]; String get speciality => localizedValues['speciality'][locale.languageCode];
String get errorMessage => String get errorMessage =>
@ -122,8 +128,10 @@ class TranslationBase {
String get lab => localizedValues['lab'][locale.languageCode]; String get lab => localizedValues['lab'][locale.languageCode];
String get result => localizedValues['result'][locale.languageCode]; String get result => localizedValues['result'][locale.languageCode];
String get medicines => localizedValues['medicines'][locale.languageCode]; String get medicines => localizedValues['medicines'][locale.languageCode];
String get prescription => localizedValues['prescription'][locale.languageCode]; String get prescription =>
String get insuranceApprovals => localizedValues['insuranceApprovals'][locale.languageCode]; localizedValues['prescription'][locale.languageCode];
String get insuranceApprovals =>
localizedValues['insuranceApprovals'][locale.languageCode];
String get insurance => localizedValues['insurance'][locale.languageCode]; String get insurance => localizedValues['insurance'][locale.languageCode];
String get approvals => localizedValues['approvals'][locale.languageCode]; String get approvals => localizedValues['approvals'][locale.languageCode];
String get bodyMeasurements => String get bodyMeasurements =>
@ -145,7 +153,8 @@ class TranslationBase {
String get pleaseEnterAnswer => String get pleaseEnterAnswer =>
localizedValues['pleaseEnterAnswer'][locale.languageCode]; localizedValues['pleaseEnterAnswer'][locale.languageCode];
String get replay => localizedValues['replay'][locale.languageCode]; String get replay => localizedValues['replay'][locale.languageCode];
String get progressNote => localizedValues['progressNote'][locale.languageCode]; String get progressNote =>
localizedValues['progressNote'][locale.languageCode];
String get progress => localizedValues['progress'][locale.languageCode]; String get progress => localizedValues['progress'][locale.languageCode];
String get note => localizedValues['note'][locale.languageCode]; String get note => localizedValues['note'][locale.languageCode];
String get searchNote => localizedValues['searchNote'][locale.languageCode]; String get searchNote => localizedValues['searchNote'][locale.languageCode];
@ -223,8 +232,10 @@ class TranslationBase {
String get urgent => localizedValues['urgent'][locale.languageCode]; String get urgent => localizedValues['urgent'][locale.languageCode];
String get routine => localizedValues['routine'][locale.languageCode]; String get routine => localizedValues['routine'][locale.languageCode];
String get send => localizedValues['send'][locale.languageCode]; String get send => localizedValues['send'][locale.languageCode];
String get referralFrequency => localizedValues['referralFrequency'][locale.languageCode]; String get referralFrequency =>
String get selectReferralFrequency => localizedValues['selectReferralFrequency'][locale.languageCode]; localizedValues['referralFrequency'][locale.languageCode];
String get selectReferralFrequency =>
localizedValues['selectReferralFrequency'][locale.languageCode];
String get clinicalDetailsAndRemarks => String get clinicalDetailsAndRemarks =>
localizedValues['clinicalDetailsAndRemarks'][locale.languageCode]; localizedValues['clinicalDetailsAndRemarks'][locale.languageCode];
String get remarks => localizedValues['remarks'][locale.languageCode]; String get remarks => localizedValues['remarks'][locale.languageCode];
@ -291,34 +302,94 @@ class TranslationBase {
localizedValues['moreThan3Letter'][locale.languageCode]; localizedValues['moreThan3Letter'][locale.languageCode];
String get gender2 => localizedValues['gender2'][locale.languageCode]; String get gender2 => localizedValues['gender2'][locale.languageCode];
String get age2 => localizedValues['age2'][locale.languageCode]; String get age2 => localizedValues['age2'][locale.languageCode];
String get admissionDetail => localizedValues['admissionDetail'][locale.languageCode]; String get sickleave => localizedValues['sick-leaves'][locale.languageCode];
String get patientSick =>
localizedValues['patient-sick'][locale.languageCode];
String get leave => localizedValues['leave'][locale.languageCode];
String get submit => localizedValues['submit'][locale.languageCode];
String get doctorName => localizedValues['doc-name'][locale.languageCode];
String get clinicName => localizedValues['clinicname'][locale.languageCode];
String get sickLeaveDate =>
localizedValues['sick-leave-date'][locale.languageCode];
String get sickLeaveDays =>
localizedValues['sick-leave-days'][locale.languageCode];
String get admissionDetail =>
localizedValues['admissionDetail'][locale.languageCode];
String get dateTime => localizedValues['dateTime'][locale.languageCode]; String get dateTime => localizedValues['dateTime'][locale.languageCode];
String get admissionNo => localizedValues['admissionNo'][locale.languageCode]; String get admissionNo => localizedValues['admissionNo'][locale.languageCode];
String get losNo => localizedValues['losNo'][locale.languageCode]; String get losNo => localizedValues['losNo'][locale.languageCode];
String get area => localizedValues['area'][locale.languageCode]; String get area => localizedValues['area'][locale.languageCode];
String get room => localizedValues['room'][locale.languageCode]; String get room => localizedValues['room'][locale.languageCode];
String get bed => localizedValues['bed'][locale.languageCode]; String get bed => localizedValues['bed'][locale.languageCode];
String get previousSickLeaveIssue =>
localizedValues['prevoius-sickleave-issed'][locale.languageCode];
String get noSickLeaveApplied =>
localizedValues['no-sickleve-applied'][locale.languageCode];
String get applyNow => localizedValues['applynow'][locale.languageCode];
String get addSickLeave =>
localizedValues['add-sickleave'][locale.languageCode];
String get add => localizedValues['add'][locale.languageCode];
String get approved => localizedValues['approved'][locale.languageCode];
String get extended => localizedValues['extended'][locale.languageCode];
String get pending => localizedValues['pending'][locale.languageCode];
String get leaveStartDate =>
localizedValues['leave-start-date'][locale.languageCode];
String get daysSickleave =>
localizedValues['days-sick-leave'][locale.languageCode];
String get extend => localizedValues['extend'][locale.languageCode];
String get extendSickLeave =>
localizedValues['extend-sickleave'][locale.languageCode];
String get targetPatient =>
localizedValues['patient-target'][locale.languageCode];
String get noPrescription =>
localizedValues['no-priscription-listed'][locale.languageCode];
String get next => localizedValues['next'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode];
String get healthRecordInformation => localizedValues['healthRecordInformation'][locale.languageCode];
String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; String get emptyMessage =>
String get chiefComplaintLength => localizedValues['chiefComplaintLength'][locale.languageCode]; localizedValues['empty-message'][locale.languageCode];
String get healthRecordInformation =>
localizedValues['healthRecordInformation'][locale.languageCode];
String get chiefComplaintLength =>
localizedValues['chiefComplaintLength'][locale.languageCode];
String get referTo => localizedValues['referTo'][locale.languageCode]; String get referTo => localizedValues['referTo'][locale.languageCode];
String get referredFrom => localizedValues['referredFrom'][locale.languageCode]; String get referredFrom =>
localizedValues['referredFrom'][locale.languageCode];
String get branch => localizedValues['branch'][locale.languageCode]; String get branch => localizedValues['branch'][locale.languageCode];
String get chooseAppointment => localizedValues['chooseAppointment'][locale.languageCode]; String get chooseAppointment =>
String get appointmentNo => localizedValues['appointmentNo'][locale.languageCode]; localizedValues['chooseAppointment'][locale.languageCode];
String get appointmentNo =>
localizedValues['appointmentNo'][locale.languageCode];
String get refer => localizedValues['refer'][locale.languageCode]; String get refer => localizedValues['refer'][locale.languageCode];
String get approved => localizedValues['approved'][locale.languageCode];
String get rejected => localizedValues['rejected'][locale.languageCode]; String get rejected => localizedValues['rejected'][locale.languageCode];
String get sameBranch => localizedValues['sameBranch'][locale.languageCode]; String get sameBranch => localizedValues['sameBranch'][locale.languageCode];
String get otherBranch => localizedValues['otherBranch'][locale.languageCode]; String get otherBranch => localizedValues['otherBranch'][locale.languageCode];
String get dr => localizedValues['dr'][locale.languageCode]; String get dr => localizedValues['dr'][locale.languageCode];
String get previewHealth => localizedValues['previewHealth'][locale.languageCode]; String get previewHealth =>
String get summaryReport => localizedValues['summaryReport'][locale.languageCode]; localizedValues['previewHealth'][locale.languageCode];
String get summaryReport =>
localizedValues['summaryReport'][locale.languageCode];
String get accept => localizedValues['accept'][locale.languageCode]; String get accept => localizedValues['accept'][locale.languageCode];
String get reject => localizedValues['reject'][locale.languageCode]; String get reject => localizedValues['reject'][locale.languageCode];
String get noAppointmentsErrorMsg => localizedValues['noAppointmentsErrorMsg'][locale.languageCode]; String get noAppointmentsErrorMsg =>
localizedValues['noAppointmentsErrorMsg'][locale.languageCode];
String get referralPatient =>
localizedValues['referralPatient'][locale.languageCode];
String get noPrescriptionListed =>
localizedValues['noPrescriptionListed'][locale.languageCode];
String get addNow => localizedValues['addNow'][locale.languageCode];
String get orderType => localizedValues['orderType'][locale.languageCode];
String get strength => localizedValues['strength'][locale.languageCode];
String get doseTime => localizedValues['doseTime'][locale.languageCode];
String get indication => localizedValues['indication'][locale.languageCode];
String get duration => localizedValues['duration'][locale.languageCode];
String get instruction => localizedValues['instruction'][locale.languageCode];
String get addMedication =>
localizedValues['addMedication'][locale.languageCode];
String get route => localizedValues['route'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -363,16 +363,17 @@ class _VerifyAccountState extends State<VerifyAccount> {
"IsLoginForDoctorApp": true, "IsLoginForDoctorApp": true,
"IsSilentLogIN": false "IsSilentLogIN": false
}; };
CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel( CheckActivationCodeRequestModel checkActivationCodeForDoctorApp =
zipCode: _loggedUser['ZipCode'], new CheckActivationCodeRequestModel(
mobileNumber: _loggedUser['MobileNumber'], zipCode: _loggedUser['ZipCode'],
projectID: await sharedPref.getInt(PROJECT_ID), mobileNumber: _loggedUser['MobileNumber'],
logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID), projectID: await sharedPref.getInt(PROJECT_ID),
activationCode: activationCode, logInTokenID: await sharedPref.getString(LOGIN_TOKEN_ID),
generalid: "Cs2020@2016\$2958" activationCode: activationCode,
); generalid: "Cs2020@2016\$2958");
authProv.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp) authProv
.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp)
.then((res) async { .then((res) async {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
sharedPref.setString(TOKEN, res['AuthenticationTokenID']); sharedPref.setString(TOKEN, res['AuthenticationTokenID']);
@ -381,7 +382,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
res['List_DoctorProfile'][0], changeLoadingStata); res['List_DoctorProfile'][0], changeLoadingStata);
} else { } else {
ClinicModel clinic = ClinicModel clinic =
ClinicModel.fromJson(res['List_DoctorsClinic'][0]); ClinicModel.fromJson(res['List_DoctorsClinic'][0]);
getDocProfiles(clinic, changeLoadingStata); getDocProfiles(clinic, changeLoadingStata);
} }
} else { } else {
@ -404,12 +405,19 @@ class _VerifyAccountState extends State<VerifyAccount> {
*/ */
loginProcessCompleted( loginProcessCompleted(
Map<String, dynamic> profile, Function changeLoadingStata) { Map<String, dynamic> profile, Function changeLoadingStata) {
var doctor = DoctorProfileModel.fromJson(profile); var doctor = DoctorProfileModel.fromJson(profile);
authProv.setDoctorProfile(doctor); authProv.setDoctorProfile(doctor);
sharedPref.setObj(DOCTOR_PROFILE, profile);
this.getDashboard(doctor, changeLoadingStata);
}
getDashboard(doctor, Function changeLoadingStata) {
// authProv.getDashboard(doctor).then((value) {
// print(value);
changeLoadingStata(false); changeLoadingStata(false);
sharedPref.setObj(DOCTOR_PROFILE, profile); // sharedPref.setObj(DASHBOARD_DATA, value);
Navigator.of(context).pushReplacementNamed(HOME); Navigator.of(context).pushReplacementNamed(HOME);
// });
} }
Future<dynamic> _asyncSimpleDialog( Future<dynamic> _asyncSimpleDialog(

@ -13,58 +13,73 @@ class MyScheduleWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<WorkingHours> workingHours = Helpers.getWorkingHours(workingHoursTable.workingHours); List<WorkingHours> workingHours = Helpers.getWorkingHours(
workingHoursTable.workingHours,
);
return CardWithBgWidgetNew( return CardWithBgWidgetNew(
widget: Container( widget: Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Column(
children: [
Divider(
height: 10,
color: Colors.grey,
thickness: 1.0,
),
Text('${workingHoursTable.date.day}')
],
),
Row( Row(
children: <Widget>[ children: <Widget>[
AppText(workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier),
AppText( AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}', workingHoursTable.dayName,
fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,), fontSize: 2.5 * SizeConfig.textMultiplier,
),
AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}',
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
),
], ],
), ),
SizedBox(
height: 8,
),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: workingHours.map((work) { children: workingHours.map((work) {
return Container( return Container(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Divider(color: Colors.grey),
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ SizedBox(
AppText('From',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,), height: 5,
SizedBox(height: 5,), ),
AppText(work.from,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,) AppText(
], work.from + ' - ',
), fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
), ),
Container(height: SizeConfig.realScreenWidth * 0.1 ,width: 0.8,color: Colors.grey, Column(
margin: EdgeInsets.only(left: 15,right: 15),), crossAxisAlignment: CrossAxisAlignment.start,
Expanded( children: <Widget>[
child: Column( SizedBox(
crossAxisAlignment: CrossAxisAlignment.start, height: 5,
children: <Widget>[ ),
AppText('To',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,), AppText(
SizedBox(height: 5,), work.to,
AppText(work.to,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,) fontSize: 2.0 * SizeConfig.textMultiplier,
], fontWeight: FontWeight.w300,
), ),
],
), ),
], ],
) )
], ],
), ),
); );

@ -0,0 +1,13 @@
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class MedicationDetails extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
AppText('MEDICATION'),
],
);
}
}

@ -1,11 +1,13 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.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/routes.dart'; import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'large_avatar.dart'; import 'large_avatar.dart';
@ -19,7 +21,41 @@ class PrescriptionInPatientWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
child: prescriptionReportForInPatientList.length == 0 child: prescriptionReportForInPatientList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Prescriptions') ? Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(40),
decoration: BoxDecoration(
border:
Border.all(color: HexColor('#B8382C'), width: 4),
borderRadius: BorderRadius.all(Radius.circular(100))),
child: IconButton(
icon: Icon(
Icons.add,
size: 35,
),
onPressed: () {
// openAddPrescription(context);
}),
),
Padding(
child: AppText(
TranslationBase.of(context).noPrescription,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10),
),
AppText(
TranslationBase.of(context).applyNow,
fontWeight: FontWeight.bold,
color: HexColor('#B8382C'),
)
],
),
))
: Container( : Container(
margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, 0, margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, 0,
SizeConfig.realScreenWidth * 0.05, 0), SizeConfig.realScreenWidth * 0.05, 0),
@ -28,9 +64,12 @@ class PrescriptionInPatientWidget extends StatelessWidget {
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
Navigator.of(context).pushNamed(IN_PATIENT_PRESCRIPTIONS_DETAILS, arguments: { Navigator.of(context).pushNamed(
'prescription': prescriptionReportForInPatientList[index] IN_PATIENT_PRESCRIPTIONS_DETAILS,
}); arguments: {
'prescription':
prescriptionReportForInPatientList[index]
});
}, },
child: CardWithBgWidgetNew( child: CardWithBgWidgetNew(
widget: Column( widget: Column(

@ -1,11 +1,14 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.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';
import 'package:doctor_app_flutter/screens/patients/out_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/out_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/medication.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'large_avatar.dart'; import 'large_avatar.dart';
@ -18,7 +21,41 @@ class PrescriptionOutPatientWidget extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
child: patientPrescriptionsList.length == 0 child: patientPrescriptionsList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Prescriptions') ? Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(40),
decoration: BoxDecoration(
border:
Border.all(color: HexColor('#B8382C'), width: 4),
borderRadius: BorderRadius.all(Radius.circular(100))),
child: IconButton(
icon: Icon(
Icons.add,
size: 35,
),
onPressed: () {
openAddPrescription(context);
}),
),
Padding(
child: AppText(
TranslationBase.of(context).noPrescription,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10),
),
AppText(
TranslationBase.of(context).applyNow,
fontWeight: FontWeight.bold,
color: HexColor('#B8382C'),
)
],
),
))
: Container( : Container(
margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, 0, margin: EdgeInsets.fromLTRB(SizeConfig.realScreenWidth * 0.05, 0,
SizeConfig.realScreenWidth * 0.05, 0), SizeConfig.realScreenWidth * 0.05, 0),
@ -91,4 +128,12 @@ class PrescriptionOutPatientWidget extends StatelessWidget {
), ),
); );
} }
openAddPrescription(BuildContext context) {
showModalBottomSheet(
context: context,
builder: (context) {
return MedicationDetails();
});
}
} }

@ -10,10 +10,10 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'PatientProfileButton.dart'; import 'PatientProfileButton.dart';
/* /*
*@author: Elham Rababah *@author: Elham Rababah
*@Date:22/4/2020 *@Date:22/4/2020
*@param: *@param:
*@return:ProfileMedicalInfoWidget *@return:ProfileMedicalInfoWidget
*@desc: Profile Medical Info Widget *@desc: Profile Medical Info Widget
*/ */
@ -27,13 +27,14 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
mainAxisSpacing: 20, mainAxisSpacing: 20,
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: 1.5, childAspectRatio: 1.5,
children: [ PatientProfileButton( children: [
key: key, PatientProfileButton(
patient: patient, key: key,
nameLine1: "Create New", patient: patient,
nameLine2: "Episode", nameLine1: "Create New",
route: CREATE_EPISODE, nameLine2: "Episode",
icon: 'heartbeat.png'), route: CREATE_EPISODE,
icon: 'heartbeat.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,
@ -78,6 +79,20 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).insurance, nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals, nameLine2: TranslationBase.of(context).approvals,
icon: 'lab.png'), icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION,
nameLine1: 'Order',
nameLine2: 'Prescription',
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PROCEDURE,
nameLine1: 'Order Test',
nameLine2: 'Or Procedures',
icon: 'lab.png'),
Visibility( Visibility(
visible: selectedPatientType != 0 && visible: selectedPatientType != 0 &&
selectedPatientType != 5 && selectedPatientType != 5 &&
@ -98,6 +113,15 @@ 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')),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
child: PatientProfileButton(
key: key,
patient: patient,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
icon: 'sick_leaves_icons.png')),
]); ]);
} }
} }
@ -150,3 +174,89 @@ class CircleAvatarWidget extends StatelessWidget {
); );
} }
} }
class PatientProfileButton extends StatelessWidget {
final String nameLine1;
final String nameLine2;
final String icon;
final dynamic route;
final PatiantInformtion patient;
final String url = "assets/images/";
PatientProfileButton(
{Key key,
this.patient,
this.nameLine1,
this.nameLine2,
this.icon,
this.route})
: super(key: key);
@override
Widget build(BuildContext context) {
return new Container(
margin: new EdgeInsets.symmetric(horizontal: 4.0),
child: InkWell(
onTap: () {
navigator(context, this.route);
},
child: Column(children: <Widget>[
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
this.nameLine1,
color: Color(0xFFB9382C),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 2,
),
AppText(
this.nameLine2,
color: Colors.black,
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 2,
),
],
),
),
Expanded(
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
child: new Image.asset(url + icon))
],
)),
)
]),
),
decoration: BoxDecoration(
// border: Border.all(),
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border.fromBorderSide(BorderSide(
color: Color(0xffBBBBBB),
width: 1,
)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
),
padding: EdgeInsets.fromLTRB(5, 10, 5, 5),
);
}
void navigator(BuildContext context, route) {
Navigator.of(context).pushNamed(route, arguments: {'patient': patient});
}
}

@ -2,13 +2,80 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
class NumberTextInputFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(
TextEditingValue oldValue, TextEditingValue newValue) {
final int newTextLength = newValue.text.length;
int selectionIndex = newValue.selection.end;
int usedSubstringIndex = 0;
final StringBuffer newText = StringBuffer();
if (newTextLength >= 1) {
newText.write('(');
if (newValue.selection.end >= 1) selectionIndex++;
}
if (newTextLength >= 4) {
newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') ');
if (newValue.selection.end >= 3) selectionIndex += 2;
}
if (newTextLength >= 7) {
newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-');
if (newValue.selection.end >= 6) selectionIndex++;
}
if (newTextLength >= 11) {
newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' ');
if (newValue.selection.end >= 10) selectionIndex++;
}
// Dump the rest.
if (newTextLength >= usedSubstringIndex)
newText.write(newValue.text.substring(usedSubstringIndex));
return TextEditingValue(
text: newText.toString(),
selection: TextSelection.collapsed(offset: selectionIndex),
);
}
}
final _mobileFormatter = NumberTextInputFormatter();
class TextFields extends StatefulWidget { class TextFields extends StatefulWidget {
TextFields(
TextFields({Key key, this.type, this.hintText, this.suffixIcon, this.autoFocus, this.onChanged, this.initialValue, this.minLines, this.maxLines, this.inputFormatters, this.padding, this.focus=false, this.maxLengthEnforced=true, {Key key,
this.suffixIconColor, this.inputAction, this.onSubmit, this.keepPadding=true, this.textCapitalization = TextCapitalization.none, this.onTap, this.controller, this.keyboardType, this.validator, this.borderOnlyError=false, this.type,
this.onSaved, this.onSuffixTap, this.readOnly: false, this.maxLength, this.prefixIcon, this.bare=false, this.fontSize=16.0, this.fontWeight=FontWeight.w700, this.autoValidate=false, this.onTapTextFields}) : super(key: key); this.hintText,
this.suffixIcon,
this.autoFocus,
this.onChanged,
this.initialValue,
this.minLines,
this.maxLines,
this.inputFormatters,
this.padding,
this.focus = false,
this.maxLengthEnforced = true,
this.suffixIconColor,
this.inputAction,
this.onSubmit,
this.keepPadding = true,
this.textCapitalization = TextCapitalization.none,
this.controller,
this.keyboardType,
this.validator,
this.borderOnlyError = false,
this.onSaved,
this.onSuffixTap,
this.readOnly: false,
this.maxLength,
this.prefixIcon,
this.bare = false,
this.onTap,
this.fontSize = 16.0,
this.fontWeight = FontWeight.w700,
this.autoValidate = false,
this.fillColor,
this.hintColor,
this.onTapTextFields})
: super(key: key);
final String hintText; final String hintText;
final String initialValue; final String initialValue;
@ -16,7 +83,7 @@ class TextFields extends StatefulWidget {
final bool autoFocus; final bool autoFocus;
final IconData suffixIcon; final IconData suffixIcon;
final Color suffixIconColor; final Color suffixIconColor;
final IconData prefixIcon; final Icon prefixIcon;
final VoidCallback onTap; final VoidCallback onTap;
final Function onTapTextFields; final Function onTapTextFields;
final TextEditingController controller; final TextEditingController controller;
@ -42,6 +109,8 @@ class TextFields extends StatefulWidget {
final EdgeInsets padding; final EdgeInsets padding;
final bool focus; final bool focus;
final bool borderOnlyError; final bool borderOnlyError;
final Color hintColor;
final Color fillColor;
@override @override
_TextFieldsState createState() => _TextFieldsState(); _TextFieldsState createState() => _TextFieldsState();
@ -64,8 +133,7 @@ class _TextFieldsState extends State<TextFields> {
@override @override
void didUpdateWidget(TextFields oldWidget) { void didUpdateWidget(TextFields oldWidget) {
if (widget.focus) if (widget.focus) _focusNode.requestFocus();
_focusNode.requestFocus();
super.didUpdateWidget(oldWidget); super.didUpdateWidget(oldWidget);
} }
@ -78,25 +146,45 @@ class _TextFieldsState extends State<TextFields> {
Widget _buildSuffixIcon() { Widget _buildSuffixIcon() {
switch (widget.type) { switch (widget.type) {
case "password": case "password":
{ return Padding( {
padding: const EdgeInsets.only(right: 8.0), return Padding(
child: view ? padding: const EdgeInsets.only(right: 8.0),
InkWell(onTap: () {this.setState(() { view= false; });}, child: Icon(EvaIcons.eye, size: 24.0, color: Color.fromRGBO(78, 62, 253, 1.0))) child: view
: ? InkWell(
InkWell(onTap: () {this.setState(() { view= true; });}, child: Icon(EvaIcons.eyeOff, size: 24.0, color: Colors.grey[500])) onTap: () {
);} this.setState(() {
view = false;
});
},
child: Icon(EvaIcons.eye,
size: 24.0, color: Color.fromRGBO(78, 62, 253, 1.0)))
: InkWell(
onTap: () {
this.setState(() {
view = true;
});
},
child: Icon(EvaIcons.eyeOff,
size: 24.0, color: Colors.grey[500])));
}
break; break;
default: default:
if (widget.suffixIcon!=null) if (widget.suffixIcon != null)
return InkWell(onTap: widget.onSuffixTap, child: Icon(widget.suffixIcon, size: 22.0, color: widget.suffixIconColor!=null ? widget.suffixIconColor : Colors.grey[500])); return InkWell(
onTap: widget.onSuffixTap,
child: Icon(widget.suffixIcon,
size: 22.0,
color: widget.suffixIconColor != null
? widget.suffixIconColor
: Colors.grey[500]));
else else
return null; return null;
} }
} }
bool _determineReadOnly() { bool _determineReadOnly() {
if (widget.readOnly!=null && widget.readOnly) { if (widget.readOnly != null && widget.readOnly) {
_focusNode.unfocus(); _focusNode.unfocus();
return true; return true;
} else { } else {
@ -106,82 +194,107 @@ class _TextFieldsState extends State<TextFields> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ( return (AnimatedContainer(
AnimatedContainer( duration: Duration(milliseconds: 300),
duration: Duration(milliseconds: 300), decoration: widget.bare
decoration: widget.bare ? null :BoxDecoration( ? null
boxShadow: [BoxShadow(color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0), offset: Offset(0.0, 13.0), blurRadius: focus ? 34.0 : 12.0)] : BoxDecoration(boxShadow: [
), // BoxShadow(
child: TextFormField( // color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0),
onTap: widget.onTapTextFields, // offset: Offset(0.0, 13.0),
keyboardAppearance: Theme.of(context).brightness, // blurRadius: focus ? 34.0 : 12.0)
scrollPhysics: BouncingScrollPhysics(), BoxShadow(
autovalidate: widget.autoValidate, color: Color.fromRGBO(110, 68, 80, focus ? 0.20 : 0),
textCapitalization: widget.textCapitalization, offset: Offset(0.0, 13.0),
onFieldSubmitted: widget.inputAction==TextInputAction.next ? (widget.onSubmit!=null ? widget.onSubmit : (val) { _focusNode.nextFocus(); }) : widget.onSubmit, blurRadius: focus ? 34.0 : 12.0)
textInputAction: widget.inputAction, ]),
minLines: widget.minLines ?? 1, child: TextFormField(
maxLines: widget.maxLines ?? 1, onTap: widget.onTapTextFields,
maxLengthEnforced: widget.maxLengthEnforced, keyboardAppearance: Theme.of(context).brightness,
initialValue: widget.initialValue, scrollPhysics: BouncingScrollPhysics(),
onChanged: widget.onChanged, autovalidate: widget.autoValidate,
focusNode: _focusNode, textCapitalization: widget.textCapitalization,
maxLength: widget.maxLength ?? null, onFieldSubmitted: widget.inputAction == TextInputAction.next
controller: widget.controller, ? (widget.onSubmit != null
keyboardType: widget.keyboardType, ? widget.onSubmit
readOnly: _determineReadOnly(), : (val) {
obscureText: widget.type=="password" && !view ? true : false, _focusNode.nextFocus();
autofocus: widget.autoFocus ?? false, })
validator: widget.validator, : widget.onSubmit,
onSaved: widget.onSaved, textInputAction: widget.inputAction,
style: Theme.of(context).textTheme.body2.copyWith( fontSize: widget.fontSize, fontWeight: widget.fontWeight ), minLines: widget.minLines ?? 1,
inputFormatters: widget.inputFormatters, maxLines: widget.maxLines ?? 1,
decoration: InputDecoration( maxLengthEnforced: widget.maxLengthEnforced,
counterText: "", initialValue: widget.initialValue,
hintText: widget.hintText, onChanged: widget.onChanged,
hintStyle: TextStyle(fontSize: widget.fontSize, fontWeight: widget.fontWeight, color: Theme.of(context).hintColor), focusNode: _focusNode,
maxLength: widget.maxLength ?? null,
contentPadding: widget.padding!=null ? widget.padding : EdgeInsets.symmetric(vertical: (widget.bare && !widget.keepPadding) ? 0.0 : 10.0, horizontal: 16.0), controller: widget.controller,
filled: true, keyboardType: widget.keyboardType,
fillColor: widget.bare ? Colors.transparent : Theme.of(context).backgroundColor, readOnly: _determineReadOnly(),
obscureText: widget.type == "password" && !view ? true : false,
suffixIcon: _buildSuffixIcon(), autofocus: widget.autoFocus ?? false,
prefixIcon: widget.type!="search" ? validator: widget.validator,
widget.prefixIcon!=null ? onSaved: widget.onSaved,
Padding( style: Theme.of(context)
padding: EdgeInsets.only(left: 28.0, top: 14.0, bottom: 14.0, right: 0), .textTheme
child: Text("\$", style: TextStyle( fontSize: 14, fontWeight: FontWeight.w800),), .bodyText1
) .copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight),
: inputFormatters: widget.keyboardType == TextInputType.phone
null ? <TextInputFormatter>[
: WhitelistingTextInputFormatter.digitsOnly,
Icon(EvaIcons.search, size: 20.0, color: Colors.grey[500]), _mobileFormatter,
]
errorStyle: TextStyle(fontSize: 12.0, fontWeight: widget.fontWeight, height: widget.borderOnlyError ? 0.0 : null), : widget.inputFormatters,
errorBorder: OutlineInputBorder( decoration: InputDecoration(
borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(widget.bare ? 0.0 : 0.5 ), width: 2.0), counterText: "",
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0) hintText: widget.hintText,
), hintStyle: TextStyle(
focusedErrorBorder: OutlineInputBorder( fontSize: widget.fontSize,
borderSide: BorderSide(color: Theme.of(context).errorColor.withOpacity(widget.bare ? 0.0 : 0.5 ), width: 2.0), fontWeight: widget.fontWeight,
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0) color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
focusedBorder: OutlineInputBorder( contentPadding: widget.padding != null
borderSide: BorderSide(color: Theme.of(context).dividerColor.withOpacity(widget.bare ? 0.0 : 1.0 ), width: 2.0), ? widget.padding
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0) : EdgeInsets.symmetric(
), vertical: (widget.bare && !widget.keepPadding) ? 0.0 : 10.0,
disabledBorder: OutlineInputBorder( horizontal: 16.0),
borderSide: BorderSide(color: Theme.of(context).dividerColor.withOpacity(widget.bare ? 0.0 : 1.0 ), width: 2.0), filled: true,
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0) fillColor: widget.bare
), ? Colors.transparent
enabledBorder: OutlineInputBorder( : Theme.of(context).backgroundColor,
borderSide: BorderSide(color: Theme.of(context).dividerColor.withOpacity(widget.bare ? 0.0 : 1.0 ), width: 2.0), suffixIcon: _buildSuffixIcon(),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0) prefixIcon: widget.prefixIcon,
) errorStyle: TextStyle(
fontSize: 12.0,
fontWeight: widget.fontWeight,
height: widget.borderOnlyError ? 0.0 : null),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context)
.errorColor
.withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.grey, width: 1.0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0),
), ),
), ),
) ),
); ));
} }
} }

@ -4,16 +4,15 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'app_texts_widget.dart'; import 'app_texts_widget.dart';
class AppButton extends StatefulWidget {
class AppButton extends StatefulWidget {
final GestureTapCallback onPressed; final GestureTapCallback onPressed;
final String title; final String title;
final IconData icon; final IconData icon;
final Color color; final Color color;
final double fontSize; final double fontSize;
final double padding; final double padding;
final Color fontColor;
final bool loading; final bool loading;
final bool disabled; final bool disabled;
@ -25,67 +24,66 @@ class AppButton extends StatefulWidget {
this.fontSize = 2, this.fontSize = 2,
this.padding = 13, this.padding = 13,
this.loading = false, this.loading = false,
this.disabled = false}); this.disabled = false,
this.fontColor = Colors.white});
_AppButtonState createState() => _AppButtonState(); _AppButtonState createState() => _AppButtonState();
} }
class _AppButtonState extends State<AppButton>{ class _AppButtonState extends State<AppButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return return IgnorePointer(
IgnorePointer( ignoring: widget.loading,
ignoring: widget.loading, child: RawMaterialButton(
child: RawMaterialButton( fillColor: widget.color != null ? widget.color : HexColor("#B8382C"),
fillColor: widget.color != null ? widget.color : HexColor("#B8382C"), splashColor: widget.color,
splashColor: widget.color, child: Padding(
child: Padding( padding: EdgeInsets.only(
padding: EdgeInsets.only( top: widget.padding,
top: widget.padding, bottom: widget.padding,
bottom: widget.padding, //right: SizeConfig.widthMultiplier * widget.padding,
//right: SizeConfig.widthMultiplier * widget.padding, //left: SizeConfig.widthMultiplier * widget.padding
//left: SizeConfig.widthMultiplier * widget.padding ),
), child: Row(
child: Row( mainAxisSize: MainAxisSize.max,
mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
children: <Widget>[ if (widget.icon != null)
if (widget.icon != null) Icon(
Icon( widget.icon,
widget.icon,
color: Colors.white,
),
if (widget.icon != null)
SizedBox(
width: 5.0,
),
widget.loading
? Padding(
padding: EdgeInsets.all(2.6),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor:
AlwaysStoppedAnimation<Color>(
Colors.grey[300],
),
),
),
)
: AppText(
widget.title.toUpperCase(),
color: Colors.white, color: Colors.white,
fontSize: SizeConfig.textMultiplier * widget.fontSize,
), ),
], if (widget.icon != null)
), SizedBox(
width: 5.0,
),
widget.loading
? Padding(
padding: EdgeInsets.all(2.6),
child: SizedBox(
height: 19.0,
width: 19.0,
child: CircularProgressIndicator(
backgroundColor: Colors.white,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.grey[300],
),
),
),
)
: AppText(
widget.title.toUpperCase(),
color: widget.fontColor,
fontSize: SizeConfig.textMultiplier * widget.fontSize,
),
],
), ),
onPressed: widget.onPressed,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(6))),
), ),
); onPressed: widget.onPressed,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(6))),
),
);
} }
} }

@ -15,6 +15,7 @@ class AppTextFormField extends FormField<String> {
FormFieldValidator<String> validator, FormFieldValidator<String> validator,
ValueChanged<String> onChanged, ValueChanged<String> onChanged,
GestureTapCallback onTap, GestureTapCallback onTap,
bool obscureText = false,
TextEditingController controller, TextEditingController controller,
bool autovalidate = true, bool autovalidate = true,
TextInputType textInputType, TextInputType textInputType,
@ -24,6 +25,8 @@ class AppTextFormField extends FormField<String> {
ValueChanged<String> onFieldSubmitted, ValueChanged<String> onFieldSubmitted,
IconButton prefix, IconButton prefix,
String labelText, String labelText,
IconData suffixIcon,
bool readOnly = false,
borderColor}) borderColor})
: super( : super(
onSaved: onSaved, onSaved: onSaved,
@ -33,44 +36,54 @@ class AppTextFormField extends FormField<String> {
return Column( return Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 40.0, height: 40.0,
child: TextFormField( child: TextFormField(
focusNode: focusNode, obscureText: obscureText,
keyboardType: textInputType, focusNode: focusNode,
inputFormatters: [FilteringTextInputFormatter.allow(RegExp(inputFormatter)), keyboardType: textInputType,
],onChanged: onChanged?? (value){ inputFormatters: [
state.didChange(value); FilteringTextInputFormatter.allow(
}, RegExp(inputFormatter)),
textInputAction: textInputAction, ],
onFieldSubmitted: onFieldSubmitted, onChanged: onChanged ??
decoration: InputDecoration( (value) {
hintText: hintText, state.didChange(value);
suffixIcon: prefix, },
hintStyle: TextStyle( textInputAction: textInputAction,
fontSize: SizeConfig.textMultiplier * 1.8,), onFieldSubmitted: onFieldSubmitted,
contentPadding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), decoration: InputDecoration(
labelText: labelText, hintText: hintText,
labelStyle: TextStyle( suffixIcon: prefix,
fontSize: SizeConfig.textMultiplier * 1.7,), hintStyle: TextStyle(
enabledBorder: OutlineInputBorder( fontSize: SizeConfig.textMultiplier * 1.8,
borderRadius: BorderRadius.all(Radius.circular(6)), ),
borderSide: BorderSide( contentPadding:
color: borderColor != null ? borderColor : HexColor( EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
"#CCCCCC")), labelText: labelText,
), labelStyle: TextStyle(
focusedBorder: OutlineInputBorder( fontSize: SizeConfig.textMultiplier * 1.7,
borderSide: BorderSide( ),
color: borderColor != null ? borderColor : HexColor( enabledBorder: OutlineInputBorder(
"#CCCCCC")), borderRadius: BorderRadius.all(Radius.circular(6)),
borderRadius: BorderRadius.all(Radius.circular(6)), borderSide: BorderSide(
) color: borderColor != null
//BorderRadius.all(Radius.circular(20)); ? borderColor
), : HexColor("#CCCCCC")),
onTap: onTap, ),
controller: controller, focusedBorder: OutlineInputBorder(
), borderSide: BorderSide(
), color: borderColor != null
state.hasError ? borderColor
: HexColor("#CCCCCC")),
borderRadius: BorderRadius.all(Radius.circular(6)),
)
//BorderRadius.all(Radius.circular(20));
),
onTap: onTap,
controller: controller,
),
),
state.hasError
? Text( ? Text(
state.errorText, state.errorText,
style: TextStyle(color: Colors.red), style: TextStyle(color: Colors.red),

@ -20,7 +20,7 @@ class AppText extends StatefulWidget {
final bool visibility; final bool visibility;
final TextAlign textAlign; final TextAlign textAlign;
final Color backGroundcolor; final Color backGroundcolor;
final TextOverflow textOverflow;
AppText(this.data, AppText(this.data,
{this.color = Colors.black, {this.color = Colors.black,
this.fontWeight = FontWeight.normal, this.fontWeight = FontWeight.normal,
@ -33,6 +33,7 @@ class AppText extends StatefulWidget {
this.marginLeft = 0, this.marginLeft = 0,
this.visibility = true, this.visibility = true,
this.textAlign, this.textAlign,
this.textOverflow,
this.backGroundcolor = Colors.white}); this.backGroundcolor = Colors.white});
@override @override
@ -42,28 +43,25 @@ class AppText extends StatefulWidget {
class _AppTextState extends State<AppText> { class _AppTextState extends State<AppText> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Visibility( return Container(
visible: widget.visibility, margin: widget.margin != null
child: Container( ? EdgeInsets.all(widget.margin)
margin: widget.margin != null : EdgeInsets.only(
? EdgeInsets.all(widget.margin) top: widget.marginTop,
: EdgeInsets.only( right: widget.marginRight,
top: widget.marginTop, bottom: widget.marginBottom,
right: widget.marginRight, left: widget.marginLeft),
bottom: widget.marginBottom, child: Text(
left: widget.marginLeft), widget.data,
child: Text( textAlign: widget.textAlign,
widget.data, overflow: widget.textOverflow ?? TextOverflow.clip,
textAlign: widget.textAlign, style: TextStyle(
overflow: TextOverflow.clip, color: widget.color,
style: TextStyle( fontWeight: widget.fontWeight,
color: widget.color, fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
fontWeight: widget.fontWeight, fontFamily: widget.fontFamily,
fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2),
fontFamily: widget.fontFamily,
// backgroundColor:widget.backGroundcolor // backgroundColor:widget.backGroundcolor
),
), ),
), ),
); );

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "12.0.0" version: "14.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.40.6" version: "0.41.1"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -70,7 +70,7 @@ packages:
name: build_config name: build_config
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.4" version: "0.4.5"
build_daemon: build_daemon:
dependency: transitive dependency: transitive
description: description:
@ -84,7 +84,7 @@ packages:
name: build_modules name: build_modules
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
build_resolvers: build_resolvers:
dependency: transitive dependency: transitive
description: description:
@ -98,21 +98,21 @@ packages:
name: build_runner name: build_runner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.7" version: "1.10.9"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
name: build_runner_core name: build_runner_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "6.1.2" version: "6.1.4"
build_web_compilers: build_web_compilers:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: build_web_compilers name: build_web_compilers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.12.2" version: "2.15.3"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
@ -161,7 +161,7 @@ packages:
name: checked_yaml name: checked_yaml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.4"
cli_util: cli_util:
dependency: transitive dependency: transitive
description: description:
@ -433,7 +433,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.2" version: "0.6.3-nullsafety.1"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -475,7 +475,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -629,7 +629,7 @@ packages:
name: pubspec_parse name: pubspec_parse
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.5" version: "0.1.7"
quiver: quiver:
dependency: transitive dependency: transitive
description: description:
@ -732,7 +732,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -774,7 +774,7 @@ packages:
name: timing name: timing
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.1+2" version: "0.1.1+3"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -867,5 +867,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.11.0-162.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

@ -14,7 +14,7 @@ description: A new Flutter project.
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ">=2.6.0 <3.0.0" sdk: ">=2.8.0 <3.0.0"
dependencies: dependencies:
flutter: flutter:
@ -54,7 +54,7 @@ dependencies:
cupertino_icons: ^0.1.2 cupertino_icons: ^0.1.2
# SVG # SVG
#flutter_svg: ^0.17.4 #flutter_svg: ^0.17.4
percent_indicator: "^2.1.1" percent_indicator: ^2.1.1
#Dependency Injection #Dependency Injection
get_it: ^4.0.2 get_it: ^4.0.2
@ -86,7 +86,7 @@ flutter:
assets: assets:
- assets/images/ - assets/images/
- assets/images/dashboard/ - assets/images/dashboard/
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware. # https://flutter.dev/assets-and-images/#resolution-aware.

Loading…
Cancel
Save