Merge branch 'soap-objective-feature-re-design' into 'development'

fix referral card and UCAF design

See merge request Cloud_Solution/doctor_app_flutter!467
merge-requests/468/merge
Mohammad Aljammal 5 years ago
commit 3f3f8da0f6

@ -43,7 +43,7 @@ const Map<String, Map<String, String>> localizedValues = {
'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'}, 'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'},
'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'},
'service': {'en': 'Service', 'ar': 'خدمة'}, 'service': {'en': 'Service', 'ar': 'خدمة'},
'referral': {'en': 'Referral', 'ar': 'االإحالة'}, 'referral': {'en': 'Referral', 'ar': 'الإحالة'},
'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'}, 'inPatient': {'en': 'In Patient', 'ar': 'المريض الداخلي'},
'operations': {'en': 'Operations', 'ar': 'عمليات'}, 'operations': {'en': 'Operations', 'ar': 'عمليات'},
'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'},
@ -51,7 +51,7 @@ const Map<String, Map<String, String>> localizedValues = {
'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'}, 'myReferralPatient': {'en': 'My Referral Patient', 'ar': 'مرضى الاحالة'},
'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'}, 'referPatient': {'en': 'Referral Patient', 'ar': 'إحالة مريض'},
'myReferral': {'en': 'My Referral', 'ar': 'إحالة'}, 'myReferral': {'en': 'My Referral', 'ar': 'إحالة'},
'myReferredPatient': {'en': 'My Referred Patient', 'ar': 'مرضاي المحالين'}, 'myReferredPatient': {'en': 'Referred', 'ar': 'المحالين'},
'referredPatient': {'en': 'Referred Patient', 'ar': 'المرضى المحالين'}, 'referredPatient': {'en': 'Referred Patient', 'ar': 'المرضى المحالين'},
'referredOn': {'en': 'referred On : ', 'ar': ' : تمت الإحالة في'}, 'referredOn': {'en': 'referred On : ', 'ar': ' : تمت الإحالة في'},
'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'}, 'firstName': {'en': 'First Name', 'ar': 'الاسم الاول'},

@ -8,10 +8,12 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/order-procedure.dart'; import 'package:doctor_app_flutter/models/SOAP/order-procedure.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/patients/profile/UCAF/page-stepper-widget.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/PatientHeaderWidgetNoAvatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
@ -45,6 +47,9 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true,
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType, arrivalType),
appBarTitle: TranslationBase.of(context).ucaf, appBarTitle: TranslationBase.of(context).ucaf,
body: Column( body: Column(
children: [ children: [
@ -54,7 +59,32 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientHeaderWidgetNoAvatar(patient), // PatientHeaderWidgetNoAvatar(patient),
Container(
margin: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).patient}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).ucaf}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
PageStepperWidget(
stepsCount: 2,
currentStepIndex: 2,
screenSize: screenSize,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
@ -80,6 +110,32 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
child: Container(
child: BorderedButton(
TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Colors.white,
backgroundColor: Colors.white,
textColor: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.2,
handler: () {
Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE;
});
},
),
),
),
SizedBox(
width: 8,
),
Expanded(
child: Container(
child: BorderedButton( child: BorderedButton(
TranslationBase.of(context).save, TranslationBase.of(context).save,
hasBorder: true, hasBorder: true,
@ -103,25 +159,11 @@ class _UcafDetailScreenState extends State<UcafDetailScreen> {
}, },
), ),
), ),
Container( ),
margin: EdgeInsets.only( ],
left: 16, right: 16, top: 0.0, bottom: 8),
child: BorderedButton(
TranslationBase.of(context).cancel,
hasBorder: true,
vPadding: 8,
hPadding: 8,
borderColor: Colors.white,
backgroundColor: Colors.white,
textColor: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.2,
handler: () {
Navigator.of(context).popUntil((route) {
return route.settings.name == PATIENTS_PROFILE;
});
},
), ),
), ),
], ],
), ),
)); ));

@ -366,7 +366,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.1, height: screenSize.height * 0.1,
hintText: TranslationBase.of(context).specifyPossibleLineManagement, hintText: TranslationBase.of(context)
.specifyPossibleLineManagement,
dropDownText: "None", dropDownText: "None",
enabled: false, enabled: false,
minLines: 4, minLines: 4,
@ -385,7 +386,8 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.1, height: screenSize.height * 0.1,
hintText: TranslationBase.of(context).backAbdomen, hintText:
TranslationBase.of(context).backAbdomen,
dropDownText: "BackLNeck", dropDownText: "BackLNeck",
enabled: false, enabled: false,
), ),
@ -403,7 +405,11 @@ class _UCAFInputScreenState extends State<UCAFInputScreen> {
color: HexColor("#D02127"), color: HexColor("#D02127"),
onPressed: () { onPressed: () {
Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL, Navigator.of(context).pushNamed(PATIENT_UCAF_DETAIL,
arguments: {'patient': patient}); arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType
});
}, },
), ),
), ),

@ -13,7 +13,7 @@ class PageStepperWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double dividerWidth = (screenSize.width / stepsCount) - (10 * stepsCount); double dividerWidth = (screenSize.width / stepsCount) - (5 * stepsCount);
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0), margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0),
@ -68,8 +68,8 @@ class StepWidget extends StatelessWidget {
Container( Container(
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
margin: EdgeInsets.symmetric(horizontal: 1), margin: EdgeInsets.symmetric(horizontal: 1),
width: 25, width: 30,
height: 25, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9),
shape: BoxShape.circle, shape: BoxShape.circle,

@ -44,12 +44,12 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
child: Container( child: Container(
height: 60.0, height: 60.0,
// margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9, width: MediaQuery.of(context).size.width * 1, // 0.92,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Theme.of(context).dividerColor, color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7 width: 1), //width: 0.7
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -68,7 +68,7 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
width: MediaQuery.of(context).size.width * 0.30, width: MediaQuery.of(context).size.width * 0.30,
child: Center( child: Center(
child: child:
AppText(TranslationBase.of(context).myReferral), AppText(TranslationBase.of(context).referral),
), ),
), ),
Container( Container(

@ -282,17 +282,11 @@ class PatientReferralItemWidget extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
RichText( AppText(
text: new TextSpan( referralStatus != null ? referralStatus : "",
style: new TextStyle( fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier, fontSize: 1.9 * SizeConfig.textMultiplier,
color: Colors.black), fontWeight: FontWeight.w700,
children: <TextSpan>[
new TextSpan(
text: referralStatus != null
? referralStatus
: "",
style: TextStyle(
color: referralStatus != null color: referralStatus != null
? referralStatus == 'Pending' ? referralStatus == 'Pending'
? Color(0xffc4aa54) ? Color(0xffc4aa54)
@ -300,30 +294,26 @@ class PatientReferralItemWidget extends StatelessWidget {
? Colors.green[700] ? Colors.green[700]
: Colors.red[700] : Colors.red[700]
: Colors.grey[500], : Colors.grey[500],
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize:
2.0 * SizeConfig.textMultiplier)),
],
),
), ),
//TODO :ask backend to return in the standard format
AppText( AppText(
referredOn, referredOn,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 2.1 * SizeConfig.textMultiplier, fontSize: 2.0 * SizeConfig.textMultiplier,
color: Color(0XFF28353E),
) )
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
patientInfo.patientName, patientInfo.patientName,
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.2,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
backGroundcolor: Colors.white, backGroundcolor: Colors.white,
color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
@ -339,65 +329,69 @@ class PatientReferralItemWidget extends StatelessWidget {
DoctorApp.female_1, DoctorApp.female_1,
color: Colors.pink, color: Colors.pink,
), ),
],
),
SizedBox( SizedBox(
width: 10, width: 4,
),
AppText(
referredOn,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
)
],
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Column( Expanded(
child: Column(
children: [ children: [
RichText( Row(
text: new TextSpan( mainAxisAlignment: MainAxisAlignment.start,
style: new TextStyle( children: [
fontSize: 2.0 * SizeConfig.textMultiplier, AppText(
color: Colors.black), TranslationBase.of(context).fileNumber,
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.fileNumber,
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')),
new TextSpan(
text: patientInfo.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 15)), fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
),
AppText(
patientInfo.patientID.toString(),
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
),
], ],
), ),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).referredFrom,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
), ),
Container( AppText(
child: RichText( isSameBranch
text: new TextSpan( ? TranslationBase.of(context).sameBranch
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.referredFrom,
style: TextStyle(
fontSize: 14,
fontFamily: 'Poppins')),
new TextSpan(
text: isSameBranch
? TranslationBase.of(context)
.sameBranch
: TranslationBase.of(context) : TranslationBase.of(context)
.otherBranch, .otherBranch,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 15)), fontWeight: FontWeight.w700,
], fontSize: 1.8 * SizeConfig.textMultiplier,
), color: Color(0XFF2E303A),
), ),
],
), ),
], ],
), ),
),
Row( Row(
children: [ children: [
AppText( AppText(
@ -405,7 +399,8 @@ class PatientReferralItemWidget extends StatelessWidget {
patient.nationality*/ patient.nationality*/
"Saudi", "Saudi",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, color: Color(0xFF2E303A),
fontSize: 1.4 * SizeConfig.textMultiplier,
), ),
/* patient.nationality != null /* patient.nationality != null
? ClipRRect( ? ClipRRect(
@ -434,48 +429,68 @@ class PatientReferralItemWidget extends StatelessWidget {
) )
], ],
), ),
Container( Row(
child: RichText( mainAxisAlignment: MainAxisAlignment.start,
text: new TextSpan( crossAxisAlignment: CrossAxisAlignment.start,
style: new TextStyle( children: [
fontSize: 2.0 * SizeConfig.textMultiplier, AppText(
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).remarks + " : ", TranslationBase.of(context).remarks + " : ",
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')),
new TextSpan(
text: patientInfo.remarksFromSource,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 15)), fontWeight: FontWeight.w600,
], fontSize: 1.7 * SizeConfig.textMultiplier,
color: Color(0XFF575757),
), ),
Expanded(
child: AppText(
patientInfo.remarksFromSource,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 1.8 * SizeConfig.textMultiplier,
color: Color(0XFF2E303A),
), ),
), ),
],
),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 30, width: 2,
height: 30, height: 30,
margin: EdgeInsets.only( color: Color(0xFFD9D9D9),
left:
projectViewModel.isArabic ? 10 : 10 /*10:85*/, /*
right:
projectViewModel.isArabic ? 10 : 10 /*85:10*/,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Colors.grey[400], width: 2.5), color: Color(0xFFD9D9D9), width: 2.5),
left: BorderSide( left: BorderSide(
color: Colors.grey[400], width: 2.5), color: Color(0xFFD9D9D9), width: 2.5),
)), )),
*/
),
Container(
margin: EdgeInsets.only(
left: 0, top: 20, right: 0, bottom: 0),
child: Icon(
Icons.arrow_forward,
color: Color(0xFFD9D9D9),
size: 30,
),
),
Container(
margin: EdgeInsets.only(
left: 0, top: 25, right: 0, bottom: 0),
padding: EdgeInsets.only(left: 4.0, right: 4.0),
child: Container(
width: 40,
height: 40,
child: Image.asset(
'assets/images/female_avatar.png',
fit: BoxFit.cover,
),
),
), ),
Expanded( Expanded(
flex: 4, flex: 4,

Loading…
Cancel
Save