Merge branch 'patients-new-design' into 'development'

Patients new design

See merge request Cloud_Solution/doctor_app_flutter!377
merge-requests/378/merge
Mohammad Aljammal 5 years ago
commit b3caeb4b4c

@ -328,7 +328,7 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': 'لا وصفة طبية مدرجة' 'ar': 'لا وصفة طبية مدرجة'
}, },
'referTo': {'en': "Refer To", 'ar': 'محال إلى'}, 'referTo': {'en': "Refer To", 'ar': 'محال إلى'},
'referredFrom': {'en': "Referred From", 'ar': 'محال من'}, 'referredFrom': {'en': "From : ", 'ar': ' : من'},
'branch': {'en': "Branch", 'ar': 'الفرع'}, 'branch': {'en': "Branch", 'ar': 'الفرع'},
'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'}, 'chooseAppointment': {'en': "Choose Appointment", 'ar': 'اختر موعد'},
'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'}, 'appointmentNo': {'en': "Appointment # : ", 'ar': '# الموعد:'},

@ -1,12 +1,13 @@
// TODO : it have to be changed. // TODO : it have to be changed.
class PatiantInformtion { class PatiantInformtion {
final List<PatiantInformtion> list; final PatiantInformtion patientDetails;
int genderInt; int genderInt;
dynamic age; dynamic age;
String appointmentDate; String appointmentDate;
int appointmentNo; int appointmentNo;
String appointmentType; String appointmentType;
int appointmentTypeId;
String arrivedOn; String arrivedOn;
int clinicGroupId; int clinicGroupId;
String companyName; String companyName;
@ -31,6 +32,8 @@ class PatiantInformtion {
String firstNameN; String firstNameN;
String middleNameN; String middleNameN;
String lastNameN; String lastNameN;
String fullName;
String fullNameN;
int gender; int gender;
String dateofBirth; String dateofBirth;
String nationalityId; String nationalityId;
@ -58,7 +61,7 @@ class PatiantInformtion {
int visitTypeId; int visitTypeId;
String startTimes; String startTimes;
PatiantInformtion( PatiantInformtion(
{this.list, {this.patientDetails,
this.projectId, this.projectId,
this.clinicId, this.clinicId,
this.doctorId, this.doctorId,
@ -96,6 +99,7 @@ class PatiantInformtion {
this.startTime, this.startTime,
this.appointmentNo, this.appointmentNo,
this.appointmentType, this.appointmentType,
this.appointmentTypeId,
this.arrivedOn, this.arrivedOn,
this.clinicGroupId, this.clinicGroupId,
this.companyName, this.companyName,
@ -110,6 +114,8 @@ class PatiantInformtion {
this.nationality, this.nationality,
this.patientMRN, this.patientMRN,
this.visitType, this.visitType,
this.fullName,
this.fullNameN,
this.nationalityFlagURL, this.nationalityFlagURL,
this.patientStatusType, this.patientStatusType,
this.visitTypeId, this.visitTypeId,
@ -117,6 +123,8 @@ class PatiantInformtion {
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => factory PatiantInformtion.fromJson(Map<String, dynamic> json) =>
PatiantInformtion( PatiantInformtion(
patientDetails: json['patientDetails'] != null ? new PatiantInformtion.fromJson(json['patientDetails'])
: null,
projectId: json["ProjectID"] ?? json["projectID"], projectId: json["ProjectID"] ?? json["projectID"],
clinicId: json["ClinicID"] ?? json["clinicID"], clinicId: json["ClinicID"] ?? json["clinicID"],
doctorId: json["DoctorID"] ?? json["doctorID"], doctorId: json["DoctorID"] ?? json["doctorID"],
@ -133,6 +141,8 @@ class PatiantInformtion {
middleNameN: json["MiddleNameN"] ?? json["middleNameN"], middleNameN: json["MiddleNameN"] ?? json["middleNameN"],
lastNameN: json["LastNameN"] ?? json["lastNameN"], lastNameN: json["LastNameN"] ?? json["lastNameN"],
gender: json["Gender"] ?? json["gender"], gender: json["Gender"] ?? json["gender"],
fullName: json["fullName"] ?? json["fullName"],
fullNameN: json["fullNameN"] ?? json["fullNameN"],
dateofBirth: json["DateofBirth"] ?? json["dob"], dateofBirth: json["DateofBirth"] ?? json["dob"],
nationalityId: json["NationalityID"] ?? json["nationalityID"], nationalityId: json["NationalityID"] ?? json["nationalityID"],
mobileNumber: json["MobileNumber"] ?? json["mobileNumber"], mobileNumber: json["MobileNumber"] ?? json["mobileNumber"],
@ -165,6 +175,7 @@ class PatiantInformtion {
startTime: json["startTime"], startTime: json["startTime"],
appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'], appointmentNo: json['appointmentNo'] ?? json['AppointmentNo'],
appointmentType: json['appointmentType'], appointmentType: json['appointmentType'],
appointmentTypeId: json['appointmentTypeId'],
arrivedOn: json['arrivedOn'], arrivedOn: json['arrivedOn'],
clinicGroupId: json['clinicGroupId'], clinicGroupId: json['clinicGroupId'],
companyName: json['companyName'], companyName: json['companyName'],

@ -73,7 +73,7 @@ class PatientProfileScreen extends StatelessWidget {
color: Color(0XFFF2F2F2), color: Color(0XFFF2F2F2),
child: Stack( child: Stack(
children: [ children: [
SingleChildScrollView( Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -368,25 +368,27 @@ class PatientProfileScreen extends StatelessWidget {
), ),
), ),
), ),
Padding( Expanded(
padding: const EdgeInsets.all(16.0), child: Padding(
child: Container( padding: const EdgeInsets.all(16.0),
child: Column( child: SingleChildScrollView(
children: [ child: Column(
isFromSearch children: [
? ProfileMedicalInfoWidgetSearch( isFromSearch
patient: patient, ? ProfileMedicalInfoWidgetSearch(
patientType: patientType, patient: patient,
from: from, patientType: patientType,
to: to, from: from,
) to: to,
: ProfileMedicalInfoWidget( )
patient: patient, : ProfileMedicalInfoWidget(
patientType: patientType, patient: patient,
from: from, patientType: patientType,
to: to, from: from,
), to: to,
], ),
],
),
), ),
), ),
) )

@ -2,14 +2,17 @@ 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/auth_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.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/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/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/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/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/PatientProfileButton.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientProfileButton.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.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';
@ -42,17 +45,60 @@ class MyReferralDetailScreen extends StatelessWidget {
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: model.patientArrivalList != null && body: model.patientArrivalList != null &&
model.patientArrivalList.length > 0 model.patientArrivalList.length > 0
? Column( ? Column(
children: [ children: [
Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
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(
(Helpers.capitalize(model.patientArrivalList[0].patientDetails.fullName)),
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
model.patientArrivalList[0].patientDetails.gender == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
]),
),
],
),
),
),
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ProfileWelcomeWidget( /*ProfileWelcomeWidget(
AppText( AppText(
authProvider.selectedClinicName != null authProvider.selectedClinicName != null
? authProvider.selectedClinicName ? authProvider.selectedClinicName
@ -63,7 +109,7 @@ class MyReferralDetailScreen extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
height: 100, height: 100,
), ),*/
SizedBox( SizedBox(
height: 16, height: 16,
), ),
@ -80,7 +126,7 @@ class MyReferralDetailScreen extends StatelessWidget {
PatientReferralItemWidget( PatientReferralItemWidget(
"${pendingReferral.patientID}", "${pendingReferral.patientID}",
patientName: pendingReferral.patientName, patientName: pendingReferral.patientName,
referralStatus: null, referralStatus: pendingReferral.referralStatus,
isReferredTo: false, isReferredTo: false,
isSameBranch: isSameBranch:
pendingReferral.isReferralDoctorSameBranch, pendingReferral.isReferralDoctorSameBranch,
@ -89,47 +135,14 @@ class MyReferralDetailScreen extends StatelessWidget {
clinicDescription: null, clinicDescription: null,
remark: pendingReferral.remarksFromSource, remark: pendingReferral.remarksFromSource,
referredOn: pendingReferral.referredOn, referredOn: pendingReferral.referredOn,
patientInfo: pendingReferral,
), ),
SizedBox( SizedBox(
child: GridView.count( child: ProfileMedicalInfoWidgetSearch(
childAspectRatio: 1.8, patient: model.patientArrivalList[0],
crossAxisSpacing: 8, patientType: "7",
mainAxisSpacing: 10, from: null,
controller: new ScrollController( to: null,
keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
crossAxisCount: 2,
children: [
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context)
.previewHealth,
nameLine2: TranslationBase.of(context)
.summaryReport,
icon: 'radiology-1.png'),
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route: LAB_ORDERS,
nameLine1:
TranslationBase.of(context).lab,
nameLine2:
TranslationBase.of(context).result,
icon: 'lab.png'),
PatientProfileButton(
key: key,
patient: model.patientArrivalList[0],
route:
VITAL_SIGN_DETAILS /*PATIENT_VITAL_SIGN*/,
nameLine1:
TranslationBase.of(context).vital,
nameLine2:
TranslationBase.of(context).signs,
icon: 'heartbeat.png'),
],
), ),
), ),
], ],

@ -33,33 +33,13 @@ class MyReferralPatientScreen extends StatelessWidget {
) )
: SingleChildScrollView( : SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(top: 50),
// color: Colors.white,
// height: MediaQuery.of(context).size.height,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 100), // SizedBox(height: 50),
ProfileWelcomeWidget(
AppText(
authProvider.selectedClinicName != null
? authProvider.selectedClinicName
: authProvider.doctorProfile.clinicDescription,
fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.white,
textAlign: TextAlign.center,
),
height: 100,
),
SizedBox(
height: 16,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: AppText(
TranslationBase.of(context).myReferralPatient,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
...List.generate( ...List.generate(
model.pendingReferral.length, model.pendingReferral.length,
(index) => InkWell( (index) => InkWell(
@ -71,9 +51,11 @@ class MyReferralPatientScreen extends StatelessWidget {
}, },
child: PatientReferralItemWidget( child: PatientReferralItemWidget(
"${model.pendingReferral[index].patientID}", "${model.pendingReferral[index].patientID}",
patientInfo: model.pendingReferral[index],
patientName: patientName:
model.pendingReferral[index].patientName, model.pendingReferral[index].patientName,
referralStatus: null, referralStatus:
model.pendingReferral[index].referralStatus,
isReferredTo: false, isReferredTo: false,
isSameBranch: model.pendingReferral[index] isSameBranch: model.pendingReferral[index]
.isReferralDoctorSameBranch, .isReferralDoctorSameBranch,

@ -37,6 +37,7 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
appBarTitle: TranslationBase.of(context).patientsreferral, appBarTitle: TranslationBase.of(context).patientsreferral,
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
// backgroundColor: Colors.white,
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0), preferredSize: Size.fromHeight(65.0),
child: Center( child: Center(
@ -91,7 +92,8 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
MyReferralPatientScreen(), MyReferralPatientScreen(),
MyReferredPatient(), ReferredPatientScreen(),
// MyReferredPatient(),
], ],
), ),
) )

@ -15,6 +15,7 @@ class ReferredPatientScreen extends StatelessWidget {
onModelReady: (model) => model.getMyReferredPatient(), onModelReady: (model) => model.getMyReferredPatient(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).referredPatient, appBarTitle: TranslationBase.of(context).referredPatient,
body: model.listMyReferredPatientModel == null || body: model.listMyReferredPatientModel == null ||
model.listMyReferredPatientModel.length == 0 model.listMyReferredPatientModel.length == 0

@ -1,6 +1,11 @@
import 'package:doctor_app_flutter/config/size_config.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';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.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';
class PatientReferralItemWidget extends StatelessWidget { class PatientReferralItemWidget extends StatelessWidget {
final String patientName; final String patientName;
@ -14,6 +19,7 @@ class PatientReferralItemWidget extends StatelessWidget {
final String referredOn; final String referredOn;
final String answerFromTarget; final String answerFromTarget;
final Widget infoIcon; final Widget infoIcon;
final PendingReferral patientInfo;
PatientReferralItemWidget( PatientReferralItemWidget(
this.patientID, { this.patientID, {
@ -27,230 +33,387 @@ class PatientReferralItemWidget extends StatelessWidget {
this.referredOn, this.referredOn,
this.answerFromTarget, this.answerFromTarget,
this.infoIcon, this.infoIcon,
this.patientInfo,
}); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column( child: Column(
children: [ children: [
Row( // TODO should be removed by mousa
children: [ // Row(
Expanded( // children: [
// Expanded(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// if (referralStatus != null)
// Row(
// children: [
// AppText(
// TranslationBase.of(context).referralStatus,
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// Container(
// color: Color(0xFF4BA821),
// padding: EdgeInsets.all(4),
// child: AppText(
// referralStatus
// /*referralStatus == "46"
// ? TranslationBase.of(context).approved
// : TranslationBase.of(context).rejected*/
// ,
// color: Colors.white,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// Row(
// children: [
// AppText(
// isReferredTo
// ? "${TranslationBase.of(context).referTo}: "
// : "${TranslationBase.of(context).referredFrom}: ",
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// AppText(
// isSameBranch
// ? TranslationBase.of(context).sameBranch
// : TranslationBase.of(context).otherBranch,
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// AppText(
// "${TranslationBase.of(context).referralDoctor} : ",
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// Expanded(
// child: AppText(
// referralDoctorName != null
// ? "${TranslationBase.of(context).dr} $referralDoctorName"
// : "-",
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// if (clinicDescription != null)
// Row(
// children: [
// AppText(
// "${TranslationBase.of(context).clinic}: ",
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// AppText(
// clinicDescription,
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// Row(
// children: [
// AppText(
// "${TranslationBase.of(context).patientID}: ",
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// AppText(
// patientID ?? '-',
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// Row(
// children: [
// AppText(
// "${TranslationBase.of(context).patientName}: ",
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// AppText(
// patientName ?? '-',
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// AppText(
// TranslationBase.of(context).referralRemark,
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// Expanded(
// child: AppText(
// remark,
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
// Row(
// children: [
// AppText(
// TranslationBase.of(context).referredOn,
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// AppText(
// referredOn ?? '-',
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ],
// ),
// if (answerFromTarget != null)
// SizedBox(
// height: 8,
// ),
// if (answerFromTarget != null)
// Row(
// children: [
// AppText(
// TranslationBase.of(context).referralResponse,
// color: Colors.grey,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// AppText(
// answerFromTarget != "" ? answerFromTarget : '-',
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 12,
// ),
// ],
// ),
// SizedBox(
// height: 16,
// ),
// ],
// ),
// ),
// if (infoIcon != null) infoIcon,
// ],
// ),
// const Divider(
// color: Color(0xffCCCCCC),
// height: 1,
// thickness: 1,
// indent: 0,
// endIndent: 0,
// ),
// SizedBox(
// height: 8,
// ),
Container(
child: CardWithBgWidget(
bgColor: referralStatus != null ? referralStatus == 'Pending'
? Colors.orange[400]
: Colors.red[800] : Colors.grey[500],
hasBorder: false,
widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
child: InkWell(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: [
if (referralStatus != null)
Row(
children: [
AppText(
TranslationBase.of(context).referralStatus,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
Container(
color: Color(0xFF4BA821),
padding: EdgeInsets.all(4),
child: AppText(
referralStatus
/*referralStatus == "46"
? TranslationBase.of(context).approved
: TranslationBase.of(context).rejected*/
,
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
],
),
SizedBox(
height: 8,
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( RichText(
isReferredTo text: new TextSpan(
? "${TranslationBase.of(context).referTo}: " style: new TextStyle(
: "${TranslationBase.of(context).referredFrom}: ", fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.grey, color: Colors.black),
fontWeight: FontWeight.bold, children: <TextSpan>[
fontSize: 12, new TextSpan(
text: referralStatus != null ? referralStatus : "",
style: TextStyle(
color: referralStatus != null ? referralStatus == 'Pending'
? Colors.orange[400]
: Colors.red[800] : Colors.grey[500],
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 18)),
],
),
), ),
//TODO :ask backend to return in the standerformate
AppText( AppText(
isSameBranch referredOn,
? TranslationBase.of(context).sameBranch fontFamily: 'Poppins',
: TranslationBase.of(context).otherBranch, fontWeight: FontWeight.w600,
color: Colors.black, )
fontWeight: FontWeight.bold,
fontSize: 12,
),
], ],
), ),
SizedBox( AppText(
height: 8, patientInfo.patientName,
), fontSize: SizeConfig.textMultiplier * 2,
Row( fontWeight: FontWeight.bold,
crossAxisAlignment: CrossAxisAlignment.start, backGroundcolor: Colors.white,
children: [ fontFamily: 'Poppins',
AppText(
"${TranslationBase.of(context).referralDoctor} : ",
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
Expanded(
child: AppText(
referralDoctorName != null
? "${TranslationBase.of(context).dr} $referralDoctorName"
: "-",
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
],
), ),
SizedBox( SizedBox(
height: 8, width: 10,
), ),
if (clinicDescription != null) RichText(
Row( text: new TextSpan(
children: [ style: new TextStyle(
AppText( fontSize: 2.0 * SizeConfig.textMultiplier,
"${TranslationBase.of(context).clinic}: ", color: Colors.black),
color: Colors.grey, children: <TextSpan>[
fontWeight: FontWeight.bold, new TextSpan(
fontSize: 12, text: TranslationBase.of(context).fileNumber,
), style: TextStyle(
AppText( fontSize: 14, fontFamily: 'Poppins')),
clinicDescription, new TextSpan(
color: Colors.black, text: patientInfo.patientID.toString(),
fontWeight: FontWeight.bold, style: TextStyle(
fontSize: 12, fontWeight: FontWeight.w700,
), fontFamily: 'Poppins',
fontSize: 15)),
], ],
), ),
SizedBox(
height: 8,
), ),
Row( Container(
children: [ child: RichText(
AppText( text: new TextSpan(
"${TranslationBase.of(context).patientID}: ", style: new TextStyle(
color: Colors.grey, fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, color: Colors.black),
fontSize: 12, children: <TextSpan>[
), new TextSpan(
AppText( text: TranslationBase.of(context).referredFrom,
patientID ?? '-', style: TextStyle(
color: Colors.black, fontSize: 14, fontFamily: 'Poppins')),
fontWeight: FontWeight.bold, new TextSpan(
fontSize: 12, text: isSameBranch
? TranslationBase.of(context).sameBranch
: TranslationBase.of(context).otherBranch,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
), ),
], ),
),
SizedBox(
height: 8,
), ),
Row( Container(
children: [ child: RichText(
AppText( text: new TextSpan(
"${TranslationBase.of(context).patientName}: ", style: new TextStyle(
color: Colors.grey, fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, color: Colors.black),
fontSize: 12, children: <TextSpan>[
), new TextSpan(
AppText( text:
patientName ?? '-', TranslationBase.of(context).remarks + " : ",
color: Colors.black, style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 14, fontFamily: 'Poppins')),
fontSize: 12, new TextSpan(
text: patientInfo.remarksFromSource,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
), ),
], ),
), ),
SizedBox( SizedBox(
height: 8, height: 20,
), ),
Row( Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( RichText(
TranslationBase.of(context).referralRemark, text: TextSpan(
color: Colors.grey, style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 2.0 * SizeConfig.textMultiplier,
fontSize: 12, color: Colors.black),
), children: <TextSpan>[
Expanded( TextSpan(
child: AppText( text: TranslationBase.of(context)
remark, .referralDoctor +
color: Colors.black, " : ",
fontWeight: FontWeight.bold, style: TextStyle(
fontSize: 12, fontSize: 14, fontFamily: 'Poppins')),
TextSpan(
text: referralDoctorName,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
), ),
), )
],
),
SizedBox(
height: 8,
),
Row(
children: [
AppText(
TranslationBase.of(context).referredOn,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
referredOn ?? '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
], ],
), ),
if (answerFromTarget != null) Container(
SizedBox( width: double.infinity,
height: 8, alignment: Alignment.centerRight,
), child: Icon(FontAwesomeIcons.arrowRight,
if (answerFromTarget != null) size: 25, color: Colors.black))
Row(
children: [
AppText(
TranslationBase.of(context).referralResponse,
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
answerFromTarget != "" ? answerFromTarget : '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
),
SizedBox(
height: 16,
),
], ],
), ),
), // onTap: onTap,
if (infoIcon != null) infoIcon, )),
], ),
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 8,
), ),
], ],
), ),

@ -88,14 +88,14 @@ class PatientProfileButton extends StatelessWidget {
color: Color(0xffBBBBBB), color: Color(0xffBBBBBB),
width: 1, width: 1,
)), )),
boxShadow: [ /*boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.2), color: Colors.grey.withOpacity(0.2),
spreadRadius: 5, spreadRadius: 5,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow offset: Offset(0, 3), // changes position of shadow
), ),
], ],*/
), ),
); );
} }

@ -67,7 +67,7 @@ class PatientPageHeaderWidget extends StatelessWidget {
height: 5, height: 5,
), ),
AppText( AppText(
patient.firstName + ' ' + patient.lastName, patient.patientDetails.fullName != null ? patient.patientDetails.fullName : patient.firstName,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

@ -13,8 +13,11 @@ import 'package:provider/provider.dart';
class CardWithBgWidget extends StatelessWidget { class CardWithBgWidget extends StatelessWidget {
final Widget widget; final Widget widget;
final Color bgColor;
final bool hasBorder;
CardWithBgWidget({@required this.widget}); CardWithBgWidget(
{@required this.widget, this.bgColor, this.hasBorder = true});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -26,7 +29,9 @@ class CardWithBgWidget extends StatelessWidget {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all(color: HexColor('#707070'), width: 2.0), border: Border.all(
color: hasBorder ? HexColor('#707070') : Colors.transparent,
width: hasBorder ? 2.0 : 0),
), ),
child: Material( child: Material(
borderRadius: BorderRadius.all(Radius.circular(10.0)), borderRadius: BorderRadius.all(Radius.circular(10.0)),
@ -34,23 +39,33 @@ class CardWithBgWidget extends StatelessWidget {
children: [ children: [
if (projectProvider.isArabic) if (projectProvider.isArabic)
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),),),
width: 10, width: 10,
color: HexColor('#58434F'),
), ),
bottom: 0, bottom: 1,
top: 0, top: 1,
right: 0, right: 1,
) )
else else
Positioned( Positioned(
child: Container( child: Container(
decoration: BoxDecoration(
color: bgColor ?? HexColor('#58434F'),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),),),
width: 10, width: 10,
color: HexColor('#58434F'),
), ),
bottom: 0, bottom: 1,
top: 0, top: 1,
left: 0, left: 1,
), ),
Container( Container(
padding: EdgeInsets.all(15.0), padding: EdgeInsets.all(15.0),

Loading…
Cancel
Save