merge-requests/434/head
Sultan Khan 5 years ago
commit 9aa42c71c2

Binary file not shown.

@ -68,6 +68,7 @@ class BaseAppClient {
body['LanguageID'] = 2; body['LanguageID'] = 2;
body['stamp'] = STAMP; body['stamp'] = STAMP;
// if(!body.containsKey("IPAdress"))
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['VersionID'] = VERSION_ID; body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
@ -85,6 +86,9 @@ class BaseAppClient {
print("URL : $url"); print("URL : $url");
print("Body : ${json.encode(body)}"); print("Body : ${json.encode(body)}");
String bodyData= json.encode(body);
var asd="";
if (await Helpers.checkConnection()) { if (await Helpers.checkConnection()) {
final response = await http.post(url, final response = await http.post(url,

@ -121,7 +121,7 @@ const GET_DASHBOARD =
const GET_SICKLEAVE_STATISTIC = const GET_SICKLEAVE_STATISTIC =
'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics';
const ARRIVED_PATIENT_URL = const ARRIVED_PATIENT_URL =
'Services/DoctorApplication.svc/REST/PatientArrivalList'; 'Services/DoctorApplication.svc/REST/PatientArrivalList';
const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave';
const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves';
const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave';
@ -301,7 +301,7 @@ const PRIMARY_COLOR = 0xff515B5D;
const TRANSACTION_NO = 0; const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '11.11.11.11'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 5.3; const VERSION_ID = 5.3;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';

@ -80,7 +80,7 @@ class Timelines {
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
date = json['Date']; date = json['Date'];
doctorId = json['DoctorId']; doctorId = json['DoctorId'];
doctorImage = json['DoctorImage']; doctorImage = json['DoctorImageURL'];
doctorName = json['DoctorName']; doctorName = json['DoctorName'];
encounterNumber = json['EncounterNumber']; encounterNumber = json['EncounterNumber'];
encounterType = json['EncounterType']; encounterType = json['EncounterType'];
@ -101,7 +101,7 @@ class Timelines {
data['ClinicName'] = this.clinicName; data['ClinicName'] = this.clinicName;
data['Date'] = this.date; data['Date'] = this.date;
data['DoctorId'] = this.doctorId; data['DoctorId'] = this.doctorId;
data['DoctorImage'] = this.doctorImage; data['DoctorImageURL'] = this.doctorImage;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;
data['EncounterNumber'] = this.encounterNumber; data['EncounterNumber'] = this.encounterNumber;
data['EncounterType'] = this.encounterType; data['EncounterType'] = this.encounterType;

@ -1,8 +1,9 @@
class MedicalFileRequestModel { class MedicalFileRequestModel {
int patientMRN; int patientMRN;
String vidaAuthTokenID; String vidaAuthTokenID;
String iPAdress;
MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID}); MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress});
MedicalFileRequestModel.fromJson(Map<String, dynamic> json) { MedicalFileRequestModel.fromJson(Map<String, dynamic> json) {
patientMRN = json['PatientMRN']; patientMRN = json['PatientMRN'];
@ -13,6 +14,7 @@ class MedicalFileRequestModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['VidaAuthTokenID'] = this.vidaAuthTokenID; data['VidaAuthTokenID'] = this.vidaAuthTokenID;
data['IPAdress'] = this.iPAdress;
return data; return data;
} }
} }

@ -16,6 +16,7 @@ class MedicalFileService extends BaseService {
Future getMedicalFile({int mrn}) async { Future getMedicalFile({int mrn}) async {
_fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn);
_fileRequestModel.iPAdress = "9.9.9.9";
hasError = false; hasError = false;
_medicalFileList.clear(); _medicalFileList.clear();
await baseAppClient.post(GET_MEDICAL_FILE, await baseAppClient.post(GET_MEDICAL_FILE,

@ -156,7 +156,7 @@ class PatientReferralService extends LookupService {
hasError = false; hasError = false;
DoctorProfileModel doctorProfile = await getDoctorProfile(); DoctorProfileModel doctorProfile = await getDoctorProfile();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ClinicID'] = 0; // body['ClinicID'] = 0;
body['DoctorID'] = doctorProfile.doctorID; body['DoctorID'] = doctorProfile.doctorID;
await baseAppClient.post( await baseAppClient.post(

@ -14,7 +14,7 @@ class RadiologyService extends BaseService {
hasError = false; hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>(); final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = invoiceNo; body['InvoiceNo'] = invoiceNo;
body['LineIt emNo'] = lineItem; body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId; body['ProjectID'] = projectId;
await baseAppClient.postPatient(GET_RAD_IMAGE_URL, await baseAppClient.postPatient(GET_RAD_IMAGE_URL,

File diff suppressed because one or more lines are too long

@ -59,6 +59,10 @@ class DoctorApp {
IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral_1 = static const IconData referral_1 =
IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData progress_notes =
IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_icon_1 =
IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData operations = static const IconData operations =
IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData out_patient = static const IconData out_patient =
@ -77,22 +81,273 @@ class DoctorApp {
IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData female_1 = static const IconData female_1 =
IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_icon_active_1 =
IconData(0xe81c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu_icon_1 =
IconData(0xe81d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData mail = static const IconData mail =
IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData medicine_search = static const IconData medicine_search =
IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe81f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_code_1 =
IconData(0xe820, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_1 =
IconData(0xe821, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referred = static const IconData referred =
IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe822, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData send =
IconData(0xe823, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData sync_icon = static const IconData sync_icon =
IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe824, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData drawer_icon = static const IconData drawer_icon =
IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe825, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData view =
IconData(0xe826, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData warning =
IconData(0xe827, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData add =
IconData(0xe828, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData close =
IconData(0xe829, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData back =
IconData(0xe82a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData health_summary =
IconData(0xe82b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData powered_by_cs =
IconData(0xe82c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_code_2 =
IconData(0xe82d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ecg =
IconData(0xe82e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData create_episode =
IconData(0xe82f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData booked =
IconData(0xe830, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData admission_req =
IconData(0xe831, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData walkin =
IconData(0xe832, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData reschedule_ =
IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves = static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout =
IconData(0xe837, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi =
IconData(0xe838, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData livecare =
IconData(0xe839, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData health_bmi =
IconData(0xe83a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData health_bmi_r =
IconData(0xe83b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData modify_episode =
IconData(0xe83c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height =
IconData(0xe83d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi_r =
IconData(0xe83e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi =
IconData(0xe83f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData order_prescription =
IconData(0xe840, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData order_procedures =
IconData(0xe841, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi_r =
IconData(0xe842, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData respiration_rate =
IconData(0xe843, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData patient_sick_leave =
IconData(0xe844, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData progress_notes_1 =
IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData temperature =
IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData underweight_bmi =
IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData radiology_1 =
IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_patient_1 = static const IconData search_patient_1 =
IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData referral_bg =
IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search = static const IconData search =
IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_bg =
IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData arrival_patients = static const IconData arrival_patients =
IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData arrival_patients_bg =
IconData(0xe84e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData refer_patient =
IconData(0xe84f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData underweight_bmi_r =
IconData(0xe850, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight =
IconData(0xe851, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_pressure =
IconData(0xe852, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData vital_signs =
IconData(0xe853, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ucaf =
IconData(0xe854, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData filter =
IconData(0xe855, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData male_1 =
IconData(0xe856, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData female =
IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData external_link =
IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_face =
IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms =
IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home =
IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger =
IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_active =
IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply =
IconData(0xe85e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData schedule_active =
IconData(0xe85f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData schedule =
IconData(0xe860, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_reader_active =
IconData(0xe861, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_reader =
IconData(0xe862, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_active =
IconData(0xe863, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData arrow_forward =
IconData(0xe864, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData heart_rate =
IconData(0xe865, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu_icon_active_1 =
IconData(0xe866, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData message_icon_1 =
IconData(0xe867, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData message_icon_active_1 =
IconData(0xe868, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData scdedule_icon_active_1 =
IconData(0xe869, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi_r_1 =
IconData(0xe86a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData underweight_bmi_1 =
IconData(0xe86b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData temperature_1 =
IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData underweight_bmi_r_1 =
IconData(0xe86d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_1 =
IconData(0xe86e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData blood_pressure_1 =
IconData(0xe86f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData health_bmi_r_1 =
IconData(0xe870, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData health_bmi_1 =
IconData(0xe871, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData heart_rate_1 =
IconData(0xe872, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData height_1 =
IconData(0xe873, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData obese_bmi_1 =
IconData(0xe874, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ovrweight_bmi_1 =
IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData powered_by_cs_1 =
IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_code_3 =
IconData(0xe877, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData reschedule__1 =
IconData(0xe878, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout_1 =
IconData(0xe879, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData livecare_1 =
IconData(0xe87a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData modify_episode_1 =
IconData(0xe87b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData order_prescription_1 =
IconData(0xe87c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData order_procedures_1 =
IconData(0xe87d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData patient_sick_leave_1 =
IconData(0xe87e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData progress_notes_2 =
IconData(0xe87f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData radiology_2 =
IconData(0xe880, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData refer_patient_1 =
IconData(0xe881, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ucaf_1 =
IconData(0xe882, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData vital_signs_1 =
IconData(0xe883, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData walkin_1 =
IconData(0xe884, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData admission_req_1 =
IconData(0xe885, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData booked_1 =
IconData(0xe886, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData create_episode_1 =
IconData(0xe887, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData ecg_1 =
IconData(0xe888, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData health_summary_1 =
IconData(0xe889, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results_1 =
IconData(0xe88a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData female_2 =
IconData(0xe88b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData filter_1 =
IconData(0xe88c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData male_3 =
IconData(0xe88d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search_2 =
IconData(0xe88e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData send_1 =
IconData(0xe88f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData view_1 =
IconData(0xe890, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData warning_1 =
IconData(0xe891, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData add_1 =
IconData(0xe892, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData arrow_forward_1 =
IconData(0xe893, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData back_1 =
IconData(0xe894, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData close_1 =
IconData(0xe895, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit_1 =
IconData(0xe896, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData external_link_1 =
IconData(0xe897, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger_1 =
IconData(0xe898, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms_1 =
IconData(0xe899, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_face_1 =
IconData(0xe89a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_reader_1 =
IconData(0xe89b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qr_reader_active_1 =
IconData(0xe89c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData schedule_1 =
IconData(0xe89d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData schedule_active_1 =
IconData(0xe89e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_1 =
IconData(0xe89f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_active_1 =
IconData(0xe8a0, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_1 =
IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_active_1 =
IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg);
} }

@ -43,11 +43,11 @@ class DoctorReplayChat extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
height: 150, height: 115,
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 10, right: 10, bottom: 10), left: 10, right: 10),
margin: EdgeInsets.only(top: 50), margin: EdgeInsets.only(top: 40),
child: Column( child: Column(
children: [ children: [
Row( Row(
@ -300,31 +300,44 @@ class DoctorReplayChat extends StatelessWidget {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
child:TextFields( width: double.infinity,
hasLabelText: msgController.text != '' // height: MediaQuery.of(context).size.height * 0.12,
? true child: Column(
: false, mainAxisSize: MainAxisSize.min,
showLabelText: false, children: <Widget>[
hintText: TranslationBase FractionallySizedBox(
.of(context) child: Container(
.typeHereToReply, child: TextFields(
fontSize: 13.5, borderRadius: 0,
suffixIcon: FontAwesomeIcons.arrowRight, hasLabelText: msgController.text != ''
suffixIconColor: Colors.green, ? true
// hintColor: Colors.black, : false,
fontWeight: FontWeight.w600, showLabelText: false,
maxLines: 50, hintText: "\n"+TranslationBase
minLines: 3, .of(context)
controller: msgController, .typeHereToReply,
validator: (value) { fontSize: 13.5,
if (value == null || value == "")
return TranslationBase.of(context) suffixIcon: FontAwesomeIcons.arrowRight,
.emptyMessage; suffixIconColor: Colors.green,
else // hintColor: Colors.black,
return null; fontWeight: FontWeight.w600,
}), maxLines: 50,
height: MediaQuery.of(context).size.height * 0.1, minLines: 3,
), controller: msgController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
),
],
),
)
)); ));
} }
} }

@ -120,8 +120,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
.timelines[index].clinicName, .timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0] branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName, .timelines[index].projectName,
profileUrl: profileUrl: model.medicalFileList[0]
'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', .entityList[0].timelines[index].doctorImage,
appointmentDate: appointmentDate:
DateUtils.getDateTimeFromServerFormat( DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0] model.medicalFileList[0].entityList[0]

@ -147,7 +147,7 @@ class _InsuranceApprovalScreenNewState
.toString(), .toString(),
isPrescriptions: true, isPrescriptions: true,
approvalStatus: model.insuranceApproval[index] approvalStatus: model.insuranceApproval[index]
.approvalDetails.status, .approvalDetails?.status??'',
), ),
), ),
), ),

@ -216,28 +216,26 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Row( Row(
children: [ children: [
Texts( Texts(
'Receipt on :', 'Receipt on: ',
color: Colors.grey[500], color: Colors.grey[500],
), ),
Texts( Texts(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14,
), ),
], ],
), ),
Row( Row(
children: [ children: [
Texts( Texts(
'Exp on:', 'Exp on: ',
color: Colors.grey[500], color: Colors.grey[500],
), ),
Texts( Texts(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14,
), ),
], ],
), ),
@ -253,66 +251,109 @@ class _InsuranceApprovalsDetailsState extends State<InsuranceApprovalsDetails> {
Container( Container(
child: Column( child: Column(
children: [ children: [
Row( Padding(
mainAxisAlignment: padding: const EdgeInsets.symmetric(
MainAxisAlignment.spaceAround, horizontal: 8.0),
children: [ child: Row(
Texts('Procedure'), mainAxisAlignment:
Texts('Status'), MainAxisAlignment.spaceAround,
Texts('Usage Status') children: [
], Container(
width: MediaQuery.of(context)
.size
.width *
0.33,
child: Texts(
'Procedure',
fontWeight: FontWeight.w700,
),
),
Container(
width: MediaQuery.of(context)
.size
.width *
0.33,
child: Texts(
'Status',
fontWeight: FontWeight.w700,
),
),
Container(
width: MediaQuery.of(context)
.size
.width *
0.21,
child: Texts(
'Usage Status',
fontWeight: FontWeight.w700,
),
)
],
),
),
Divider(
color: Colors.black,
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceAround,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
height: MediaQuery.of(context)
.size
.height *
0.15, //130.0,
width: MediaQuery.of(context)
.size
.width *
0.33,
child: Texts(model
.insuranceApproval[
indexInsurance]
.approvalDetails
.procedureName),
),
Container(
height: MediaQuery.of(context)
.size
.height *
0.15,
width: MediaQuery.of(context)
.size
.width *
0.33,
child: Texts(model
.insuranceApproval[
indexInsurance]
.approvalDetails
.status),
),
Container(
height: MediaQuery.of(context)
.size
.height *
0.15,
width: MediaQuery.of(context)
.size
.width *
0.21,
child: Texts(model
.insuranceApproval[
indexInsurance]
.approvalDetails
.isInvoicedDesc),
),
],
),
), ),
Divider( Divider(
color: Colors.black45, color: Colors.black45,
), ),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceAround,
children: [
Container(
height: MediaQuery.of(context)
.size
.height *
0.2, //130.0,
width: MediaQuery.of(context)
.size
.width *
0.33,
child: Texts(model
.insuranceApproval[indexInsurance]
.approvalDetails
.procedureName),
),
Container(
height: MediaQuery.of(context)
.size
.height *
0.2,
width: MediaQuery.of(context)
.size
.width *
0.33,
child: Texts(model
.insuranceApproval[indexInsurance]
.approvalDetails
.status),
),
Container(
height: MediaQuery.of(context)
.size
.height *
0.2,
width: MediaQuery.of(context)
.size
.width *
0.25,
child: Texts(model
.insuranceApproval[indexInsurance]
.approvalDetails
.isInvoicedDesc),
),
],
)
], ],
), ),
), ),

@ -209,16 +209,38 @@ class MyReferralDetailScreen extends StatelessWidget {
), ),
], ],
) )
: Container( : Column(
child: Center( children: [
child: AppText( Container(
TranslationBase.of(context).patientNoDetailErrMsg, padding: EdgeInsets.only(left: 12.0),
color: HexColor("#B8382B"), child: Row(children: [
fontWeight: FontWeight.bold, IconButton(
fontSize: 16, icon: Icon(Icons.arrow_back_ios),
), color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
Expanded(
child: AppText("" ,
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
),
]),
), ),
), Container(
child: Center(
child: AppText(
TranslationBase.of(context).patientNoDetailErrMsg,
color: HexColor("#B8382B"),
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
),
],
),
), ),
); );
} }

@ -39,11 +39,11 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
// backgroundColor: Colors.white, // backgroundColor: Colors.white,
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0), preferredSize: Size.fromHeight(60.0),
child: Center( child: Center(
child: Container( child: Container(
height: 60.0, height: 60.0,
margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9, width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(

@ -1,4 +1,7 @@
import 'package:date_time_picker/date_time_picker.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,6 +15,11 @@ class LineChartCurved extends StatelessWidget {
List<int> xAxixs = List(); List<int> xAxixs = List();
List<double> yAxixs = List(); List<double> yAxixs = List();
// DateFormat format = DateFormat("yyyy-MM-dd");
DateFormat yearFormat = DateFormat("yyyy/MMM");
DateFormat monthFormat = DateFormat("MMM");
bool isDatesSameYear = true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
getXaxix(); getXaxix();
@ -23,36 +31,42 @@ class LineChartCurved extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white, // color: Colors.white,
), ),
child: Stack( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Column( const SizedBox(
crossAxisAlignment: CrossAxisAlignment.stretch, height: 4,
children: <Widget>[ ),
const SizedBox( Container(
height: 4, padding: const EdgeInsets.only(right: 18.0, left: 16.0),
), child: Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
title, children: [
style: TextStyle( AppText(
color: Colors.black, title,
fontSize: 15, fontSize: SizeConfig.textMultiplier * 2.1,
letterSpacing: 2), fontWeight: FontWeight.bold,
textAlign: TextAlign.center, backGroundcolor: Colors.black,
), fontFamily: 'Poppins',
SizedBox(height: 10,), textAlign: TextAlign.center,
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
), ),
],
),
),
SizedBox(
height: 16,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
), ),
const SizedBox( ),
height: 10, ),
), const SizedBox(
], height: 10,
), ),
], ],
), ),
@ -68,8 +82,9 @@ class LineChartCurved extends StatelessWidget {
} }
} }
} }
getYaxix() { getYaxix() {
int indexess= (timeSeries.length*0.30).toInt(); int indexess = (timeSeries.length * 0.30).toInt();
for (int index = 0; index < timeSeries.length; index++) { for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexess * index; int mIndex = indexess * index;
if (mIndex < timeSeries.length) { if (mIndex < timeSeries.length) {
@ -83,7 +98,6 @@ class LineChartCurved extends StatelessWidget {
lineTouchData: LineTouchData( lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData( touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Colors.white, tooltipBgColor: Colors.white,
), ),
touchCallback: (LineTouchResponse touchResponse) {}, touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true, handleBuiltInTouches: true,
@ -97,12 +111,37 @@ class LineChartCurved extends StatelessWidget {
color: Colors.black, color: Colors.black,
fontSize: 10, fontSize: 10,
), ),
rotateAngle:-65, rotateAngle: -65,
//rotateAngle:-65, //rotateAngle:-65,
margin: 22, margin: 22,
getTitles: (value) { getTitles: (value) {
if (timeSeries.length < 15) { if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) { if (timeSeries.length > value.toInt()) {
DateTime dateTime = timeSeries[value.toInt()].time;
if (isDatesSameYear) {
return monthFormat.format(dateTime);
} else {
return yearFormat.format(dateTime);
}
} else {
return '';
}
} else {
if (value.toInt() == 0 ||
value.toInt() == timeSeries.length - 1 ||
xAxixs.contains(value.toInt())) {
DateTime dateTime = timeSeries[value.toInt()].time;
if (isDatesSameYear) {
return monthFormat.format(dateTime);
} else {
return yearFormat.format(dateTime);
}
}
}
/*if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) {
DateTime dateTime = timeSeries[value.toInt()].time;
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
} else } else
return ''; return '';
@ -114,7 +153,7 @@ class LineChartCurved extends StatelessWidget {
if (xAxixs.contains(value.toInt())) { if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
} }
} }*/
return ''; return '';
}, },
), ),
@ -163,7 +202,7 @@ class LineChartCurved extends StatelessWidget {
), ),
minX: 0, minX: 0,
maxX: (timeSeries.length - 1).toDouble(), maxX: (timeSeries.length - 1).toDouble(),
maxY: getMaxY()+0.3, maxY: getMaxY() + 0.3,
minY: getMinY(), minY: getMinY(),
lineBarsData: getData(context), lineBarsData: getData(context),
); );
@ -176,7 +215,7 @@ class LineChartCurved extends StatelessWidget {
if (resultValueDouble > max) max = resultValueDouble; if (resultValueDouble > max) max = resultValueDouble;
}); });
return max.roundToDouble() ; return max.roundToDouble();
} }
double getMinY() { double getMinY() {
@ -192,14 +231,22 @@ class LineChartCurved extends StatelessWidget {
List<LineChartBarData> getData(context) { List<LineChartBarData> getData(context) {
List<FlSpot> spots = List(); List<FlSpot> spots = List();
isDatesSameYear = true;
int previousDateYear = 0;
for (int index = 0; index < timeSeries.length; index++) { for (int index = 0; index < timeSeries.length; index++) {
spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); spots.add(FlSpot(index.toDouble(), timeSeries[index].sales));
if (isDatesSameYear == false ||
(previousDateYear != 0 &&
previousDateYear != timeSeries[index].time.year)) {
isDatesSameYear = false;
}
previousDateYear = timeSeries[index].time.year;
} }
final LineChartBarData lineChartBarData1 = LineChartBarData( final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots, spots: spots,
isCurved: true, isCurved: true,
colors: [Theme.of(context).primaryColor], colors: [Colors.red] /*[Theme.of(context).primaryColor]*/,
barWidth: 5, barWidth: 5,
isStrokeCapRound: true, isStrokeCapRound: true,
dotData: FlDotData( dotData: FlDotData(

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -26,71 +27,77 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white, // color: Colors.white,
), ),
child: Stack( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
Column( const SizedBox(
crossAxisAlignment: CrossAxisAlignment.stretch, height: 4,
children: <Widget>[ ),
const SizedBox( Container(
height: 15, padding: const EdgeInsets.only(right: 18.0, left: 16.0),
), child: Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
title, children: [
style: TextStyle( AppText(
color: Colors.black, fontSize: 15, letterSpacing: 2), title,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 2.1,
), fontWeight: FontWeight.bold,
SizedBox( backGroundcolor: Colors.black,
height: 10, fontFamily: 'Poppins',
), textAlign: TextAlign.center,
Expanded(
child: Padding(
padding:
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
), ),
],
),
),
SizedBox(
height: 10,
),
Expanded(
child: Padding(
padding:
const EdgeInsets.only(right: 18.0, left: 16.0, top: 15),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
), ),
SizedBox( ),
height: 10, ),
), SizedBox(
height: 10,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row( Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Row( Container(
children: [ width: 20,
Container( height: 20,
width: 20, decoration: BoxDecoration(
height: 20, shape: BoxShape.rectangle,
decoration: BoxDecoration( color: Theme.of(context).primaryColor),
shape: BoxShape.rectangle,
color: Theme.of(context).primaryColor),
),
SizedBox(width: 5,),
AppText(TranslationBase.of(context).systolicLng)
],
), ),
SizedBox(width: 15,), SizedBox(width: 5,),
Row( AppText(TranslationBase.of(context).systolicLng)
children: [ ],
Container( ),
width: 20, SizedBox(width: 15,),
height: 20, Row(
decoration: BoxDecoration( children: [
shape: BoxShape.rectangle, Container(
color: Colors.grey), width: 20,
), height: 20,
SizedBox(width: 5,), decoration: BoxDecoration(
AppText(TranslationBase.of(context).diastolicLng) shape: BoxShape.rectangle,
], color: Colors.grey),
), ),
SizedBox(width: 5,),
AppText(TranslationBase.of(context).diastolicLng)
], ],
) ),
], ],
), )
], ],
), ),
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.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/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
@ -17,7 +18,13 @@ class VitalSignBloodPressureWidget extends StatefulWidget {
final String viewKey2; final String viewKey2;
VitalSignBloodPressureWidget( VitalSignBloodPressureWidget(
{Key key, this.vitalList, this.title1, this.title2, this.viewKey1, this.title3, this.viewKey2}); {Key key,
this.vitalList,
this.title1,
this.title2,
this.viewKey1,
this.title3,
this.viewKey2});
@override @override
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
@ -28,21 +35,96 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( /*decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1), border: Border.all(color: Colors.grey, width: 1),
), ),*/
margin: EdgeInsets.all(20), margin: EdgeInsets.all(0),
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row(
children: [
Expanded(
child: Container(
child: Container(
padding: EdgeInsets.all(8),
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),*/
child: AppText(
TranslationBase.of(context).date,
fontSize: SizeConfig.textMultiplier * 1.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60,
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(8),
child: Container(
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),*/
child: AppText(
widget.title2,
fontSize: SizeConfig.textMultiplier * 1.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(8),
child: Container(
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),*/
child: AppText(
widget.title3,
fontSize: SizeConfig.textMultiplier * 1.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60
),
),
),
],
),
const Divider(
height: 1,
thickness: 1,
color: Colors.black,
),
Table( Table(
border: TableBorder.symmetric( border: TableBorder(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]),
), ),
children: fullData(projectViewModel), children: fullData(projectViewModel),
), ),
@ -54,36 +136,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
List<TableRow> fullData(ProjectViewModel projectViewModel) { List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [ /* tableRow.add(TableRow(children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: AppText(
TranslationBase.of(context).date,
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
),
child: Center(
child: AppText(widget.title2, color: Colors.white),
),
height: 60),
),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -98,22 +151,24 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
), ),
height: 60), height: 60),
), ),
])); ]));*/
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey1]; var data = vital.toJson()[widget.viewKey1];
DateTime elementDate = DateTime elementDate =
DateUtils.getDateTimeFromServerFormat(vital.createdOn); DateUtils.getDateTimeFromServerFormat(vital.createdOn);
if (data != 0) if (data != 0)
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: AppText( '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ', // textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
@ -121,11 +176,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: AppText( '${vital.toJson()[widget.viewKey1]}',
'${vital.toJson()[widget.viewKey1]}', // textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
@ -133,11 +190,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: AppText( '${vital.toJson()[widget.viewKey2]}',
'${vital.toJson()[widget.viewKey2]}', // textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),

@ -39,7 +39,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: mode, baseViewModel: mode,
/* appBar: PatientProfileHeaderWhitAppointmentAppBar( /* appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: patient, patient: patient,
patientType: patientType, patientType: patientType,
arrivalType: arrivalType, arrivalType: arrivalType,
@ -140,7 +140,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
? '${assetBasePath}health_BMI.png' ? '${assetBasePath}health_BMI.png'
: '${assetBasePath}health_BMI-r.png', : '${assetBasePath}health_BMI-r.png',
height: height:
MediaQuery.of(context).size.height * 0.10, MediaQuery.of(context).size.height * 0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -176,7 +176,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
? '${assetBasePath}ovrweight_BMI.png' ? '${assetBasePath}ovrweight_BMI.png'
: '${assetBasePath}ovrweight_BMI-r.png', : '${assetBasePath}ovrweight_BMI-r.png',
height: height:
MediaQuery.of(context).size.height * 0.10, MediaQuery.of(context).size.height * 0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
@ -203,75 +203,75 @@ class VitalSignDetailsScreen extends StatelessWidget {
)), )),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 4 mode.getBMIStatus() != 4
? '${assetBasePath}Obese_BMI.png' ? '${assetBasePath}Obese_BMI.png'
: '${assetBasePath}Obese_BMI-r.png', : '${assetBasePath}Obese_BMI-r.png',
height: height:
MediaQuery.of(context).size.height * 0.10, MediaQuery.of(context).size.height * 0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
AppText( AppText(
"${TranslationBase.of(context).bmiObese}", "${TranslationBase.of(context).bmiObese}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 4
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
AppText( AppText(
"(30-34.9)", "(30-34.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 4
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
], ],
)), )),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Image.asset( Image.asset(
mode.getBMIStatus() != 5 mode.getBMIStatus() != 5
? '${assetBasePath}Obese_BMI.png' ? '${assetBasePath}Obese_BMI.png'
: '${assetBasePath}Obese_BMI-r.png', : '${assetBasePath}Obese_BMI-r.png',
height: height:
MediaQuery.of(context).size.height * 0.10, MediaQuery.of(context).size.height * 0.10,
), ),
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
FittedBox( FittedBox(
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
child: AppText( child: AppText(
"${TranslationBase.of(context).bmiObeseExtreme} fdsd", "${TranslationBase.of(context).bmiObeseExtreme}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 5
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
), ),
AppText( AppText(
"(35<)", "(35<)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4 color: mode.getBMIStatus() == 5
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
], ],
)), )),
], ],
) )
], ],
@ -280,7 +280,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 8.0), margin: EdgeInsets.symmetric(horizontal: 8.0),
child : GridView.count( child: GridView.count(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
crossAxisSpacing: 4, crossAxisSpacing: 4,
@ -291,24 +291,25 @@ class VitalSignDetailsScreen extends StatelessWidget {
InkWell( InkWell(
onTap: () => isNotOneAppointment onTap: () => isNotOneAppointment
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Height, pageKey: vitalSignDetails.Height,
pageTitle: pageTitle:
TranslationBase.of(context) TranslationBase.of(context).height,
.height, vitalList:
vitalList: mode.patientVitalSignsHistory,
mode.patientVitalSignsHistory, patient: patient,
), patientType: patientType,
), arrivalType: arrivalType,
) ),
),
)
: null, : null,
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context).height, des: TranslationBase.of(context).height,
imagePath: imagePath: "${assetBasePath}height.png",
"${assetBasePath}height.png",
lastVal: mode.heightCm, lastVal: mode.heightCm,
unit: TranslationBase.of(context).cm, unit: TranslationBase.of(context).cm,
), ),
@ -317,18 +318,20 @@ class VitalSignDetailsScreen extends StatelessWidget {
InkWell( InkWell(
onTap: () => isNotOneAppointment onTap: () => isNotOneAppointment
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.Weight, pageKey: vitalSignDetails.Weight,
pageTitle: pageTitle:
TranslationBase.of(context) TranslationBase.of(context).weight,
.weight, vitalList:
vitalList: mode.patientVitalSignsHistory,
mode.patientVitalSignsHistory, patient: patient,
), patientType: patientType,
), arrivalType: arrivalType,
) ),
),
)
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context).weight, des: TranslationBase.of(context).weight,
@ -340,26 +343,25 @@ class VitalSignDetailsScreen extends StatelessWidget {
InkWell( InkWell(
onTap: () => isNotOneAppointment onTap: () => isNotOneAppointment
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: pageKey: vitalSignDetails.Temperature,
vitalSignDetails.Temperature, pageTitle: TranslationBase.of(context)
pageTitle: .temperature,
TranslationBase.of(context) vitalList:
.temperature, mode.patientVitalSignsHistory,
vitalList: patient: patient,
mode.patientVitalSignsHistory, patientType: patientType,
), arrivalType: arrivalType,
), ),
) ),
)
: null, : null,
child: Container( child: Container(
child: VitalSignItem( child: VitalSignItem(
des: des: TranslationBase.of(context).temperature,
TranslationBase.of(context).temperature, imagePath: "${assetBasePath}temperature.png",
imagePath:
"${assetBasePath}temperature.png",
lastVal: mode.temperatureCelcius, lastVal: mode.temperatureCelcius,
unit: TranslationBase.of(context).tempC, unit: TranslationBase.of(context).tempC,
), ),
@ -368,23 +370,24 @@ class VitalSignDetailsScreen extends StatelessWidget {
InkWell( InkWell(
onTap: () => isNotOneAppointment onTap: () => isNotOneAppointment
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: vitalSignDetails.heart, pageKey: vitalSignDetails.heart,
pageTitle: pageTitle:
TranslationBase.of(context) TranslationBase.of(context).heart,
.heart, vitalList:
vitalList: mode.patientVitalSignsHistory,
mode.patientVitalSignsHistory, patient: patient,
), patientType: patientType,
), arrivalType: arrivalType,
) ),
),
)
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context).heart, des: TranslationBase.of(context).heart,
imagePath: imagePath: "${assetBasePath}heart_rate.png",
"${assetBasePath}heart_rate.png",
lastVal: mode.hartRat, lastVal: mode.hartRat,
unit: TranslationBase.of(context).bpm, unit: TranslationBase.of(context).bpm,
), ),
@ -392,52 +395,50 @@ class VitalSignDetailsScreen extends StatelessWidget {
InkWell( InkWell(
onTap: () => isNotOneAppointment onTap: () => isNotOneAppointment
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: pageKey: vitalSignDetails.Respiration,
vitalSignDetails.Respiration, pageTitle: TranslationBase.of(context)
pageTitle: .respirationRate,
TranslationBase.of(context) vitalList:
.respirationRate, mode.patientVitalSignsHistory,
vitalList: patient: patient,
mode.patientVitalSignsHistory, patientType: patientType,
), arrivalType: arrivalType,
), ),
) ),
)
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: TranslationBase.of(context) des: TranslationBase.of(context).respirationRate,
.respirationRate, imagePath: "${assetBasePath}respiration_rate.png",
imagePath:
"${assetBasePath}respiration_rate.png",
lastVal: mode.respirationBeatPerMinute, lastVal: mode.respirationBeatPerMinute,
unit: TranslationBase.of(context) unit:
.respirationSigns, TranslationBase.of(context).respirationSigns,
), ),
), ),
InkWell( InkWell(
onTap: () => isNotOneAppointment onTap: () => isNotOneAppointment
? Navigator.push( ? Navigator.push(
context, context,
FadePage( FadePage(
page: VitalSignItemDetailsScreen( page: VitalSignItemDetailsScreen(
pageKey: pageKey: vitalSignDetails.BloodPressure,
vitalSignDetails.BloodPressure, pageTitle: TranslationBase.of(context)
pageTitle: .bloodPressure,
TranslationBase.of(context) vitalList:
.bloodPressure, mode.patientVitalSignsHistory,
vitalList: patient: patient,
mode.patientVitalSignsHistory, patientType: patientType,
), arrivalType: arrivalType,
), ),
) ),
)
: null, : null,
child: VitalSignItem( child: VitalSignItem(
des: des: TranslationBase.of(context).bloodPressure,
TranslationBase.of(context).bloodPressure, imagePath: "${assetBasePath}blood_pressure.png",
imagePath:
"${assetBasePath}blood_pressure.png",
lastVal: mode.bloodPressure, lastVal: mode.bloodPressure,
unit: TranslationBase.of(context).sysDias, unit: TranslationBase.of(context).sysDias,
), ),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.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/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
@ -27,21 +28,74 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( /*decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1), border: Border.all(color: Colors.grey, width: 1),
), ),*/
margin: EdgeInsets.all(20), margin: EdgeInsets.all(0),
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row(
children: [
Expanded(
child: Container(
child: Container(
padding: EdgeInsets.all(8),
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),*/
child: AppText(
TranslationBase.of(context).date,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60,
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(8),
child: Container(
/*decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),*/
child: AppText(
widget.title2,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60
),
),
)
],
),
const Divider(
height: 1,
thickness: 1,
color: Colors.black,
),
Table( Table(
border: TableBorder.symmetric( border: TableBorder(
inside: BorderSide(width: 2.0, color: Colors.grey[300]), horizontalInside: BorderSide(width: 1.0, color: Colors.grey[300]),
), ),
children: fullData(projectViewModel), children: fullData(projectViewModel),
), ),
@ -53,67 +107,40 @@ class _VitalSignDetailsWidgetState extends State<VitalSignDetailsWidget> {
List<TableRow> fullData(ProjectViewModel projectViewModel) { List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [ /* tableRow.add(TableRow(children: [
Container(
child: Container( ]));*/
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: AppText(
TranslationBase.of(context).date,
color: Colors.white,
),
),
height: 60,
),
),
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0)
),
),
child: Center(
child: AppText(widget.title2, color: Colors.white),
),
height: 60),
)
]));
widget.vitalList.forEach((vital) { widget.vitalList.forEach((vital) {
var data = vital.toJson()[widget.viewKey]; var data = vital.toJson()[widget.viewKey];
DateTime elementDate = DateTime elementDate =
DateUtils.getDateTimeFromServerFormat(vital.createdOn); DateUtils.getDateTimeFromServerFormat(vital.createdOn);
if (data != 0) if (data != 0)
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: AppText( '${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ', // textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: AppText( '${vital.toJson()[widget.viewKey]}',
'${vital.toJson()[widget.viewKey]}', // textAlign: TextAlign.center,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),

@ -1,10 +1,15 @@
import 'package:doctor_app_flutter/config/size_config.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/lookups/patient_lookup.dart'; import 'package:doctor_app_flutter/lookups/patient_lookup.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -12,8 +17,17 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
final vitalSignDetails pageKey; final vitalSignDetails pageKey;
final String pageTitle; final String pageTitle;
List<Map> VSchart; List<Map> VSchart;
PatiantInformtion patient;
VitalSignItemDetailsScreen({this.vitalList, this.pageKey, this.pageTitle}); String patientType;
String arrivalType;
VitalSignItemDetailsScreen(
{this.vitalList,
this.pageKey,
this.pageTitle,
this.patient,
this.patientType,
this.arrivalType});
final List<VitalSignHistory> vitalList; final List<VitalSignHistory> vitalList;
@ -31,7 +45,6 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
'title2Ar': 'الكتلة', 'title2Ar': 'الكتلة',
'viewKey': 'BodyMassIndex', 'viewKey': 'BodyMassIndex',
}, },
]; ];
break; break;
@ -87,7 +100,6 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
'title3Ar': 'الإنبساط', 'title3Ar': 'الإنبساط',
'viewKey': 'BloodPressure', 'viewKey': 'BloodPressure',
}, },
]; ];
break; break;
@ -161,35 +173,79 @@ class VitalSignItemDetailsScreen extends StatelessWidget {
} }
return AppScaffold( return AppScaffold(
appBarTitle: pageTitle, appBarTitle: pageTitle,
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
isShowAppBar: true, isShowAppBar: true,
body: ListView( appBar: PatientProfileHeaderNewDesignAppBar(
children: VSchart.map((chartInfo) { patient, patientType, arrivalType),
var vitalListTemp = vitalList.where( body: SingleChildScrollView(
(element) => element.toJson()[chartInfo['viewKey']] != null, child: Column(
); crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(vitalListTemp.length != 0 && chartInfo['viewKey']=='BloodPressure'){ Container(
return VitalSingChartBloodPressure( margin: EdgeInsets.all(16.0),
vitalList: vitalList, child: Column(
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], crossAxisAlignment: CrossAxisAlignment.start,
title1: chartInfo['title1'], children: [
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], AppText(
title3:projectViewModel.isArabic?chartInfo['title3Ar']: chartInfo['title3'], "${patient.firstName ?? patient.patientDetails.firstName}'s",
viewKey1: 'BloodPressureHigher', fontFamily: 'Poppins',
viewKey2: 'BloodPressureLower', fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
); ),
} AppText(
TranslationBase.of(context).vitalSign,
return vitalListTemp.length != 0 fontFamily: 'Poppins',
? VitalSingChartAndDetials( fontSize: SizeConfig.textMultiplier * 3,
vitalList: vitalList, fontWeight: FontWeight.bold,
name:projectViewModel.isArabic? chartInfo['nameAr']:chartInfo['name'], )
title1: chartInfo['title1'], ],
title2:projectViewModel.isArabic?chartInfo['title2Ar']: chartInfo['title2'], ),
viewKey: chartInfo['viewKey']) ),
: Container(); Container(
}).toList(), child: ListView(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
children: VSchart.map((chartInfo) {
var vitalListTemp = vitalList.where(
(element) => element.toJson()[chartInfo['viewKey']] != null,
);
if (vitalListTemp.length != 0 &&
chartInfo['viewKey'] == 'BloodPressure') {
return VitalSingChartBloodPressure(
vitalList: vitalList,
name: projectViewModel.isArabic
? chartInfo['nameAr']
: chartInfo['name'],
title1: chartInfo['title1'],
title2: projectViewModel.isArabic
? chartInfo['title2Ar']
: chartInfo['title2'],
title3: projectViewModel.isArabic
? chartInfo['title3Ar']
: chartInfo['title3'],
viewKey1: 'BloodPressureHigher',
viewKey2: 'BloodPressureLower',
);
}
return vitalListTemp.length != 0
? VitalSingChartAndDetials(
vitalList: vitalList,
name: projectViewModel.isArabic
? chartInfo['nameAr']
: chartInfo['name'],
title1: chartInfo['title1'],
title2: projectViewModel.isArabic
? chartInfo['title2Ar']
: chartInfo['title2'],
viewKey: chartInfo['viewKey'])
: Container();
}).toList(),
),
),
],
),
), ),
); );
} }

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart';
@ -32,9 +33,52 @@ class VitalSingChartAndDetials extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
generateData(); generateData();
return timeSeriesData.length != 0 ? Column( return timeSeriesData.length != 0
children: <Widget>[ ? Padding(
AppExpandableNotifier( padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: LineChartCurved(
title: name,
timeSeries: timeSeriesData,
indexes: timeSeriesData.length ~/ 5.5,
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
SizedBox(height: 8,),
VitalSignDetailsWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
viewKey: viewKey,
),
],
),
),
/*AppExpandableNotifier(
// isExpand: true, // isExpand: true,
headerWid: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,), headerWid: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,),
bodyWid: VitalSignDetailsWidget( bodyWid: VitalSignDetailsWidget(
@ -43,26 +87,31 @@ class VitalSingChartAndDetials extends StatelessWidget {
title2: title2, title2: title2,
viewKey: viewKey, viewKey: viewKey,
), ),
), ),*/
], ],
) : Container( ),
width: double.infinity, )
height: MediaQuery.of(context).size.height, : Container(
child: Center( width: double.infinity,
child: AppText(TranslationBase.of(context).vitalSignDetailEmpty), height: MediaQuery.of(context).size.height,
), child: Center(
); child: AppText(TranslationBase.of(context).vitalSignDetailEmpty),
),
);
} }
generateData() { generateData() {
if (vitalList.length > 0) { if (vitalList.length > 0) {
vitalList.reversed.toList().forEach( vitalList.reversed.toList().forEach(
(element) { (element) {
DateTime elementDate = DateUtils.getDateTimeFromServerFormat(element.createdOn); DateTime elementDate =
if(element.toJson()[viewKey]!=null && element.toJson()[viewKey]?.toInt()!=0) DateUtils.getDateTimeFromServerFormat(element.createdOn);
if (element.toJson()[viewKey] != null &&
element.toJson()[viewKey]?.toInt() != 0)
timeSeriesData.add( timeSeriesData.add(
TimeSeriesSales2( TimeSeriesSales2(
new DateTime(elementDate.year, elementDate.month, elementDate.day), new DateTime(
elementDate.year, elementDate.month, elementDate.day),
element.toJson()[viewKey].toDouble(), element.toJson()[viewKey].toDouble(),
), ),
); );

@ -1,9 +1,11 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
@ -36,26 +38,72 @@ class VitalSingChartBloodPressure extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
generateData(); generateData();
return Column( return Padding(
children: <Widget>[ padding: const EdgeInsets.all(10.0),
AppExpandableNotifier( child: Column(
// isExpand: true, crossAxisAlignment: CrossAxisAlignment.start,
headerWid: LineChartCurvedBloodPressure( children: <Widget>[
title: name, Container(
timeSeries1: timeSeriesData1, margin: EdgeInsets.symmetric(horizontal: 8),
timeSeries2: timeSeriesData2, decoration: BoxDecoration(
indexes: timeSeriesData1.length ~/ 5.5, color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: LineChartCurvedBloodPressure(
title: name,
timeSeries1: timeSeriesData1,
timeSeries2: timeSeriesData2,
indexes: timeSeriesData1.length ~/ 5.5,
),
), ),
bodyWid: VitalSignBloodPressureWidget( Container(
vitalList: vitalList, margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
title1: title1, padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
title2: title2, decoration: BoxDecoration(
title3: title3, color: Colors.white,
viewKey1: viewKey1, borderRadius: BorderRadius.circular(12)
viewKey2: viewKey2, ),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
fontSize: SizeConfig.textMultiplier * 2.3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
SizedBox(height: 8,),
VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
),
],
),
), ),
), /*AppExpandableNotifier(
], // isExpand: true,
headerWid: LineChartCurvedBloodPressure(
title: name,
timeSeries1: timeSeriesData1,
timeSeries2: timeSeriesData2,
indexes: timeSeriesData1.length ~/ 5.5,
),
bodyWid: VitalSignBloodPressureWidget(
vitalList: vitalList,
title1: title1,
title2: title2,
title3: title3,
viewKey1: viewKey1,
viewKey2: viewKey2,
),
),*/
],
),
); );
} }

@ -25,116 +25,113 @@ class ProcedureCard extends StatelessWidget {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
color: Colors.white, color: Colors.white,
), ),
child: Padding( child: Container(
padding: const EdgeInsets.all(8.0), child: Row(
child: Container( mainAxisAlignment: MainAxisAlignment.start,
child: Row( children: [
mainAxisAlignment: MainAxisAlignment.start, Container(
children: [ height: MediaQuery.of(context).size.height * .20,
Container( width: 5,
height: MediaQuery.of(context).size.height * .20, decoration: BoxDecoration(
width: 5, borderRadius: BorderRadius.only(
decoration: BoxDecoration( topLeft: Radius.circular(10),
borderRadius: BorderRadius.only( bottomLeft: Radius.circular(10),
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color: entityList.orderType == 1
? Colors.red[500]
: Colors.black,
), ),
color: entityList.orderType == 1
? Colors.red[500]
: Colors.black,
), ),
Expanded( ),
child: Container( Expanded(
padding: EdgeInsets.only( child: Container(
left: projectViewModel.isArabic ? 0 : 15, padding: EdgeInsets.only(
right: projectViewModel.isArabic ? 15 : 0), left: projectViewModel.isArabic ? 0 : 15,
child: InkWell( right: projectViewModel.isArabic ? 15 : 0),
child: Column( child: InkWell(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expanded( children: [
child: Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Texts(
entityList.orderType == 0
? 'Routine'
: 'Urgent',
color: entityList.orderType == 0
? Colors.black
: Colors.red[800],
fontWeight: FontWeight.w600,
),
SizedBox(
height: 5,
),
Texts(
entityList.procedureName,
bold: true,
fontSize: 14,
),
],
),
),
SizedBox(
width: 5,
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Texts( Texts(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', entityList.orderType == 0
color: Colors.black, ? 'Routine'
: 'Urgent',
color: entityList.orderType == 0
? Colors.black
: Colors.red[800],
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, ),
SizedBox(
height: 5,
), ),
Texts( Texts(
'${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}', entityList.procedureName,
fontWeight: FontWeight.w600, bold: true,
color: Colors.grey[700],
fontSize: 14, fontSize: 14,
), ),
], ],
), ),
], ),
), SizedBox(
Row( width: 5,
children: [ ),
Texts( Column(
TranslationBase.of(context).orderNo, crossAxisAlignment: CrossAxisAlignment.end,
color: Colors.grey, mainAxisAlignment: MainAxisAlignment.end,
fontSize: 12, children: [
), Texts(
Texts( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}',
entityList.orderNo.toString(), color: Colors.black,
color: Colors.grey, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 14,
), ),
], Texts(
), '${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}',
Row( fontWeight: FontWeight.w600,
mainAxisAlignment: MainAxisAlignment.spaceBetween, color: Colors.grey[700],
children: [ fontSize: 14,
Texts( ),
entityList.remarks ?? '', ],
fontSize: 12, ),
), ],
Icon(Icons.edit) ),
], Row(
) children: [
], Texts(
), TranslationBase.of(context).orderNo,
onTap: onTap, color: Colors.grey,
fontSize: 12,
),
Texts(
entityList.orderNo.toString(),
color: Colors.grey,
fontSize: 12,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
entityList.remarks ?? '',
fontSize: 12,
),
Icon(Icons.edit)
],
)
],
), ),
onTap: onTap,
), ),
), ),
], ),
), ],
), ),
), ),
); );

@ -175,7 +175,7 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
Row( Row(
children: [ children: [
AppText( AppText(
'New Radiology Order', 'New Lab Order',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 20, fontSize: 20,
), ),

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -27,8 +28,8 @@ class ProcedureScreen extends StatelessWidget {
onModelReady: (model) => model.getProcedure(mrn: patient.patientId), onModelReady: (model) => model.getProcedure(mrn: patient.patientId),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: false, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).orderProcedure, appBar: PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -37,8 +38,6 @@ class ProcedureScreen extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign(
patient, arrivalType ?? '0', patientType),
SizedBox( SizedBox(
height: 12, height: 12,
), ),

@ -1200,7 +1200,7 @@ class TranslationBase {
String get updateReschedule => String get updateReschedule =>
localizedValues['update-reschedule'][locale.languageCode]; localizedValues['update-reschedule'][locale.languageCode];
String get sickLeave => localizedValues['sick_leave'][locale.languageCode]; String get sickLeave => localizedValues['sick_leave'][locale.languageCode];
String get accepted => localizedValues['accepetd'][locale.languageCode]; String get accepted => localizedValues['accepted'][locale.languageCode];
String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get cancelled => localizedValues['cancelled'][locale.languageCode];
String get unReplied => localizedValues['unReplied'][locale.languageCode]; String get unReplied => localizedValues['unReplied'][locale.languageCode];
String get replied => localizedValues['replied'][locale.languageCode]; String get replied => localizedValues['replied'][locale.languageCode];

@ -21,31 +21,32 @@ class MyScheduleWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Column( Expanded(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
SizedBox( children: [
height: 10, SizedBox(
), height: 10,
AppText( ),
workingHoursTable.dayName, AppText(
fontSize: 2.5 * SizeConfig.textMultiplier, workingHoursTable.dayName,
fontFamily: 'Poppins', fontSize: 18,
// fontSize: 18 fontFamily: 'Poppins',
), // fontSize: 18
SizedBox( ),
height: 10, SizedBox(
), height: 10,
AppText( ),
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', AppText(
fontSize: 2.5 * SizeConfig.textMultiplier, ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontWeight: FontWeight.w700, fontSize: 18,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
// fontSize: 18 // fontSize: 18
), ),
], ],
),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.55, width: MediaQuery.of(context).size.width * 0.55,
@ -80,15 +81,10 @@ class MyScheduleWidget extends StatelessWidget {
), ),
Container( Container(
width: MediaQuery.of(context).size.width*0.55, width: MediaQuery.of(context).size.width*0.55,
child: Expanded( child: AppText(
child: Padding( '${work.from} - ${work.to}',
padding: const EdgeInsets.all(8.0), fontSize: 15,
child: AppText( fontWeight: FontWeight.w300,
work.from + ' - ' + work.to,
fontSize: 15,
fontWeight: FontWeight.w300,
),
),
), ),
) )
], ],

@ -20,292 +20,294 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PreferredSize( return Container(
preferredSize: Size(double.infinity, 200), padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration(
color: Colors.white,
),
height: 200,
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,), left: 10, right: 10, bottom: 10),
decoration: BoxDecoration( margin: EdgeInsets.only(top: 50),
color: Colors.white, child: Column(
), children: [
height: 200, Container(
child: Container( padding: EdgeInsets.only(left: 12.0),
padding: EdgeInsets.only( child: Row(children: [
left: 10, right: 10, bottom: 10), IconButton(
margin: EdgeInsets.only(top: 50), icon: Icon(Icons.arrow_back_ios),
child: Column( color: Colors.black, //Colors.black,
children: [ onPressed: () => Navigator.pop(context),
Container( ),
padding: EdgeInsets.only(left: 12.0), Expanded(
child: Row(children: [ child: AppText(
IconButton( patient.firstName != null ?
icon: Icon(Icons.arrow_back_ios), (Helpers.capitalize(patient.firstName) +
color: Colors.black, //Colors.black, " " +
onPressed: () => Navigator.pop(context), Helpers.capitalize(
), patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
AppText( fontSize: SizeConfig.textMultiplier *2.5,
patient.firstName!=null? (Helpers.capitalize(patient.firstName) + " " + Helpers.capitalize(patient.lastName)):'',
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
patient.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
Row(children: [
Padding(
padding: EdgeInsets.only(left: 12.0),
child: Container(
width: 60,
height: 60,
child: Image.asset(
patient.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
), ),
SizedBox( patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
width: 10, ? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
), ),
Expanded( ]),
child: Column( ),
crossAxisAlignment: Row(children: [
CrossAxisAlignment.start, Padding(
children: [ padding: EdgeInsets.only(left: 12.0),
SERVICES_PATIANT2[ child: Container(
int.parse(patientType)] == width: 60,
"patientArrivalList" height: 60,
? Container( child: Image.asset(
child: Row( patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
mainAxisAlignment: ? 'assets/images/male_avatar.png'
MainAxisAlignment : 'assets/images/female_avatar.png',
.spaceBetween, fit: BoxFit.cover,
children: [ ),
patient.patientStatusType == ),
43 ),
? AppText( SizedBox(
TranslationBase.of( width: 10,
context) ),
.arrivedP, Expanded(
color: Colors.green, child: Column(
fontWeight: crossAxisAlignment:
FontWeight.bold, CrossAxisAlignment.start,
fontFamily: children: [
'Poppins', SERVICES_PATIANT2[
fontSize: 12, int.parse(patientType)] ==
) "patientArrivalList"
: AppText( ? Container(
TranslationBase.of( child: Row(
context) mainAxisAlignment:
.notArrived, MainAxisAlignment
color: .spaceBetween,
Colors.red[800], children: [
patient.patientStatusType ==
43
? AppText(
TranslationBase.of(
context)
.arrivedP,
color: Colors.green,
fontWeight:
FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12,
)
: AppText(
TranslationBase.of(
context)
.notArrived,
color:
Colors.red[800],
fontWeight:
FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12,
),
arrivalType == '1'
? AppText(
patient.startTime !=
null
? patient
.startTime
: '',
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
: AppText(
DateUtils.convertStringToDateFormat(
patient
.arrivedOn,
'MM-dd-yyyy HH:mm'),
fontFamily:
'Poppins',
fontWeight:
FontWeight.w600,
)
],
))
: SizedBox(),
if (SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient")
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.appointmentDate +
" : ",
fontSize: 14,
),
patient.startTime != null
? Container(
height: 15,
width: 60,
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
),
child: AppText(
patient.startTime,
color: Colors.white,
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight: fontWeight:
FontWeight.bold, FontWeight.bold,
fontFamily:
'Poppins',
fontSize: 12,
), ),
arrivalType == '1' )
? AppText( : SizedBox(),
patient.startTime != SizedBox(
null width: 3.5,
? patient ),
.startTime Container(
: '', child: AppText(
fontFamily: convertDateFormat2(patient.appointmentDate.toString()?? ''),
'Poppins', fontSize: 1.5 *
fontWeight: SizeConfig
FontWeight.w600, .textMultiplier,
)
: AppText(
DateUtils.convertStringToDateFormat(
patient
.arrivedOn,
'MM-dd-yyyy HH:mm'),
fontFamily:
'Poppins',
fontWeight: fontWeight:
FontWeight.w600, FontWeight.bold,
)
],
))
: SizedBox(),
if (SERVICES_PATIANT2[
int.parse(patientType)] ==
"List_MyOutPatient")
Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.appointmentDate +
" : ",
fontSize: 14,
),
patient.startTime != null
? Container(
height: 15,
width: 60,
decoration:
BoxDecoration(
borderRadius:
BorderRadius
.circular(
25),
color: HexColor(
"#20A169"),
),
child: AppText(
patient.startTime,
color: Colors.white,
fontSize: 1.5 *
SizeConfig
.textMultiplier,
textAlign: TextAlign
.center,
fontWeight:
FontWeight.bold,
),
)
: SizedBox(),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 *
SizeConfig
.textMultiplier,
fontWeight:
FontWeight.bold,
),
), ),
SizedBox(
height: 0.5,
)
],
),
margin: EdgeInsets.only(
top: 8,
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 1.6 *
SizeConfig
.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(
context)
.fileNumber,
style: TextStyle(
fontSize: 12,
fontFamily:
'Poppins')),
new TextSpan(
text: patient.patientId
.toString(),
style: TextStyle(
fontWeight:
FontWeight.w700,
fontFamily:
'Poppins',
fontSize: 14)),
],
), ),
), SizedBox(
Row( height: 0.5,
children: [ )
AppText( ],
patient.nationalityName ?? ),
patient.nationality, margin: EdgeInsets.only(
fontWeight: FontWeight.bold, top: 8,
fontSize: 12, ),
),
patient.nationality != null
? ClipRRect(
borderRadius:
BorderRadius
.circular(
20.0),
child: Image.network(
patient
.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
(BuildContext
context,
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox()
],
)
],
), ),
Container( Row(
child: RichText( mainAxisAlignment:
text: new TextSpan( MainAxisAlignment.spaceBetween,
style: new TextStyle( children: [
fontSize: 1.6 * RichText(
SizeConfig.textMultiplier, text: TextSpan(
color: Colors.black, style: TextStyle(
fontFamily: 'Poppins', fontSize: 1.6 *
), SizeConfig
.textMultiplier,
color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of( text:
TranslationBase.of(
context) context)
.age + .fileNumber,
" : ",
style: TextStyle( style: TextStyle(
fontSize: 14)), fontSize: 12,
fontFamily:
'Poppins')),
new TextSpan( new TextSpan(
text: text: patient.patientId
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", .toString(),
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,
fontFamily:
'Poppins',
fontSize: 14)), fontSize: 14)),
], ],
), ),
), ),
Row(
children: [
AppText(
patient.nationalityName ??
patient.nationality,
fontWeight: FontWeight.bold,
fontSize: 12,
),
patient.nationality != null
? ClipRRect(
borderRadius:
BorderRadius
.circular(
20.0),
child: Image.network(
patient.nationalityFlagURL,
height: 25,
width: 30,
errorBuilder:
(BuildContext
context,
Object
exception,
StackTrace
stackTrace) {
return Text(
'No Image');
},
))
: SizedBox()
],
)
],
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 1.6 *
SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins',
),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(
context)
.age +
" : ",
style: TextStyle(
fontSize: 14)),
new TextSpan(
text:
"${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,
fontSize: 14)),
],
),
), ),
], ),
), ],
), ),
]), ),
], ]),
), ],
), ),
), ),
); );

@ -54,7 +54,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
patient.gender == 1 patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -72,7 +72,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -256,8 +256,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
.circular( .circular(
20.0), 20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder:
@ -295,7 +294,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,

@ -63,17 +63,20 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
(Helpers.capitalize(patient.firstName) + child: AppText(
" " + patient.firstName != null ?
Helpers.capitalize( (Helpers.capitalize(patient.firstName) +
patient.lastName)), " " +
fontSize: SizeConfig.textMultiplier * 3, Helpers.capitalize(
fontWeight: FontWeight.bold, patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
backGroundcolor: Colors.white, fontSize: SizeConfig.textMultiplier *2.5,
fontFamily: 'Poppins', fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
), ),
patient.gender == 1 patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -91,7 +94,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -210,7 +213,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate??''), convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -275,8 +278,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
.circular( .circular(
20.0), 20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder:
@ -314,7 +316,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,

@ -63,18 +63,20 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
patient.firstName != null ? child: AppText(
(Helpers.capitalize(patient.firstName) + patient.firstName != null ?
" " + (Helpers.capitalize(patient.firstName) +
Helpers.capitalize( " " +
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), Helpers.capitalize(
fontSize: SizeConfig.textMultiplier * 2.5, patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier *2.5,
backGroundcolor: Colors.white, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
), ),
patient.gender == 1 patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
@ -92,7 +94,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
width: 60, width: 60,
height: 60, height: 60,
child: Image.asset( child: Image.asset(
patient.gender == 1 patient.patientDetails != null ? patient.patientDetails.gender == 1 : patient.gender == 1
? 'assets/images/male_avatar.png' ? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png', : 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
@ -211,7 +213,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient.appointmentDate??''), convertDateFormat2(patient.appointmentDate.toString()?? ''),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -276,8 +278,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
.circular( .circular(
20.0), 20.0),
child: Image.network( child: Image.network(
patient patient.nationalityFlagURL,
.nationalityFlagURL,
height: 25, height: 25,
width: 30, width: 30,
errorBuilder: errorBuilder:
@ -315,7 +316,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
fontSize: 14)), fontSize: 14)),
new TextSpan( new TextSpan(
text: text:
"${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}",
style: TextStyle( style: TextStyle(
fontWeight: fontWeight:
FontWeight.w700, FontWeight.w700,

@ -0,0 +1,61 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
class ExpandableSOAPWidget extends StatelessWidget {
final bool isExpanded;
final Widget child;
final Function onTap;
final headerTitle;
const ExpandableSOAPWidget(
{Key key, this.isExpanded, this.child, this.onTap, this.headerTitle})
: super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
child: HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
),
InkWell(
onTap: onTap,
child: Icon(
isExpanded ? EvaIcons.arrowIosUpwardOutline: EvaIcons.arrowIosDownwardOutline))
],
),
bodyWidget: child,
isExpand: isExpanded,
),
);
}
}

@ -1,9 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.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/widgets/shared/Text.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:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class StepsWidget extends StatelessWidget { class StepsWidget extends StatelessWidget {
@ -20,7 +20,7 @@ class StepsWidget extends StatelessWidget {
? Stack( ? Stack(
children: [ children: [
Container( Container(
height: 120, height: 150,
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
@ -32,7 +32,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: index == 0 ? 15 : 30, top: 50,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -40,198 +40,199 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: index == 0 ? 70 : 50, width: 38,
height: index == 0 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 0 : index > 0
? null ? null
: Border.all( : Border.all(
color: Colors.black, width: 0.75), color: Colors.black, width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 color: index == 0
? Colors.white ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFFB9382C) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'1', color: Colors.white,)
variant: index == 0 ? "heading2" : "",
bold: true,
color: index == 0
? Colors.black
: index > 0
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 0 ? 5 : 10, height:5
), ),
AppText( Column(
"SUBJECTIVE", mainAxisAlignment: MainAxisAlignment.start,
fontWeight: FontWeight.bold, children: [
fontSize: 14, AppText(
"Subjective",
fontWeight: FontWeight.bold,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 0,),
],
), ),
], ],
), ),
), ),
), ),
Positioned( Positioned(
top: index == 1 ? 15 : 30, top: 50,
left: MediaQuery.of(context).size.width * 0.28, left: MediaQuery
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 1 ? changeCurrentTab(1) : null, onTap: () => index >= 1 ? changeCurrentTab(1) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: index == 1 ? 70 : 50, width: 38,
height: index == 1 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 color: index == 1
? Colors.white ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFFB9382C) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'2', color: Colors.white,)
variant: index == 1 ? "heading2" : '',
bold: true,
color: index == 1
? Colors.black
: index > 1
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 1 ? 5 : 10, height:5,
), ),
AppText( Column(
"OBJECTIVE", mainAxisAlignment: MainAxisAlignment.start,
fontWeight: FontWeight.bold, children: [
fontSize:14, AppText(
"Objective",
fontWeight: FontWeight.bold,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 1,),
],
), ),
], ],
), ),
), ),
), ),
Positioned( Positioned(
top: index == 2 ? 15 : 30, top: 50,
left: MediaQuery.of(context).size.width * 0.52, left: MediaQuery
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if(index >= 3) if (index >= 3)
changeCurrentTab(2); changeCurrentTab(2);
}, },
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: index == 2 ? 70 : 50, width: 38,
height: index == 2 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 color: index == 2
? Colors.white ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFB9382C) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'3', color: Colors.white,)
variant: index == 2 ? "heading2" : '',
bold: true,
color: index == 2
? Colors.black
: index > 2
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 2 ? 5 : 10, height:5,
), ),
AppText( Column(
"ASSESSMENT", mainAxisAlignment: MainAxisAlignment.start,
fontWeight: FontWeight.bold, children: [
fontSize:14, AppText(
"Assessment",
fontWeight: FontWeight.bold,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 2,),
],
), ),
], ],
), ),
), ),
), ),
Positioned( Positioned(
top: index == 3 ? 15 : 30, top: 50,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Container( Container(
width: index == 3 ? 70 : 50, width: 38,
height: index == 3 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 3 : index > 3
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 color: index == 3
? Colors.white ? Color(0xFFCC9B14)
: index > 3 : index > 3
? Color(0xFFB9382C) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'4', color: Colors.white,)
variant: index == 3 ? "heading2" : '', ),
bold: true,
color: index == 3
? Colors.black
: index > 3
? Colors.white
: Colors.grey,
),
)
), ),
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height:5,
), ),
Center( Center(
child: AppText( child: Column(
"PLAN", crossAxisAlignment: CrossAxisAlignment.end,
fontWeight: FontWeight.bold, children: [
textAlign: TextAlign.center, AppText(
fontSize:14, "Plan",
), fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 12,
),
StatusLabel(selectedStepId: index, stepId: 3,),
],
),
), ),
], ],
), ),
@ -242,8 +243,11 @@ class StepsWidget extends StatelessWidget {
: Stack( : Stack(
children: [ children: [
Container( Container(
height: 120, height: 150,
width: MediaQuery.of(context).size.width, width: MediaQuery
.of(context)
.size
.width,
color: Colors.transparent, color: Colors.transparent,
child: Center( child: Center(
child: Divider( child: Divider(
@ -254,7 +258,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: index == 0 ? 15 : 30, top: 50,
right: 0, right: 0,
child: InkWell( child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
@ -262,37 +266,29 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: index == 0 ? 70 : 50, width: 38,
height: index == 0 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 0 border: index == 0
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 0 : index > 0
? null ? null
: Border.all( : Border.all(
color: Colors.black, width: 0.75), color: Colors.black, width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 0 color: index == 0
? Colors.white ? Color(0xFFCC9B14)
: index > 0 : index > 0
? Color(0xFFB9382C) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'1', color: Colors.white,)
variant: index == 0 ? "heading2" : "",
bold: true,
color: index == 0
? Colors.black
: index > 0
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 0 ? 5 : 10, height:5
), ),
AppText( AppText(
"شخصي", "شخصي",
@ -304,45 +300,40 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: index == 1 ? 15 : 30, top: 50,
right: MediaQuery.of(context).size.width * 0.28, right: MediaQuery
.of(context)
.size
.width * 0.28,
child: InkWell( child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: index == 1 ? 70 : 50, width: 38,
height: index == 1 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 1 border: index == 1
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 1 color: index == 1
? Colors.white ? Color(0xFFCC9B14)
: index > 1 : index > 1
? Color(0xFFB9382C) ? Color(0xFF359846)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'2', color: Colors.white,)
variant: index == 1 ? "heading2" : '',
bold: true,
color: index == 1
? Colors.black
: index > 1
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 1 ? 5 : 10, height:5
), ),
AppText( AppText(
"هدف", "هدف",
@ -354,45 +345,40 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: index == 2 ? 15 : 30, top: 50,
right: MediaQuery.of(context).size.width * 0.52, right: MediaQuery
.of(context)
.size
.width * 0.52,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(2) : null, onTap: () => index >= 3 ? changeCurrentTab(2) : null,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: index == 2 ? 70 : 50, width: 38,
height: index == 2 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 2 border: index == 2
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 2 : index > 2
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 2 color: index == 2
? Colors.white ? Color(0xFFCC9B14)
: index > 2 : index > 2
? Color(0xFFB9382C) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'3', color: Colors.white,)
variant: index == 2 ? "heading2" : '',
bold: true,
color: index == 2
? Colors.black
: index > 2
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 2 ? 5 : 10, height:5,
), ),
Padding( Padding(
@ -408,7 +394,7 @@ class StepsWidget extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
top: index == 3 ? 15 : 30, top: 50,
left: 0, left: 0,
child: InkWell( child: InkWell(
onTap: () => index >= 3 ? changeCurrentTab(4) : null, onTap: () => index >= 3 ? changeCurrentTab(4) : null,
@ -416,37 +402,29 @@ class StepsWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
width: index == 3 ? 70 : 50, width: 38,
height: index == 3 ? 70 : 50, height: 38,
decoration: BoxDecoration( decoration: BoxDecoration(
border: index == 3 border: index == 3
? Border.all(color: Color(0xFFB9382C), width: 2) ? Border.all(color: Color(0xFFCC9B14), width: 2)
: index > 3 : index > 3
? null ? null
: Border.all( : Border.all(
color: Color(0xFFCCCCCC), width: 0.75), color: Color(0xFFCCCCCC), width: 0.75),
shape: BoxShape.circle, shape: BoxShape.circle,
color: index == 3 color: index == 3
? Colors.white ? Color(0xFFCC9B14)
: index > 3 : index > 3
? Color(0xFFB9382C) ? Color(0xFFCC9B14)
: Color(0xFFCCCCCC), : Color(0xFFCCCCCC),
), ),
child: Center( child: Center(
child: Texts( child: Icon(FontAwesomeIcons.check, size: 20,
'4', color: Colors.white,)
variant: index == 3 ? "heading2" : '',
bold: true,
color: index == 3
? Colors.black
: index > 3
? Colors.white
: Colors.grey,
),
), ),
), ),
SizedBox( SizedBox(
height: index == 3 ? 5 : 10, height:5,
), ),
Container( Container(
margin: EdgeInsets.only(right:index == 3? 15:0), margin: EdgeInsets.only(right:index == 3? 15:0),
@ -454,13 +432,50 @@ class StepsWidget extends StatelessWidget {
"خطة", "خطة",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize:14, fontSize:14,
), ),
), ),
], ],
), ),
), ),
), ),
], ],
); );
}
}
class StatusLabel extends StatelessWidget {
const StatusLabel({
Key key, this.stepId, this.selectedStepId,
}) : super(key: key);
final int stepId;
final int selectedStepId;
@override
Widget build(BuildContext context) {
return Container(
width: 65,
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
decoration: BoxDecoration(
color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId <
selectedStepId ? Color(0xFFD8E8DB) : Color(0xFFCCCCCC),
borderRadius: BorderRadius.all(
Radius.circular(5.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
child: AppText(
stepId == selectedStepId ? "inProgress" : stepId < selectedStepId
? "Completed"
: " Locked ",
fontWeight: FontWeight.bold,
textAlign: TextAlign.center,
fontSize: 10,
color: stepId == selectedStepId ? Color(0xFFCC9B14) : stepId <
selectedStepId ? Color(0xFF359846) : Color(0xFF969696),
),
);
} }
} }

@ -0,0 +1,122 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../custom_validation_error.dart';
class UpdateChiefComplaints extends StatelessWidget {
const UpdateChiefComplaints({
Key key,
@required this.formKey,
@required this.complaintsController,
@required this.illnessController,
@required this.medicationController,
this.complaintsControllerError,
this.illnessControllerError,
this.medicationControllerError,
}) : super(key: key);
final GlobalKey<FormState> formKey;
final TextEditingController complaintsController;
final TextEditingController illnessController;
final TextEditingController medicationController;
final String complaintsControllerError;
final String illnessControllerError;
final String medicationControllerError;
@override
Widget build(BuildContext context) {
return Form(
key: formKey,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 20,
),
//TODO handel error cases
NewTextFields(
hintText: TranslationBase.of(context).addChiefComplaints,
controller: complaintsController,
maxLines: 25,
minLines: 3,
),
Container(
child: CustomValidationError(
error: complaintsControllerError,
)),
// Container(
// margin:
// EdgeInsets.only(left: 10, right: 10, top: 15),
// child: TextFields(
// hasLabelText: complaintsController.text != ''
// ? true
// : false,
// hintText: TranslationBase
// .of(context)
// .addChiefComplaints,
// fontSize: 13.5,
// // hintColor: Colors.black,
// showLabelText: true,
// fontWeight: FontWeight.w600,
// maxLines: 25,
// minLines: 13,
// controller: complaintsController,
// validator: (value) {
// if (value == null || value == "")
// return TranslationBase.of(context)
// .emptyMessage;
// else if (value.length < 25)
// return TranslationBase
// .of(context)
// .chiefComplaintLength;
// //"";
// else
// return null;
// }),
// ),
SizedBox(
height: 20,
),
NewTextFields(
hintText: TranslationBase
.of(context)
.historyOfPresentIllness,
controller: illnessController,
maxLines: 25,
minLines: 3,
),
Container(
child: CustomValidationError(error: illnessControllerError,)),
SizedBox(
height: 20,
),
SizedBox(
height: 10,
),
UpdateMedicationWidget(
medicationController: medicationController,
),
SizedBox(
height: 10,
),
NewTextFields(
hintText: TranslationBase
.of(context)
.currentMedications,
controller: medicationController,
maxLines: 25,
minLines: 3,
),
Container(child: CustomValidationError(
error: medicationControllerError,)),
SizedBox(
height: 10,
),
]),
);
}
}

@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../custom_validation_error.dart'; import '../custom_validation_error.dart';
@ -40,17 +41,19 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
return Column( return Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).addMedication, hintText: TranslationBase.of(context).addMedication,
borderColor: HexColor('#707070'),
borderWidth: 0.30,
fontSize: 13.5, fontSize: 13.5,
borderRadius: 12,
onTapTextFields: () { onTapTextFields: () {
openMedicationList(context); openMedicationList(context);
}, },
readOnly: true, readOnly: true,
// hintColor: Colors.black, // hintColor: Colors.black,
suffixIcon: EvaIcons.plusCircleOutline, suffixIcon: EvaIcons.plusCircleOutline,
suffixIconColor: AppGlobal.appPrimaryColor, suffixIconColor: Color(0xFF2B353E),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// controller: messageController, // controller: messageController,
validator: (value) { validator: (value) {

@ -1,5 +1,4 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/config.dart';
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/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
@ -17,17 +16,15 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart';
import '../expandable_SOAP_widget.dart';
class UpdateSubjectivePage extends StatefulWidget { class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -54,7 +51,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
TextEditingController illnessController = TextEditingController(); TextEditingController illnessController = TextEditingController();
TextEditingController complaintsController = TextEditingController(); TextEditingController complaintsController = TextEditingController();
TextEditingController medicationController = TextEditingController(); TextEditingController medicationController = TextEditingController();
String complaintsControllerError = '';
String medicationControllerError = '';
String illnessControllerError = '';
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
getHistory(SOAPViewModel model) async { getHistory(SOAPViewModel model) async {
@ -220,6 +219,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
// baseViewModel: model, // baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
@ -232,243 +234,109 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
SizedBox( SizedBox(
height: 30, height: 30,
), ),
HeaderBodyExpandableNotifier( ExpandableSOAPWidget(
headerWidget: Row( headerTitle: TranslationBase.of(context)
mainAxisAlignment: MainAxisAlignment.spaceBetween, .chiefComplaints
children: [ ,
Row( onTap: () {
children: [ setState(() {
Texts(TranslationBase.of(context).chiefComplaints.toUpperCase(), isChiefExpand = !isChiefExpand;
variant: isChiefExpand ? "bodyText" : '', });
bold: isChiefExpand ? true : false, },
color: Colors.black), child: UpdateChiefComplaints(
Icon( formKey: formKey,
FontAwesomeIcons.asterisk, complaintsController: complaintsController,
color: AppGlobal.appPrimaryColor, illnessController: illnessController,
size: 12, medicationController: medicationController,
) complaintsControllerError: complaintsControllerError,
], illnessControllerError: illnessControllerError,
), medicationControllerError: medicationControllerError,
InkWell(
onTap: () {
setState(() {
isChiefExpand = !isChiefExpand;
});
},
child: Icon(
isChiefExpand ? EvaIcons.minus : EvaIcons.plus))
],
),
bodyWidget: Form(
key: formKey,
child: Column(children: [
SizedBox(
height: 20,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: complaintsController.text != ''
? true
: false,
hintText: TranslationBase.of(context)
.addChiefComplaints,
fontSize: 13.5,
// hintColor: Colors.black,
showLabelText: true,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: complaintsController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else if (value.length < 25)
return TranslationBase
.of(context)
.chiefComplaintLength;
//"";
else
return null;
}),
),
SizedBox(
height: 20,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: illnessController.text != ''
? true
: false,
showLabelText: true,
hintText: TranslationBase
.of(context)
.historyOfPresentIllness,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: illnessController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
SizedBox(
height: 10,
),
UpdateMedicationWidget(medicationController: medicationController,),
SizedBox(
height: 10,
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hasLabelText: medicationController.text != ''
? true
: false,
showLabelText: true,
hintText: TranslationBase
.of(context)
.currentMedications,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 23,
minLines: 10,
controller: medicationController,
validator: (value) {
if (value == null || value == "")
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 10,
),
]),
), ),
isExpand: isChiefExpand, isExpanded: isChiefExpand,
),
SizedBox(
height: 30,
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
), ),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, ExpandableSOAPWidget(
children: [ headerTitle: TranslationBase
Row( .of(context)
children: [ .histories,
Texts(TranslationBase onTap: () {
.of(context) setState(() {
.histories isHistoryExpand = !isHistoryExpand;
.toUpperCase(), });
variant: isHistoryExpand ? "bodyText" : '', },
bold: isHistoryExpand ? true : false, child: Column(
color: Colors.black),
],
),
InkWell(
onTap: () {
setState(() {
isHistoryExpand = !isHistoryExpand;
});
},
child: Icon(isHistoryExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget: Column(
children: [ children: [
UpdateHistoryWidget(myHistoryList: widget.myHistoryList) UpdateHistoryWidget(myHistoryList: widget.myHistoryList)
], ],
), ),
isExpand: isHistoryExpand, isExpanded: isHistoryExpand,
),
SizedBox(
height: 30,
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
), ),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, ExpandableSOAPWidget(
children: [ headerTitle: TranslationBase
Row( .of(context)
children: [ .allergiesSoap
Texts(TranslationBase ,
.of(context) onTap: () {
.allergiesSoap setState(() {
.toUpperCase(), isAllergiesExpand = !isAllergiesExpand;
variant: isAllergiesExpand ? "bodyText" : '', });
bold: isAllergiesExpand ? true : false, },
color: Colors.black), child: Column(
],
),
InkWell(
onTap: () {
setState(() {
isAllergiesExpand = !isAllergiesExpand;
});
},
child: Icon(isAllergiesExpand
? EvaIcons.minus
: EvaIcons.plus))
],
),
bodyWidget:Column(
children: [ children: [
UpdateAllergiesWidget(myAllergiesList: widget.myAllergiesList,), UpdateAllergiesWidget(myAllergiesList: widget
.myAllergiesList,),
SizedBox( SizedBox(
height: 30, height: 30,
), ),
], ],
) ),
, isExpanded: isAllergiesExpand,
isExpand: isAllergiesExpand,
),
SizedBox(
height: 30,
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
), ),
SizedBox( SizedBox(
height: 30, height:MediaQuery.of(context).size.height * 0.2,
), ),
AppButton( ],
title: TranslationBase.of(context).next, ),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
),
height: MediaQuery
.of(context)
.size
.height * 0.15,
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 15,
),
Container(child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: AppButton(
title: TranslationBase
.of(context)
.next,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
addSubjectiveInfo( addSubjectiveInfo(
@ -477,11 +345,13 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
myHistoryList: widget.myHistoryList); myHistoryList: widget.myHistoryList);
}, },
), ),
], ),
),),
SizedBox(
height: 15,
), ),
), ],
), ),),
),
), ),
); );
} }
@ -492,7 +362,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
formKey.currentState.save(); formKey.currentState.save();
formKey.currentState.validate(); formKey.currentState.validate();
complaintsControllerError = '';
medicationControllerError = '';
illnessControllerError = '';
if (complaintsController.text.isNotEmpty && if (complaintsController.text.isNotEmpty &&
illnessController.text.isNotEmpty && illnessController.text.isNotEmpty &&
complaintsController.text.length > 25) { complaintsController.text.length > 25) {
@ -518,6 +390,29 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.changePageViewIndex(1); widget.changePageViewIndex(1);
} else { } else {
setState(() {
if (complaintsController.text.isEmpty) {
complaintsControllerError = TranslationBase
.of(context)
.emptyMessage;
} else if (complaintsController.text.length < 25) {
complaintsControllerError = TranslationBase
.of(context)
.chiefComplaintLength;
}
if (illnessController.text.isEmpty) {
illnessControllerError = TranslationBase
.of(context)
.emptyMessage;
}
if (medicationController.text.isEmpty) {
medicationControllerError = TranslationBase
.of(context)
.emptyMessage;
}
});
helpers.showErrorToast(TranslationBase helpers.showErrorToast(TranslationBase
.of(context) .of(context)
.chiefComplaintErrorMsg); .chiefComplaintErrorMsg);
@ -624,12 +519,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
numberOfWeeks: 0); numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) { if (model.patientChiefComplaintList.isEmpty) {
// TODO: make it postChiefComplaint after it start to work // TODO: make it postChiefComplaint after it start to work
postChiefComplaintRequestModel.editedBy=''; postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel); await model.postChiefComplaint(postChiefComplaintRequestModel);
} else { } else {
await model.patchChiefComplaint(postChiefComplaintRequestModel); await model.patchChiefComplaint(postChiefComplaintRequestModel);
} }
} }
} }
} }

@ -1,5 +1,6 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -13,6 +14,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
@ -25,6 +27,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
@ -33,8 +36,13 @@ class UpdateObjectivePage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
UpdateObjectivePage( UpdateObjectivePage(
{Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState}); {Key key,
this.changePageViewIndex,
this.mySelectedExamination,
this.patientInfo,
this.changeLoadingState});
@override @override
_UpdateObjectivePageState createState() => _UpdateObjectivePageState(); _UpdateObjectivePageState createState() => _UpdateObjectivePageState();
@ -55,6 +63,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
)), )),
); );
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
@ -97,350 +106,435 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
// baseViewModel: model, // baseViewModel: model,
body: Column(
body: SingleChildScrollView( mainAxisAlignment: MainAxisAlignment.spaceBetween,
physics: ScrollPhysics(), children: [
child: Center( Expanded(
child: FractionallySizedBox( child: SingleChildScrollView(
widthFactor: 0.9, physics: ScrollPhysics(),
child: Column( child: Container(
mainAxisAlignment: MainAxisAlignment.start, color: Color.fromRGBO(248, 248, 248, 1),
children: [ child: Center(
SizedBox( child: FractionallySizedBox(
height: 30, widthFactor: 0.95,
), child: Container(
HeaderBodyExpandableNotifier( margin: EdgeInsets.all(8.0),
headerWidget: Row( padding: EdgeInsets.all(12.0),
mainAxisAlignment: MainAxisAlignment.spaceBetween, decoration: BoxDecoration(
children: [ shape: BoxShape.rectangle,
Row( color: Colors.white,
children: [ borderRadius: BorderRadius.circular(12),
Texts(TranslationBase.of(context).physicalSystemExamination, border: Border.fromBorderSide(BorderSide(
variant: isSysExaminationExpand color: Colors.grey.shade400,
? "bodyText" width: 0.4,
: '', )),
bold: isSysExaminationExpand ? true : false,
color: Colors.black),
Icon(
FontAwesomeIcons.asterisk,
color: AppGlobal.appPrimaryColor,
size: 12,
)
],
), ),
InkWell( child: Column(
onTap: () { mainAxisAlignment: MainAxisAlignment.start,
setState(() { children: [
isSysExaminationExpand = HeaderBodyExpandableNotifier(
!isSysExaminationExpand; headerWidget: Row(
}); mainAxisAlignment:
}, MainAxisAlignment.spaceBetween,
child: Icon(isSysExaminationExpand children: [
? EvaIcons.minus Row(
: EvaIcons.plus)) children: [
], AppText(
), "${TranslationBase.of(context).physicalSystemExamination}",
bodyWidget: Column(children: [ fontFamily: 'Poppins',
SizedBox( fontSize: SizeConfig.textMultiplier * 2.0,
height: 20, fontWeight: isSysExaminationExpand ? FontWeight.w700 : FontWeight.normal,
), ),
Column( /*Texts(
children: [ TranslationBase.of(context)
Container( .physicalSystemExamination,
margin: variant: isSysExaminationExpand
EdgeInsets.only(left: 10, right: 10, top: 15), ? "bodyText"
child: TextFields( : '',
hintText: TranslationBase.of(context).physicalSystemExamination, bold: isSysExaminationExpand
fontSize: 13.5, ? true
onTapTextFields: () { : false,
openExaminationList(context); color: Colors.black),*/
}, Icon(
readOnly: true, FontAwesomeIcons.asterisk,
// hintColor: Colors.black, color: AppGlobal.appPrimaryColor,
suffixIcon: EvaIcons.plusCircleOutline, size: 12,
suffixIconColor: AppGlobal.appPrimaryColor, )
fontWeight: FontWeight.w600, ],
// controller: messageController, ),
validator: (value) { InkWell(
if (value == null) onTap: () {
return TranslationBase.of(context) setState(() {
.emptyMessage; isSysExaminationExpand =
else !isSysExaminationExpand;
return null; });
}), },
), child: Icon(isSysExaminationExpand
SizedBox( ? Icons.keyboard_arrow_up
height: 20, : Icons.keyboard_arrow_down))
), ],
Column( ),
children: bodyWidget: Column(children: [
widget.mySelectedExamination.map((examination) {
TextEditingController remarksController= TextEditingController(text :examination.remark);
return Container(
margin: EdgeInsets.only(
left: 15, right: 15, top: 15),
child: Column(children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Texts(
( examination
.selectedExamination.nameEn )
.toUpperCase(),
variant: "bodyText",
bold: true,
color: Colors.black)
],
),
SizedBox( SizedBox(
height: 8, height: 20,
), ),
Row( Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Container(
children: [ margin: EdgeInsets.only(
InkWell( left: 10, right: 10, top: 15),
child: Center( child: TextFields(
child: Container( hintText: TranslationBase.of(context)
height: .physicalSystemExamination,
screenSize.height * fontSize: 13.5,
0.070, onTapTextFields: () {
decoration: openExaminationList(context);
containerBorderDecoration( },
examination readOnly: true,
.isNormal // hintColor: Colors.black,
? Color( suffixIcon:
0xFF515A5D) EvaIcons.plusCircleOutline,
: Colors suffixIconColor:
.white, AppGlobal.appPrimaryColor,
Colors.grey), fontWeight: FontWeight.w600,
child: Center( // controller: messageController,
child: Padding( validator: (value) {
padding: if (value == null)
const EdgeInsets return TranslationBase.of(context)
.all(8.0), .emptyMessage;
child: Text( else
TranslationBase.of(context).normal, return null;
style: TextStyle( }),
fontSize: 12, ),
color: SizedBox(
examination height: 20,
.isNormal ),
? Colors.white Column(
: Colors children: widget.mySelectedExamination
.black, .map((examination) {
//Colors.black, TextEditingController
fontWeight: remarksController =
FontWeight TextEditingController(
.bold, text: examination.remark);
),
), return Container(
), margin: EdgeInsets.only(
)), left: 15, right: 15, top: 15),
), child: Column(children: [
onTap: () { Row(
setState(() { mainAxisAlignment:
examination.isAbnormal = MainAxisAlignment
false; .spaceBetween,
examination.isNormal = children: [
true; Texts(
examination.notExamined = false; (examination
}); .selectedExamination
}), .nameEn)
SizedBox( .toUpperCase(),
width: 12, variant: "bodyText",
), bold: true,
InkWell( color: Colors.black)
child: Center( ],
child: Container( ),
height: SizedBox(
screenSize.height * height: 8,
0.070, ),
decoration: Row(
containerBorderDecoration( mainAxisAlignment:
examination MainAxisAlignment
.isAbnormal .spaceBetween,
? Color( children: [
0xFF515A5D) Row(
: Colors children: [
.white, InkWell(
Colors.black), child: Center(
child: Center( child: Container(
child: Padding( height: screenSize
padding: .height *
const EdgeInsets 0.070,
.all(8.0), decoration: containerBorderDecoration(
child: Text( examination
TranslationBase.of(context).abnormal, .isNormal
style: TextStyle( ? Color(
fontSize: 12, 0xFF515A5D)
color: : Colors
examination .white,
.isAbnormal Colors
? Colors.white .grey),
: Colors child: Center(
.black, child:
//Colors.black, Padding(
fontWeight: padding:
FontWeight const EdgeInsets.all(
.bold, 8.0),
), child: Text(
TranslationBase.of(
context)
.normal,
style:
TextStyle(
fontSize:
12,
color: examination.isNormal
? Colors.white
: Colors.black,
//Colors.black,
fontWeight:
FontWeight.bold,
),
),
),
)),
),
onTap: () {
setState(() {
examination
.isAbnormal =
false;
examination
.isNormal =
true;
examination
.notExamined =
false;
});
}),
SizedBox(
width: 12,
), ),
), InkWell(
)), child: Center(
), child: Container(
onTap: () { height: screenSize
setState(() { .height *
examination.isNormal = 0.070,
false; decoration: containerBorderDecoration(
examination.isAbnormal = examination
true; .isAbnormal
examination.notExamined = false; ? Color(
}); 0xFF515A5D)
}),SizedBox( : Colors
width: 12, .white,
), Colors
InkWell( .black),
child: Center( child: Center(
child: Container( child:
height: Padding(
screenSize.height * padding:
0.070, const EdgeInsets.all(
decoration: 8.0),
containerBorderDecoration( child: Text(
examination TranslationBase.of(
.notExamined context)
? Color( .abnormal,
0xFF515A5D) style:
: Colors TextStyle(
.white, fontSize:
Colors.black), 12,
child: Center( color: examination.isAbnormal
child: Padding( ? Colors.white
padding: : Colors.black,
const EdgeInsets //Colors.black,
.all(8.0), fontWeight:
child: Text( FontWeight.bold,
"Not Examined", ),
style: TextStyle( ),
fontSize: 12, ),
color: )),
examination ),
.notExamined onTap: () {
? Colors.white setState(() {
: Colors examination
.black, .isNormal =
//Colors.black, false;
fontWeight: examination
FontWeight .isAbnormal =
.bold, true;
), examination
.notExamined =
false;
});
}),
SizedBox(
width: 12,
), ),
InkWell(
child: Center(
child: Container(
height: screenSize
.height *
0.070,
decoration: containerBorderDecoration(
examination
.notExamined
? Color(
0xFF515A5D)
: Colors
.white,
Colors
.black),
child: Center(
child:
Padding(
padding:
const EdgeInsets.all(
8.0),
child: Text(
"Not Examined",
style:
TextStyle(
fontSize:
12,
color: examination.notExamined
? Colors.white
: Colors.black,
//Colors.black,
fontWeight:
FontWeight.bold,
),
),
),
)),
),
onTap: () {
setState(() {
examination
.isAbnormal =
false;
examination
.isNormal =
false;
examination
.notExamined =
true;
});
}),
],
),
InkWell(
child: Icon(
FontAwesomeIcons.trash,
color: Colors.grey,
size: 20,
), ),
)), onTap: () => removeExamination(
), examination
onTap: () { .selectedExamination),
setState(() { )
examination.isAbnormal = ],
false; ),
examination.isNormal = SizedBox(
false; height: 20,
examination.notExamined = true; ),
}); Container(
}), margin: EdgeInsets.only(
], left: 0, right: 0, top: 15),
), child: TextFields(
InkWell( hasLabelText:
remarksController
child: Icon( .text !=
FontAwesomeIcons.trash, ''
color: Colors.grey, ? true
size: 20, : false,
), showLabelText: true,
onTap: () => removeExamination( hintText:
examination.selectedExamination), TranslationBase.of(
context)
.remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 4,
controller:
remarksController,
onChanged: (val) {
examination.remark = val;
},
validator: (value) {
if (value == null)
return TranslationBase
.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
]));
}).toList(),
) )
], ],
), )
SizedBox( ]),
height: 20, isExpand: isSysExaminationExpand,
), ),
Container( ],
margin: EdgeInsets.only( ),
left: 0, right: 0, top: 15), ),
child: TextFields( ),
hasLabelText: remarksController.text != ''?true:false, ),
showLabelText: true, ),
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 4,
controller: remarksController,
onChanged: (val) {
examination.remark = val;
},
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SizedBox(
height: 20,
),
]));
}).toList(),
)
],
)
]),
isExpand: isSysExaminationExpand,
), ),
DividerWithSpacesAround(height: 30,), ),
AppButton( Container(
title: TranslationBase.of(context).next, margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
loading: model.state == ViewState.BusyLocal, child: Row(
onPressed: () async { children: [
await submitUpdateObjectivePage(model); Expanded(
}, child: AppButton(
title: TranslationBase.of(context).previous,
color: HexColor("#EAEAEA"),
fontColor: Colors.black,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 10,
), ),
SizedBox( Expanded(
height: 30, child: AppButton(
title: TranslationBase.of(context).next,
loading: model.state == ViewState.BusyLocal,
color: HexColor("#A5A5A5"),
fontColor: HexColor("#5A5A5A"),
fontWeight: FontWeight.bold,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
), ),
], ),
), ],
), )));
),
)));
} }
submitUpdateObjectivePage(SOAPViewModel model) async { submitUpdateObjectivePage(SOAPViewModel model) async {
if (widget.mySelectedExamination.isNotEmpty) {
if(widget.mySelectedExamination.isNotEmpty){
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel(); PostPhysicalExamRequestModel postPhysicalExamRequestModel =
new PostPhysicalExamRequestModel();
widget.mySelectedExamination.forEach((exam) { widget.mySelectedExamination.forEach((exam) {
if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM ==
null) null)
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = []; postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
[];
postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add( postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
ListHisProgNotePhysicalExaminationVM( .add(ListHisProgNotePhysicalExaminationVM(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
appointmentNo: widget.patientInfo.appointmentNo, appointmentNo: widget.patientInfo.appointmentNo,
remarks: exam.remark ?? '', remarks: exam.remark ?? '',
createdBy: exam.createdBy??doctorProfile.doctorID, createdBy: exam.createdBy ?? doctorProfile.doctorID,
createdOn: DateTime.now().toIso8601String(), createdOn: DateTime.now().toIso8601String(),
editedBy: doctorProfile.doctorID, editedBy: doctorProfile.doctorID,
editedOn: DateTime.now().toIso8601String(), editedOn: DateTime.now().toIso8601String(),
@ -450,15 +544,20 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
isNormal: exam.isNormal, isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination, // masterDescription: exam.selectedExamination,
notExamined: exam.notExamined, notExamined: exam.notExamined,
examinationType: exam.isNormal?1:exam.isAbnormal?2:3, examinationType: exam.isNormal
examinationTypeName: exam.isNormal?"Normal":exam.isAbnormal?'AbNormal':"Not Examined", ? 1
isNew:exam.isNew : exam.isAbnormal
? 2
)); : 3,
examinationTypeName: exam.isNormal
? "Normal"
: exam.isAbnormal
? 'AbNormal'
: "Not Examined",
isNew: exam.isNew));
}); });
if(model.patientPhysicalExamList.isEmpty) { if (model.patientPhysicalExamList.isEmpty) {
await model.postPhysicalExam(postPhysicalExamRequestModel); await model.postPhysicalExam(postPhysicalExamRequestModel);
} else { } else {
await model.patchPhysicalExam(postPhysicalExamRequestModel); await model.patchPhysicalExam(postPhysicalExamRequestModel);
@ -482,9 +581,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
removeExamination(MasterKeyModel masterKey) { removeExamination(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> history = widget.mySelectedExamination Iterable<MySelectedExamination> history = widget.mySelectedExamination
.where( .where((element) =>
(element) => masterKey.id == element.selectedExamination.id &&
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId); masterKey.typeId == element.selectedExamination.typeId);
if (history.length > 0) if (history.length > 0)
@ -494,11 +592,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
} }
openExaminationList(BuildContext context) { openExaminationList(BuildContext context) {
final screenSize = MediaQuery final screenSize = MediaQuery.of(context).size;
.of(context) InputDecoration textFieldSelectorDecoration(
.size; String hintText, String selectedText, bool isDropDown) {
InputDecoration textFieldSelectorDecoration(String hintText,
String selectedText, bool isDropDown) {
return InputDecoration( return InputDecoration(
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
@ -533,7 +629,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Navigator.of(context).pop(); Navigator.of(context).pop();
}); });
}, },
removeExamination: (masterKey) => removeExamination(masterKey),); removeExamination: (masterKey) => removeExamination(masterKey),
);
}); });
} }
} }
@ -541,10 +638,13 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
class AddExaminationDailog extends StatefulWidget { class AddExaminationDailog extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination; final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination; final Function addSelectedExamination;
final Function (MasterKeyModel) removeExamination; final Function(MasterKeyModel) removeExamination;
const AddExaminationDailog( const AddExaminationDailog(
{Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination}) {Key key,
this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination})
: super(key: key); : super(key: key);
@override @override
@ -559,71 +659,69 @@ class _AddExaminationDailogState extends State<AddExaminationDailog> {
child: BaseView<SOAPViewModel>( child: BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) { if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup( await model
MasterKeysService.PhysicalExamination); .getMasterLookup(MasterKeysService.PhysicalExamination);
} }
}, },
builder: (_, model, w) => builder: (_, model, w) => AppScaffold(
AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
body: Center( body: Center(
child: Container( child: Container(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.9, widthFactor: 0.9,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 16, height: 16,
), ),
AppText( AppText(
TranslationBase.of(context).physicalSystemExamination, TranslationBase.of(context).physicalSystemExamination,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16, fontSize: 16,
), ),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
MasterKeyCheckboxSearchWidget( MasterKeyCheckboxSearchWidget(
model: model, model: model,
hintSearchText: TranslationBase.of(context).searchExamination, hintSearchText:
buttonName: TranslationBase.of(context).addExamination, TranslationBase.of(context).searchExamination,
masterList: model.physicalExaminationList, buttonName:
removeHistory: (history){ TranslationBase.of(context).addExamination,
setState(() { masterList: model.physicalExaminationList,
widget.removeExamination(history); removeHistory: (history) {
}); setState(() {
}, widget.removeExamination(history);
addHistory: (history){ });
setState(() { },
MySelectedExamination mySelectedExamination = new MySelectedExamination( addHistory: (history) {
selectedExamination: history setState(() {
); MySelectedExamination mySelectedExamination =
widget new MySelectedExamination(
.mySelectedExamination selectedExamination: history);
.add( widget.mySelectedExamination
mySelectedExamination); .add(mySelectedExamination);
}); });
}, },
addSelectedHistories: (){ addSelectedHistories: () {
widget.addSelectedExamination(); widget.addSelectedExamination();
}, },
isServiceSelected: (master) =>isServiceSelected(master), isServiceSelected: (master) =>
), isServiceSelected(master),
]), ),
))), ]),
))),
)), )),
); );
} }
isServiceSelected(MasterKeyModel masterKey) { isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam = Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
widget (element) =>
.mySelectedExamination masterKey.id == element.selectedExamination.id &&
.where((element) => masterKey.typeId == element.selectedExamination.typeId);
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) { if (exam.length > 0) {
return true; return true;
} }

@ -6,8 +6,6 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_assessment_page.dart';
@ -17,11 +15,13 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../patient-profile-header-new-design.dart';
class UpdateSoapIndex extends StatefulWidget { class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate; final bool isUpdate;
const UpdateSoapIndex({Key key, this.isUpdate}) : super(key: key); const UpdateSoapIndex({Key key, this.isUpdate}) : super(key: key);
@override @override
_UpdateSoapIndexState createState() => _UpdateSoapIndexState(); _UpdateSoapIndexState createState() => _UpdateSoapIndexState();
} }
@ -65,30 +65,39 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
// baseViewModel: model, // baseViewModel: model,
isLoading: _isLoading, isLoading: _isLoading,
appBarTitle: TranslationBase.of(context).healthRecordInformation, isShowAppBar: false,
// appBarTitle: TranslationBase.of(context).healthRecordInformation,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
decoration: decoration: BoxDecoration(
BoxDecoration(boxShadow: <BoxShadow>[], color: Colors.white), boxShadow: <BoxShadow>[],
color: Theme.of(context).scaffoldBackgroundColor),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
PatientPageHeaderWidget(patient), // PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7'),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
FractionallySizedBox( FractionallySizedBox(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Theme.of(context).scaffoldBackgroundColor,
height: MediaQuery.of(context).size.height * 0.75, height: MediaQuery.of(context).size.height * 0.75,
child: Column( child: Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: left: MediaQuery.of(context).size.width *
MediaQuery.of(context).size.width * 0.05, 0.05,
right: right: MediaQuery.of(context).size.width *
MediaQuery.of(context).size.width * 0.05), 0.05),
child: StepsWidget( child: StepsWidget(
index: _currentIndex, index: _currentIndex,
changeCurrentTab: changePageViewIndex, changeCurrentTab: changePageViewIndex,
@ -96,6 +105,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
), ),
Expanded( Expanded(
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: _controller, controller: _controller,
onPageChanged: (index) { onPageChanged: (index) {
@ -106,32 +116,32 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: <Widget>[ children: <Widget>[
UpdateSubjectivePage( UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
myAllergiesList: myAllergiesList, myAllergiesList: myAllergiesList,
myHistoryList: myHistoryList, myHistoryList: myHistoryList,
patientInfo: patient, patientInfo: patient,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
), ),
UpdateObjectivePage( UpdateObjectivePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
mySelectedExamination: mySelectedExamination:
mySelectedExamination, mySelectedExamination,
patientInfo: patient, patientInfo: patient,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
), ),
UpdateAssessmentPage( UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
mySelectedAssessmentList: mySelectedAssessmentList:
mySelectedAssessment, mySelectedAssessment,
patientInfo: patient, patientInfo: patient,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
), ),
UpdatePlanPage( UpdatePlanPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
patientInfo: patient, patientInfo: patient,
patientProgressNote: patientProgressNote, patientProgressNote: patientProgressNote,
changeLoadingState:changeLoadingState changeLoadingState: changeLoadingState
) )
], ],

@ -77,7 +77,7 @@ class TextFields extends StatefulWidget {
this.hasBorder = true, this.hasBorder = true,
this.onTapTextFields, this.onTapTextFields,
this.hasLabelText = false, this.hasLabelText = false,
this.showLabelText = false}) this.showLabelText = false, this.borderRadius= 8.0, this.borderColor, this.borderWidth = 1, })
: super(key: key); : super(key: key);
final String hintText; final String hintText;
@ -116,6 +116,9 @@ class TextFields extends StatefulWidget {
final Color fillColor; final Color fillColor;
final bool hasBorder; final bool hasBorder;
final bool showLabelText; final bool showLabelText;
Color borderColor;
final double borderRadius;
final double borderWidth;
bool hasLabelText; bool hasLabelText;
@override @override
@ -200,6 +203,8 @@ class _TextFieldsState extends State<TextFields> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
widget.borderColor = widget.borderColor?? Colors.grey;
return (AnimatedContainer( return (AnimatedContainer(
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
decoration: widget.bare decoration: widget.bare
@ -276,6 +281,7 @@ class _TextFieldsState extends State<TextFields> {
hintText: widget.hintText, hintText: widget.hintText,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: widget.fontSize, fontSize: widget.fontSize,
fontWeight: widget.fontWeight, fontWeight: widget.fontWeight,
color: widget.hintColor ?? Theme.of(context).hintColor, color: widget.hintColor ?? Theme.of(context).hintColor,
), ),
@ -304,7 +310,7 @@ class _TextFieldsState extends State<TextFields> {
width: 1.0) width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
@ -315,28 +321,28 @@ class _TextFieldsState extends State<TextFields> {
.withOpacity(widget.bare ? 0.0 : 0.5), .withOpacity(widget.bare ? 0.0 : 0.5),
width: 1.0) width: 1.0)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0)), : BorderRadius.circular(0.0)),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: widget.hasBorder borderSide: widget.hasBorder
? BorderSide(color: Colors.grey, width: 1.0) ? BorderSide(color: widget.borderColor,width: widget.borderWidth)
: BorderSide(color: Colors.transparent, width: 0), : BorderSide(color: Colors.transparent, width: 0),
borderRadius: widget.hasBorder borderRadius: widget.hasBorder
? BorderRadius.circular(widget.bare ? 0.0 : 8.0) ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)
: BorderRadius.circular(0.0), : BorderRadius.circular(0.0),
), ),
), ),

@ -1,14 +1,9 @@
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/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'StarRating.dart';
import 'Text.dart'; import 'Text.dart';
class DoctorCardInsurance extends StatelessWidget { class DoctorCardInsurance extends StatelessWidget {
@ -41,140 +36,157 @@ class DoctorCardInsurance extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
width: double.maxFinite,
height: 160,
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( borderRadius: BorderRadius.circular(15),
left: BorderSide( color: Colors.white,
color: approvalStatus == "Approved" ),
? Color(0xff359846) child: Container(
: Color(0xffD02127), child: Row(
width: 3.5), mainAxisAlignment: MainAxisAlignment.start,
top: BorderSide(color: Colors.white, width: 0.5), children: [
bottom: BorderSide(color: Colors.white, width: 0.5), Container(
right: BorderSide(color: Colors.white, width: 0.5), height: 160,
), width: 5,
color: Colors.white), decoration: BoxDecoration(
child: Padding( borderRadius: BorderRadius.only(
padding: const EdgeInsets.all(15.0), topLeft: Radius.circular(10),
child: InkWell( bottomLeft: Radius.circular(10),
onTap: onTap, ),
child: Column( color: approvalStatus == "Approved" ? Color(0xff359846) : Color(0xffD02127),
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
"$approvalStatus",
color: approvalStatus == "Approved"
? Color(0xff359846)
: Color(0xffD02127),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(25.0),
),
color: Color(0xff2E303A)),
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
'$patientOut',
color: Colors.white,
fontSize: 15.0,
),
),
)
],
),
Row(
children: [
Expanded(
child: Texts(
doctorName,
bold: true,
)),
],
), ),
Row( ),
crossAxisAlignment: CrossAxisAlignment.end, Expanded(
children: <Widget>[ child: Container(
Container( padding: EdgeInsets.only(
child: LargeAvatar( left: projectViewModel.isArabic ? 0 : 15,
name: doctorName, right: projectViewModel.isArabic ? 15 : 0),
url: profileUrl, child: InkWell(
), onTap: onTap,
width: 55, child: Column(
height: 55, crossAxisAlignment: CrossAxisAlignment.start,
), children: <Widget>[
Expanded( Row(
flex: 4, mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Container( children: [
margin: EdgeInsets.all(10), Texts(
child: Column( "$approvalStatus",
crossAxisAlignment: CrossAxisAlignment.start, color: approvalStatus == "Approved"
children: <Widget>[ ? Color(0xff359846)
if (orderNo != null && !isPrescriptions) : Color(0xffD02127),
Row( ),
children: <Widget>[ Container(
Texts( decoration: BoxDecoration(
'order No:', borderRadius: BorderRadius.all(
color: Colors.grey[500], Radius.circular(25.0),
), ),
Texts( color: Color(0xff2E303A)),
orderNo ?? '', child: Padding(
) padding: const EdgeInsets.all(5.0),
], child: Texts(
'$patientOut',
color: Colors.white,
fontSize: 13.0,
), ),
if (invoiceNO != null && !isPrescriptions) ),
Row( )
children: <Widget>[ ],
Texts( ),
'Invoice:', Row(
color: Colors.grey[500], children: [
), Expanded(
Texts( child: Texts(
invoiceNO, doctorName,
) bold: true,
], )),
), ],
if (isPrescriptions) ),
Row( Row(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.end,
Texts( children: <Widget>[
'Clinic: ', Container(
color: Colors.grey[500], child: LargeAvatar(
), name: doctorName,
Expanded( url: profileUrl,
child: Texts( ),
clinic, width: 55,
), height: 55,
) ),
], Expanded(
), flex: 4,
if (branch != null) child: Container(
Row( margin: EdgeInsets.all(10),
children: <Widget>[ child: Column(
Texts( crossAxisAlignment: CrossAxisAlignment.start,
'Approval No: ', children: <Widget>[
color: Colors.grey[500], if (orderNo != null && !isPrescriptions)
), Row(
Texts( children: <Widget>[
branch, Texts(
) 'order No:',
], color: Colors.grey[500],
) ),
]), Texts(
), orderNo ?? '',
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'Invoice:',
color: Colors.grey[500],
),
Texts(
invoiceNO,
)
],
),
if (isPrescriptions)
Row(
children: <Widget>[
Texts(
'Clinic: ',
color: Colors.grey[500],
),
Expanded(
child: Texts(
clinic,
),
)
],
),
if (branch != null)
Row(
children: <Widget>[
Texts(
'Approval No: ',
color: Colors.grey[500],
),
Texts(
branch,
)
],
)
]),
),
),
Icon(
EvaIcons.eye,
size: 38.0,
)
],
),
],
), ),
Icon( ),
EvaIcons.eye,
size: 38.0,
)
],
), ),
], ),
), ],
), ),
), ),
); );

@ -0,0 +1,236 @@
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.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 NewTextFields extends StatefulWidget {
NewTextFields(
{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,
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 = 15.0,
this.fontWeight = FontWeight.w500,
this.autoValidate = false,
this.hintColor,
this.isEnabled = true})
: super(key: key);
final String hintText;
// final String initialValue;
final String type;
final bool autoFocus;
final IconData suffixIcon;
final Color suffixIconColor;
final Icon prefixIcon;
final VoidCallback onTap;
final TextEditingController controller;
final TextInputType keyboardType;
final FormFieldValidator validator;
final Function onSaved;
final Function onSuffixTap;
final Function onChanged;
final Function onSubmit;
final bool readOnly;
final int maxLength;
final int minLines;
final int maxLines;
final bool maxLengthEnforced;
final bool bare;
final bool isEnabled;
final TextInputAction inputAction;
final double fontSize;
final FontWeight fontWeight;
final bool keepPadding;
final TextCapitalization textCapitalization;
final List<TextInputFormatter> inputFormatters;
final bool autoValidate;
final EdgeInsets padding;
final bool focus;
final bool borderOnlyError;
final Color hintColor;
final String initialValue;
@override
_NewTextFieldsState createState() => _NewTextFieldsState();
}
class _NewTextFieldsState extends State<NewTextFields> {
final FocusNode _focusNode = FocusNode();
bool focus = false;
bool view = false;
@override
void initState() {
super.initState();
_focusNode.addListener(() {
setState(() {
focus = _focusNode.hasFocus;
});
});
}
@override
void didUpdateWidget(NewTextFields oldWidget) {
if (widget.focus) _focusNode.requestFocus();
super.didUpdateWidget(oldWidget);
}
@override
void dispose() {
_focusNode.dispose();
super.dispose();
}
bool _determineReadOnly() {
if (widget.readOnly != null && widget.readOnly) {
_focusNode.unfocus();
return true;
} else {
return false;
}
}
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: HexColor('#707070'),
width: 0.30),
color: Colors.white),
child: Container(
margin: EdgeInsets.only(top: 8),
padding: EdgeInsets.only(top: 8),
child: TextFormField(
enabled: widget.isEnabled,
initialValue: widget.initialValue,
keyboardAppearance: Theme.of(context).brightness,
scrollPhysics: BouncingScrollPhysics(),
autovalidate: widget.autoValidate,
textCapitalization: widget.textCapitalization,
onFieldSubmitted: widget.inputAction == TextInputAction.next
? (widget.onSubmit != null
? widget.onSubmit
: (val) {
_focusNode.nextFocus();
})
: widget.onSubmit,
textInputAction: widget.inputAction,
minLines: widget.minLines ?? 1,
maxLines: widget.maxLines ?? 1,
maxLengthEnforced: widget.maxLengthEnforced,
onChanged: widget.onChanged,
focusNode: _focusNode,
maxLength: widget.maxLength ?? null,
controller: widget.controller,
keyboardType: widget.keyboardType,
readOnly: _determineReadOnly(),
obscureText: widget.type == "password" && !view ? true : false,
autofocus: widget.autoFocus ?? false,
validator: widget.validator,
onSaved: widget.onSaved,
style: Theme.of(context).textTheme.body2.copyWith(
fontSize: widget.fontSize, fontWeight: widget.fontWeight, color: Color(0xFF575757), fontFamily: 'Poppins'),
inputFormatters: widget.keyboardType == TextInputType.phone
? <TextInputFormatter>[
WhitelistingTextInputFormatter.digitsOnly,
_mobileFormatter,
]
: widget.inputFormatters,
decoration: InputDecoration(
labelText: widget.hintText,
labelStyle:
TextStyle(color: Color(0xFF2E303A), fontSize:15,fontWeight: FontWeight.w700),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context).errorColor.withOpacity(0.5),
width: 1.0),
borderRadius: BorderRadius.circular(12.0)),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Theme.of(context).errorColor.withOpacity(0.5),
width: 1.0),
borderRadius: BorderRadius.circular(8.0)),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white, width: 1.0),
borderRadius: BorderRadius.circular(12)),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white, width: 1.0),
borderRadius: BorderRadius.circular(12)),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white, width: 1.0),
borderRadius: BorderRadius.circular(12),
),
),
),
),
);
}
}

@ -608,7 +608,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:
@ -900,7 +900,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:
@ -1084,5 +1084,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.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save