merge-requests/383/head
Sultan Khan 4 years ago
commit 3c1a65f310

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

@ -42,7 +42,7 @@ class VitalSignsService extends BaseService {
hasError = false;
Map<String, dynamic> body = Map();
body['PatientMRN'] = patient.patientId; // patient.patientMRN
body['AppointmentNo'] = patient.appointmentNo;
// body['AppointmentNo'] = patient.appointmentNo;
// body['EpisodeID'] = patient.episodeNo;
body['PatientTypeID'] = 1;
body['PatientType'] = 1;

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

File diff suppressed because it is too large Load Diff

@ -1,14 +1,21 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/medical_file_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/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.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/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_scaffold_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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class MedicalFilePage extends StatefulWidget {
@override
@ -21,6 +28,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId),
builder:
@ -32,18 +42,45 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
baseViewModel: model,
child: SingleChildScrollView(
child: Container(
color: Colors.white,
child: Column(
// mainAxisAlignment: model.medicalFileList.length != 0 &&
// model.medicalFileList != null
// ? MainAxisAlignment.start
// : MainAxisAlignment.center,
children: [
PatientPageHeaderWidget(patient),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey,
PatientProfileHeaderNewDesign(
patient, patient.patientType.toString(), arrivalType),
Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
child: Container(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
'Medical',
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
'Report',
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
],
),
],
),
),
),
),
(model.medicalFileList != null &&
model.medicalFileList.length != 0)
@ -60,66 +97,155 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
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: [
AppText(
TranslationBase.of(context).branch +
": ",
fontWeight: FontWeight.w700,
Row(
children: [
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
fontSize: 17.0,
fontFamily: 'Poppins',
)
],
),
AppText(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName),
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: [
AppText(
TranslationBase.of(context)
.doctorName
.toUpperCase() +
": ",
fontWeight: FontWeight.w700,
),
Expanded(
child: AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
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: [
AppText(
TranslationBase.of(context)
.clinicName +
": ",
fontWeight: FontWeight.w700,
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
),
Column(
children: [
Icon(
Icons.remove_red_eye,
size: 30.0,
)
],
)
],
),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
],
),
),
@ -135,16 +261,24 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
)),
);
},
),
);
})
: Container(
child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
),
: Column(
children: [
Container(
child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
),
),
SizedBox(
height: 400,
)
],
)
],
),

@ -1,6 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/InsuranceViewModel.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/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -236,7 +237,7 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
),
Texts(
convertDateFormat(model.insuranceApproval[index].rceiptOn),
DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[index].rceiptOn).toString(),
fontSize: 17.5,
fontWeight: FontWeight.w600,
@ -257,7 +258,7 @@ class _InsuranceApprovalScreenNewState extends State<InsuranceApprovalScreenNew>
),
Texts(
convertDateFormat(model.insuranceApproval[index].expiryDate),
DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[index].expiryDate).toString(),
fontSize: 17.5,
fontWeight: FontWeight.w600,

@ -1,42 +1,27 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.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/SOAP/GeneralGetReqForSOAP.dart';
import 'package:doctor_app_flutter/models/SOAP/PostEpisodeReqModel.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/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/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_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_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import '../../../routes.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
*@param:
*@return:PatientProfileWidget
*@desc: Patient Profile Widget
*/
// ignore: must_be_immutable
class PatientProfileScreen extends StatelessWidget {
PatiantInformtion patient;
bool isFromSearch = false;
//TODO change it
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -73,320 +58,35 @@ class PatientProfileScreen extends StatelessWidget {
color: Color(0XFFF2F2F2),
child: Stack(
children: [
SingleChildScrollView(
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
height: 220,
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(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)),
fontSize: SizeConfig.textMultiplier * 3,
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)),
],
),
),
PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Expanded(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
child: Column(
children: [
isFromSearch
? ProfileMedicalInfoWidgetSearch(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
)
: ProfileMedicalInfoWidget(
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
),
],
),
),
]),
],
),
),
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
child: Column(
children: [
isFromSearch
? ProfileMedicalInfoWidgetSearch(
patient: patient,
patientType: patientType,
from: from,
to: to,
)
: ProfileMedicalInfoWidget(
patient: patient,
patientType: patientType,
from: from,
to: to,
),
],
],
),
),
),
)
@ -493,42 +193,6 @@ class AvatarWidget extends StatelessWidget {
}
}
convertDateFormat2(String str) {
String timeConvert;
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)));
String 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));
}
/* Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -56,15 +56,16 @@ class RadiologyDetailsPage extends StatelessWidget {
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100],
// color: Colors.grey[100],
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Divider(),
if (finalRadiology.dIAPACSURL != "")
if (model.radImageURL.isNotEmpty)
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () {
launch(model.radImageURL);
},

@ -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/viewModel/auth_view_model.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/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/helpers.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/profile/PatientProfileButton.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_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
@ -42,17 +45,60 @@ class MyReferralDetailScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).referPatient,
isShowAppBar: false,
body: model.patientArrivalList != null &&
model.patientArrivalList.length > 0
? Column(
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(
child: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ProfileWelcomeWidget(
/*ProfileWelcomeWidget(
AppText(
authProvider.selectedClinicName != null
? authProvider.selectedClinicName
@ -63,7 +109,7 @@ class MyReferralDetailScreen extends StatelessWidget {
textAlign: TextAlign.center,
),
height: 100,
),
),*/
SizedBox(
height: 16,
),
@ -80,7 +126,7 @@ class MyReferralDetailScreen extends StatelessWidget {
PatientReferralItemWidget(
"${pendingReferral.patientID}",
patientName: pendingReferral.patientName,
referralStatus: null,
referralStatus: pendingReferral.referralStatus,
isReferredTo: false,
isSameBranch:
pendingReferral.isReferralDoctorSameBranch,
@ -89,47 +135,14 @@ class MyReferralDetailScreen extends StatelessWidget {
clinicDescription: null,
remark: pendingReferral.remarksFromSource,
referredOn: pendingReferral.referredOn,
patientInfo: pendingReferral,
),
SizedBox(
child: GridView.count(
childAspectRatio: 1.8,
crossAxisSpacing: 8,
mainAxisSpacing: 10,
controller: new ScrollController(
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'),
],
child: ProfileMedicalInfoWidgetSearch(
patient: model.patientArrivalList[0],
patientType: "7",
from: null,
to: null,
),
),
],

@ -33,33 +33,13 @@ class MyReferralPatientScreen extends StatelessWidget {
)
: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 50),
// color: Colors.white,
// height: MediaQuery.of(context).size.height,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 100),
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,
),
),
// SizedBox(height: 50),
...List.generate(
model.pendingReferral.length,
(index) => InkWell(
@ -71,9 +51,11 @@ class MyReferralPatientScreen extends StatelessWidget {
},
child: PatientReferralItemWidget(
"${model.pendingReferral[index].patientID}",
patientInfo: model.pendingReferral[index],
patientName:
model.pendingReferral[index].patientName,
referralStatus: null,
referralStatus:
model.pendingReferral[index].referralStatus,
isReferredTo: false,
isSameBranch: model.pendingReferral[index]
.isReferralDoctorSameBranch,

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

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

@ -24,6 +24,8 @@ class VitalSignDetailsScreen extends StatelessWidget {
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
String from = routeArgs['from'];
String to = routeArgs['to'];
String imageBasePath = 'assets/images/';

@ -19,16 +19,21 @@ class DateUtils {
}
static DateTime getDateTimeFromServerFormat(String str) {
const start = "/Date(";
DateTime date= DateTime.now();
if (str!=null) {
const start = "/Date(";
const end = "+0300)";
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(
int.parse(str.substring(startIndex + start.length, endIndex)));
date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex)));
} else {
date = DateTime.now();
}
return date;
}
@ -279,4 +284,14 @@ class DateUtils {
}
return "$years ${TranslationBase.of(context).years} $months ${TranslationBase.of(context).months} $days ${TranslationBase.of(context).days}";
}
static bool isToday(DateTime dateTime){
DateTime todayDate = DateTime.now().toUtc();
if(dateTime.day == todayDate.day && dateTime.month == todayDate.month && dateTime.year == todayDate.year) {
return true;
}
return false;
}
}

@ -1,8 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.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/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -16,58 +17,83 @@ class MyScheduleWidget extends StatelessWidget {
List<WorkingHours> workingHours = Helpers.getWorkingHours(
workingHoursTable.workingHours,
);
return CardWithBgWidgetNew(
widget: Container(
child: Column(
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
children: [
Divider(
height: 1,
color: Colors.grey,
thickness: 1.0,
),
],
children: [
SizedBox(
height: 10,
),
AppText(
workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier,
fontFamily: 'Poppins',
// fontSize: 18
),
SizedBox(
height: 10,
),
Row(
children: <Widget>[
AppText(
workingHoursTable.dayName,
fontSize: 2.5 * SizeConfig.textMultiplier,
),
AppText(
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}',
fontSize: 2.2 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
),
],
AppText(
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
// fontSize: 18
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: workingHours.map((work) {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 5,
),
AppText(
work.from + ' - ' + work.to,
fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
],
),
Container(
width: MediaQuery.of(context).size.width * 0.55,
child: CardWithBgWidget(
bgColor: DateUtils.isToday(workingHoursTable.date)
? Colors.green[500]
: Colors.transparent,
// hasBorder: false,
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (DateUtils.isToday(workingHoursTable.date))
AppText(
"Today",
fontSize: 2.5 * SizeConfig.textMultiplier,
fontFamily: 'Poppins',
color: Colors.green[500],
// fontSize: 18
),
SizedBox(
height: 10,
),
);
}).toList(),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: workingHours.map((work) {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 5,
),
AppText(
work.from + ' - ' + work.to,
fontSize: 2.0 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
);
}).toList(),
),
],
),
),
],
),
),
),
],
);
}
}

@ -1,6 +1,12 @@
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/my_referral/PendingReferral.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/card_with_bg_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class PatientReferralItemWidget extends StatelessWidget {
final String patientName;
@ -14,6 +20,7 @@ class PatientReferralItemWidget extends StatelessWidget {
final String referredOn;
final String answerFromTarget;
final Widget infoIcon;
final PendingReferral patientInfo;
PatientReferralItemWidget(
this.patientID, {
@ -27,230 +34,453 @@ class PatientReferralItemWidget extends StatelessWidget {
this.referredOn,
this.answerFromTarget,
this.infoIcon,
this.patientInfo,
});
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(16.0),
margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column(
children: [
Row(
children: [
Expanded(
// TODO should be removed by mousa
// Row(
// 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'
? Color(0xffc4aa54)
: Colors.red[800]
: Colors.grey[500],
hasBorder: false,
widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
child: InkWell(
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,
),
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
isReferredTo
? "${TranslationBase.of(context).referTo}: "
: "${TranslationBase.of(context).referredFrom}: ",
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: referralStatus != null
? referralStatus
: "",
style: TextStyle(
color: referralStatus != null
? referralStatus == 'Pending'
? Color(0xffc4aa54)
: referralStatus == 'Accepted'
? Colors.green[700]
: Colors.red[700]
: Colors.grey[500],
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)),
],
),
),
//TODO :ask backend to return in the standard format
AppText(
isSameBranch
? TranslationBase.of(context).sameBranch
: TranslationBase.of(context).otherBranch,
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
referredOn,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 2.1 * SizeConfig.textMultiplier,
)
],
),
SizedBox(
height: 8,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"${TranslationBase.of(context).referralDoctor} : ",
color: Colors.grey,
patientInfo.patientName,
fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold,
fontSize: 12,
),
Expanded(
child: AppText(
referralDoctorName != null
? "${TranslationBase.of(context).dr} $referralDoctorName"
: "-",
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
backGroundcolor: Colors.white,
fontFamily: 'Poppins',
),
],
),
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,
SizedBox(
width: 4,
),
AppText(
patientID ?? '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
/*patient.gender*/1 == 1
? Icon(
DoctorApp.male_2,
color: Colors.blue,
)
: Icon(
DoctorApp.female_1,
color: Colors.pink,
),
],
),
SizedBox(
height: 8,
width: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppText(
"${TranslationBase.of(context).patientName}: ",
color: Colors.grey,
fontWeight: FontWeight.bold,
fontSize: 12,
),
AppText(
patientName ?? '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
Column(
children: [
RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
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',
fontSize: 15)),
],
),
),
Container(
child: RichText(
text: new TextSpan(
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).otherBranch,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
),
),
],
),
Row(
children: [
AppText(
/*patient.nationalityName ??
patient.nationality*/ "Saudi",
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()
],
)
],
),
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,
),
Container(
child: RichText(
text: new TextSpan(
style: new TextStyle(
fontSize: 2.0 * SizeConfig.textMultiplier,
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text:
TranslationBase.of(context).remarks + " : ",
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')),
new TextSpan(
text: patientInfo.remarksFromSource,
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
),
],
),
),
SizedBox(
height: 8,
height: 20,
),
Row(
Column(
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,
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)),
],
),
AppText(
answerFromTarget != "" ? answerFromTarget : '-',
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 12,
),
],
),
SizedBox(
height: 16,
)
],
),
Container(
width: double.infinity,
alignment: Alignment.centerRight,
child: Icon(FontAwesomeIcons.arrowRight,
size: 25, color: Colors.black))
],
),
),
if (infoIcon != null) infoIcon,
],
),
const Divider(
color: Color(0xffCCCCCC),
height: 1,
thickness: 1,
indent: 0,
endIndent: 0,
),
SizedBox(
height: 8,
// onTap: onTap,
)),
),
),
],
),

@ -11,6 +11,8 @@ class PatientProfileButton extends StatelessWidget {
final String icon;
final dynamic route;
final PatiantInformtion patient;
final String patientType;
String arrivalType;
String from;
String to;
final String url = "assets/images/";
@ -20,16 +22,18 @@ class PatientProfileButton extends StatelessWidget {
PatientProfileButton(
{Key key,
this.patient,
this.nameLine1,
this.nameLine2,
this.icon,
this.route,
this.isDisable = false,
this.onTap,
this.isLoading = false,
this.from,
this.to})
this.patient,
this.patientType,
this.arrivalType,
this.nameLine1,
this.nameLine2,
this.icon,
this.route,
this.isDisable = false,
this.onTap,
this.isLoading = false,
this.from,
this.to})
: super(key: key);
@override
@ -41,19 +45,23 @@ class PatientProfileButton extends StatelessWidget {
onTap: isDisable
? null
: onTap != null
? onTap
: () {
navigator(context, this.route);
},
? onTap
: () {
navigator(context, this.route);
},
child: Column(children: <Widget>[
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: new Image.asset(url + icon, width: 50, height: 50,))
],
)),
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: new Image.asset(
url + icon,
width: 50,
height: 50,
))
],
)),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.all(5),
@ -62,7 +70,8 @@ class PatientProfileButton extends StatelessWidget {
children: [
AppText(
this.nameLine1,
color: Colors.black, /*Color(0xFFB9382C),*/
color: Colors.black,
/*Color(0xFFB9382C),*/
fontWeight: FontWeight.w600,
textAlign: TextAlign.left,
fontSize: SizeConfig.textMultiplier * 1.5,
@ -88,14 +97,14 @@ class PatientProfileButton extends StatelessWidget {
color: Color(0xffBBBBBB),
width: 1,
)),
boxShadow: [
/*boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow
),
],
],*/
),
);
}
@ -107,7 +116,15 @@ class PatientProfileButton extends StatelessWidget {
if (to == null) {
to = DateUtils.convertDateToFormat(DateTime.now(), 'yyyy-MM-dd');
}
Navigator.of(context).pushNamed(route,
arguments: {'patient': patient, 'from': from, 'to': to});
if(arrivalType == null){
arrivalType = "0";
}
Navigator.of(context).pushNamed(route, arguments: {
'patient': patient,
'from': from,
'to': to,
'patientType': patientType,
'arrivalType': arrivalType
});
}
}
}

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

@ -0,0 +1,351 @@
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 PatientProfileHeaderNewDesign extends StatelessWidget {
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
PatientProfileHeaderNewDesign(this.patient, this.patientType, this.arrivalType);
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration(
color: Colors.white,
),
height: 220,
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(patient.firstName) +
" " +
Helpers.capitalize(
patient.lastName)),
fontSize: SizeConfig.textMultiplier * 3,
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 timeConvert;
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)));
String 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));
}
}

@ -17,13 +17,19 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
class ProfileMedicalInfoWidget extends StatelessWidget {
String from;
String to;
PatiantInformtion patient;
String patientType;
final String from;
final String to;
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
ProfileMedicalInfoWidget(
{Key key, this.patient, this.patientType, this.from, this.to});
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to});
@override
Widget build(BuildContext context) {
@ -69,6 +75,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
@ -79,13 +87,17 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: LAB_ORDERS,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport,
@ -96,6 +108,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,
@ -104,6 +118,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ADMISSION_REQUEST,
nameLine1: TranslationBase.of(context).admission,
nameLine2: TranslationBase.of(context).request,
@ -112,6 +128,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
? PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
@ -119,14 +137,27 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
: PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_HISTORY,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.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,
@ -135,6 +166,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: REFER_PATIENT_TO_DOCTOR,
nameLine1: TranslationBase.of(context).myReferral,
nameLine2: TranslationBase.of(context).patient,
@ -143,6 +176,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: ADD_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
@ -151,6 +186,8 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_UCAF_REQUEST,
nameLine1: TranslationBase.of(context).patient,
nameLine2: TranslationBase.of(context).ucaf,
@ -159,7 +196,9 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: RADIOLOGY,
patientType: patientType,
arrivalType: arrivalType,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/health_summary.png'),
@ -167,13 +206,17 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: PATIENT_INSURANCE_APPROVALS,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
icon: 'patient/vital_signs.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",

@ -12,9 +12,15 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
final String to;
final PatiantInformtion patient;
final String patientType;
final String arrivalType;
ProfileMedicalInfoWidgetSearch(
{Key key, this.patient, this.patientType, this.from, this.to});
{Key key,
this.patient,
this.patientType,
this.arrivalType,
this.from,
this.to});
@override
Widget build(BuildContext context) {
@ -31,6 +37,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: RADIOLOGY_PATIENT,
nameLine1: TranslationBase.of(context).radiology,
nameLine2: TranslationBase.of(context).service,
@ -38,6 +46,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_INSURANCE_APPROVALS_NEW,
nameLine1: TranslationBase.of(context).insurance,
nameLine2: TranslationBase.of(context).service,
@ -45,13 +55,17 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
route: LAB_ORDERS,
patientType: patientType,
arrivalType: arrivalType,
route: LAB_RESULT,
nameLine1: TranslationBase.of(context).lab,
nameLine2: TranslationBase.of(context).result,
icon: 'patient/lab_results.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
from: from,
to: to,
nameLine1: TranslationBase.of(context).vital,
@ -69,20 +83,26 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
? PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png')
: PatientProfileButton(
key: key,
patient: patient,
route: ORDER_PRESCRIPTION_HISTORY,
patientType: patientType,
arrivalType: arrivalType,
route: ORDER_PRESCRIPTION_NEW,
nameLine1: TranslationBase.of(context).orders,
nameLine2: TranslationBase.of(context).prescription,
icon: 'patient/order_prescription.png'),
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: MEDICAL_FILE,
nameLine1: TranslationBase.of(context).previewHealth,
nameLine2: TranslationBase.of(context).summaryReport,
@ -90,6 +110,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PATIENT_ECG,
nameLine1: TranslationBase.of(context).patient,
nameLine2: "ECG",
@ -97,6 +119,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: SHOW_SICKLEAVE,
nameLine1: TranslationBase.of(context).patientSick,
nameLine2: TranslationBase.of(context).leave,
@ -104,6 +128,8 @@ class ProfileMedicalInfoWidgetSearch extends StatelessWidget {
PatientProfileButton(
key: key,
patient: patient,
patientType: patientType,
arrivalType: arrivalType,
route: PROGRESS_NOTE,
nameLine1: TranslationBase.of(context).progress,
nameLine2: TranslationBase.of(context).note,

@ -31,14 +31,6 @@ class _AppDrawerState extends State<AppDrawer> {
Helpers helpers = new Helpers();
ProjectViewModel projectsProvider;
// @override
// void didChangeDependencies() {
// super.didChangeDependencies();
// // if (_isInit) {
// getDocProfile(); // TODO: Refactor this code to prevent errors in the cosole.
// // }
// _isInit = false;
// }
@override
Widget build(BuildContext context) {
@ -47,127 +39,112 @@ class _AppDrawerState extends State<AppDrawer> {
return RoundedContainer(
child: Container(
color: Colors.white,
// margin: EdgeInsets.only(top: SizeConfig.heightMultiplier * 2),
child: Drawer(
child: Column(children: <Widget>[
Expanded(
flex: 4,
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 20),
height: SizeConfig.heightMultiplier * 50,
child: InkWell(
child: DrawerHeader(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
child: Image.asset(
'assets/images/logo.png',
),
margin: EdgeInsets.only(top: 10, bottom: 15),
),
SizedBox(
height: 1,
child: Container(
color: Colors.black26,
),
),
SizedBox(height: 15),
InkWell(
onTap: () {
Navigator.of(context)
.pushNamed(PROFILE, arguments: {
'title': authProvider.doctorProfile.doctorName,
"doctorProfileall": authProvider.doctorProfile
});
},
child: Column(
children: [
authProvider.doctorProfile != null
? CircleAvatar(
radius:
SizeConfig.imageSizeMultiplier * 12,
// radius: (52)
child: ClipRRect(
borderRadius: BorderRadius.circular(50),
child: Image.network(
authProvider
.doctorProfile.doctorImageURL,
fit: BoxFit.fill,
width: 700,
),
),
backgroundColor: Colors.transparent,
)
: SizedBox(),
authProvider.doctorProfile != null
? Padding(
padding: EdgeInsets.only(top: 10),
child: AppText(
TranslationBase.of(context).dr +
authProvider
.doctorProfile?.doctorName,
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: SizeConfig.textMultiplier * 2,
))
: SizedBox(),
],
),
),
RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
side: BorderSide(color: Colors.red)),
child: AppText(
TranslationBase.of(context).logout,
color: Colors.white,
),
onPressed: () async {
Navigator.pop(context);
await helpers.logout();
projectsProvider.isLogin = false;
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Image.asset(
'assets/images/dr_app_logo.png',
),
margin: EdgeInsets.only(top: 10, bottom: 15),
),
SizedBox(height: 15),
if (authProvider.doctorProfile != null)
InkWell(
onTap: () {
Navigator.of(context).pushNamed(PROFILE, arguments: {
'title': authProvider.doctorProfile.doctorName,
"doctorProfileall": authProvider.doctorProfile
});
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 10),
child: AppText(
TranslationBase.of(context).dr +
authProvider.doctorProfile?.doctorName,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5,
),
),
Padding(
padding: EdgeInsets.only(top: 5),
child: AppText(
authProvider.doctorProfile?.clinicDescription,
fontWeight: FontWeight.w600,
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2,
fontFamily: 'Poppins',
))
],
),
],
),
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rescheduleLeaves,
// " or " +
// TranslationBase.of(context).leaves,
DoctorApp.leaves,
// subTitle: ,
),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddRescheduleLeavScreen(),
// MyReferredPatient(),
));
},
),
),
],
),
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).settings, Icons.settings),
onTap: () {
Navigator.pop(context);
Navigator.of(context).pushNamed(SETTINGS);
},
SizedBox(
height: 40,
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).reschedule,
DoctorApp.leaves,
subTitle: TranslationBase.of(context).leaves,
Container(
margin: EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout, Icons.settings),
onTap: () async {
Navigator.pop(context);
await helpers.logout();
projectsProvider.isLogin = false;
},
),
InkWell(
child: DrawerItem(
projectsProvider.isArabic
? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic,
DoctorApp.qr_code),
onTap: () {
if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en');
else
projectsProvider.changeLanguage('ar');
},
),
],
),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddRescheduleLeavScreen(),
// MyReferredPatient(),
));
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).qr +
TranslationBase.of(context).reader,
DoctorApp.qr_code),
onTap: () {
Navigator.pop(context);
Navigator.of(context).pushNamed(QR_READER);
},
),
]),
),
@ -179,14 +156,35 @@ class _AppDrawerState extends State<AppDrawer> {
child: Align(
alignment: FractionalOffset.bottomCenter,
child: Container(
child: Column(
children: <Widget>[
Text("Powered by"),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30,
)
],
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width *0.3,
child: RichText(
text: TextSpan(
text: 'Powered by',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.bold,
fontSize: SizeConfig.textMultiplier * 2,
fontFamily: 'Poppins',),
children: <TextSpan>[
TextSpan(text: ' Cloud Solutions',
style: TextStyle(
color: Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2,
fontFamily: 'Poppins',),
)
]
),),
),
// Text("Powered by"),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 20,
)
],
))))
]))
])),

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

@ -26,7 +26,7 @@ class _DrawerItemState extends State<DrawerItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 5, bottom: 5, left: 10, right: 10),
margin: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -39,15 +39,19 @@ class _DrawerItemState extends State<DrawerItem> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
AppText(
widget.title,
color: widget.color ?? Colors.black,
textOverflow: TextOverflow.ellipsis,
// fontWeight: FontWeight.bold,
// margin: 5,
marginLeft: 5,
marginRight: 5,
fontSize: SizeConfig.textMultiplier * 2.3,
Container(
width: MediaQuery.of(context).size.width *0.45,
child: Expanded(
child: AppText(
widget.title,
marginLeft: 5,
marginRight: 5,
color:widget.color ??Color(0xFF2E303A),
fontSize: SizeConfig.textMultiplier * 2.0,
fontFamily: 'Poppins',
fontWeight: FontWeight.bold,
),
),
),
AppText(
widget.subTitle,

@ -566,7 +566,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3-nullsafety.1"
json_annotation:
dependency: transitive
description:
@ -608,7 +608,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.4"
mime:
dependency: transitive
description:
@ -900,7 +900,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
stream_channel:
dependency: transitive
description:
@ -1084,5 +1084,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0 <2.11.0"
dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save