merge-requests/197/head
Sultan Khan 4 years ago
commit 97d915ef99

@ -34,18 +34,22 @@ const Map<String, Map<String, String>> localizedValues = {
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'},
'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'},
'lab': {'en': 'Lab', 'ar': 'المختبر'},
'result': {'en': 'Result', 'ar': 'نتيجة'},
'todayStatistics': {'en': 'Today Statistics', 'ar': 'إحصائيات اليوم'},
'arrived': {'en': 'Arrived', 'ar': 'وصل'},
'er': {'en': 'ER', 'ar': 'حالة طوارئ'},
'walkIn': {'en': 'Walk-in', 'ar': 'ادخل'},
'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'},
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'االإحالة'},
'inPatient': {'en': 'In-Patient', 'ar': 'االمريض الداخلي'},
'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
'searchMedicine': {'en': 'Search Medicine', 'ar': 'بحث عن الدواء'},
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},
'myReferredPatient': {'en': 'My Referred Patient', 'ar': 'مرضاي المحالين'},
'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'},
'middleName': {'en': 'Middle Name', 'ar': 'اسم الاب'},
@ -78,9 +82,14 @@ const Map<String, Map<String, String>> localizedValues = {
'errorMessage': {'en': 'Something went wrong', 'ar': 'حدث خطأ ما'},
'patientProfile': {'en': 'Patient Profile', 'ar': 'ملف المريض'},
'vitalSign': {'en': 'Vital Sign', 'ar': 'المؤشرات الحيوية'},
'vital': {'en': 'Vital', 'ar': 'الحيوية'},
'signs': {'en': 'Signs', 'ar': 'المؤشرات'},
'labOrder': {'en': 'Lab Order', 'ar': 'نتائج التحاليل'},
'prescription': {'en': 'Prescription', 'ar': 'الوصفات'},
'medicines': {'en': 'Medicines', 'ar': 'الأدوية'},
'prescription': {'en': 'Prescription', 'ar': 'وصفات'},
'insuranceApprovals': {'en': 'Insurance Approvals', 'ar': 'موافقات التأمين'},
'insurance': {'en': 'Insurance', 'ar': 'التأمين'},
'approvals': {'en': 'Approvals', 'ar': 'موافقات'},
'bodyMeasurements': {'en': 'Body Measurements', 'ar': 'قياسات الجسم'},
'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'},
'pulse': {'en': 'Pulse', 'ar': 'النبض'},
@ -104,6 +113,8 @@ const Map<String, Map<String, String>> localizedValues = {
},
'replay': {'en': 'Replay', 'ar': 'تاكيد'},
'progressNote': {'en': 'Progress Note', 'ar': 'ملاحظة التقدم'},
'progress': {'en': 'Progress', 'ar': 'التقدم'},
'note': {'en': 'Note', 'ar': 'ملاحظة'},
'searchNote': {'en': 'Search Note', 'ar': 'بحث عن ملاحظة'},
'errorNoProgressNote': {
'en': 'You don\'t have any Progress Note',
@ -164,6 +175,7 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'ليس لديك اي مرضى'
},
'age': {'en': 'Age', 'ar': 'العمر'},
'nationality': {'en': 'Nationality', 'ar': 'الجنسية'},
'today': {'en': 'Today', 'ar': 'اليوم'},
'yesterday': {'en': 'Yesterday', 'ar': 'الأمس'},
'tomorrow': {'en': 'Tomorrow', 'ar': 'الغد'},
@ -204,7 +216,8 @@ const Map<String, Map<String, String>> localizedValues = {
'price': {'en': 'Price', 'ar': 'السعر'},
'youCanFindItIn': {'en': 'You can Find it in', 'ar': 'تستطيع ان تجده هنا '},
'radiologyReport': {'en': 'Radiology Report', 'ar': 'تقرير الاشعة'},
'orders': {'en': 'Orders', 'ar': ' الطلبات'},
'orders': {'en': 'Orders', 'ar': 'الطلبات'},
'list': {'en': 'List', 'ar': 'قائمة'},
'searchOrders': {'en': 'Search Orders', 'ar': ' بحث عن الطلبات'},
'prescriptionDetails': {'en': 'Prescription Details', 'ar': 'تفاصبل الوصفة'},
'prescriptionInfo': {'en': 'Prescription Info', 'ar': 'معلومات الوصفة'},
@ -248,11 +261,18 @@ const Map<String, Map<String, String>> localizedValues = {
},
'gender2': {'en': 'Gender: ', 'ar': 'الجنس: '},
'age2': {'en': 'Age: ', 'ar': 'العمر: '},
'replySuccessfully': {'en': 'Reply Successfully', 'ar': 'تم الرد بنجاح'},
"sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"},
"submit": {"en": "Submit", "ar": "ارسال"},
"doc-name": {"en": "Doctor Name", "ar": "اسم الطبيب"},
"clinicname": {"en": "Clinic Name", "ar": "اسم العيادة"},
"sick-leave-date": {"en": "Sick leave date ", "ar": "تاريخ الاجازة."},
"sick-leave-days": {"en": "Sick leave days", "ar": "عدد ايام الاجازة."}
"sick-leave-days": {"en": "Sick leave days", "ar": "عدد ايام الاجازة."},
'replySuccessfully': {'en': 'Reply Successfully', 'ar': 'تم الرد بنجاح'},
'admissionDetail': {'en': 'ADMISSION DETAIL: ', 'ar': 'تفاصيل القبول: '},
'dateTime': {'en': 'DATE / TIME:', 'ar': 'التاريخ / الوقت:'},
'admissionNo': {'en': 'ADMISSION #: ', 'ar': 'قبول #:'},
'losNo': {'en': 'LOS #:', 'ar': 'LOS #:'},
'area': {'en': 'AREA:', 'ar': 'المنطقة'},
'room': {'en': 'ROOM:', 'ar': 'الغرفة'},
'bed': {'en': 'BED:', 'ar': 'السرير'},
};

@ -0,0 +1,77 @@
import 'package:intl/intl.dart';
class DateUtils {
static String convertStringToDateFormat(String date, String dateFormat) {
DateTime dateTime = DateTime.parse(date);
return DateFormat(dateFormat).format(dateTime);
}
static convertDateFromServerFormat(String str, dateFormat) {
const start = "/Date(";
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)));
return DateFormat(dateFormat).format(date);
}
static String differenceBetweenDateAndCurrentInYearMonthDay(DateTime firstDate) {
DateTime now = DateTime.now();
// now = now.add(Duration(days: 400, minutes: 0));
var difference = firstDate.difference(now);
int years = now.year - firstDate.year;
int months = now.month - firstDate.month;
int days = now.day - firstDate.day;
if (months < 0 || (months == 0 && days < 0)) {
years--;
months += (days < 0 ? 11 : 12);
}
if (days < 0) {
final monthAgo = new DateTime(now.year, now.month - 1, firstDate.day);
days = now.difference(monthAgo).inDays + 1;
}
return "$days Days, $months Months, $years Years";
}
static String differenceBetweenDateAndCurrent(DateTime firstDate) {
DateTime now = DateTime.now();
// DateTime now = nows.add(Duration(days: 400, minutes: 25, hours: 0));
var difference = now.difference(firstDate);
int minutesInDays = difference.inMinutes;
int hoursInDays = minutesInDays ~/ 60;
int minutes = minutesInDays % 60;
int days = hoursInDays ~/ 24;
int hours = hoursInDays % 24;
double hoursInOneDay = difference.inHours / difference.inDays;
return "$days Days, $hours HR, $minutes Min";
}
static String differenceBetweenServerDateAndCurrent(String str) {
const start = "/Date(";
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)));
return differenceBetweenDateAndCurrent(date);
}
}

@ -72,6 +72,7 @@ class TranslationBase {
String get walkIn => localizedValues['walkIn'][locale.languageCode];
String get notArrived => localizedValues['notArrived'][locale.languageCode];
String get radiology => localizedValues['radiology'][locale.languageCode];
String get service => localizedValues['service'][locale.languageCode];
String get referral => localizedValues['referral'][locale.languageCode];
String get inPatient => localizedValues['inPatient'][locale.languageCode];
String get operations => localizedValues['operations'][locale.languageCode];
@ -81,6 +82,7 @@ class TranslationBase {
localizedValues['searchMedicine'][locale.languageCode];
String get myReferralPatient =>
localizedValues['myReferralPatient'][locale.languageCode];
String get myReferral => localizedValues['myReferral'][locale.languageCode];
String get myReferredPatient =>
localizedValues['myReferredPatient'][locale.languageCode];
String get firstName => localizedValues['firstName'][locale.languageCode];
@ -113,11 +115,18 @@ class TranslationBase {
String get patientProfile =>
localizedValues['patientProfile'][locale.languageCode];
String get vitalSign => localizedValues['vitalSign'][locale.languageCode];
String get vital => localizedValues['vital'][locale.languageCode];
String get signs => localizedValues['signs'][locale.languageCode];
String get labOrder => localizedValues['labOrder'][locale.languageCode];
String get lab => localizedValues['lab'][locale.languageCode];
String get result => localizedValues['result'][locale.languageCode];
String get medicines => localizedValues['medicines'][locale.languageCode];
String get prescription =>
localizedValues['prescription'][locale.languageCode];
String get insuranceApprovals =>
localizedValues['insuranceApprovals'][locale.languageCode];
String get insurance => localizedValues['insurance'][locale.languageCode];
String get approvals => localizedValues['approvals'][locale.languageCode];
String get bodyMeasurements =>
localizedValues['bodyMeasurements'][locale.languageCode];
String get temperature => localizedValues['temperature'][locale.languageCode];
@ -139,6 +148,8 @@ class TranslationBase {
String get replay => localizedValues['replay'][locale.languageCode];
String get progressNote =>
localizedValues['progressNote'][locale.languageCode];
String get progress => localizedValues['progress'][locale.languageCode];
String get note => localizedValues['note'][locale.languageCode];
String get searchNote => localizedValues['searchNote'][locale.languageCode];
String get errorNoProgressNote =>
localizedValues['errorNoProgressNote'][locale.languageCode];
@ -192,6 +203,7 @@ class TranslationBase {
String get youDoNotHaveAnyItem =>
localizedValues['youDoNotHaveAnyItem'][locale.languageCode];
String get age => localizedValues['age'][locale.languageCode];
String get nationality => localizedValues['nationality'][locale.languageCode];
String get today => localizedValues['today'][locale.languageCode];
String get tomorrow => localizedValues['tomorrow'][locale.languageCode];
String get all => localizedValues['all'][locale.languageCode];
@ -230,6 +242,7 @@ class TranslationBase {
String get radiologyReport =>
localizedValues['radiologyReport'][locale.languageCode];
String get orders => localizedValues['orders'][locale.languageCode];
String get list => localizedValues['list'][locale.languageCode];
String get searchOrders =>
localizedValues['searchOrders'][locale.languageCode];
String get prescriptionDetails =>
@ -286,6 +299,14 @@ class TranslationBase {
localizedValues['sick-leave-date'][locale.languageCode];
String get sickLeaveDays =>
localizedValues['sick-leave-days'][locale.languageCode];
String get admissionDetail =>
localizedValues['admissionDetail'][locale.languageCode];
String get dateTime => localizedValues['dateTime'][locale.languageCode];
String get admissionNo => localizedValues['admissionNo'][locale.languageCode];
String get losNo => localizedValues['losNo'][locale.languageCode];
String get area => localizedValues['area'][locale.languageCode];
String get room => localizedValues['room'][locale.languageCode];
String get bed => localizedValues['bed'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -8,7 +8,7 @@ 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_button.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -35,279 +35,276 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
@override
Widget build(BuildContext context) {
return CardWithBgWidgetNew(
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
AppText(
'${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
InkWell(
return Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10),
padding: EdgeInsets.only(left: 0, top: 8, right: 0, bottom: 0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.fromBorderSide(BorderSide(
color: Color(0xffCCCCCC),
width: 2,
)),
color: Color(0xffffffff),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
HeaderBodyExpandableNotifier(
headerWidget: Container(
margin: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
AppText(
'${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
InkWell(
onTap: () {
setState(() {
_showDetails = !_showDetails;
});
},
child: Icon(_showDetails
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down)),
],
child: Image.asset(
"assets/images/ic_circle_arrow.png",
width: 25,
height: 25,
color: Colors.black,
),
),
],
),
),
!_showDetails
? Container()
: AnimatedContainer(
duration: Duration(milliseconds: 200),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).fileNo,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.patientId}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).referralDoctor,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
Texts(
widget.myReferredPatientModel
.referralDoctorName,
maxLength: 80,
readMore: true,
),
],
),
),
]),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).referringClinic,
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).frequency,
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
widget.myReferredPatientModel
.frequencyDescription,
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
],
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).fileNo,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).priority,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(
margin: EdgeInsets.only(
left: 4,
top: 2.5,
right: 2.5,
bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).maxResponseTime,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
Helpers.getDateFormatted(widget
.myReferredPatientModel
.maxResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
])
AppText(
'${widget.myReferredPatientModel.patientId}',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
SizedBox(
height: 5,
),
AppText(
TranslationBase.of(context).clinicDetailsandRemarks,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Texts(
'${widget.myReferredPatientModel.referringDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start,
maxLength: 100),
SizedBox(
height: 5,
),
AppText(
TranslationBase.of(context).answerSuggestions,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container(
margin: EdgeInsets.only(
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).referralDoctor,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
Texts(
widget.myReferredPatientModel
.referralDoctorName,
maxLength: 80,
readMore: true,
),
],
),
Texts(
'${widget.myReferredPatientModel.referredDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start,
maxLength: 100),
SizedBox(
height: 5,
),
]),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).referringClinic,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
SizedBox(height: 10.0),
Container(
width: double.infinity,
child: Button(
onTap: () async {
try {
await widget.model.verify(widget.myReferredPatientModel);
DrAppToastMsg.showSuccesToast('Verify Successfully');
} catch (e) {
DrAppToastMsg.showErrorToast(e);
}
},
title: TranslationBase.of(context).verify,
loading: widget.model.state == ViewState.BusyLocal,
margin: EdgeInsets.only(
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).frequency,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
widget.myReferredPatientModel
.frequencyDescription,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
],
)
),
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).priority,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.priorityDescription}',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
Container(
margin: EdgeInsets.only(
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).maxResponseTime,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
Helpers.getDateFormatted(widget
.myReferredPatientModel.maxResponseTime),
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
])
],
),
)
],
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
SizedBox(
height: 5,
),
Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).clinicDetailsandRemarks,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Texts(
'${widget.myReferredPatientModel.referringDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start,
maxLength: 100),
SizedBox(
height: 5,
),
AppText(
TranslationBase.of(context).answerSuggestions,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Texts(
'${widget.myReferredPatientModel.referredDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start,
maxLength: 100),
],
),
),
SizedBox(
height: 5,
),
SizedBox(height: 10.0),
Container(
margin: EdgeInsets.all(10),
width: double.infinity,
child: Button(
onTap: () async {
try {
await widget.model
.verify(widget.myReferredPatientModel);
DrAppToastMsg.showSuccesToast(
'Verify Successfully');
} catch (e) {
DrAppToastMsg.showErrorToast(e);
}
},
title: TranslationBase.of(context).verify,
loading: widget.model.state == ViewState.BusyLocal,
),
)
],
)
],
),
isExpand: _showDetails,
)
],
),
);
}

@ -1,7 +1,11 @@
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/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
import 'package:flutter/material.dart';
import './profile_medical_info_widget.dart';
/*
@ -19,54 +23,416 @@ class PatientProfileWidget extends StatelessWidget {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return CustomScrollView(primary: false, slivers: <Widget>[
SliverList(
delegate: SliverChildListDelegate(
[
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Column(children: <Widget>[
Container(
padding: EdgeInsets.only(top: 20),
child: ProfileImageWidget(
url:
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
name: patient.firstName + ' ' + patient.lastName,
fontsize: 24.0,
color: Colors.black,
return Container(
color: Color(0XFFF2F2F2),
child: CustomScrollView(primary: false, slivers: <Widget>[
SliverList(
delegate: SliverChildListDelegate(
[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.shade300,
blurRadius: 10.0,
spreadRadius: 0,
offset: Offset(0, 10)
),
],
color: Colors.white
),
child: Column(children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
AvatarWidget(
Icon(
patient.genderDescription == "Male"
? DoctorApp.male
: DoctorApp.female_icon,
size: 70,
color: Colors.white,
),
),
SizedBox(
width: 20,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
patient.firstName + ' ' + patient.lastName,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Row(
children: [
AppText(
TranslationBase.of(context).fileNo,
color: Colors.black,
fontWeight: FontWeight.bold,
),
SizedBox(
width: 20,
),
AppText(
patient.patientId.toString(),
color: Colors.black,
fontWeight: FontWeight.normal,
),
],
)
],
)
],
),
),
Container(
child: Column(
children: <Widget>[
AppText(
'File No: ' + patient.patientId.toString(),
fontWeight: FontWeight.normal,
fontSize: 16,
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
Container(
height: 10 * SizeConfig.textMultiplier,
child: Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 8.0, 8.0, 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).age,
fontWeight: FontWeight.bold,
fontSize: 2 * SizeConfig.textMultiplier,
),
SizedBox(
height: 4,
),
AppText(
"${DateUtils.convertDateFromServerFormat(patient.dateofBirth, 'dd-MM-yyyy')} / ${patient.age}",
fontWeight: FontWeight.normal,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
],
),
),
),
Container(
width: 1,
color: Color(0xffCCCCCC),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 8.0, 8.0, 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).nationality,
fontWeight: FontWeight.bold,
fontSize: 2 * SizeConfig.textMultiplier,
),
SizedBox(
height: 4,
),
AppText(
patient.nationalityName,
fontWeight: FontWeight.normal,
fontSize: 1.7 * SizeConfig.textMultiplier,
),
],
),
),
),
Container(
width: 1,
color: Color(0xffCCCCCC),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 8.0, 8.0, 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).gender,
fontWeight: FontWeight.bold,
fontSize: 2 * SizeConfig.textMultiplier,
),
SizedBox(
height: 4,
),
AppText(
patient.genderDescription,
fontWeight: FontWeight.normal,
fontSize: 1.8 * SizeConfig.textMultiplier,
),
],
),
),
),
AppText(
patient.genderDescription.toString() +
', ' +
patient.age,
fontWeight: FontWeight.normal,
fontSize: 16,
)
],
),
)
),
Container(
width: double.infinity,
height: 1,
color: Color(0xffCCCCCC),
),
]),
]),
),
],
),
if (patient.admissionNo != null)
Container(
margin: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).admissionDetail,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 1.8 * SizeConfig.textMultiplier,
),
SizedBox(
height: 4,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border: Border.fromBorderSide(BorderSide(
color: Color(0xffBBBBBB),
width: 1,
)),
),
child: Column(
children: [
Padding(
padding: EdgeInsets.all(16),
child: Column(
children: [
Row(
children: [
Container(
width: 14 * SizeConfig.textMultiplier,
child: AppText(
TranslationBase.of(context).dateTime,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
),
AppText(
patient.admissionDate != null
? "${DateUtils
.convertDateFromServerFormat(
patient.admissionDate,
'EEEE dd, MMMM yyyy hh:mm a')}"
: "",
color: Colors.black,
fontWeight: FontWeight.normal,
fontSize:
1.6 * SizeConfig.textMultiplier,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Container(
width: 14 * SizeConfig.textMultiplier,
child: AppText(
TranslationBase.of(context).admissionNo,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
),
AppText(
patient.admissionNo != null
? patient.admissionNo
: '',
color: Colors.black,
fontWeight: FontWeight.normal,
fontSize: 1.6 *
SizeConfig.textMultiplier,
),
],
),
SizedBox(
height: 4,
),
Row(
children: [
Container(
width: 14 * SizeConfig.textMultiplier,
child: AppText(
TranslationBase.of(context).losNo,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
),
AppText(
patient.admissionDate != null
? DateUtils
.differenceBetweenServerDateAndCurrent(
patient.admissionDate)
: "",
color: Colors.black,
fontWeight: FontWeight.normal,
fontSize: 1.6 *
SizeConfig.textMultiplier,
),
],
),
],
),
),
const Divider(
color: Color(0xffCCCCCC),
height: 5,
thickness: 1,
indent: 0,
endIndent: 0,
),
Container(
height: 10 * SizeConfig.textMultiplier,
child: Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 8.0, 8.0, 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).area,
fontWeight: FontWeight.bold,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
SizedBox(
height: 4,
),
AppText(
patient.clinicDescription,
fontWeight: FontWeight.normal,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
],
),
),
),
Container(
width: 1,
color: Color(0xffCCCCCC),
),
Expanded(
child: Padding(
padding: const EdgeInsets.fromLTRB(16.0, 8.0, 8.0, 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).room,
fontWeight: FontWeight.bold,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
SizedBox(
width: 4,
),
AppText(
"${patient.nursingStationName}\n${patient.roomId}",
fontWeight: FontWeight.normal,
fontSize: 1.4 * SizeConfig.textMultiplier,
),
],
),
),
SizedBox(
height: 4,
),
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).bed,
fontWeight: FontWeight.bold,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
SizedBox(
width: 4,
),
AppText(
"${patient.bedId}",
fontWeight: FontWeight.normal,
fontSize: 1.6 * SizeConfig.textMultiplier,
),
],
),
),
],
),
),
),
],
),
)
],
),
)
],
),
),
],
),
],
),
),
SliverPadding(
padding: const EdgeInsets.all(16.0),
sliver: ProfileMedicalInfoWidget(
patient: patient,
))
]),
);
}
}
class AvatarWidget extends StatelessWidget {
final Widget avatarIcon;
AvatarWidget(this.avatarIcon);
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.08),
offset: Offset(0.0, 5.0),
blurRadius: 16.0)
],
borderRadius: BorderRadius.all(Radius.circular(35.0)),
color: Color(0xffCCCCCC),
),
SliverPadding(
padding: const EdgeInsets.fromLTRB(20, 30, 15, 10),
sliver: ProfileMedicalInfoWidget(
patient: patient,
))
]);
child: avatarIcon,
);
}
}

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../../../config/size_config.dart';
@ -29,26 +30,30 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
name: TranslationBase.of(context).vitalSign,
nameLine1: TranslationBase.of(context).vital,
nameLine2: TranslationBase.of(context).signs,
route: VITAL_SIGN_DETAILS,
icon: 'heartbeat.png'),
PatientProfileButton(
key: key,
patient: patient,
route: LAB_ORDERS,
name: TranslationBase.of(context).labOrder,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: patient,
route: PRESCRIPTIONS,
name: TranslationBase.of(context).prescription,
nameLine1: TranslationBase.of(context).medicines,
nameLine2: TranslationBase.of(context).prescription,
icon: 'note.png'),
PatientProfileButton(
key: key,
patient: patient,
route: RADIOLOGY,
name: TranslationBase.of(context).radiology,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'radiology-1.png'),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
@ -56,13 +61,15 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key,
patient: patient,
route: PROGRESS_NOTE,
name: TranslationBase.of(context).progressNote,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
icon: 'heartbeat.png')),
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_INSURANCE_APPROVALS,
name: TranslationBase.of(context).insuranceApprovals,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).approvals,
icon: 'lab.png'),
Visibility(
visible: selectedPatientType != 0 &&
@ -72,7 +79,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key,
patient: patient,
route: REFER_PATIENT,
name: TranslationBase.of(context).myReferralPatient,
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
icon: 'note.png')),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
@ -80,7 +88,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
key: key,
patient: patient,
route: PATIENT_ORDERS,
name: TranslationBase.of(context).orders,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).list,
icon: 'radiology-1.png')),
Visibility(
visible: selectedPatientType != 0 && selectedPatientType != 5,
@ -144,13 +153,14 @@ class CircleAvatarWidget extends StatelessWidget {
}
class PatientProfileButton extends StatelessWidget {
final String name;
final String nameLine1;
final String nameLine2;
final String icon;
final dynamic route;
final PatiantInformtion patient;
final String url = "assets/images/";
PatientProfileButton(
{Key key, this.patient, this.name, this.icon, this.route})
{Key key, this.patient, this.nameLine1, this.nameLine2, this.icon, this.route})
: super(key: key);
@override
Widget build(BuildContext context) {
@ -164,12 +174,25 @@ class PatientProfileButton extends StatelessWidget {
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.all(5),
child: new AppText(
this.name,
color: Colors.red,
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 2,
child:
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
this.nameLine1,
color: Color(0xFFB9382C),
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 2,
),
AppText(
this.nameLine2,
color: Colors.black,
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 2,
),
],
),
),
Expanded(
@ -189,6 +212,10 @@ class PatientProfileButton extends StatelessWidget {
// border: Border.all(),
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border.fromBorderSide(BorderSide(
color: Color(0xffBBBBBB),
width: 1,
)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2),

Loading…
Cancel
Save