Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into doctor_replay

 Conflicts:
	lib/config/localized_values.dart
merge-requests/418/head
Elham Rababah 5 years ago
commit fc98e75ec3

@ -14,7 +14,8 @@
<application <application
android:name="io.flutter.app.FlutterApplication" android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="doctor_app_flutter"> android:roundIcon="@mipmap/ic_launcher_round"
android:label="Doctors app">
<activity android:name=".ui.VideoCallActivity"></activity> <activity android:name=".ui.VideoCallActivity"></activity>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#ffffff</color>
</resources>

@ -1,122 +1,128 @@
{ {
"images" : [ "images":[
{ {
"size" : "20x20", "idiom":"iphone",
"idiom" : "iphone", "size":"20x20",
"filename" : "Icon-App-20x20@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-20x20@2x.png"
}, },
{ {
"size" : "20x20", "idiom":"iphone",
"idiom" : "iphone", "size":"20x20",
"filename" : "Icon-App-20x20@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-20x20@3x.png"
}, },
{ {
"size" : "29x29", "idiom":"iphone",
"idiom" : "iphone", "size":"29x29",
"filename" : "Icon-App-29x29@1x.png", "scale":"1x",
"scale" : "1x" "filename":"Icon-App-29x29@1x.png"
}, },
{ {
"size" : "29x29", "idiom":"iphone",
"idiom" : "iphone", "size":"29x29",
"filename" : "Icon-App-29x29@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-29x29@2x.png"
}, },
{ {
"size" : "29x29", "idiom":"iphone",
"idiom" : "iphone", "size":"29x29",
"filename" : "Icon-App-29x29@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-29x29@3x.png"
}, },
{ {
"size" : "40x40", "idiom":"iphone",
"idiom" : "iphone", "size":"40x40",
"filename" : "Icon-App-40x40@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-40x40@2x.png"
}, },
{ {
"size" : "40x40", "idiom":"iphone",
"idiom" : "iphone", "size":"40x40",
"filename" : "Icon-App-40x40@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-40x40@3x.png"
}, },
{ {
"size" : "60x60", "idiom":"iphone",
"idiom" : "iphone", "size":"60x60",
"filename" : "Icon-App-60x60@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-60x60@2x.png"
}, },
{ {
"size" : "60x60", "idiom":"iphone",
"idiom" : "iphone", "size":"60x60",
"filename" : "Icon-App-60x60@3x.png", "scale":"3x",
"scale" : "3x" "filename":"Icon-App-60x60@3x.png"
}, },
{ {
"size" : "20x20", "idiom":"iphone",
"idiom" : "ipad", "size":"76x76",
"filename" : "Icon-App-20x20@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-76x76@2x.png"
}, },
{ {
"size" : "20x20", "idiom":"ipad",
"idiom" : "ipad", "size":"20x20",
"filename" : "Icon-App-20x20@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-20x20@1x.png"
}, },
{ {
"size" : "29x29", "idiom":"ipad",
"idiom" : "ipad", "size":"20x20",
"filename" : "Icon-App-29x29@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-20x20@2x.png"
}, },
{ {
"size" : "29x29", "idiom":"ipad",
"idiom" : "ipad", "size":"29x29",
"filename" : "Icon-App-29x29@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-29x29@1x.png"
}, },
{ {
"size" : "40x40", "idiom":"ipad",
"idiom" : "ipad", "size":"29x29",
"filename" : "Icon-App-40x40@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-29x29@2x.png"
}, },
{ {
"size" : "40x40", "idiom":"ipad",
"idiom" : "ipad", "size":"40x40",
"filename" : "Icon-App-40x40@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-40x40@1x.png"
}, },
{ {
"size" : "76x76", "idiom":"ipad",
"idiom" : "ipad", "size":"40x40",
"filename" : "Icon-App-76x76@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-40x40@2x.png"
}, },
{ {
"size" : "76x76", "idiom":"ipad",
"idiom" : "ipad", "size":"76x76",
"filename" : "Icon-App-76x76@2x.png", "scale":"1x",
"scale" : "2x" "filename":"Icon-App-76x76@1x.png"
}, },
{ {
"size" : "83.5x83.5", "idiom":"ipad",
"idiom" : "ipad", "size":"76x76",
"filename" : "Icon-App-83.5x83.5@2x.png", "scale":"2x",
"scale" : "2x" "filename":"Icon-App-76x76@2x.png"
}, },
{ {
"size" : "1024x1024", "idiom":"ipad",
"idiom" : "ios-marketing", "size":"83.5x83.5",
"filename" : "Icon-App-1024x1024@1x.png", "scale":"2x",
"scale" : "1x" "filename":"Icon-App-83.5x83.5@2x.png"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"scale" : "1x",
"filename" : "ItunesArtwork@2x.png"
}
],
"info":{
"version":1,
"author":"easyappicon"
} }
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

@ -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';
@ -143,9 +143,6 @@ const GET_PROCEDURE_LIST =
'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; 'Services/DoctorApplication.svc/REST/GetOrderedProcedure';
const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure';
const GET_PATIENT_ARRIVAL_LIST =
'Services/DoctorApplication.svc/REST/PatientArrivalList';
///Lab Order ///Lab Order
const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders';
const GET_Patient_LAB_SPECIAL_RESULT = const GET_Patient_LAB_SPECIAL_RESULT =

@ -287,6 +287,7 @@ const Map<String, Map<String, String>> localizedValues = {
'room': {'en': 'ROOM:', 'ar': 'الغرفة'}, 'room': {'en': 'ROOM:', 'ar': 'الغرفة'},
'bed': {'en': 'BED:', 'ar': 'السرير'}, 'bed': {'en': 'BED:', 'ar': 'السرير'},
'next': {'en': 'Next', 'ar': 'التالي'}, 'next': {'en': 'Next', 'ar': 'التالي'},
'previous': {'en': 'PREVIOUS', 'ar': 'السابق'},
'healthRecordInformation': { 'healthRecordInformation': {
'en': 'HEALTH RECORD INFORMATION', 'en': 'HEALTH RECORD INFORMATION',
'ar': 'معلومات السجل الصحي' 'ar': 'معلومات السجل الصحي'
@ -332,7 +333,7 @@ const Map<String, Map<String, String>> localizedValues = {
'branch': {'en': "Branch", 'ar': 'الفرع'}, 'branch': {'en': "Branch", 'ar': 'الفرع'},
'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'}, 'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'},
'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'}, 'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'},
'refer': {'en': "REFER", 'ar': 'إحالة'}, 'refer': {'en': "Refer", 'ar': 'إحالة'},
'rejected': {'en': "Rejected", 'ar': 'مرفوض'}, 'rejected': {'en': "Rejected", 'ar': 'مرفوض'},
'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'}, 'sameBranch': {'en': "Same Branch", 'ar': 'نفس الفرع'},
'otherBranch': {'en': "Other Branch", 'ar': 'فرع آخر'}, 'otherBranch': {'en': "Other Branch", 'ar': 'فرع آخر'},
@ -377,11 +378,15 @@ const Map<String, Map<String, String>> localizedValues = {
'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'}, 'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'},
'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'}, 'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'},
'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'}, 'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'},
'yourBodyMassIndex': {'en': "Your Body Mass Index is", 'ar': 'مؤشر كتلة جسمك هو'}, 'yourBodyMassIndex': {
'en': "Your Body Mass Index is",
'ar': 'مؤشر كتلة جسمك هو'
},
'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'}, 'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'},
'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'}, 'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'},
'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'}, 'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'},
'bmiObese': {'en': "Obese", 'ar': 'سمين'}, 'bmiObese': {'en': "Obese", 'ar': 'سمين'},
'bmiObeseExtreme': {'en': "Extreme Obese", 'ar': 'سمنة مفرطة'},
'method': {'en': "Method", 'ar': 'الطريقة'}, 'method': {'en': "Method", 'ar': 'الطريقة'},
'pulseBeats': {'en': 'Pulse(beats/minute)', 'ar': ' (دقة/دقيقة)النبض'}, 'pulseBeats': {'en': 'Pulse(beats/minute)', 'ar': ' (دقة/دقيقة)النبض'},
'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'}, 'rhythm': {'en': "Rhythm", 'ar': 'الإيقاع'},
@ -705,7 +710,7 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': " : استجابة الإحالة" 'ar': " : استجابة الإحالة"
}, },
'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"}, 'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"},
'diagnosisDetail': {'en': "Diagnosis Detail : ", 'ar': "تفاصيل التشخيص"}, 'diagnosisDetail': {'en': "Diagnosis Details", 'ar': "تفاصيل التشخيص"},
'referralSuccessMsgAccept': { 'referralSuccessMsgAccept': {
'en': "Referral Accepted Successfully", 'en': "Referral Accepted Successfully",
'ar': "تم قبول الإحالة بنجاح" 'ar': "تم قبول الإحالة بنجاح"
@ -816,13 +821,10 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Extend Sick Leave Request", "en": "Extend Sick Leave Request",
"ar": "تمديد طلب الإجازة المرضية" "ar": "تمديد طلب الإجازة المرضية"
}, },
"unReplied": { "accepted": {"en": "Accepted", "ar": "وافقت"},
"en": "UnReplied", "cancelled": {"en": "Cancelled", "ar": "ألغيت"},
"ar": "لم يتم الرد" "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"},
},"replied": { "replied": {"en": "Replied", "ar": " تم الرد"},"typeHereToReply": {
"en": "Replied",
"ar": " تم الرد"
},"typeHereToReply": {
"en": "Type here to reply", "en": "Type here to reply",
"ar": "اكتب هنا للرد" "ar": "اكتب هنا للرد"
}, },

@ -38,22 +38,24 @@ class BaseService {
body['To'] = date; body['To'] = date;
body['PageIndex'] = 0; body['PageIndex'] = 0;
body['PageSize'] = 0; body['PageSize'] = 0;
if(patientMrn == -1){ if(patientMrn != -1){
body['PatientMRN'] = patientMrn; body['PatientMRN'] = patientMrn;
} }
if(appointmentNo == -1){ if(appointmentNo != -1){
body['AppointmentNo'] = appointmentNo; body['AppointmentNo'] = appointmentNo;
} }
await baseAppClient.post( await baseAppClient.post(
GET_PATIENT_ARRIVAL_LIST, ARRIVED_PATIENT_URL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientArrivalList.clear(); patientArrivalList.clear();
response['patientArrivalList']['entityList'].forEach((v) { if(response['patientArrivalList']['entityList'] != null){
PatiantInformtion item = PatiantInformtion.fromJson(v); response['patientArrivalList']['entityList'].forEach((v) {
patientArrivalList.add(item); PatiantInformtion item = PatiantInformtion.fromJson(v);
}); patientArrivalList.add(item);
});
}
}, },
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -158,8 +158,7 @@ class PatientReferralViewModel extends BaseViewModel {
await _referralPatientService.getPatientArrivalList(toDate, await _referralPatientService.getPatientArrivalList(toDate,
fromDate: fromDate, fromDate: fromDate,
patientMrn: patientMrn, patientMrn: patientMrn);
appointmentNo: appointmentNo);
if (_referralPatientService.hasError) { if (_referralPatientService.hasError) {
error = _referralPatientService.error; error = _referralPatientService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -101,14 +101,16 @@ class VitalSignsViewModel extends BaseViewModel {
int getBMIStatus() { int getBMIStatus() {
var bodyMassIndex = double.parse(bodyMax); var bodyMassIndex = double.parse(bodyMax);
if (bodyMassIndex <= 18.5) { if (bodyMassIndex < 18.5) {
return 1; return 1;
} else if (bodyMassIndex <= 25.0) { } else if (bodyMassIndex >= 18.5 && bodyMassIndex <= 24.9) {
return 2; return 2;
} else if (bodyMassIndex <= 30) { } else if (bodyMassIndex >= 25 && bodyMassIndex <= 29.9) {
return 3; return 3;
} else { } else if (bodyMassIndex >= 30 && bodyMassIndex <= 34.9) {
return 4; return 4;
} else {
return 5;
} }
} }

@ -1,10 +1,17 @@
import 'package:doctor_app_flutter/core/enum/filter_type.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/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart'; import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/prescriptions_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
@ -12,8 +19,10 @@ import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.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:flutter/cupertino.dart';
class PrescriptionViewModel extends BaseViewModel { class PrescriptionViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
bool hasError = false; bool hasError = false;
PrescriptionService _prescriptionService = locator<PrescriptionService>(); PrescriptionService _prescriptionService = locator<PrescriptionService>();
List<GetMedicationResponseModel> get allMedicationList => List<GetMedicationResponseModel> get allMedicationList =>
@ -26,6 +35,26 @@ class PrescriptionViewModel extends BaseViewModel {
List<dynamic> get drugToDrug => _prescriptionService.drugToDrugList; List<dynamic> get drugToDrug => _prescriptionService.drugToDrugList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList; List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
PrescriptionsService _prescriptionsService = locator<PrescriptionsService>();
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList =>
_prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList =>
_prescriptionsService.prescriptionReportEnhList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
Future getItem({int itemID}) async { Future getItem({int itemID}) async {
hasError = false; hasError = false;
@ -119,4 +148,113 @@ class PrescriptionViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(
prescriptions: prescriptions, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getListPharmacyForPrescriptions(
itemId: itemId, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
}
});
}
getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
_getPrescriptionsOrders() async {
await _prescriptionsService.getPrescriptionsOrders();
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
getPrescriptions(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptions(patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
_filterList();
await _getPrescriptionsOrders();
setState(ViewState.Idle);
}
}
} }

@ -40,6 +40,10 @@ class ProcedureViewModel extends BaseViewModel {
filterType == FilterType.Clinic filterType == FilterType.Clinic
? _finalRadiologyListClinic ? _finalRadiologyListClinic
: _finalRadiologyListHospital; : _finalRadiologyListHospital;
List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList;
List<LabOrderResult> get labOrdersResultsList => List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList; _labsService.labOrdersResultsList;
@ -221,7 +225,7 @@ class ProcedureViewModel extends BaseViewModel {
await _labsService.getPatientLabOrdersList(patient); await _labsService.getPatientLabOrdersList(patient);
if (_labsService.hasError) { if (_labsService.hasError) {
error = _labsService.error; error = _labsService.error;
setState(ViewState.Error); setState(ViewState.ErrorLocal);
} else { } else {
_labsService.patientLabOrdersList.forEach((element) { _labsService.patientLabOrdersList.forEach((element) {
List<PatientLabOrdersList> patientLabOrdersClinic = List<PatientLabOrdersList> patientLabOrdersClinic =

@ -61,7 +61,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.grey, primarySwatch: Colors.grey,
primaryColor: Colors.grey, primaryColor: Colors.grey,
buttonColor: HexColor('#B8382C'), buttonColor: HexColor('#B8382C'),
fontFamily: 'WorkSans', fontFamily: 'Poppins',
dividerColor: Colors.grey[350], dividerColor: Colors.grey[350],
backgroundColor: Color.fromRGBO(255, 255, 255, 1), backgroundColor: Color.fromRGBO(255, 255, 255, 1),
), ),

@ -1220,7 +1220,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
Container( Container(
height: 150, height: 150,
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: ((SizeConfig.screenWidth * .55) / 5), width: ((SizeConfig.screenWidth * .55) / 5.3),
child: SizedBox(), child: SizedBox(),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.red[50]), borderRadius: BorderRadius.circular(10), color: Colors.red[50]),
@ -1246,7 +1246,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Align( child: Align(
child: AppText( child: AppText(
value.kPIParameter + ' (' + value.value.toString() + ') ', value.kPIParameter + ' (' + value.value.toString() + ') ',
fontSize: 11, fontSize: 10,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
)), )),
@ -1385,7 +1385,7 @@ class DashboardItem extends StatelessWidget {
height: height != null height: height != null
? height ? height
: MediaQuery.of(context).orientation == Orientation.portrait : MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.16 ? MediaQuery.of(context).size.height * 0.18
: MediaQuery.of(context).size.height * 0.36, : MediaQuery.of(context).size.height * 0.36,
decoration: BoxDecoration( decoration: BoxDecoration(
color: !hasBorder color: !hasBorder

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.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-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';
@ -61,10 +62,10 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
this.encounterNumber, this.encounterNumber,
this.pp, this.pp,
this.patient}); this.patient});
bool isPhysicalExam = false; bool isPhysicalExam = true;
bool isProcedureExpand = false; bool isProcedureExpand = true;
bool isHistoryExpand = false; bool isHistoryExpand = true;
bool isAssessmentExpand = false; bool isAssessmentExpand = true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -73,6 +74,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString(), patient.arrivedOn),
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
@ -82,8 +85,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
PatientProfileHeaderNewDesign(patient, // PatientProfileHeaderNewDesign(patient,
patient.patientType.toString(), patient.arrivedOn), // patient.patientType.toString(), patient.arrivedOn),
model.medicalFileList.length != 0 && model.medicalFileList.length != 0 &&
model model
.medicalFileList[0] .medicalFileList[0]
@ -488,28 +491,62 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
FontWeight FontWeight
.w700, .w700,
), ),
AppText( Expanded(
model child: AppText(
.medicalFileList[ model
0] .medicalFileList[
.entityList[0] 0]
.timelines[ .entityList[
encounterNumber] 0]
.timeLineEvents[ .timelines[
0] encounterNumber]
.consulations[ .timeLineEvents[
0] 0]
.lstAssessments[ .consulations[
index] 0]
.condition .lstAssessments[
.trim(), index]
.condition
.trim(),
),
), ),
], ],
), ),
Row(
children: [
Expanded(
child: AppText(
model
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.description,
fontWeight:
FontWeight
.w700,
),
)
],
),
Row( Row(
children: [ children: [
AppText( AppText(
model 'Type: ',
fontWeight:
FontWeight
.w700,
),
Expanded(
child: AppText(model
.medicalFileList[ .medicalFileList[
0] 0]
.entityList[0] .entityList[0]
@ -521,33 +558,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
0] 0]
.lstAssessments[ .lstAssessments[
index] index]
.description, .type),
fontWeight:
FontWeight
.w700,
)
],
),
Row(
children: [
AppText(
'Type: ',
fontWeight:
FontWeight
.w700,
), ),
AppText(model
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[0]
.lstAssessments[
index]
.type),
], ],
), ),
SizedBox( SizedBox(

@ -10,9 +10,12 @@ import 'package:doctor_app_flutter/util/date-utils.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/patients/profile/patient_profile_header_with_appointment_card_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:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -36,6 +39,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
builder: builder:
(BuildContext context, MedicalFileViewModel model, Widget child) => (BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", patientType),
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(), appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView( body: NetworkBaseView(
@ -48,8 +53,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
// ? MainAxisAlignment.start // ? MainAxisAlignment.start
// : MainAxisAlignment.center, // : MainAxisAlignment.center,
children: [ children: [
PatientProfileHeaderNewDesign( // PatientProfileHeaderNewDesign(
patient, patient.patientType.toString(), arrivalType), // patient, patient.patientType.toString(), arrivalType),
Padding( Padding(
padding: padding:
EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
@ -92,181 +97,215 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
itemCount: model.medicalFileList[0].entityList[0] itemCount: model.medicalFileList[0].entityList[0]
.timelines.length, .timelines.length,
itemBuilder: (BuildContext ctxt, int index) { itemBuilder: (BuildContext ctxt, int index) {
return Padding( return InkWell(
padding: EdgeInsets.symmetric( onTap: () {
horizontal: 12.0, vertical: 8.0), Navigator.push(
child: InkWell( context,
child: Container( MaterialPageRoute(
width: double.infinity, builder: (context) => MedicalFileDetails(
margin: EdgeInsets.only( age: patient.age,
top: 10, left: 10, right: 10), firstName: patient.firstName,
padding: EdgeInsets.all(8.0), lastName: patient.lastName,
decoration: BoxDecoration( gender: patient.genderDescription,
color: Colors.white, encounterNumber: index,
borderRadius: BorderRadius.all( pp: patient.patientId,
Radius.circular(10.0), patient: patient,
), )),
border: Border.all( );
color: Colors.grey[200], width: 0.5), },
), child: DoctorCard(
child: Column( doctorName: model.medicalFileList[0]
children: [ .entityList[0].timelines[index].doctorName,
Row( clinic: model.medicalFileList[0].entityList[0]
mainAxisAlignment: .timelines[index].clinicName,
MainAxisAlignment.spaceBetween, branch: model.medicalFileList[0].entityList[0]
children: [ .timelines[index].projectName,
Row( profileUrl:
children: [ 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
AppText( appointmentDate:
model DateUtils.getDateTimeFromServerFormat(
.medicalFileList[0] model.medicalFileList[0].entityList[0]
.entityList[0] .timelines[index].date,
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
fontSize: 17.0,
fontFamily: 'Poppins',
)
],
),
Row(
children: [
AppText(
Helpers.convertStringToDate(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.day
.toString() +
"/",
),
AppText(
Helpers.convertStringToDate(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.month
.toString() +
"/",
),
AppText(
Helpers.convertStringToDate(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.year
.toString(),
),
],
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
ClipRRect(
borderRadius:
BorderRadius.all(
Radius.circular(30)),
child: Image.network(
'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
],
),
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
TranslationBase.of(context)
.clinic +
": ",
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
fontWeight: FontWeight.w600,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
TranslationBase.of(context)
.branch +
": ",
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName,
fontWeight: FontWeight.w600,
),
],
),
],
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.end,
children: [
Column(
children: [
Icon(
Icons.remove_red_eye,
size: 30.0,
)
],
)
],
),
],
),
), ),
onTap: () { isPrescriptions: true,
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
)),
);
},
), ),
); );
// return Padding(
// padding: EdgeInsets.symmetric(
// horizontal: 12.0, vertical: 8.0),
// child: InkWell(
// child: Container(
// width: double.infinity,
// margin: EdgeInsets.only(
// top: 10, left: 10, right: 10),
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.all(
// Radius.circular(10.0),
// ),
// border: Border.all(
// color: Colors.grey[200], width: 0.5),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .doctorName,
// fontWeight: FontWeight.w700,
// fontSize: 17.0,
// fontFamily: 'Poppins',
// )
// ],
// ),
// Row(
// children: [
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .day
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .month
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .year
// .toString(),
// ),
// ],
// )
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// children: [
// ClipRRect(
// borderRadius:
// BorderRadius.all(
// Radius.circular(30)),
// child: Image.network(
// 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
// fit: BoxFit.cover,
// width: 60,
// height: 70,
// ),
// ),
// ],
// ),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// AppText(
// TranslationBase.of(context)
// .clinic +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .clinicName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
// children: [
// AppText(
// TranslationBase.of(context)
// .branch +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .projectName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// ],
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Column(
// children: [
// Icon(
// Icons.remove_red_eye,
// size: 30.0,
// )
// ],
// )
// ],
// ),
// ],
// ),
// ),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// MedicalFileDetails(
// age: patient.age,
// firstName: patient.firstName,
// lastName: patient.lastName,
// gender: patient.genderDescription,
// encounterNumber: index,
// pp: patient.patientId,
// patient: patient,
// )),
// );
// },
// ),
// );
}) })
: Column( : Column(
children: [ children: [

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.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/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/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';
@ -28,15 +29,16 @@ class ECGPage extends StatelessWidget {
patientID: patient.patientId), patientID: patient.patientId),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
appBar: PatientProfileHeaderNewDesignAppBar(patient,arrivalType??'0',patientType),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), // PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType),
SizedBox(height: 12,), SizedBox(height: 12,),
Texts('Service',style: "caption2",color: Colors.black,), Texts('Service',style: "caption2",color: Colors.black,),
Texts('ECG',bold: true,fontSize: 22,), Texts('ECG',bold: true,fontSize: 22,),

@ -58,7 +58,7 @@ class _AdmissionRequestThirdScreenState
isShowAppBar: false, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: (){ onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
@ -66,418 +66,344 @@ class _AdmissionRequestThirdScreenState
}, },
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Container(
margin: EdgeInsets.all(16.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// PatientPageHeaderWidget(patient), AppText(
PatientProfileHeaderNewDesign( "${TranslationBase.of(context).admission}",
patient, patientType, arrivalType), fontFamily: 'Poppins',
Container( fontSize: SizeConfig.textMultiplier * 1.6,
margin: EdgeInsets.all(16.0), fontWeight: FontWeight.w600,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
), ),
Container( AppText(
margin: EdgeInsets.symmetric( "${TranslationBase.of(context).request}",
vertical: 0, horizontal: 16), fontFamily: 'Poppins',
child: Column( fontSize: SizeConfig.textMultiplier * 3,
crossAxisAlignment: CrossAxisAlignment.start, fontWeight: FontWeight.bold,
children: [ )
AppText( ],
TranslationBase.of(context) ),
.specialityAndDoctorDetail, ),
fontFamily: 'Poppins', Container(
fontSize: SizeConfig.textMultiplier * 1.8, margin:
fontWeight: FontWeight.w700, EdgeInsets.symmetric(vertical: 0, horizontal: 16),
), child: Column(
SizedBox( crossAxisAlignment: CrossAxisAlignment.start,
height: 10, children: [
), AppText(
AppTextFieldCustom( TranslationBase.of(context)
height: screenSize.height * 0.070, .specialityAndDoctorDetail,
hintText: "test field", fontFamily: 'Poppins',
isDropDown: true, fontSize: SizeConfig.textMultiplier * 1.8,
controller: _sickLeaveCommentsController, fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).clinic,
onTap: model.clinicList != null && isDropDown: true,
model.clinicList.length > 0 dropDownText: _selectedClinic != null
? () { ? _selectedClinic['clinicGroupName']
openListDialogField( : null,
'clinicGroupName', enabled: false,
'clinicID', onClick: model.clinicList != null &&
model.clinicList, model.clinicList.length > 0
(selectedValue) { ? () {
setState(() { openListDialogField(
_selectedClinic = selectedValue; 'clinicGroupName',
}); 'clinicID',
}); model.clinicList, (selectedValue) {
} setState(() {
: () async { _selectedClinic = selectedValue;
GifLoaderDialogUtils.showMyDialog( });
context);
await model.getClinics().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.clinicList.length > 0) {
openListDialogField(
'clinicGroupName',
'clinicID',
model.clinicList,
(selectedValue) {
setState(() {
_selectedClinic =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.clinic,
_selectedClinic != null
? _selectedClinic[
'clinicGroupName']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 20,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: _selectedClinic != null
? model.doctorsList != null &&
model.doctorsList.length > 0
? () {
openListDialogField(
'DoctorName',
'DoctorID',
model.doctorsList,
(selectedValue) {
setState(() {
_selectedDoctor =
selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils
.showMyDialog(context);
await model
.getClinicDoctors(
_selectedClinic[
'clinicID'])
.then((_) =>
GifLoaderDialogUtils
.hideDialog(
context));
if (model.state ==
ViewState.Idle &&
model.doctorsList.length >
0) {
openListDialogField(
'DoctorName',
'DoctorID',
model.doctorsList,
(selectedValue) {
setState(() {
_selectedDoctor =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
}
: null,
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.doctor,
_selectedDoctor != null
? _selectedDoctor[
'DoctorName']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 16,
),
AppText(
TranslationBase.of(context).patientDetails,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5,
),
SizedBox(
height: 10,
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context).patientPregnant,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _patientPregnant,
onChanged: (newValue) {
setState(() {
_patientPregnant = newValue;
});
},
controlAffinity:
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context)
.isSickLeaveRequired,
fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1,
),
value: _isSickLeaveRequired,
onChanged: (newValue) {
setState(() {
_isSickLeaveRequired = newValue;
}); });
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model.getClinics().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.clinicList.length > 0) {
openListDialogField(
'clinicGroupName',
'clinicID',
model.clinicList, (selectedValue) {
setState(() {
_selectedClinic = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
}, },
controlAffinity: ),
ListTileControlAffinity.leading, SizedBox(
contentPadding: EdgeInsets.all(0), height: 20,
), ),
Container( AppTextFieldCustom(
child: TextField( height: screenSize.height * 0.075,
decoration: hintText: TranslationBase.of(context).doctor,
Helpers.textFieldSelectorDecoration( isDropDown: true,
TranslationBase.of(context) dropDownText: _selectedDoctor != null
.sickLeaveComments, ? _selectedDoctor['DoctorName']
null, : null,
false), enabled: false,
enabled: true, onClick: _selectedClinic != null
controller: _sickLeaveCommentsController, ? model.doctorsList != null &&
keyboardType: TextInputType.text, model.doctorsList.length > 0
minLines: 2, ? () {
maxLines: 4, openListDialogField('DoctorName',
)), 'DoctorID', model.doctorsList,
SizedBox( (selectedValue) {
height: 10, setState(() {
), _selectedDoctor = selectedValue;
Container( });
height: screenSize.height * 0.070, });
child: InkWell( }
onTap: model.dietTypesList != null && : () async {
model.dietTypesList.length > 0 GifLoaderDialogUtils.showMyDialog(
? () { context);
openListDialogField('nameEn', 'id', await model
model.dietTypesList, .getClinicDoctors(
(selectedValue) { _selectedClinic['clinicID'])
setState(() { .then((_) => GifLoaderDialogUtils
_selectedDietType = .hideDialog(context));
selectedValue; if (model.state == ViewState.Idle &&
}); model.doctorsList.length > 0) {
openListDialogField('DoctorName',
'DoctorID', model.doctorsList,
(selectedValue) {
setState(() {
_selectedDoctor = selectedValue;
}); });
} });
: () async { } else if (model.state ==
GifLoaderDialogUtils.showMyDialog( ViewState.ErrorLocal) {
context); DrAppToastMsg.showErrorToast(
await model.getDietTypes().then( model.error);
(_) => GifLoaderDialogUtils } else {
.hideDialog(context)); DrAppToastMsg.showErrorToast(
if (model.state == ViewState.Idle && "Empty List");
model.dietTypesList.length > }
0) { }
openListDialogField('nameEn', : null,
'id', model.dietTypesList, ),
(selectedValue) { SizedBox(
setState(() { height: 16,
_selectedDietType = ),
selectedValue; AppText(
}); TranslationBase.of(context).patientDetails,
}); fontFamily: 'Poppins',
} else if (model.state == fontSize: SizeConfig.textMultiplier * 1.8,
ViewState.ErrorLocal) { fontWeight: FontWeight.w700,
DrAppToastMsg.showErrorToast( ),
model.error); SizedBox(
} else { height: 10,
DrAppToastMsg.showErrorToast( ),
"Empty List"); CheckboxListTile(
} title: AppText(
}, TranslationBase.of(context).patientPregnant,
child: TextField( fontWeight: FontWeight.normal,
decoration: fontFamily: 'Poppins',
Helpers.textFieldSelectorDecoration( fontSize: SizeConfig.textMultiplier * 2.0,
TranslationBase.of(context)
.dietType,
_selectedDietType != null
? _selectedDietType['nameEn']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.dietTypeRemarks,
null,
false),
enabled: true,
controller: _dietTypeRemarksController,
keyboardType: TextInputType.text,
minLines: 4,
maxLines: 6,
)),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.pastMedicalHistory,
null,
false),
enabled: true,
controller: _postMedicalHistoryController,
keyboardType: TextInputType.text,
minLines: 2,
maxLines: 4,
)),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.pastSurgicalHistory,
null,
false),
enabled: true,
controller: _postSurgicalHistoryController,
keyboardType: TextInputType.text,
minLines: 2,
maxLines: 4,
)),
],
), ),
value: _patientPregnant,
activeColor: HexColor("#D02127"),
onChanged: (newValue) {
setState(() {
_patientPregnant = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
CheckboxListTile(
title: AppText(
TranslationBase.of(context).isSickLeaveRequired,
fontWeight: FontWeight.normal,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.0,
),
value: _isSickLeaveRequired,
activeColor: HexColor("#D02127"),
onChanged: (newValue) {
setState(() {
_isSickLeaveRequired = newValue;
});
},
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0),
),
AppTextFieldCustom(
hintText:
TranslationBase.of(context).sickLeaveComments,
controller: _sickLeaveCommentsController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
),
SizedBox(
height: 10,
),
AppTextFieldCustom(
height: screenSize.height * 0.075,
hintText: TranslationBase.of(context).dietType,
isDropDown: true,
dropDownText: _selectedDietType != null
? _selectedDietType['nameEn']
: null,
enabled: false,
onClick: model.dietTypesList != null &&
model.dietTypesList.length > 0
? () {
openListDialogField(
'nameEn', 'id', model.dietTypesList,
(selectedValue) {
setState(() {
_selectedDietType = selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model.getDietTypes().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.dietTypesList.length > 0) {
openListDialogField(
'nameEn', 'id', model.dietTypesList,
(selectedValue) {
setState(() {
_selectedDietType = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
),
SizedBox(
height: 10,
),
AppTextFieldCustom(
hintText:
TranslationBase.of(context).dietTypeRemarks,
controller: _dietTypeRemarksController,
minLines: 4,
maxLines: 6,
inputType: TextInputType.multiline,
),
SizedBox(
height: 10,
),
AppTextFieldCustom(
hintText: TranslationBase.of(context).pastMedicalHistory,
controller: _postMedicalHistoryController,
minLines: 4,
maxLines: 6,
inputType: TextInputType.multiline,
),
SizedBox(
height: 10,
),
AppTextFieldCustom(
hintText: TranslationBase.of(context).pastSurgicalHistory,
controller: _postSurgicalHistoryController,
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
), ),
], ],
), ),
), ),
), ],
Container( ),
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), ),
child: AppButton( ),
title: TranslationBase.of(context).next, Container(
color: HexColor("#B8382B"), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
onPressed: () { child: AppButton(
model.admissionRequestData = AdmissionRequest(); title: TranslationBase.of(context).next,
if (_selectedClinic != null && color: HexColor("#D02127"),
_selectedDoctor != null && onPressed: () {
_sickLeaveCommentsController.text != "" && model.admissionRequestData = AdmissionRequest();
_postMedicalHistoryController.text != "" && if (_selectedClinic != null &&
_postSurgicalHistoryController.text != "") { _selectedDoctor != null &&
model.admissionRequestData.patientMRN = _sickLeaveCommentsController.text != "" &&
patient.patientMRN; _postMedicalHistoryController.text != "" &&
model.admissionRequestData.appointmentNo = _postSurgicalHistoryController.text != "") {
patient.appointmentNo; model.admissionRequestData.patientMRN =
model.admissionRequestData.episodeID = patient.patientMRN;
patient.episodeNo; model.admissionRequestData.appointmentNo =
model.admissionRequestData.admissionRequestNo = 0; patient.appointmentNo;
model.admissionRequestData.episodeID = patient.episodeNo;
model.admissionRequestData.admissionRequestNo = 0;
model.admissionRequestData.admitToClinic = model.admissionRequestData.admitToClinic =
_selectedClinic['clinicID']; _selectedClinic['clinicID'];
model.admissionRequestData.mrpDoctorID = model.admissionRequestData.mrpDoctorID =
_selectedDoctor['DoctorID']; _selectedDoctor['DoctorID'];
model.admissionRequestData.isPregnant = model.admissionRequestData.isPregnant = _patientPregnant;
_patientPregnant; model.admissionRequestData.isSickLeaveRequired =
model.admissionRequestData.isSickLeaveRequired = _isSickLeaveRequired;
_isSickLeaveRequired; model.admissionRequestData.sickLeaveComments =
model.admissionRequestData.sickLeaveComments = _sickLeaveCommentsController.text;
_sickLeaveCommentsController.text; model.admissionRequestData.isDietType =
model.admissionRequestData.isDietType = _selectedDietType != null ? true : false;
_selectedDietType != null ? true : false; model.admissionRequestData.dietType =
model.admissionRequestData.dietType = _selectedDietType != null
_selectedDietType != null ? _selectedDietType['id']
? _selectedDietType['id'] : 0;
: 0; model.admissionRequestData.dietRemarks =
model.admissionRequestData.dietRemarks = _dietTypeRemarksController.text;
_dietTypeRemarksController.text; model.admissionRequestData.pastMedicalHistory =
model.admissionRequestData.pastMedicalHistory = _postMedicalHistoryController.text;
_postMedicalHistoryController.text; model.admissionRequestData.pastSurgicalHistory =
model.admissionRequestData.pastSurgicalHistory = _postSurgicalHistoryController.text;
_postSurgicalHistoryController.text; Navigator.of(context)
Navigator.of(context).pushNamed( .pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: {
PATIENT_ADMISSION_REQUEST_2, 'patient': patient,
arguments: { 'patientType': patientType,
'patient': patient, 'arrivalType': arrivalType,
'admission-data': model.admissionRequestData 'admission-data': model.admissionRequestData
}); });
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
TranslationBase.of(context).pleaseFill); TranslationBase.of(context).pleaseFill);
} }
}, },
),
),
],
), ),
),
],
),
), ),
), ),
); );

@ -7,11 +7,12 @@ import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-view
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/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/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.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.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.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/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -32,11 +33,6 @@ class AdmissionRequestThirdScreen extends StatefulWidget {
class _AdmissionRequestThirdScreenState class _AdmissionRequestThirdScreenState
extends State<AdmissionRequestThirdScreen> { extends State<AdmissionRequestThirdScreen> {
final _treatmentLineController = TextEditingController();
final _complicationsController = TextEditingController();
final _otherProceduresController = TextEditingController();
dynamic _selectedAdmissionType;
dynamic _selectedDiagnosis; dynamic _selectedDiagnosis;
dynamic _selectedIcd; dynamic _selectedIcd;
dynamic _selectedDiagnosisType; dynamic _selectedDiagnosisType;
@ -45,6 +41,8 @@ class _AdmissionRequestThirdScreenState
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
AdmissionRequest admissionRequest = routeArgs['admission-data']; AdmissionRequest admissionRequest = routeArgs['admission-data'];
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
@ -53,6 +51,7 @@ class _AdmissionRequestThirdScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -68,132 +67,68 @@ class _AdmissionRequestThirdScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Container( Container(
margin: margin: EdgeInsets.all(16.0),
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( AppText(
height: 10, "${TranslationBase.of(context).admission}",
), fontFamily: 'Poppins',
Container( fontSize: SizeConfig.textMultiplier * 1.6,
child: TextField( fontWeight: FontWeight.w600,
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).treatmentLine,
null,
false),
enabled: true,
controller: _treatmentLineController,
keyboardType: TextInputType.text,
minLines: 3,
maxLines: 5,
)),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).complications,
null,
false),
enabled: true,
controller: _complicationsController,
keyboardType: TextInputType.text,
minLines: 3,
maxLines: 5,
)),
SizedBox(
height: 10,
),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).otherProcedure,
null,
false),
enabled: true,
controller: _otherProceduresController,
keyboardType: TextInputType.text,
minLines: 3,
maxLines: 5,
)),
SizedBox(
height: 10,
),
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.admissionTypeList != null &&
model.admissionTypeList.length > 0
? () {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model
.getMasterLookup(MasterKeysService
.AdmissionRequestType)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.admissionTypeList.length > 0) {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).admissionType,
_selectedAdmissionType != null
? _selectedAdmissionType['nameEn']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 16,
), ),
AppText( AppText(
TranslationBase.of(context).diagnosisDetail, "${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2.5, )
],
),
),
Container(
margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).diagnosisDetail,
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).diagnosis,
onTap: model.diagnosisTypesList != null && dropDownText: _selectedDiagnosis != null
model.diagnosisTypesList.length > 0 ? _selectedDiagnosis['nameEn']
? () { : null,
enabled: false,
isDropDown: true,
onClick: model.diagnosisTypesList != null &&
model.diagnosisTypesList.length > 0
? () {
openListDialogField('nameEn', 'id',
model.diagnosisTypesList,
(selectedValue) {
setState(() {
_selectedDiagnosis = selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.getDiagnosis().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.diagnosisTypesList.length > 0) {
openListDialogField('nameEn', 'id', openListDialogField('nameEn', 'id',
model.diagnosisTypesList, model.diagnosisTypesList,
(selectedValue) { (selectedValue) {
@ -201,51 +136,46 @@ class _AdmissionRequestThirdScreenState
_selectedDiagnosis = selectedValue; _selectedDiagnosis = selectedValue;
}); });
}); });
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
} }
: () async { },
GifLoaderDialogUtils.showMyDialog(
context);
await model.getDiagnosis().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.diagnosisTypesList.length > 0) {
openListDialogField('nameEn', 'id',
model.diagnosisTypesList,
(selectedValue) {
setState(() {
_selectedDiagnosis = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).diagnosis,
_selectedDiagnosis != null
? _selectedDiagnosis['nameEn']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).icd,
onTap: model.icdCodes != null && dropDownText: _selectedIcd != null
model.icdCodes.length > 0 ? _selectedIcd['description']
? () { : null,
enabled: false,
isDropDown: true,
onClick: model.icdCodes != null &&
model.icdCodes.length > 0
? () {
openListDialogField(
'description', 'code', model.icdCodes,
(selectedValue) {
setState(() {
_selectedIcd = selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model
.getICDCodes(patient.patientMRN)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.icdCodes.length > 0) {
openListDialogField( openListDialogField(
'description', 'code', model.icdCodes, 'description', 'code', model.icdCodes,
(selectedValue) { (selectedValue) {
@ -253,57 +183,51 @@ class _AdmissionRequestThirdScreenState
_selectedIcd = selectedValue; _selectedIcd = selectedValue;
}); });
}); });
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
} }
: () async { },
GifLoaderDialogUtils.showMyDialog(
context);
await model
.getICDCodes(patient.patientMRN)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.icdCodes.length > 0) {
openListDialogField(
'description',
'code',
model.icdCodes, (selectedValue) {
setState(() {
_selectedIcd = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).icd,
_selectedIcd != null
? _selectedIcd['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).diagnoseType,
onTap: model.listOfDiagnosisSelectionTypes != dropDownText: _selectedDiagnosisType != null
null && ? _selectedDiagnosisType['description']
model.listOfDiagnosisSelectionTypes : null,
.length > enabled: false,
0 isDropDown: true,
? () { onClick: model.listOfDiagnosisSelectionTypes !=
null &&
model.listOfDiagnosisSelectionTypes.length >
0
? () {
openListDialogField('description', 'code',
model.listOfDiagnosisSelectionTypes,
(selectedValue) {
setState(() {
_selectedDiagnosisType = selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(context);
await model
.getMasterLookup(MasterKeysService
.DiagnosisSelectionType)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.listOfDiagnosisSelectionTypes
.length >
0) {
openListDialogField('description', 'code', openListDialogField('description', 'code',
model.listOfDiagnosisSelectionTypes, model.listOfDiagnosisSelectionTypes,
(selectedValue) { (selectedValue) {
@ -312,49 +236,14 @@ class _AdmissionRequestThirdScreenState
selectedValue; selectedValue;
}); });
}); });
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
} }
: () async { },
GifLoaderDialogUtils.showMyDialog(
context);
await model
.getMasterLookup(MasterKeysService
.DiagnosisSelectionType)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.listOfDiagnosisSelectionTypes
.length >
0) {
openListDialogField(
'description',
'code',
model.listOfDiagnosisSelectionTypes,
(selectedValue) {
setState(() {
_selectedDiagnosisType =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).diagnoseType,
_selectedDiagnosisType != null
? _selectedDiagnosisType['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
@ -367,55 +256,66 @@ class _AdmissionRequestThirdScreenState
)), )),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton( child: Row(
title: TranslationBase.of(context).next, children: [
color: HexColor("#B8382B"), Expanded(
onPressed: () async { child: AppButton(
if (_treatmentLineController.text != "" && title: TranslationBase.of(context).previous,
_complicationsController.text != "" && color: HexColor("#EAEAEA"),
_otherProceduresController.text != "" && fontColor: Colors.black,
_selectedAdmissionType != null && onPressed: () {
_selectedDiagnosis != null && Navigator.pop(context);
_selectedIcd != null && },
_selectedDiagnosisType != null) { ),
model.admissionRequestData = admissionRequest; ),
SizedBox(
model.admissionRequestData.mainLineOfTreatment = width: 10,
_treatmentLineController.text; ),
model.admissionRequestData.complications = Expanded(
_complicationsController.text; child: AppButton(
model.admissionRequestData.otherProcedures = title: TranslationBase.of(context).submit,
_otherProceduresController.text; color: HexColor("#359846"),
model.admissionRequestData.admissionType = onPressed: () async {
_selectedAdmissionType['id']; if (_selectedDiagnosis != null &&
_selectedIcd != null &&
_selectedDiagnosisType != null) {
model.admissionRequestData = admissionRequest;
dynamic admissionRequestDiagnoses = [ dynamic admissionRequestDiagnoses = [
{ {
'diagnosisDescription': _selectedDiagnosis['nameEn'], 'diagnosisDescription':
'diagnosisType': _selectedDiagnosis['id'], _selectedDiagnosis['nameEn'],
'icdCode': _selectedIcd['code'], 'diagnosisType': _selectedDiagnosis['id'],
'icdCodeDescription': _selectedIcd['description'], 'icdCode': _selectedIcd['code'],
'type': _selectedDiagnosisType['code'], 'icdCodeDescription':
'remarks': "", _selectedIcd['description'],
'isActive': true, 'type': _selectedDiagnosisType['code'],
} 'remarks': "",
]; 'isActive': true,
model.admissionRequestData.admissionRequestDiagnoses = }
admissionRequestDiagnoses; ];
model.admissionRequestData
.admissionRequestDiagnoses =
admissionRequestDiagnoses;
await model.makeAdmissionRequest(); await model.makeAdmissionRequest();
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} else { } else {
DrAppToastMsg.showSuccesToast( DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).admissionRequestSuccessMsg); TranslationBase.of(context)
Navigator.popUntil(context, ModalRoute.withName(PATIENTS_PROFILE)); .admissionRequestSuccessMsg);
} Navigator.popUntil(context,
} else { ModalRoute.withName(PATIENTS_PROFILE));
DrAppToastMsg.showErrorToast( }
TranslationBase.of(context).pleaseFill); } else {
} DrAppToastMsg.showErrorToast(
}, TranslationBase.of(context).pleaseFill);
}
},
),
),
],
), ),
), ),
], ],

@ -12,6 +12,8 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.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.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.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/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -36,17 +38,23 @@ class _AdmissionRequestSecondScreenState
final _estimatedCostController = TextEditingController(); final _estimatedCostController = TextEditingController();
final _expectedDaysController = TextEditingController(); final _expectedDaysController = TextEditingController();
final _otherDepartmentsInterventionsController = TextEditingController(); final _otherDepartmentsInterventionsController = TextEditingController();
final _treatmentLineController = TextEditingController();
final _complicationsController = TextEditingController();
final _otherProceduresController = TextEditingController();
DateTime _expectedAdmissionDate; DateTime _expectedAdmissionDate;
dynamic _selectedFloor; dynamic _selectedFloor;
dynamic _selectedWard; dynamic _selectedWard;
dynamic _selectedRoomCategory; dynamic _selectedRoomCategory;
dynamic _selectedAdmissionType;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
AdmissionRequest admissionRequest = routeArgs['admission-data']; AdmissionRequest admissionRequest = routeArgs['admission-data'];
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
@ -55,6 +63,7 @@ class _AdmissionRequestSecondScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -70,145 +79,159 @@ class _AdmissionRequestSecondScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.all(16.0),
vertical: 16, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( AppText(
height: 16, "${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
), ),
AppText(
"${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
Container(
margin:
EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.postPlansEstimatedCost, .postPlansEstimatedCost,
fontWeight: FontWeight.bold, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: TranslationBase.of(context).estimatedCost,
Helpers.textFieldSelectorDecoration( controller: _estimatedCostController,
TranslationBase.of(context) inputType: TextInputType.number,
.estimatedCost, inputFormatters: [
null, FilteringTextInputFormatter.allow(
false), RegExp(ONLY_NUMBERS))
enabled: true, ],
controller: _estimatedCostController, ),
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS))
],
keyboardType: TextInputType.number,
)),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context).postPlans,
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).postPlans,
null,
false),
enabled: true,
controller: _postPlansEstimatedCostController, controller: _postPlansEstimatedCostController,
keyboardType: TextInputType.text, inputType: TextInputType.multiline,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context)
decoration: .otherDepartmentsInterventions,
Helpers.textFieldSelectorDecoration( controller:
TranslationBase.of(context)
.otherDepartmentsInterventions,
null,
false),
enabled: true,
controller:
_otherDepartmentsInterventionsController, _otherDepartmentsInterventionsController,
keyboardType: TextInputType.multiline, inputType: TextInputType.multiline,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
)), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppText( AppText(
TranslationBase.of(context).otherInformation, TranslationBase.of(context).otherInformation,
fontWeight: FontWeight.bold, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: TranslationBase.of(context).expectedDays,
Helpers.textFieldSelectorDecoration( controller: _expectedDaysController,
TranslationBase.of(context) inputType: TextInputType.number,
.expectedDays, inputFormatters: [
null, FilteringTextInputFormatter.allow(
false), RegExp(ONLY_NUMBERS))
enabled: true, ],
controller: _expectedDaysController, ),
inputFormatters: [
FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS))
],
keyboardType: TextInputType.number,
)),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context)
onTap: () { .expectedAdmissionDate,
if (_expectedAdmissionDate == null) { dropDownText: _expectedAdmissionDate != null
_expectedAdmissionDate = DateTime.now(); ? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}"
} : null,
_selectDate(context, _expectedAdmissionDate, enabled: false,
(picked) { isDropDown: true,
setState(() { suffixIcon: Icon(
_expectedAdmissionDate = picked; Icons.calendar_today,
}); color: Colors.black,
});
},
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.expectedAdmissionDate,
_expectedAdmissionDate != null
? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
), ),
onClick: () {
if (_expectedAdmissionDate == null) {
_expectedAdmissionDate = DateTime.now();
}
_selectDate(context, _expectedAdmissionDate,
(picked) {
setState(() {
_expectedAdmissionDate = picked;
});
});
},
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).floor,
onTap: model.floorList != null && dropDownText: _selectedFloor != null
model.floorList.length > 0 ? _selectedFloor['description']
? () { : null,
enabled: false,
isDropDown: true,
onClick: model.floorList != null &&
model.floorList.length > 0
? () {
openListDialogField(
'description',
'floorID',
model.floorList, (selectedValue) {
setState(() {
_selectedFloor = selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model.getFloors().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.floorList.length > 0) {
openListDialogField( openListDialogField(
'description', 'description',
'floorID', 'floorID',
@ -217,52 +240,47 @@ class _AdmissionRequestSecondScreenState
_selectedFloor = selectedValue; _selectedFloor = selectedValue;
}); });
}); });
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
} }
: () async { },
GifLoaderDialogUtils.showMyDialog(
context);
await model.getFloors().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.floorList.length > 0) {
openListDialogField('description',
'floorID', model.floorList,
(selectedValue) {
setState(() {
_selectedFloor = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).floor,
_selectedFloor != null
? _selectedFloor['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).ward,
onTap: model.wardList != null && dropDownText: _selectedWard != null
model.wardList.length > 0 ? _selectedWard['description']
? () { : null,
enabled: false,
isDropDown: true,
onClick: model.wardList != null &&
model.wardList.length > 0
? () {
openListDialogField(
'description',
'nursingStationID',
model.wardList, (selectedValue) {
setState(() {
_selectedWard = selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model.getWards().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.wardList.length > 0) {
openListDialogField( openListDialogField(
'description', 'description',
'nursingStationID', 'nursingStationID',
@ -271,54 +289,51 @@ class _AdmissionRequestSecondScreenState
_selectedWard = selectedValue; _selectedWard = selectedValue;
}); });
}); });
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
} }
: () async { },
GifLoaderDialogUtils.showMyDialog(
context);
await model.getWards().then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.wardList.length > 0) {
openListDialogField(
'description',
'nursingStationID',
model.wardList,
(selectedValue) {
setState(() {
_selectedWard = selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).ward,
_selectedWard != null
? _selectedWard['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText:
onTap: model.roomCategoryList != null && TranslationBase.of(context).roomCategory,
model.roomCategoryList.length > 0 dropDownText: _selectedRoomCategory != null
? () { ? _selectedRoomCategory['description']
: null,
enabled: false,
isDropDown: true,
onClick: model.roomCategoryList != null &&
model.roomCategoryList.length > 0
? () {
openListDialogField(
'description',
'categoryID',
model.roomCategoryList,
(selectedValue) {
setState(() {
_selectedRoomCategory =
selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model.getRoomCategories().then(
(_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.roomCategoryList.length > 0) {
openListDialogField( openListDialogField(
'description', 'description',
'categoryID', 'categoryID',
@ -329,52 +344,103 @@ class _AdmissionRequestSecondScreenState
selectedValue; selectedValue;
}); });
}); });
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
} }
: () async { },
GifLoaderDialogUtils.showMyDialog( ),
context); SizedBox(
await model.getRoomCategories().then( height: 10,
(_) => GifLoaderDialogUtils ),
.hideDialog(context)); AppTextFieldCustom(
if (model.state == ViewState.Idle && hintText:
model.roomCategoryList.length > TranslationBase.of(context).treatmentLine,
0) { controller: _treatmentLineController,
openListDialogField( inputType: TextInputType.multiline,
'description', minLines: 3,
'categoryID', maxLines: 5,
model.roomCategoryList, ),
(selectedValue) { SizedBox(
setState(() { height: 10,
_selectedRoomCategory = ),
selectedValue; AppTextFieldCustom(
}); hintText:
}); TranslationBase.of(context).complications,
} else if (model.state == controller: _complicationsController,
ViewState.ErrorLocal) { inputType: TextInputType.multiline,
DrAppToastMsg.showErrorToast( minLines: 3,
model.error); maxLines: 5,
} else { ),
DrAppToastMsg.showErrorToast( SizedBox(
"Empty List"); height: 10,
} ),
}, AppTextFieldCustom(
child: TextField( hintText:
decoration: TranslationBase.of(context).otherProcedure,
Helpers.textFieldSelectorDecoration( controller: _otherProceduresController,
TranslationBase.of(context) inputType: TextInputType.multiline,
.roomCategory, minLines: 3,
_selectedRoomCategory != null maxLines: 5,
? _selectedRoomCategory[
'description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFieldCustom(
height: screenSize.height * 0.075,
hintText:
TranslationBase.of(context).admissionType,
dropDownText: _selectedAdmissionType != null
? _selectedAdmissionType['nameEn']
: null,
enabled: false,
isDropDown: true,
onClick: model.admissionTypeList != null &&
model.admissionTypeList.length > 0
? () {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model
.getMasterLookup(MasterKeysService
.AdmissionRequestType)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.admissionTypeList.length >
0) {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
),
], ],
), ),
), ),
@ -384,53 +450,91 @@ class _AdmissionRequestSecondScreenState
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton( child: Row(
title: TranslationBase.of(context).next, children: [
color: HexColor("#B8382B"), Expanded(
onPressed: () async { child: AppButton(
if (_estimatedCostController.text != "" && title: TranslationBase.of(context).previous,
_postPlansEstimatedCostController.text != "" && color: HexColor("#EAEAEA"),
_expectedDaysController.text != "" && fontColor: Colors.black,
_expectedAdmissionDate != null && onPressed: () {
_otherDepartmentsInterventionsController.text != "" && Navigator.pop(context);
_selectedFloor != null && },
_selectedRoomCategory != ),
null /*_selectedWard is not required*/) { ),
model.admissionRequestData = admissionRequest; SizedBox(
width: 10,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
color: HexColor("#D02127"),
onPressed: () async {
if (_estimatedCostController.text != "" &&
_postPlansEstimatedCostController.text != "" &&
_expectedDaysController.text != "" &&
_expectedAdmissionDate != null &&
_otherDepartmentsInterventionsController.text !=
"" &&
_selectedFloor != null &&
_selectedRoomCategory !=
null /*_selectedWard is not required*/ &&
_treatmentLineController.text != "" &&
_complicationsController.text != "" &&
_otherProceduresController.text != "" &&
_selectedAdmissionType != null) {
model.admissionRequestData = admissionRequest;
model.admissionRequestData.estimatedCost = model.admissionRequestData.estimatedCost =
int.parse(_estimatedCostController.text); int.parse(_estimatedCostController.text);
model.admissionRequestData.elementsForImprovement = model.admissionRequestData
_postPlansEstimatedCostController.text; .elementsForImprovement =
_postPlansEstimatedCostController.text;
model.admissionRequestData.expectedDays = model.admissionRequestData.expectedDays =
int.parse(_expectedDaysController.text); int.parse(_expectedDaysController.text);
model.admissionRequestData.admissionDate = model.admissionRequestData.admissionDate =
_expectedAdmissionDate.toIso8601String(); _expectedAdmissionDate.toIso8601String();
model.admissionRequestData model.admissionRequestData
.otherDepartmentInterventions = .otherDepartmentInterventions =
_otherDepartmentsInterventionsController.text; _otherDepartmentsInterventionsController.text;
model.admissionRequestData.admissionLocationID = model.admissionRequestData.admissionLocationID =
_selectedFloor['floorID']; _selectedFloor['floorID'];
model.admissionRequestData.wardID = model.admissionRequestData.wardID =
_selectedWard != null _selectedWard != null
? _selectedWard['nursingStationID'] ? _selectedWard['nursingStationID']
: 0; : 0;
model.admissionRequestData.roomCategoryID = model.admissionRequestData.roomCategoryID =
_selectedRoomCategory['categoryID']; _selectedRoomCategory['categoryID'];
model.admissionRequestData.admissionRequestProcedures = model.admissionRequestData
[]; .admissionRequestProcedures = [];
Navigator.of(context)
.pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: { model.admissionRequestData.mainLineOfTreatment =
'patient': patient, _treatmentLineController.text;
'admission-data': model.admissionRequestData model.admissionRequestData.complications =
}); _complicationsController.text;
} else { model.admissionRequestData.otherProcedures =
DrAppToastMsg.showErrorToast( _otherProceduresController.text;
TranslationBase.of(context).pleaseFill); model.admissionRequestData.admissionType =
} _selectedAdmissionType['id'];
},
Navigator.of(context).pushNamed(
PATIENT_ADMISSION_REQUEST_3,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'admission-data': model.admissionRequestData
});
} else {
DrAppToastMsg.showErrorToast(
TranslationBase.of(context).pleaseFill);
}
},
),
),
],
), ),
), ),
], ],

@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_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/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -34,22 +35,22 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
orderNo: widget.patientLabOrders.orderNo, orderNo: widget.patientLabOrders.orderNo,
patient: widget.patient), patient: widget.patient),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: true,
// appBarTitle: TranslationBase.of(context).labResults, appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: widget.patient,
patientType: widget.patientType??"0",
arrivalType: widget.arrivalType??"0",
orderNo: widget.patientLabOrders.orderNo,
appointmentDate:widget.patientLabOrders.orderDate,
doctorName: widget.patientLabOrders.doctorName,
profileUrl: widget.patientLabOrders.doctorImageURL,
invoiceNO: widget.patientLabOrders.invoiceNo,
),
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
PatientProfileHeaderWhitAppointment(patient: widget.patient,
patientType: widget.patientType??"0",
arrivalType: widget.arrivalType??"0",
orderNo: widget.patientLabOrders.orderNo,
appointmentDate:widget.patientLabOrders.orderDate,
doctorName: widget.patientLabOrders.doctorName,
profileUrl: widget.patientLabOrders.doctorImageURL,
invoiceNO: widget.patientLabOrders.invoiceNo,
),
...List.generate(model.patientLabSpecialResult.length, (index) => LaboratoryResultWidget( ...List.generate(model.patientLabSpecialResult.length, (index) => LaboratoryResultWidget(
onTap: () async { onTap: () async {

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart';
import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.dart'; import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.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-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_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
@ -34,7 +35,8 @@ class LabsHomePage extends StatelessWidget {
onModelReady: (model) => model.getLabs(patient), onModelReady: (model) => model.getLabs(patient),
builder: (context, ProcedureViewModel model, widget) => AppScaffold( builder: (context, ProcedureViewModel model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', patientType),
body: SingleChildScrollView( body: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: FractionallySizedBox( child: FractionallySizedBox(
@ -42,8 +44,6 @@ class LabsHomePage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
PatientProfileHeaderNewDesign(patient,
patient.patientType.toString() ?? '0', patientType),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -66,7 +66,7 @@ class LabsHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && patientType == '7') if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
addSelectedLabOrder(context, model, patient); addSelectedLabOrder(context, model, patient);

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.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_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -29,27 +30,25 @@ class RadiologyDetailsPage extends StatelessWidget {
lineItem: finalRadiology.invoiceLineItemNo, lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: finalRadiology.invoiceNo), invoiceNo: finalRadiology.invoiceNo),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBar: PatientProfileHeaderWhitAppointmentAppBar(
isShowAppBar: false, patient: patient,
patientType: patientType??"0",
arrivalType: arrivalType??"0",
orderNo: finalRadiology.orderNo.toString(),
appointmentDate:finalRadiology.orderDate,
doctorName: finalRadiology.doctorName,
profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(),
),
isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
PatientProfileHeaderWhitAppointment(patient: patient,
patientType: patientType??"0",
arrivalType: arrivalType??"0",
orderNo: finalRadiology.orderNo.toString(),
appointmentDate:finalRadiology.orderDate,
doctorName: finalRadiology.doctorName,
profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.2,
),
Container( Container(
margin: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
@ -60,21 +59,28 @@ class RadiologyDetailsPage extends StatelessWidget {
SizedBox(height: 5,), SizedBox(height: 5,),
Texts(TranslationBase.of(context).generalResult), Texts(TranslationBase.of(context).generalResult),
SizedBox(height: 5,), SizedBox(height: 5,),
Texts( Padding(
'${finalRadiology.reportData}', padding: const EdgeInsets.all(8.0),
textAlign: TextAlign.start, child: Texts(
fontSize: 17, '${finalRadiology.reportData.trim()}',
color: Colors.grey, textAlign: TextAlign.start,
fontSize: 17,
color: Colors.grey,
),
), ),
SizedBox(height: 25,), SizedBox(height: 25,),
Container( if(model.radImageURL.isNotEmpty)
width: MediaQuery.of(context).size.width * 0.8, Center(
child: Button( child: Container(
color: Colors.red, width: MediaQuery.of(context).size.width * 0.8,
onTap: () { child: Button(
launch(model.radImageURL);
}, color: Colors.red,
title: TranslationBase.of(context).openRad, onTap: () {
launch(model.radImageURL);
},
title: TranslationBase.of(context).openRad,
),
), ),
), ),
], ],

@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_
import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.dart'; import 'package:doctor_app_flutter/screens/procedures/add_radiology_order.dart';
import 'package:doctor_app_flutter/util/date-utils.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/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/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_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
@ -26,20 +27,19 @@ class RadiologyHomePage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProcedureViewModel model2 = ProcedureViewModel();
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient), onModelReady: (model) => model.getPatientRadOrders(patient),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: false, isShowAppBar: true,
// appBarTitle: TranslationBase.of(context).radiology, // appBarTitle: TranslationBase.of(context).radiology,
appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', arrivalType),
baseViewModel: model, baseViewModel: model,
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView( child: ListView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
children: <Widget>[ children: <Widget>[
PatientProfileHeaderNewDesign(
patient, patient.patientType.toString() ?? '0', patientType),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -62,7 +62,7 @@ class RadiologyHomePage extends StatelessWidget {
], ],
), ),
), ),
if (patientType != null && patientType == '7') if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell( InkWell(
onTap: () { onTap: () {
addSelectedRadiologyOrder(context, model, patient); addSelectedRadiologyOrder(context, model, patient);
@ -108,38 +108,26 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
), ),
...List.generate( ...List.generate(model.radiologyList.length, (index) => InkWell(
model.finalRadiologyList.length, onTap: () => Navigator.push(
(index) => AppExpandableNotifier( context,
title: model.finalRadiologyList[index].filterName, FadePage(
bodyWidget: Column( page: RadiologyDetailsPage(
crossAxisAlignment: CrossAxisAlignment.start, finalRadiology: model.radiologyList[index],
mainAxisAlignment: MainAxisAlignment.spaceBetween, patient: patient,
children: model ),
.finalRadiologyList[index].finalRadiologyList ),
.map((radiology) { ),
return InkWell( child: DoctorCard(
onTap: () => Navigator.push( doctorName: model.radiologyList[index].doctorName,
context, profileUrl: model.radiologyList[index].doctorImageURL,
FadePage( invoiceNO: '${model.radiologyList[index].invoiceNo}',
page: RadiologyDetailsPage( branch: '${model.radiologyList[index].projectName}',
finalRadiology: radiology, appointmentDate: model.radiologyList[index].orderDate,
patient: patient, orderNo: model.radiologyList[index].orderNo.toString(),
), ),
), )),
),
child: DoctorCard(
doctorName: radiology.doctorName,
profileUrl: radiology.doctorImageURL,
invoiceNO: '${radiology.invoiceNo}',
branch: '${radiology.projectName}',
appointmentDate: radiology.orderDate,
orderNo: radiology.orderNo.toString(),
),
);
}).toList(),
)),
)
], ],
), ),
), ),

@ -70,12 +70,14 @@ class MyReferralDetailScreen extends StatelessWidget {
color: Colors.black, //Colors.black, color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
AppText( Expanded(
(Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)), child: AppText(
fontSize: SizeConfig.textMultiplier * 3, (Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)),
fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier * 2.5,
backGroundcolor: Colors.white, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
), ),
model.patientArrivalList[0].patientDetails.gender == 1 model.patientArrivalList[0].patientDetails.gender == 1
? Icon( ? Icon(
@ -137,12 +139,15 @@ class MyReferralDetailScreen extends StatelessWidget {
referredOn: pendingReferral.referredOn, referredOn: pendingReferral.referredOn,
patientInfo: pendingReferral, patientInfo: pendingReferral,
), ),
SizedBox( Padding(
child: ProfileMedicalInfoWidgetSearch( padding: const EdgeInsets.symmetric(horizontal: 16),
patient: model.patientArrivalList[0], child: SizedBox(
patientType: "7", child: ProfileMedicalInfoWidgetSearch(
from: null, patient: model.patientArrivalList[0],
to: null, patientType: "7",
from: null,
to: null,
),
), ),
), ),
], ],

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.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/patient-referral-viewmodel.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
@ -9,6 +10,8 @@ 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/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.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.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.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/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -46,6 +49,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
referToList = List(); referToList = List();
dynamic sameBranch = { dynamic sameBranch = {
@ -66,46 +71,69 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: false,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
/*if (model.state == ViewState.BusyLocal)
Container(
color: Colors.white,
width: 50,
height: 50,
child: AppLoaderWidget(
containerColor: Colors.white,
)),*/
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(
const Divider( patient, patientType, arrivalType),
color: Color(0xffCCCCCC), Container(
height: 1, margin: EdgeInsets.all(16.0),
thickness: 2, child: Column(
indent: 0, crossAxisAlignment: CrossAxisAlignment.start,
endIndent: 0, children: [
AppText(
"${TranslationBase.of(context).refer}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
), ),
model.patientReferral.length == 0 model.patientReferral.length == 0
? ReferralForm(model, screenSize) ? referralForm(model, screenSize)
: PatientReferralItemWidget( : PatientReferralItemWidget(
"${model.patientReferral[model.patientReferral.length -1].patientID}", "${model.patientReferral[model.patientReferral.length - 1].patientID}",
patientName: model.patientReferral[model.patientReferral.length -1].patientName, patientName: model
.patientReferral[
model.patientReferral.length - 1]
.patientName,
referralStatus: referralStatus:
"${model.patientReferral[model.patientReferral.length -1].referralStatus}", "${model.patientReferral[model.patientReferral.length - 1].referralStatus}",
isReferredTo: true, isReferredTo: true,
isSameBranch: model isSameBranch: model
.patientReferral[model.patientReferral.length -1].isReferralDoctorSameBranch, .patientReferral[
referralDoctorName: model.patientReferral.length - 1]
model.patientReferral[model.patientReferral.length -1].referredByDoctorInfo, .isReferralDoctorSameBranch,
referralDoctorName: model
.patientReferral[
model.patientReferral.length - 1]
.referredByDoctorInfo,
clinicDescription: null, clinicDescription: null,
remark: model.patientReferral[model.patientReferral.length -1].remarksFromSource, remark: model
referredOn: model.patientReferral[model.patientReferral.length -1].referredOn, .patientReferral[
answerFromTarget: model.patientReferral.length - 1]
model.patientReferral[model.patientReferral.length -1].answerFromTarget, .remarksFromSource,
referredOn: model
.patientReferral[
model.patientReferral.length - 1]
.referredOn,
answerFromTarget: model
.patientReferral[
model.patientReferral.length - 1]
.answerFromTarget,
), ),
], ],
), ),
@ -114,7 +142,8 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton( child: AppButton(
title: TranslationBase.of(context).refer, title: TranslationBase.of(context).refer,
color: HexColor("#B8382B"), fontWeight: FontWeight.w700,
color: HexColor("#359846"),
onPressed: () { onPressed: () {
if (appointmentDate == null || if (appointmentDate == null ||
_selectedBranch == null || _selectedBranch == null ||
@ -145,262 +174,221 @@ class _PatientMakeReferralScreenState extends State<PatientMakeReferralScreen> {
); );
} }
Widget ReferralForm(PatientReferralViewModel model, Size screenSize) { Widget referralForm(PatientReferralViewModel model, Size screenSize) {
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 16), margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( AppTextFieldCustom(
height: 16, height: screenSize.height * 0.075,
), hintText: TranslationBase.of(context).branch,
AppText( dropDownText: _referTo != null ? _referTo['name'] : null,
TranslationBase.of(context).referPatient, enabled: false,
fontWeight: FontWeight.bold, isDropDown: true,
fontSize: 16, onClick: referToList != null
), ? () {
SizedBox( ListSelectDialog dialog = ListSelectDialog(
height: 16, list: referToList,
), attributeName: 'name',
Container( attributeValueId: 'id',
height: screenSize.height * 0.070, okText: TranslationBase.of(context).ok,
child: InkWell( okFunction: (selectedValue) {
onTap: referToList != null setState(() {
? () { _referTo = selectedValue;
ListSelectDialog dialog = ListSelectDialog( _selectedBranch = null;
list: referToList, _selectedClinic = null;
attributeName: 'name', _selectedDoctor = null;
attributeValueId: 'id', model.getDoctorBranch().then((value) async {
okText: TranslationBase.of(context).ok, _selectedBranch = value;
okFunction: (selectedValue) { if (_referTo['id'] == 1) {
setState(() { GifLoaderDialogUtils.showMyDialog(context);
_referTo = selectedValue; await model
_selectedBranch = null; .getClinics(_selectedBranch['facilityId'])
_selectedClinic = null; .then((_) =>
_selectedDoctor = null; GifLoaderDialogUtils.hideDialog(context));
model.getDoctorBranch().then((value) async { if (model.state == ViewState.ErrorLocal) {
_selectedBranch = value; DrAppToastMsg.showErrorToast(model.error);
if (_referTo['id'] == 1) {
GifLoaderDialogUtils.showMyDialog(context);
await model
.getClinics(_selectedBranch['facilityId'])
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(model.error);
}
} }
}); } else {
_selectedBranch = null;
}
}); });
}, });
); },
showDialog( );
barrierDismissible: false, showDialog(
context: context, barrierDismissible: false,
builder: (BuildContext context) { context: context,
return dialog; builder: (BuildContext context) {
}, return dialog;
); },
} );
: null, }
child: TextField( : null,
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).referTo,
_referTo != null ? _referTo['name'] : null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).hospital,
onTap: model.branchesList != null && dropDownText: _selectedBranch != null
model.branchesList.length > 0 && ? _selectedBranch['facilityName']
_referTo != null && : null,
_referTo['id'] == 2 enabled: false,
? () { isDropDown: true,
ListSelectDialog dialog = ListSelectDialog( onClick: model.branchesList != null &&
list: model.branchesList, model.branchesList.length > 0 &&
attributeName: 'facilityName', _referTo != null &&
attributeValueId: 'facilityId', _referTo['id'] == 2
okText: TranslationBase.of(context).ok, ? () {
okFunction: (selectedValue) { ListSelectDialog dialog = ListSelectDialog(
setState(() async { list: model.branchesList,
_selectedBranch = selectedValue; attributeName: 'facilityName',
_selectedClinic = null; attributeValueId: 'facilityId',
_selectedDoctor = null; okText: TranslationBase.of(context).ok,
GifLoaderDialogUtils.showMyDialog(context); okFunction: (selectedValue) {
await model setState(() async {
.getClinics(_selectedBranch['facilityId']) _selectedBranch = selectedValue;
.then((_) => _selectedClinic = null;
GifLoaderDialogUtils.hideDialog(context)); _selectedDoctor = null;
if (model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.showMyDialog(context);
DrAppToastMsg.showErrorToast(model.error); await model
} .getClinics(_selectedBranch['facilityId'])
}); .then((_) =>
}, GifLoaderDialogUtils.hideDialog(context));
); if (model.state == ViewState.ErrorLocal) {
showDialog( DrAppToastMsg.showErrorToast(model.error);
barrierDismissible: false, }
context: context, });
builder: (BuildContext context) { },
return dialog; );
}, showDialog(
); barrierDismissible: false,
} context: context,
: null, builder: (BuildContext context) {
child: TextField( return dialog;
decoration: Helpers.textFieldSelectorDecoration( },
TranslationBase.of(context).branch, );
_selectedBranch != null }
? _selectedBranch['facilityName'] : null,
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).clinic,
onTap: _selectedBranch != null && dropDownText: _selectedClinic != null
model.clinicsList != null && ? _selectedClinic['ClinicDescription']
model.clinicsList.length > 0 : null,
? () { enabled: false,
ListSelectDialog dialog = ListSelectDialog( isDropDown: true,
list: model.clinicsList, onClick: _selectedBranch != null &&
attributeName: 'ClinicDescription', model.clinicsList != null &&
attributeValueId: 'ClinicID', model.clinicsList.length > 0
usingSearch: true, ? () {
hintSearchText: ListSelectDialog dialog = ListSelectDialog(
TranslationBase.of(context).clinicSearch, list: model.clinicsList,
okText: TranslationBase.of(context).ok, attributeName: 'ClinicDescription',
okFunction: (selectedValue) { attributeValueId: 'ClinicID',
setState(() async { usingSearch: true,
_selectedDoctor = null; hintSearchText: TranslationBase.of(context).clinicSearch,
_selectedClinic = selectedValue; okText: TranslationBase.of(context).ok,
GifLoaderDialogUtils.showMyDialog(context); okFunction: (selectedValue) {
await model setState(() async {
.getClinicDoctors( _selectedDoctor = null;
_selectedClinic['ClinicID'].toString()) _selectedClinic = selectedValue;
.then((_) => GifLoaderDialogUtils.showMyDialog(context);
GifLoaderDialogUtils.hideDialog(context)); await model
if (model.state == ViewState.ErrorLocal) { .getClinicDoctors(
DrAppToastMsg.showErrorToast(model.error); _selectedClinic['ClinicID'].toString())
} .then((_) =>
}); GifLoaderDialogUtils.hideDialog(context));
}, if (model.state == ViewState.ErrorLocal) {
); DrAppToastMsg.showErrorToast(model.error);
showDialog( }
barrierDismissible: false, });
context: context, },
builder: (BuildContext context) { );
return dialog; showDialog(
}, barrierDismissible: false,
); context: context,
} builder: (BuildContext context) {
: null, return dialog;
child: TextField( },
decoration: Helpers.textFieldSelectorDecoration( );
TranslationBase.of(context).clinic, }
_selectedClinic != null : null,
? _selectedClinic['ClinicDescription']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).doctor,
onTap: _selectedClinic != null && dropDownText:
model.doctorsList != null && _selectedDoctor != null ? _selectedDoctor['DoctorName'] : null,
model.doctorsList.length > 0 enabled: false,
? () { isDropDown: true,
ListSelectDialog dialog = ListSelectDialog( onClick: _selectedClinic != null &&
list: model.doctorsList, model.doctorsList != null &&
attributeName: 'DoctorName', model.doctorsList.length > 0
attributeValueId: 'DoctorID', ? () {
usingSearch: true, ListSelectDialog dialog = ListSelectDialog(
hintSearchText: list: model.doctorsList,
TranslationBase.of(context).doctorSearch, attributeName: 'DoctorName',
okText: TranslationBase.of(context).ok, attributeValueId: 'DoctorID',
okFunction: (selectedValue) { usingSearch: true,
setState(() { hintSearchText: TranslationBase.of(context).doctorSearch,
_selectedDoctor = selectedValue; okText: TranslationBase.of(context).ok,
}); okFunction: (selectedValue) {
}, setState(() {
); _selectedDoctor = selectedValue;
showDialog( });
barrierDismissible: false, },
context: context, );
builder: (BuildContext context) { showDialog(
return dialog; barrierDismissible: false,
}, context: context,
); builder: (BuildContext context) {
} return dialog;
: null, },
child: TextField( );
decoration: Helpers.textFieldSelectorDecoration( }
TranslationBase.of(context).doctor, : null,
_selectedDoctor != null
? _selectedDoctor['DoctorName']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).date,
onTap: () => _selectDate(context, model), dropDownText: appointmentDate != null
child: TextField( ? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}"
decoration: Helpers.textFieldSelectorDecoration( : null,
TranslationBase.of(context).chooseAppointment, enabled: false,
appointmentDate != null isDropDown: true,
? "${DateUtils.convertDateToFormat(appointmentDate, "yyyy-MM-dd")}" suffixIcon: Icon(
: null, Icons.calendar_today,
true, color: Colors.black,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
), ),
onClick: (){
_selectDate(context, model);
},
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText:
decoration: Helpers.textFieldSelectorDecoration( TranslationBase.of(context).dietTypeRemarks,
TranslationBase.of(context).remarks, null, false),
enabled: true,
controller: _remarksController, controller: _remarksController,
// inputFormatters: [ inputType: TextInputType.multiline,
// FilteringTextInputFormatter.allow(RegExp(ONLY_LETTERS))
// ],
keyboardType: TextInputType.text,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), ),
], ],
), ),
); );

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sig
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_item_details_screen.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-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/patients/profile/patient_profile_header_with_appointment_card_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:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
@ -38,6 +39,11 @@ class VitalSignDetailsScreen extends StatelessWidget {
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: mode, baseViewModel: mode,
/* appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
),*/
appBarTitle: TranslationBase.of(context).vitalSign, appBarTitle: TranslationBase.of(context).vitalSign,
body: mode.patientVitalSignsHistory.length > 0 body: mode.patientVitalSignsHistory.length > 0
? Column( ? Column(
@ -66,7 +72,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
), ),
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.21, height: MediaQuery.of(context).size.height * 0.23,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12.0), padding: EdgeInsets.all(12.0),
margin: EdgeInsets.symmetric(horizontal: 16.0), margin: EdgeInsets.symmetric(horizontal: 16.0),
@ -108,16 +114,16 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText( AppText(
"${TranslationBase.of(context).bmiUnderWeight}", "${TranslationBase.of(context).bmiUnderWeight}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.15,
color: mode.getBMIStatus() == 1 color: mode.getBMIStatus() == 1
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
AppText( AppText(
"(1-10)", "(<18.5)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.15,
color: mode.getBMIStatus() == 1 color: mode.getBMIStatus() == 1
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
@ -139,19 +145,21 @@ class VitalSignDetailsScreen extends StatelessWidget {
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
AppText( Container(
"${TranslationBase.of(context).bmiHealthy}", child: AppText(
fontFamily: 'Poppins', "${TranslationBase.of(context).normal}",
fontSize: SizeConfig.textMultiplier * 1.4, fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontSize: SizeConfig.textMultiplier * 1.15,
color: mode.getBMIStatus() == 2 fontWeight: FontWeight.w700,
? Color(0XFFD02127) color: mode.getBMIStatus() == 2
: null, ? Color(0XFFD02127)
: null,
),
), ),
AppText( AppText(
"(11-20)", "(18.5-24.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 2 color: mode.getBMIStatus() == 2
? Color(0XFFD02127) ? Color(0XFFD02127)
@ -176,16 +184,16 @@ class VitalSignDetailsScreen extends StatelessWidget {
AppText( AppText(
"${TranslationBase.of(context).bmiOverWeight}", "${TranslationBase.of(context).bmiOverWeight}",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.155,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 3 color: mode.getBMIStatus() == 3
? Color(0XFFD02127) ? Color(0XFFD02127)
: null, : null,
), ),
AppText( AppText(
"(21-30)", "(25-29.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.155,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 3 color: mode.getBMIStatus() == 3
? Color(0XFFD02127) ? Color(0XFFD02127)
@ -195,38 +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.4, 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(
"(31-40>)", "(30-34.9)",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, 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(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
mode.getBMIStatus() != 5
? '${assetBasePath}Obese_BMI.png'
: '${assetBasePath}Obese_BMI-r.png',
height:
MediaQuery.of(context).size.height * 0.10,
),
const SizedBox(
height: 4,
),
FittedBox(
fit: BoxFit.fitWidth,
child: AppText(
"${TranslationBase.of(context).bmiObeseExtreme} fdsd",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
),
AppText(
"(35<)",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.15,
fontWeight: FontWeight.w700,
color: mode.getBMIStatus() == 4
? Color(0XFFD02127)
: null,
),
],
)),
], ],
) )
], ],

@ -50,17 +50,19 @@ class VitalSignItem extends StatelessWidget {
AppText( AppText(
"$lastVal", "$lastVal",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
margin: 0, margin: 0,
), ),
AppText( Expanded(
"$unit", child: AppText(
fontFamily: 'Poppins', "$unit",
fontSize: SizeConfig.textMultiplier * 1.3, fontFamily: 'Poppins',
fontWeight: FontWeight.w700, fontSize: SizeConfig.textMultiplier * 1.2,
color: HexColor('#B8382C'), fontWeight: FontWeight.w700,
margin: 0, color: HexColor('#B8382C'),
margin: 0,
),
), ),
], ],
), ),
@ -85,7 +87,7 @@ class VitalSignItem extends StatelessWidget {
child: AppText( child: AppText(
"$des", "$des",
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.5, fontSize: SizeConfig.textMultiplier * 1.3,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),

@ -80,6 +80,7 @@ postProcedure(
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else if (model.state == ViewState.Idle) { } else if (model.state == ViewState.Idle) {
model.getPrescriptions(patient);
DrAppToastMsg.showSuccesToast('Medication has been added'); DrAppToastMsg.showSuccesToast('Medication has been added');
} }
} }
@ -217,8 +218,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
FocusScope.of(context).requestFocus(new FocusNode()); FocusScope.of(context).requestFocus(new FocusNode());
}, },
child: DraggableScrollableSheet( child: DraggableScrollableSheet(
initialChildSize: 0.90, initialChildSize: 0.98,
maxChildSize: 0.90, maxChildSize: 0.98,
minChildSize: 0.9, minChildSize: 0.9,
builder: builder:
(BuildContext context, ScrollController scrollController) { (BuildContext context, ScrollController scrollController) {
@ -233,25 +234,30 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
//mainAxisAlignment: MainAxisAlignment.spaceEvenly, //mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Row( Column(
children: [ children: [
AppText( Row(
'New Prescription Order', children: [
fontWeight: FontWeight.w700, InkWell(
fontSize: 20, child: Icon(
Icons.close,
size: 24.0,
),
onTap: () {
Navigator.pop(context);
},
),
],
), ),
SizedBox( Row(
width: MediaQuery.of(context).size.width * 0.32, children: [
AppText(
'New Prescription Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
), ),
InkWell(
child: Icon(
Icons.close,
size: 23.0,
),
onTap: () {
Navigator.pop(context);
},
)
], ],
), ),
SizedBox( SizedBox(
@ -510,15 +516,15 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
} }
: null, : null,
child: TextField( child: TextField(
decoration: decoration:
textFieldSelectorDecoration( textFieldSelectorDecoration(
'UNIT', 'UNIT',
units != null units != null
? units['description'] ? units[
: null, 'description']
true), : null,
enabled: false, true),
), enabled: false),
), ),
), ),
], ],

@ -5,9 +5,13 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_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/screens/prescription/prescription_details_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_details_page.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.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';
import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -15,7 +19,9 @@ import 'package:flutter/material.dart';
class PrescriptionItemsPage extends StatelessWidget { class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions; final Prescriptions prescriptions;
final PatiantInformtion patient; final PatiantInformtion patient;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient}); final String patientType;
final String arrivalType;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient, this.patientType, this.arrivalType});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -24,198 +30,178 @@ class PrescriptionItemsPage extends StatelessWidget {
model.getPrescriptionReport(prescriptions: prescriptions,patient: patient), model.getPrescriptionReport(prescriptions: prescriptions,patient: patient),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions,
baseViewModel: model, baseViewModel: model,
appBar: PatientProfileHeaderWhitAppointmentAppBar(
patient: patient,
patientType: patientType??"0",
arrivalType: arrivalType??"0",
branch: '',
clinic: prescriptions.clinicDescription,
isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
doctorName: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL,
),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white,
),
margin: EdgeInsets.all(12),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(left: 18,right: 18),
child: Texts('Name ',bold: true,)),
Row(
children: [
SizedBox(width: 18,),
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(width: 0.5,color: Colors.grey)
),
height: 45,
width: 45,
),
SizedBox(width: 10,),
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Route: Monthly'),
Texts('Does: 2 Time a day with 1 hour gap'),
SizedBox(height: 12,),
Texts('Note: 2 Time a day with 1 hour gap'),
],
),)
],
)
],
),
),
),
if (!prescriptions.isInOutPatient) if (!prescriptions.isInOutPatient)
...List.generate( ...List.generate(
model.prescriptionReportList.length, model.prescriptionReportList.length,
(index) => InkWell( (index) => Container(
onTap: () => Navigator.push( decoration: BoxDecoration(
context, borderRadius: BorderRadius.circular(12),
FadePage( color: Colors.white,
page: PrescriptionDetailsPage(
prescriptionReport:
model.prescriptionReportList[index],
),
),
), ),
child: Container( margin: EdgeInsets.all(12),
width: double.infinity, child: Padding(
margin: padding: const EdgeInsets.all(8.0),
EdgeInsets.only(top: 10, left: 10, right: 10), child: Column(
padding: EdgeInsets.all(8.0), crossAxisAlignment: CrossAxisAlignment.start,
decoration: BoxDecoration( children: [
color: Colors.white, Container(
borderRadius: BorderRadius.all( margin: EdgeInsets.only(left: 18,right: 18),
Radius.circular(10.0), child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)),
), SizedBox(height: 12,),
border: Border.all( Row(
color: Colors.grey[200], width: 0.5), children: [
), SizedBox(width: 18,),
child: Row( Container(
children: <Widget>[ decoration: BoxDecoration(
ClipRRect( shape: BoxShape.circle,
borderRadius: border: Border.all(width: 0.5,color: Colors.grey)
BorderRadius.all(Radius.circular(5)), ),
child: Image.network( height: 55,
model.prescriptionReportList[index] width: 55,
.imageSRCUrl, child: InkWell(
fit: BoxFit.cover, onTap: (){
width: 60, showDialog(
height: 70, context: context,
), child: ShowImageDialog(
), imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
SizedBox( )
width: 10, );
), },
Expanded( child: Padding(
child: Padding( padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0), child: Image.network(
child: Center( model.prescriptionReportList[index].imageSRCUrl,
child: Texts(model fit: BoxFit.cover,
.prescriptionReportList[index] ),
.itemDescription ),
.isNotEmpty ),
? model.prescriptionReportList[index] ),
.itemDescription SizedBox(width: 10,),
: model.prescriptionReportList[index] Expanded(child: Column(
.itemDescriptionN)), crossAxisAlignment: CrossAxisAlignment.start,
)), children: [
Icon( Row(
Icons.arrow_forward_ios, children: [
size: 18, Texts(TranslationBase.of(context).route,color: Colors.grey,),
color: Colors.grey[500], Expanded(child: Texts(model.prescriptionReportList[index].routeN)),
],
),
Row(
children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportList[index].frequencyN ?? ''),
],
),
SizedBox(height: 12,),
Texts(model.prescriptionReportList[index].remarks ?? ''),
],
),)
],
) )
], ],
), ),
), ),
)) ))
else else
...List.generate( ...List.generate(
model.prescriptionReportEnhList.length, model.prescriptionReportEnhList.length,
(index) => InkWell( (index) => Container(
onTap: () { decoration: BoxDecoration(
PrescriptionReport prescriptionReport = borderRadius: BorderRadius.circular(12),
PrescriptionReport( color: Colors.white,
imageSRCUrl: model ),
.prescriptionReportEnhList[index].imageSRCUrl, margin: EdgeInsets.all(12),
itemDescription: model child: Padding(
.prescriptionReportEnhList[index] padding: const EdgeInsets.all(8.0),
.itemDescription, child: Column(
itemDescriptionN: model crossAxisAlignment: CrossAxisAlignment.start,
.prescriptionReportEnhList[index] children: [
.itemDescription, Container(
routeN: margin: EdgeInsets.only(left: 18,right: 18),
model.prescriptionReportEnhList[index].route, child: Texts(model.prescriptionReportEnhList[index].itemDescription,bold: true,),),
frequency: model SizedBox(height: 12,),
.prescriptionReportEnhList[index].frequency, Row(
frequencyN: model mainAxisAlignment: MainAxisAlignment.start,
.prescriptionReportEnhList[index].frequency, crossAxisAlignment: CrossAxisAlignment.center,
doseDailyQuantity: model children: [
.prescriptionReportEnhList[index] SizedBox(width: 18,),
.doseDailyQuantity, Container(
days: model.prescriptionReportEnhList[index].days, decoration: BoxDecoration(
itemID: shape: BoxShape.circle,
model.prescriptionReportEnhList[index].itemID, border: Border.all(width: 0.5,color: Colors.grey)
remarks: model ),
.prescriptionReportEnhList[index].remarks); height: 55,
Navigator.push( width: 55,
context, child: InkWell(
FadePage( onTap: (){
page: PrescriptionDetailsPage( showDialog(
prescriptionReport: prescriptionReport, context: context,
), child: ShowImageDialog(
imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
)
);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
),
),
),
),
SizedBox(width: 10,),
Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')),
],
),
Row(
children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportEnhList[index].frequency ?? ''),
],
),
SizedBox(height: 12,),
Texts(model.prescriptionReportEnhList[index].remarks?? ''),
],
),)
],
)
],
), ),
);
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model
.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.prescriptionReportEnhList[index]
.itemDescription),
],
),
),
),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
), ),
), ),
), ),
),
], ],
), ),
@ -225,3 +211,6 @@ class PrescriptionItemsPage extends StatelessWidget {
); );
} }
} }

@ -1,11 +1,14 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/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/screens/prescription/add_prescription_form.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart';
import 'package:doctor_app_flutter/util/date-utils.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/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/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_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
@ -17,7 +20,6 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget { class PrescriptionsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -25,32 +27,44 @@ class PrescriptionsPage extends StatelessWidget {
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescriptions(patient), onModelReady: (model) => model.getPrescriptions(patient),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType),
body: FractionallySizedBox( body: FractionallySizedBox(
widthFactor: 1.0, widthFactor: 1.0,
child: ListView( child: ListView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
children: <Widget>[ children: <Widget>[
PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), SizedBox(
SizedBox(height: 12,), height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts('Order',style: "caption2",color: Colors.black,fontSize: 13,), Texts(
Texts('Prescriptions',bold: true,fontSize: 22,), 'Order',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Prescriptions',
bold: true,
fontSize: 22,
),
], ],
), ),
), ),
if(patientType!=null && patientType=='7') if (patientType != null && patientType == '7' && patient.patientStatusType == 43)
InkWell( InkWell(
onTap: (){ onTap: () {
//TODO Hussam call the add page here addPrescriptionForm(
context, model, patient, model.prescriptionList);
}, },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
@ -73,39 +87,55 @@ class PrescriptionsPage extends StatelessWidget {
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child: Center( child: Center(
child: Icon(Icons.add,color: Colors.white,), child: Icon(
Icons.add,
color: Colors.white,
),
), ),
), ),
SizedBox(height: 10,), SizedBox(
Texts('Apply for New Prescriptions Order',color: Colors.grey[600],fontWeight: FontWeight.w600,) height: 10,
),
Texts(
'Apply for New Prescriptions Order',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
], ],
), ),
), ),
), ),
), ),
), ),
...List.generate(model.prescriptionsList.length, (index) => InkWell( ...List.generate(
onTap: () => Navigator.push( model.prescriptionsList.length,
context, (index) => InkWell(
FadePage( onTap: () => Navigator.push(
page: PrescriptionItemsPage( context,
prescriptions: model.prescriptionsList[index], FadePage(
patient: patient, page: PrescriptionItemsPage(
), prescriptions:
), model.prescriptionsList[index],
), patient: patient,
child: DoctorCard( patientType: patientType,
doctorName: model.prescriptionsList[index].doctorName, arrivalType: arrivalType,
profileUrl: model.prescriptionsList[index].doctorImageURL, ),
branch: model.prescriptionsList[index].name, ),
appointmentDate: DateUtils.getDateTimeFromServerFormat(model.prescriptionsList[index].appointmentDate,), ),
orderNo: model.prescriptionsList[index].appointmentNo.toString(), child: DoctorCard(
invoiceNO:model.prescriptionsList[index].appointmentNo.toString(), doctorName:
model.prescriptionsList[index].doctorName,
) profileUrl:
model.prescriptionsList[index].doctorImageURL,
)) branch: model.prescriptionsList[index].name,
clinic: model
.prescriptionsList[index].clinicDescription,
isPrescriptions: true,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index].appointmentDate,
),
)))
], ],
), ),
), ),

@ -0,0 +1,142 @@
import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_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/shared/Text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ProcedureCard extends StatelessWidget {
final Function onTap;
final EntityList entityList;
const ProcedureCard({Key key, this.onTap, this.entityList}) : super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
width: double.maxFinite,
height: MediaQuery.of(context).size.height * .22,
margin: EdgeInsets.all(10),
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: MediaQuery.of(context).size.height * .20,
width: 5,
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color: entityList.orderType == 1
? Colors.red[500]
: Colors.black,
),
),
Expanded(
child: Container(
padding: EdgeInsets.only(
left: projectViewModel.isArabic ? 0 : 15,
right: projectViewModel.isArabic ? 15 : 0),
child: InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
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: [
Texts(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}',
color: Colors.black,
fontWeight: FontWeight.w600,
fontSize: 14,
),
Texts(
'${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}',
fontWeight: FontWeight.w600,
color: Colors.grey[700],
fontSize: 14,
),
],
),
],
),
Row(
children: [
Texts(
TranslationBase.of(context).orderNo,
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,
),
),
),
],
),
),
),
);
}
}

@ -156,10 +156,31 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( Column(
'Please Select Category', children: [
fontWeight: FontWeight.w900, Row(
fontSize: 15.0, children: [
InkWell(
child: Icon(
Icons.close,
size: 24.0,
),
onTap: () {
Navigator.pop(context);
},
),
],
),
Row(
children: [
AppText(
'Please Select Category',
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
],
), ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,

@ -157,10 +157,31 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( Column(
'New Lab Order', children: [
fontWeight: FontWeight.w900, Row(
fontSize: 18.0, children: [
InkWell(
child: Icon(
Icons.close,
size: 24.0,
),
onTap: () {
Navigator.pop(context);
},
),
],
),
Row(
children: [
AppText(
'New Radiology Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
],
), ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,

@ -157,10 +157,31 @@ class _AddSelectedRadiologyOrderState extends State<AddSelectedRadiologyOrder> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( Column(
'New Radiology Order', children: [
fontWeight: FontWeight.w900, Row(
fontSize: 18.0, children: [
InkWell(
child: Icon(
Icons.close,
size: 24.0,
),
onTap: () {
Navigator.pop(context);
},
),
],
),
Row(
children: [
AppText(
'New Radiology Order',
fontWeight: FontWeight.w700,
fontSize: 20,
),
],
),
],
), ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,

@ -7,601 +7,149 @@ 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.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';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ProcedureScreen extends StatefulWidget { import 'ProcedureCard.dart';
@override
_ProcedureScreenState createState() => _ProcedureScreenState();
}
class _ProcedureScreenState extends State<ProcedureScreen> {
int selectedType = 0;
int testNum = 1;
PatiantInformtion patient;
setSelectedType(int val) {
setState(() {
selectedType = val;
});
}
TextEditingController procedureController = TextEditingController();
class ProcedureScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
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: true, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).orderProcedure, appBarTitle: TranslationBase.of(context).orderProcedure,
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PatientProfileHeaderNewDesign(
patient, arrivalType ?? '0', patientType),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientPageHeaderWidget(patient), Texts(
Divider( 'Order Test or',
height: 1.0, style: "caption2",
thickness: 1.0, color: Colors.black,
color: Colors.grey, fontSize: 13,
),
Texts(
'Procedure',
bold: true,
fontSize: 22,
), ),
(model.procedureList.length != 0)
? SizedBox(
height: model.procedureList[0].rowcount == 0
? 200.0
: 10.0)
: SizedBox(height: 200.0),
//model.prescriptionList == null
(model.procedureList.length != 0)
? model.procedureList[0].rowcount == 0
? Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: () {
model
.getProcedureCategory()
.then((value) {
addSelectedProcedure(
context, model, patient);
});
//model.postPrescription();
},
child: CircleAvatar(
radius: 65,
backgroundColor: Color(0XFFB8382C),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.white,
child: Icon(
Icons.add,
color: Colors.black,
size: 45.0,
),
),
),
),
SizedBox(
height: 15.0,
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
'NO ORDER FOR PROCEDURE LISTED',
color: Colors.black,
fontWeight: FontWeight.w900,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).addNow,
color: Color(0XFFB8382C),
fontWeight: FontWeight.w700,
),
],
),
],
)
: Padding(
padding: EdgeInsets.all(16.0),
child: NetworkBaseView(
baseViewModel: model,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
InkWell(
child: Container(
height: 50.0,
width: 450.0,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.grey),
borderRadius:
BorderRadius.circular(10.0),
),
child: Padding(
padding: EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
TranslationBase.of(
context)
.addMoreProcedure,
fontWeight:
FontWeight.w100,
fontSize: 12.5,
),
Icon(
Icons.add,
color: Color(0XFFB8382C),
)
],
),
),
),
onTap: () {
model
.getProcedureCategory()
.then((value) {
addSelectedProcedure(
context, model, patient);
});
//model.postPrescription();
},
),
// Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(
// Radius.circular(6.0)),
// border: Border.all(
// width: 1.0,
// color: HexColor("#CCCCCC"))),
// child: AppTextFormField(
// labelText: 'Add more procedure',
// borderColor: Colors.white,
// //suffixIcon: Icons.search,
//
// //textInputType: TextInputType.number,
// inputFormatter: ONLY_NUMBERS,
// onTap: () {
// addSelectedProcedure(context);
// },
// ),
// ),
SizedBox(
height: 10.0,
),
...List.generate(
model.procedureList[0].rowcount,
(index) => Container(
color: Colors.white,
child: Column(
children: [
SizedBox(
height:
MediaQuery.of(context)
.size
.height *
0.022,
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Container(
height: MediaQuery.of(
context)
.size
.height *
0.18,
width: MediaQuery.of(
context)
.size
.width *
0.135,
child: Column(
children: [
AppText(
DateTime.parse(model
.procedureList[
0]
.entityList[
index]
.orderDate)
.year
.toString(),
color: model
.procedureList[
0]
.entityList[
index]
.orderType ==
1
? Color(
0xFFB9382C)
: Colors
.green),
AppText(
Helpers.getMonth(model.procedureList[0].entityList[index].orderDate !=
null
? (DateTime.parse(model.procedureList[0].entityList[index].orderDate)
.month)
: DateTime.now()
.month)
.toUpperCase(),
color: model
.procedureList[
0]
.entityList[
index]
.orderType ==
1
? Color(
0xFFB9382C)
: Colors
.green),
AppText(
DateTime.parse(model
.procedureList[
0]
.entityList[
index]
.orderDate)
.day
.toString(),
color: model
.procedureList[
0]
.entityList[
index]
.orderType ==
1
? Color(
0xFFB9382C)
: Colors
.green),
],
),
),
Expanded(
child: Container(
width: MediaQuery.of(
context)
.size
.width *
0.05,
child: Column(
children: [
Row(
children: [
AppText(
TranslationBase.of(context)
.codeNo +
" : ",
fontWeight:
FontWeight
.w700,
fontSize:
13.0,
),
AppText(
model
.procedureList[
0]
.entityList[
index]
.procedureId
.toString(),
fontSize:
12.0,
),
SizedBox(
width: 12.0,
),
AppText(
TranslationBase.of(context)
.orderType +
" : ",
fontWeight:
FontWeight
.w700,
fontSize:
13.0,
),
Expanded(
child: AppText(
model.procedureList[0].entityList[index].orderType ==
0
? 'Routine'
: 'Urgent',
fontSize:
13.5,
color: model.procedureList[0].entityList[index].orderType ==
1
? Color(0xFFB9382C)
: Colors.green),
),
],
),
Row(
children: [
AppText(
'Order.NO' +
" : ",
fontWeight:
FontWeight
.w700,
fontSize:
15.0,
),
AppText(
model
.procedureList[
0]
.entityList[
index]
.orderNo
.toString(),
fontSize:
13.0,
),
],
),
Row(
children: [
Container(
child:
Expanded(
child:
AppText(
model
.procedureList[0]
.entityList[index]
.procedureName,
fontWeight:
FontWeight.w800,
),
),
)
],
),
Row(
children: [
// AppText(
// TranslationBase.of(context)
// .price +
// " : ",
// fontWeight:
// FontWeight
// .w700,
// ),
// Expanded(
// child: AppText(
// model
// .procedureList[
// 0]
// .entityList[
// index]
// .price
// .toString(),
// fontSize:
// 13.0),
// )
],
),
SizedBox(
height: 10.0,
),
Row(
children: [
Expanded(
child:
Container(
height: MediaQuery.of(context)
.size
.height *
0.047,
width: MediaQuery.of(context)
.size
.width *
0.10,
child:
AppText(
model.procedureList[0].entityList[index].remarks !=
null
? model.procedureList[0].entityList[index].remarks.toString()
: "",
fontSize:
11.5,
),
),
),
],
),
SizedBox(
height: 20.0,
),
// SizedBox(
// height: 40,
// ),
],
),
),
),
Container(
child: Column(
children: [
InkWell(
child: Icon(
Icons.edit),
onTap: () {
// model
// .updateProcedure();
if (model.procedureList[0].entityList[index].categoryID == 02 ||
model
.procedureList[
0]
.entityList[
index]
.categoryID ==
03 ||
model
.procedureList[0]
.entityList[index]
.categoryID ==
55) {
updateProcedureForm(
context,
limetNo: model
.procedureList[
0]
.entityList[
index]
.lineItemNo,
model:
model,
orderNo: model
.procedureList[
0]
.entityList[
index]
.orderNo,
remarks: model
.procedureList[
0]
.entityList[
index]
.remarks,
procedureName: model
.procedureList[
0]
.entityList[
index]
.procedureName,
patient:
patient,
procedureId: model
.procedureList[
0]
.entityList[
index]
.procedureId,
categoreId: model
.procedureList[
0]
.entityList[
index]
.categoryID
.toString());
} else {
helpers.showErrorToast(
'You cant Update this Procedure');
}
},
)
],
),
),
],
),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
),
],
),
),
),
],
),
),
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: () {
model
.getProcedureCategory()
.then((value) {
addSelectedProcedure(
context, model, patient);
});
//model.postPrescription();
},
child: CircleAvatar(
radius: 65,
backgroundColor: Color(0XFFB8382C),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.white,
child: Icon(
Icons.add,
color: Colors.black,
size: 45.0,
),
),
),
),
SizedBox(
height: 15.0,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
'NO ORDER FOR PROCEDURE LISTED',
color: Colors.black,
fontWeight: FontWeight.w900,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
TranslationBase.of(context).addNow,
color: Color(0XFFB8382C),
fontWeight: FontWeight.w700,
),
],
),
],
)
], ],
), ),
), ),
), if (patientType != null && patientType == '7')
)), InkWell(
onTap: () {
addSelectedProcedure(context, model, patient);
},
child: Container(
width: double.maxFinite,
height: 140,
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.grey[300],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Container(
height: 90,
child: Column(
children: [
Container(
height: 40,
width: 40,
decoration: BoxDecoration(
color: Colors.grey[600],
borderRadius: BorderRadius.circular(10),
),
child: Center(
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
SizedBox(
height: 10,
),
Texts(
'Add More Procedure',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
],
),
),
),
),
),
if (model.procedureList.isNotEmpty)
...List.generate(
model.procedureList[0].rowcount,
(index) => ProcedureCard(
entityList: model.procedureList[0].entityList[index],
onTap: () {
if (model.procedureList[0].entityList[index]
.categoryID ==
2 ||
model.procedureList[0].entityList[index]
.categoryID ==
4) {
updateProcedureForm(context,
model: model,
patient: patient,
remarks: model
.procedureList[0].entityList[index].remarks,
orderType: model.procedureList[0]
.entityList[index].orderType
.toString(),
orderNo: model
.procedureList[0].entityList[index].orderNo,
procedureName: model.procedureList[0]
.entityList[index].procedureName,
categoreId: model.procedureList[0]
.entityList[index].categoryID
.toString(),
procedureId: model.procedureList[0]
.entityList[index].procedureId,
limetNo: model.procedureList[0]
.entityList[index].lineItemNo);
} else
helpers.showErrorToast(
'You Cant Update This Procedure');
},
),
),
],
),
),
),
),
),
); );
} }
} }

@ -102,241 +102,245 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
(BuildContext context, ProcedureViewModel model, Widget child) => (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: DraggableScrollableSheet( child: SingleChildScrollView(
minChildSize: 0.90, child: Container(
initialChildSize: 0.95, height: MediaQuery.of(context).size.height * 0.65,
maxChildSize: 1.0, child: Form(
builder: child: Padding(
(BuildContext context, ScrollController scrollController) { padding:
return SingleChildScrollView( EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
child: Container( child: Column(
height: MediaQuery.of(context).size.height * 1.20, crossAxisAlignment: CrossAxisAlignment.start,
child: Form( children: [
child: Padding( AppText(
padding: EdgeInsets.symmetric( widget.procedureName.toUpperCase(),
horizontal: 20.0, vertical: 10.0), fontWeight: FontWeight.w700,
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, SizedBox(
height: 30.0,
),
// Container(
// height: screenSize.height * 0.070,
// child: InkWell(
// onTap: model.categoryList != null &&
// model.categoryList.length > 0
// ? () {
// ListSelectDialog dialog =
// ListSelectDialog(
// list: model.categoryList,
// attributeName: 'categoryName',
// attributeValueId: 'categoryId',
// okText:
// TranslationBase.of(context).ok,
// okFunction: (selectedValue) {
// setState(() {
// selectedCategory =
// selectedValue;
// model.getProcedureCategory(
// categoryName:
// selectedCategory[
// 'categoryName'],
// categoryID: selectedCategory[
// 'categoryId'] <=
// 9
// ? "0" +
// selectedCategory[
// 'categoryId']
// .toString()
// : selectedCategory[
// 'categoryId']
// .toString());
// });
// },
// );
// showDialog(
// barrierDismissible: false,
// context: context,
// builder: (BuildContext context) {
// return dialog;
// },
// );
// //model.getProcedureCategory();
// }
// : null,
// child: TextField(
// decoration: textFieldSelectorDecoration(
// TranslationBase.of(context)
// .procedureCategorise,
// selectedCategory != null
// ? selectedCategory['categoryName']
// : null,
// true,
// suffixIcon: Icon(
// Icons.search,
// color: Colors.black,
// )),
// enabled: false,
// ),
// ),
// ),
// if (widget.model.categoriesList.length != 0)
// NetworkBaseView(
// baseViewModel: model,
// child: selectedCategory != null
// ? selectedCategory['categoryId'] ==
// 02 ||
// selectedCategory[
// 'categoryId'] ==
// 03 ||
// selectedCategory[
// 'categoryId'] ==
// 55
// ? EntityListCheckboxSearchWidget(
// model: widget.model,
// masterList: widget
// .model
// .categoriesList[0]
// .entityList,
// removeHistory: (item) {
// setState(() {
// entityList.remove(item);
// });
// },
// addHistory: (history) {
// setState(() {
// entityList.add(history);
// });
// },
// addSelectedHistories: () {
// //TODO build your fun herr
// // widget.addSelectedHistories();
// },
// isEntityListSelected:
// (master) =>
// isEntityListSelected(
// master),
// )
// : ProcedureListWidget(
// model: widget.model,
// masterList: widget
// .model
// .categoriesList[0]
// .entityList,
// removeHistory: (item) {
// setState(() {
// entityList.remove(item);
// });
// },
// addHistory: (history) {
// setState(() {
// entityList.add(history);
// });
// },
// addSelectedHistories: () {
// //TODO build your fun herr
// // widget.addSelectedHistories();
// },
// isEntityListSelected:
// (master) =>
// isEntityListSelected(
// master),
// )
// : null),
Container(
child: Row(
children: [ children: [
AppText( AppText(TranslationBase.of(context).orderType),
widget.procedureName.toUpperCase(), Radio(
fontWeight: FontWeight.w700, activeColor: Color(0xFFB9382C),
), value: 0,
SizedBox( groupValue: selectedType,
height: 30.0, onChanged: (value) {
), setSelectedType(value);
Container( },
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.categoryList != null &&
model.categoryList.length > 0
? () {
ListSelectDialog dialog =
ListSelectDialog(
list: model.categoryList,
attributeName: 'categoryName',
attributeValueId: 'categoryId',
okText:
TranslationBase.of(context).ok,
okFunction: (selectedValue) {
setState(() {
selectedCategory =
selectedValue;
model.getProcedureCategory(
categoryName:
selectedCategory[
'categoryName'],
categoryID: selectedCategory[
'categoryId'] <=
9
? "0" +
selectedCategory[
'categoryId']
.toString()
: selectedCategory[
'categoryId']
.toString());
});
},
);
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return dialog;
},
);
//model.getProcedureCategory();
}
: null,
child: TextField(
decoration: textFieldSelectorDecoration(
TranslationBase.of(context)
.procedureCategorise,
selectedCategory != null
? selectedCategory['categoryName']
: null,
true,
suffixIcon: Icon(
Icons.search,
color: Colors.black,
)),
enabled: false,
),
),
), ),
if (widget.model.categoriesList.length != 0) Text('routine'),
NetworkBaseView( Radio(
baseViewModel: model, activeColor: Color(0xFFB9382C),
child: selectedCategory != null groupValue: selectedType,
? selectedCategory['categoryId'] == value: 1,
02 || onChanged: (value) {
selectedCategory[ setSelectedType(value);
'categoryId'] == },
03 ||
selectedCategory[
'categoryId'] ==
55
? EntityListCheckboxSearchWidget(
model: widget.model,
masterList: widget
.model
.categoriesList[0]
.entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
},
isEntityListSelected:
(master) =>
isEntityListSelected(
master),
)
: ProcedureListWidget(
model: widget.model,
masterList: widget
.model
.categoriesList[0]
.entityList,
removeHistory: (item) {
setState(() {
entityList.remove(item);
});
},
addHistory: (history) {
setState(() {
entityList.add(history);
});
},
addSelectedHistories: () {
//TODO build your fun herr
// widget.addSelectedHistories();
},
isEntityListSelected:
(master) =>
isEntityListSelected(
master),
)
: null),
Container(
child: Row(
children: [
AppText(
TranslationBase.of(context).orderType),
Radio(
activeColor: Color(0xFFB9382C),
value: 0,
groupValue: selectedType,
onChanged: (value) {
setSelectedType(value);
},
),
Text('routine'),
Radio(
activeColor: Color(0xFFB9382C),
groupValue: selectedType,
value: 1,
onChanged: (value) {
setSelectedType(value);
},
),
Text(TranslationBase.of(context).urgent),
],
),
), ),
SizedBox( Text(TranslationBase.of(context).urgent),
height: 12.0, ],
), ),
Container( ),
decoration: BoxDecoration( SizedBox(
borderRadius: height: 12.0,
BorderRadius.all(Radius.circular(6.0)), ),
border: Border.all( Container(
width: 1.0, decoration: BoxDecoration(
color: HexColor("#CCCCCC"))), borderRadius:
child: TextFields( BorderRadius.all(Radius.circular(6.0)),
fontSize: 15.0, border: Border.all(
controller: widget.remarksController, width: 1.0, color: HexColor("#CCCCCC"))),
maxLines: 3, child: TextFields(
minLines: 2, fontSize: 15.0,
onChanged: (value) {}, controller: widget.remarksController,
), hintText: widget.remarksController.text.isEmpty
? 'No Remarks Added'
: '',
maxLines: 3,
minLines: 2,
onChanged: (value) {},
),
),
SizedBox(
height: 70.0,
),
Container(
margin:
EdgeInsets.all(SizeConfig.widthMultiplier * 2),
child: Column(
//alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
color: Color(0xff359846),
title: TranslationBase.of(context)
.updateProcedure
.toUpperCase(),
onPressed: () {
// if (entityList.isEmpty == true &&
// widget.remarksController.text ==
// widget.remarks) {
// DrAppToastMsg.showErrorToast(
// "Fill the mandatory procedure details");
// return;
// }
Navigator.pop(context);
updateProcedure(
limetNO: widget.limetNo,
orderNo: widget.orderNo,
orderType: selectedType.toString(),
categorieId: widget.categoryId,
procedureId: widget.procedureId,
entityList: entityList,
patient: widget.patient,
model: widget.model,
remarks: widget.remarksController.text);
// authorizationForm(context);
},
), ),
SizedBox( SizedBox(
height: 50.0, height: 20.0,
),
Container(
margin: EdgeInsets.all(
SizeConfig.widthMultiplier * 2),
child: Wrap(
alignment: WrapAlignment.center,
children: <Widget>[
AppButton(
title: TranslationBase.of(context)
.updateProcedure
.toUpperCase(),
onPressed: () {
// if (entityList.isEmpty == true &&
// widget.remarksController.text ==
// widget.remarks) {
// DrAppToastMsg.showErrorToast(
// "Fill the mandatory procedure details");
// return;
// }
Navigator.pop(context);
updateProcedure(
limetNO: widget.limetNo,
orderNo: widget.orderNo,
orderType: selectedType.toString(),
categorieId: widget.categoryId,
procedureId: widget.procedureId,
entityList: entityList,
patient: widget.patient,
model: widget.model,
remarks:
widget.remarksController.text);
// authorizationForm(context);
},
),
],
),
), ),
AppButton(
title: TranslationBase.of(context).cancel,
color: Color(0xFFB9382C),
onPressed: () {
Navigator.pop(context);
},
)
], ],
), ),
), ),
)), ],
); ),
}), ),
)),
),
), ),
); );
}); });
@ -366,22 +370,24 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
updateProcedureReqModel.lineItemNo = limetNO; updateProcedureReqModel.lineItemNo = limetNO;
updateProcedureReqModel.orderNo = orderNo; updateProcedureReqModel.orderNo = orderNo;
if (entityList.isNotEmpty) { // if (entityList.isNotEmpty) {
entityList.forEach((element) { // entityList.forEach((element) {
controls.add( // controls.add(
Controls(code: "remarks", controlValue: element.remarks ?? ''), // Controls(code: "remarks", controlValue: element.remarks ?? ''),
); // );
controls.add( // controls.add(
Controls(code: "ordertype", controlValue: '1'), // Controls(code: "ordertype", controlValue: '1'),
); // );
//
controlsProcedure.procedure = element.procedureId; // controlsProcedure.procedure = element.procedureId;
controlsProcedure.category = int.parse(element.categoryID) > 9 // controlsProcedure.category = int.parse(element.categoryID) > 9
? element.categoryID // ? element.categoryID
: "0" + element.categoryID; // : "0" + element.categoryID;
controlsProcedure.controls = controls; // controlsProcedure.controls = controls;
}); // });
} else { // }
// else {
{
controls.add( controls.add(
Controls( Controls(
code: "remarks", controlValue: remarks.isNotEmpty ? remarks : ""), code: "remarks", controlValue: remarks.isNotEmpty ? remarks : ""),

@ -79,11 +79,13 @@ class AddRescheduleLeavScreen extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
left: BorderSide( left: BorderSide(
color: item.status == 1 color: item.status == 10
? Colors.green ? Colors.green
: item.status == 2 : item.status == 2
? HexColor('#CC9B14') ? HexColor('#CC9B14')
: Colors.red[800], : item.status == 9
? Colors.red[800]
: Colors.red,
width: 5.0, width: 5.0,
))), ))),
padding: EdgeInsets.only(left: 10, right: 10), padding: EdgeInsets.only(left: 10, right: 10),
@ -107,23 +109,30 @@ class AddRescheduleLeavScreen extends StatelessWidget {
margin: margin:
EdgeInsets.only(top: 10), EdgeInsets.only(top: 10),
child: AppText( child: AppText(
item.status == 1 item.status == 10
? TranslationBase.of( ? TranslationBase.of(
context) context)
.approved .accepted
: item.status == 2 : item.status == 2
? TranslationBase.of( ? TranslationBase.of(
context) context)
.pending .pending
: TranslationBase.of( : item.status == 9
context) ? TranslationBase
.rejected, .of(
context)
.rejected
: TranslationBase
.of(context)
.cancelled,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: item.status == 1 color: item.status == 10
? Colors.green ? Colors.green
: item.status == 2 : item.status == 2
? HexColor('#CC9B14') ? HexColor('#CC9B14')
: Colors.red[800], : item.status == 9
? Colors.red[800]
: Colors.red,
fontSize: 14, fontSize: 14,
), ),
), ),

@ -7,6 +7,14 @@ class DateUtils {
return DateFormat(dateFormat).format(dateTime); return DateFormat(dateFormat).format(dateTime);
} }
static DateTime convertISOStringToDateTime(String date){
DateTime newDate;
newDate = DateTime.parse(date);
return newDate;
}
static String convertStringToDateFormat(String date, String dateFormat) { static String convertStringToDateFormat(String date, String dateFormat) {
DateTime dateTime = DateTime.parse(date); DateTime dateTime = DateTime.parse(date);
return convertDateToFormat(dateTime, dateFormat); return convertDateToFormat(dateTime, dateFormat);

@ -552,6 +552,8 @@ class TranslationBase {
String get next => localizedValues['next'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode];
String get previous => localizedValues['previous'][locale.languageCode];
String get emptyMessage => String get emptyMessage =>
localizedValues['empty-message'][locale.languageCode]; localizedValues['empty-message'][locale.languageCode];
@ -648,13 +650,18 @@ class TranslationBase {
String get leanBodyWeight => String get leanBodyWeight =>
localizedValues['leanBodyWeight'][locale.languageCode]; localizedValues['leanBodyWeight'][locale.languageCode];
String get bodyMassIndex => localizedValues['bodyMassIndex'][locale.languageCode]; String get bodyMassIndex =>
localizedValues['bodyMassIndex'][locale.languageCode];
String get yourBodyMassIndex => localizedValues['yourBodyMassIndex'][locale.languageCode]; String get yourBodyMassIndex =>
String get bmiUnderWeight => localizedValues['bmiUnderWeight'][locale.languageCode]; localizedValues['yourBodyMassIndex'][locale.languageCode];
String get bmiUnderWeight =>
localizedValues['bmiUnderWeight'][locale.languageCode];
String get bmiHealthy => localizedValues['bmiHealthy'][locale.languageCode]; String get bmiHealthy => localizedValues['bmiHealthy'][locale.languageCode];
String get bmiOverWeight => localizedValues['bmiOverWeight'][locale.languageCode]; String get bmiOverWeight =>
localizedValues['bmiOverWeight'][locale.languageCode];
String get bmiObese => localizedValues['bmiObese'][locale.languageCode]; String get bmiObese => localizedValues['bmiObese'][locale.languageCode];
String get bmiObeseExtreme => localizedValues['bmiObeseExtreme'][locale.languageCode];
String get method => localizedValues['method'][locale.languageCode]; String get method => localizedValues['method'][locale.languageCode];
@ -1193,6 +1200,8 @@ 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 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];
String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode]; String get typeHereToReply => localizedValues['typeHereToReply'][locale.languageCode];

@ -227,13 +227,16 @@ class PatientCard extends StatelessWidget {
"List_MyOutPatient") "List_MyOutPatient")
Container( Container(
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( Expanded(
TranslationBase.of(context) child: AppText(
.appointmentDate + TranslationBase.of(context)
" : ", .appointmentDate +
fontSize: 14, " : ",
fontSize: 14,
),
), ),
patientInfo.startTimes != null patientInfo.startTimes != null
? Container( ? Container(

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart'; import 'package:doctor_app_flutter/models/patient/my_referral/PendingReferral.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -7,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bg_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:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
class PatientReferralItemWidget extends StatelessWidget { class PatientReferralItemWidget extends StatelessWidget {
final String patientName; final String patientName;
@ -39,6 +41,8 @@ class PatientReferralItemWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0), margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column( child: Column(
@ -298,7 +302,8 @@ class PatientReferralItemWidget extends StatelessWidget {
: Colors.grey[500], : Colors.grey[500],
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)), fontSize:
2.0 * SizeConfig.textMultiplier)),
], ],
), ),
), ),
@ -325,15 +330,15 @@ class PatientReferralItemWidget extends StatelessWidget {
SizedBox( SizedBox(
width: 4, width: 4,
), ),
/*patient.gender*/1 == 1 /*patient.gender*/ 1 == 1
? Icon( ? Icon(
DoctorApp.male_2, DoctorApp.male_2,
color: Colors.blue, color: Colors.blue,
) )
: Icon( : Icon(
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
], ],
), ),
SizedBox( SizedBox(
@ -351,7 +356,8 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).fileNumber, text: TranslationBase.of(context)
.fileNumber,
style: TextStyle( style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')), fontSize: 14, fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
@ -371,13 +377,17 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).referredFrom, text: TranslationBase.of(context)
.referredFrom,
style: TextStyle( style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')), fontSize: 14,
fontFamily: 'Poppins')),
new TextSpan( new TextSpan(
text: isSameBranch text: isSameBranch
? TranslationBase.of(context).sameBranch ? TranslationBase.of(context)
: TranslationBase.of(context).otherBranch, .sameBranch
: TranslationBase.of(context)
.otherBranch,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -392,11 +402,12 @@ class PatientReferralItemWidget extends StatelessWidget {
children: [ children: [
AppText( AppText(
/*patient.nationalityName ?? /*patient.nationalityName ??
patient.nationality*/ "Saudi", patient.nationality*/
"Saudi",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
/* patient.nationality != null /* patient.nationality != null
? ClipRRect( ? ClipRRect(
borderRadius: borderRadius:
BorderRadius BorderRadius
@ -418,7 +429,7 @@ class PatientReferralItemWidget extends StatelessWidget {
'No Image'); 'No Image');
}, },
))*/ ))*/
/*:*/ SizedBox() /*:*/ SizedBox()
], ],
) )
], ],
@ -445,32 +456,56 @@ class PatientReferralItemWidget extends StatelessWidget {
), ),
), ),
), ),
SizedBox( Row(
height: 20, crossAxisAlignment: CrossAxisAlignment.start,
),
Column(
children: [ children: [
RichText( Container(
text: TextSpan( width: 30,
style: TextStyle( height: 30,
fontSize: 2.0 * SizeConfig.textMultiplier, margin: EdgeInsets.only(
color: Colors.black), left: projectViewModel.isArabic ? 10 : 10 /*10:85*/,
children: <TextSpan>[ right: projectViewModel.isArabic ? 10 : 10 /*85:10*/,
TextSpan( top: 5),
text: TranslationBase.of(context) decoration: BoxDecoration(
.referralDoctor + shape: BoxShape.rectangle,
" : ", border: Border(
style: TextStyle( bottom:
fontSize: 14, fontFamily: 'Poppins')), BorderSide(color: Colors.grey[400], width: 2.5),
TextSpan( left:
text: referralDoctorName, BorderSide(color: Colors.grey[400], width: 2.5),
style: TextStyle( )),
fontWeight: FontWeight.w700, ),
fontFamily: 'Poppins', Expanded(
fontSize: 15)), flex: 4,
], child: Container(
margin: EdgeInsets.only(left: 10, top: 25, right : 10, bottom: 0),
child: Column(
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
TextSpan(
text: TranslationBase.of(context)
.referralDoctor +
" : ",
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')),
TextSpan(
text: referralDoctorName,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
)
],
),
), ),
) ),
], ],
), ),
Container( Container(

@ -0,0 +1,356 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with PreferredSizeWidget{
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
PatientProfileHeaderNewDesignAppBar(this.patient, this.patientType, this.arrivalType);
@override
Widget build(BuildContext context) {
return PreferredSize(
preferredSize: Size(double.infinity, 200),
child: Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration(
color: Colors.white,
),
height: 200,
child: Container(
padding: EdgeInsets.only(
left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
children: [
Container(
padding: EdgeInsets.only(left: 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
AppText(
patient.firstName!=null? (Helpers.capitalize(patient.firstName) + " " + Helpers.capitalize(patient.lastName)):'',
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
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(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SERVICES_PATIANT2[
int.parse(patientType)] ==
"patientArrivalList"
? Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
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.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)),
],
),
),
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.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,
fontSize: 14)),
],
),
),
),
],
),
),
]),
],
),
),
),
);
}
convertDateFormat2(String str) {
String newDate;
const start = "/Date(";
if (str.isNotEmpty) {
const end = "+0300)";
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
}
return newDate.toString();
}
isToday(date) {
DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date);
return DateFormat("yyyy-MM-dd").format(tempDate) ==
DateFormat("yyyy-MM-dd").format(DateTime.now());
}
myBoxDecoration() {
return BoxDecoration(
border: Border(
top: BorderSide(
color: Colors.green,
width: 5,
),
),
borderRadius: BorderRadius.circular(10));
}
@override
Size get preferredSize => Size(double.maxFinite,200);
}

@ -22,7 +22,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5), left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -41,15 +41,18 @@ class PatientProfileHeaderNewDesign 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.gender == 1
? Icon( ? Icon(
@ -188,9 +191,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient convertDateFormat2(patient.appointmentDate.toString()?? ''),
.appointmentDate
.toString()),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -314,20 +315,22 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate;
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; if (str.isNotEmpty) {
const end = "+0300)";
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length); final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
}
return newDate.toString(); return newDate.toString();
} }

@ -26,7 +26,8 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
final String profileUrl; final String profileUrl;
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final bool isPrescriptions;
final String clinic;
PatientProfileHeaderWhitAppointment( PatientProfileHeaderWhitAppointment(
{this.patient, {this.patient,
this.patientType, this.patientType,
@ -36,7 +37,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
this.appointmentDate, this.appointmentDate,
this.profileUrl, this.profileUrl,
this.invoiceNO, this.invoiceNO,
this.orderNo}); this.orderNo, this.isPrescriptions = false, this.clinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -209,9 +210,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient convertDateFormat2(patient.appointmentDate??''),
.appointmentDate
.toString()),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -371,7 +370,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if (orderNo != null) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -383,7 +382,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
) )
], ],
), ),
if (invoiceNO != null) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -395,10 +394,34 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
) )
], ],
), ),
if(isPrescriptions)
Row(
children: [
Texts(
'Branch:',
color: Colors.grey[800],
),
Texts(
branch?? '',
)
],
),
if(isPrescriptions)
Row(
children: [
Texts(
'Clinic:',
color: Colors.grey[800],
),
Texts(
clinic?? '',
)
],
),
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Result Date:', !isPrescriptions? 'Result Date:': 'Prescriptions Date',
color: Colors.grey[800], color: Colors.grey[800],
), ),
Expanded( Expanded(
@ -425,20 +448,22 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate ="";
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
final startIndex = str.indexOf(start); if (str.isNotEmpty) {
final endIndex = str.indexOf(end, startIndex + start.length); final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
}
return newDate.toString(); return newDate.toString();
} }

@ -0,0 +1,499 @@
import 'package:doctor_app_flutter/config/config.dart';
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/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'large_avatar.dart';
class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with PreferredSizeWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
final String doctorName;
final String branch;
final DateTime appointmentDate;
final String profileUrl;
final String invoiceNO;
final String orderNo;
final bool isPrescriptions;
final String clinic;
PatientProfileHeaderWhitAppointmentAppBar(
{this.patient,
this.patientType,
this.arrivalType,
this.doctorName,
this.branch,
this.appointmentDate,
this.profileUrl,
this.invoiceNO,
this.orderNo, this.isPrescriptions = false, this.clinic});
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
//height: 300,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(left: 12.0),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
AppText(
patient.firstName != null ?
(Helpers.capitalize(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName),
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
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(
width: 10,
),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SERVICES_PATIANT2[
int.parse(patientType)] ==
"patientArrivalList"
? Container(
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
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.bold,
),
)
: SizedBox(),
SizedBox(
width: 3.5,
),
Container(
child: AppText(
convertDateFormat2(patient.appointmentDate??''),
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)),
],
),
),
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.dateofBirth, context)}",
style: TextStyle(
fontWeight:
FontWeight.w700,
fontSize: 14)),
],
),
),
),
],
),
),
]),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 30,
height: 30,
margin: EdgeInsets.only(left: projectViewModel.isArabic?10:85, right: projectViewModel.isArabic?85:10,top: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border(
bottom:BorderSide(color: Colors.grey[400],width: 2.5),
left: BorderSide(color: Colors.grey[400],width: 2.5),
)
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(top: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: LargeAvatar(
name: doctorName,
url: profileUrl,
),
width: 25,
height: 25,
margin: EdgeInsets.only(top: 10),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
'${TranslationBase.of(context).dr}$doctorName',
color: Colors.black,
fontWeight: FontWeight.w600,
fontSize: 12,
),
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'Order No: ',
color: Colors.grey[800],
fontSize: 12
),
Texts(
orderNo ?? '',fontSize: 12
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'Invoice: ',
color: Colors.grey[800],
fontSize: 12
),
Texts(
invoiceNO,
fontSize: 12
)
],
),
if(isPrescriptions)
Row(
children: [
Texts(
'Branch: ',
color: Colors.grey[800],
fontSize: 12
),
Texts(
branch?? '',
fontSize: 12
)
],
),
if(isPrescriptions)
Row(
children: [
Texts(
'Clinic: ',
color: Colors.grey[800],
fontSize: 12
),
Texts(
clinic?? '',
fontSize: 12
)
],
),
Row(
children: <Widget>[
Expanded(
child: Texts(
!isPrescriptions? 'Result Date: ': 'Prescriptions Date ',
color: Colors.grey[800],
fontSize: 12,
),
),
Texts(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14,
)
],
)
]),
),
),
],
),
),
),
],
)
],
),
),
);
}
convertDateFormat2(String str) {
String newDate ="";
const start = "/Date(";
const end = "+0300)";
if (str.isNotEmpty) {
final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
newDate = date.year.toString() +
"/" +
date.month.toString().padLeft(2, '0') +
"/" +
date.day.toString().padLeft(2, '0');
}
return newDate.toString();
}
isToday(date) {
DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date);
return DateFormat("yyyy-MM-dd").format(tempDate) ==
DateFormat("yyyy-MM-dd").format(DateTime.now());
}
myBoxDecoration() {
return BoxDecoration(
border: Border(
top: BorderSide(
color: Colors.green,
width: 5,
),
),
borderRadius: BorderRadius.circular(10));
}
@override
Size get preferredSize => Size(double.maxFinite,290);
}

@ -124,25 +124,25 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
nameLine1: TranslationBase.of(context).admission, nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request, nameLine2: TranslationBase.of(context).request,
icon: 'patient/admission_req.png'), icon: 'patient/admission_req.png'),
(int.parse(patientType) == 7 || int.parse(patientType) == 6) // (int.parse(patientType) == 7 || int.parse(patientType) == 6)
? PatientProfileButton( // ? PatientProfileButton(
key: key, // key: key,
patient: patient, // patient: patient,
patientType: patientType, // patientType: patientType,
arrivalType: arrivalType, // arrivalType: arrivalType,
route: ORDER_PRESCRIPTION, // route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders, // nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, // nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png') // icon: 'patient/order_prescription.png')
: PatientProfileButton( // : PatientProfileButton(
key: key, // key: key,
patient: patient, // patient: patient,
patientType: patientType, // patientType: patientType,
arrivalType: arrivalType, // arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_HISTORY, // route: ORDER_PRESCRIPTION_HISTORY,
nameLine1: TranslationBase.of(context).orders, // nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription, // nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'), // icon: 'patient/order_prescription.png'),
PatientProfileButton( PatientProfileButton(
key: key, key: key,
patient: patient, patient: patient,

@ -134,6 +134,16 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
nameLine1: TranslationBase.of(context).progress, nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note, nameLine2: TranslationBase.of(context).note,
icon: 'patient/Progress_notes.png'), icon: 'patient/Progress_notes.png'),
if (int.parse(patientType) == 7 || int.parse(patientType) == 6)
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PROCEDURE,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).procedures,
icon: 'patient/Order_Procedures.png'),
], ],
), ),
); );

@ -217,6 +217,7 @@ class _TextsState extends State<Texts> {
letterSpacing: letterSpacing:
widget.variant == "overline" ? 1.5 : null, widget.variant == "overline" ? 1.5 : null,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: 'Poppins',
decoration: decoration:
widget.textDecoration //TextDecoration.lineThrough widget.textDecoration //TextDecoration.lineThrough
)), )),
@ -251,7 +252,7 @@ class _TextsState extends State<Texts> {
style: _getFontStyle().copyWith( style: _getFontStyle().copyWith(
color: HexColor('#FF0000'), color: HexColor('#FF0000'),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: "WorkSans", fontFamily: "Poppins",
)), )),
), ),
), ),

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'app_texts_widget.dart'; import 'app_texts_widget.dart';
class AppTextFieldCustom extends StatefulWidget { class AppTextFieldCustom extends StatefulWidget {
@ -9,17 +9,30 @@ class AppTextFieldCustom extends StatefulWidget {
final String hintText; final String hintText;
final TextEditingController controller; final TextEditingController controller;
final bool isDropDown; final bool isDropDown;
final String dropDownText;
final Icon suffixIcon; final Icon suffixIcon;
final Color dropDownColor; final Color dropDownColor;
final bool enabled;
final TextInputType inputType;
final int minLines;
final int maxLines;
final List<TextInputFormatter> inputFormatters;
AppTextFieldCustom( AppTextFieldCustom({
{this.height = 0, this.height = 0,
this.onClick, this.onClick,
this.hintText, this.hintText,
this.controller, this.controller,
this.isDropDown = false, this.isDropDown = false,
this.suffixIcon, this.dropDownText,
this.dropDownColor}); this.suffixIcon,
this.dropDownColor,
this.enabled = true,
this.inputType = TextInputType.text,
this.minLines = 1,
this.maxLines = 1,
this.inputFormatters,
});
@override @override
_AppTextFieldCustomState createState() => _AppTextFieldCustomState(); _AppTextFieldCustomState createState() => _AppTextFieldCustomState();
@ -43,23 +56,38 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if (widget.controller.text != "") if ((widget.controller != null &&
widget.controller.text != "") ||
widget.dropDownText != null)
AppText( AppText(
widget.hintText, widget.hintText,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
TextField( widget.dropDownText == null
textAlign: TextAlign.left, ? TextField(
decoration: textFieldSelectorDecoration( textAlign: TextAlign.left,
widget.hintText, null, true), decoration: textFieldSelectorDecoration(
style: TextStyle( widget.hintText, null, true),
fontSize: 14, style: TextStyle(
color: Colors.grey.shade600, fontSize: SizeConfig.textMultiplier * 1.7,
), fontFamily: 'Poppins',
controller: widget.controller, color: Colors.grey.shade800,
), ),
controller: widget.controller,
keyboardType: widget.inputType,
enabled: widget.enabled,
minLines: widget.minLines,
maxLines: widget.maxLines,
inputFormatters: widget.inputFormatters != null ? widget.inputFormatters : [],
)
: AppText(
widget.dropDownText,
fontFamily: 'Poppins',
color: Colors.grey.shade800,
fontSize: SizeConfig.textMultiplier * 1.7,
),
], ],
), ),
), ),
@ -67,7 +95,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
? widget.suffixIcon != null ? widget.suffixIcon != null
? widget.suffixIcon ? widget.suffixIcon
: Icon( : Icon(
Icons.arrow_drop_down, Icons.keyboard_arrow_down,
color: widget.dropDownColor != null color: widget.dropDownColor != null
? widget.dropDownColor ? widget.dropDownColor
: Colors.black, : Colors.black,
@ -85,7 +113,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
return BoxDecoration( return BoxDecoration(
color: containerColor, color: containerColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(12)),
border: Border.fromBorderSide(BorderSide( border: Border.fromBorderSide(BorderSide(
color: borderColor, color: borderColor,
width: borderWidth == -1 ? 2.0 : borderWidth, width: borderWidth == -1 ? 2.0 : borderWidth,
@ -102,6 +130,9 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff)), borderSide: BorderSide(color: Color(0Xffffffff)),
), ),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff)),
),
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff)), borderSide: BorderSide(color: Color(0Xffffffff)),
), ),

@ -138,7 +138,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
color: Colors.white, color: Colors.white,
fontSize: 17.0, fontSize: 17.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: "WorkSans")), fontFamily: "Poppins")),
) )
], ],
), ),

@ -19,12 +19,16 @@ class AppScaffold extends StatelessWidget {
final BaseViewModel baseViewModel; final BaseViewModel baseViewModel;
final Widget bottomSheet; final Widget bottomSheet;
final Color backgroundColor; final Color backgroundColor;
final Widget appBar;
AppScaffold( AppScaffold(
{this.appBarTitle = '', {this.appBarTitle = '',
this.body, this.body,
this.isLoading = false, this.isLoading = false,
this.isShowAppBar = true, this.isShowAppBar = true,
this.baseViewModel, this.bottomSheet, this.backgroundColor}); this.baseViewModel,
this.bottomSheet,
this.backgroundColor,
this.appBar});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -35,30 +39,35 @@ class AppScaffold extends StatelessWidget {
FocusScope.of(context).requestFocus(new FocusNode()); FocusScope.of(context).requestFocus(new FocusNode());
}, },
child: Scaffold( child: Scaffold(
backgroundColor: backgroundColor??Colors.white, backgroundColor: backgroundColor ?? Colors.white,
appBar: isShowAppBar appBar: isShowAppBar
? AppBar( ? appBar ??
elevation: 0, AppBar(
backgroundColor: HexColor('#515B5D'), elevation: 0,
textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), backgroundColor: Colors.white, //HexColor('#515B5D'),
title: Text(appBarTitle.toUpperCase()), textTheme: TextTheme(
leading: Builder(builder: (BuildContext context) { headline6: TextStyle(
return IconButton( color: Colors.black87,
icon: Icon(Icons.arrow_back_ios), fontSize: 16.8,
color: Colors.white, //Colors.black, )),
onPressed: () => Navigator.pop(context), title: Text(appBarTitle.toUpperCase()),
); leading: Builder(builder: (BuildContext context) {
}), return IconButton(
centerTitle: true, icon: Icon(Icons.arrow_back_ios),
actions: <Widget>[ color: Colors.black, //Colors.black,
IconButton( onPressed: () => Navigator.pop(context),
icon: Icon(DoctorApp.home_icon_active), );
color: Colors.white, //Colors.black, }),
onPressed: () => Navigator.pushNamedAndRemoveUntil( centerTitle: true,
context, HOME, (r) => false), actions: <Widget>[
), IconButton(
], icon: Icon(DoctorApp.home_icon_active),
) color: Colors.black, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
),
],
)
: null, : null,
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection body: projectProvider.isInternetConnection

@ -25,7 +25,7 @@ class AppText extends StatefulWidget {
{this.color = Colors.black, {this.color = Colors.black,
this.fontWeight = FontWeight.normal, this.fontWeight = FontWeight.normal,
this.fontSize, this.fontSize,
this.fontFamily = 'WorkSans', this.fontFamily = 'Poppins',
this.margin, this.margin,
this.marginTop = 0, this.marginTop = 0,
this.marginRight = 0, this.marginRight = 0,

@ -0,0 +1,26 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ShowImageDialog extends StatelessWidget {
final String imageUrl;
const ShowImageDialog({Key key, this.imageUrl}) : super(key: key);
@override
Widget build(BuildContext context) {
return SimpleDialog(
children: [
Container(
width: 340,
height: 340,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12)
),
child: Image.network(
imageUrl,
fit: BoxFit.fill,
),
)
],
);
}
}

@ -19,6 +19,8 @@ class DoctorCard extends StatelessWidget {
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final Function onTap; final Function onTap;
final bool isPrescriptions;
final String clinic;
DoctorCard( DoctorCard(
{this.doctorName, {this.doctorName,
@ -27,7 +29,7 @@ class DoctorCard extends StatelessWidget {
this.invoiceNO, this.invoiceNO,
this.onTap, this.onTap,
this.appointmentDate, this.appointmentDate,
this.orderNo}); this.orderNo, this.isPrescriptions=false, this.clinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -67,6 +69,7 @@ class DoctorCard extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if(!isPrescriptions)
Texts( Texts(
'${DateUtils.getHour(appointmentDate)}', '${DateUtils.getHour(appointmentDate)}',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -96,38 +99,59 @@ class DoctorCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (orderNo != null) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'order No:', 'order No:',
color: Colors.grey[500], color: Colors.grey[500],
fontSize: 14,
), ),
Texts( Texts(
orderNo ?? '', orderNo ?? '',
fontSize: 14,
) )
], ],
), ),
if (invoiceNO != null) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Invoice:', 'Invoice:',
fontSize: 14,
color: Colors.grey[500], color: Colors.grey[500],
), ),
Texts( Texts(
invoiceNO, invoiceNO,
fontSize: 14,
) )
], ],
), ),
if(isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Branch:', 'Clinic: ',
color: Colors.grey[500],
fontSize: 14,
),
Texts(
clinic,
fontSize: 14,
)
],
),
if(branch!=null)
Row(
children: <Widget>[
Texts(
'Branch: ',
fontSize: 14,
color: Colors.grey[500], color: Colors.grey[500],
), ),
Texts( Texts(
branch, branch,
fontSize: 14,
) )
], ],
) )
@ -135,7 +159,7 @@ class DoctorCard extends StatelessWidget {
), ),
), ),
Icon( Icon(
EvaIcons.eye, EvaIcons.eye,
) )
], ],
), ),

@ -35,13 +35,13 @@ class _DrawerItemState extends State<DrawerItem> {
color: widget.color ?? Colors.black87, color: widget.color ?? Colors.black87,
size: SizeConfig.imageSizeMultiplier * 5, size: SizeConfig.imageSizeMultiplier * 5,
), ),
Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ mainAxisAlignment: MainAxisAlignment.start,
Container( children: <Widget>[
width: MediaQuery.of(context).size.width *0.45, Container(
child: Expanded( width: MediaQuery.of(context).size.width *0.45,
child: AppText( child: AppText(
widget.title, widget.title,
marginLeft: 5, marginLeft: 5,
@ -52,15 +52,15 @@ class _DrawerItemState extends State<DrawerItem> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
), AppText(
AppText( widget.subTitle,
widget.subTitle, visibility: !widget.subTitle.isNullOrEmpty(),
visibility: !widget.subTitle.isNullOrEmpty(), color: widget.color ?? Colors.black,
color: widget.color ?? Colors.black, marginLeft: 5,
marginLeft: 5, fontSize: SizeConfig.textMultiplier * 2.5,
fontSize: SizeConfig.textMultiplier * 2.5, ),
), ],
], ),
), ),
], ],
)); ));

@ -121,19 +121,19 @@ flutter:
# list giving the asset and other descriptors for the font. For # list giving the asset and other descriptors for the font. For
# example: # example:
fonts: fonts:
- family: WorkSans
fonts:
- asset: assets/fonts/Work_Sans/WorkSans-Regular.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
weight: 700
- family: Poppins - family: Poppins
fonts: fonts:
- asset: assets/fonts/Poppins/Poppins-Regular.ttf - asset: assets/fonts/Poppins/Poppins-Regular.ttf
- asset: assets/fonts/Poppins/Poppins-Medium.ttf weight: 400
- asset: assets/fonts/Poppins/Poppins-Bold.ttf - asset: assets/fonts/Poppins/Poppins-Medium.ttf
weight: 700 weight: 500
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 700
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 800
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 900
# - family: Trajan Pro # - family: Trajan Pro

Loading…
Cancel
Save