Appointment screen Changes & improvements.

merge-update-with-lab-changes
Sikander Saleem 4 years ago
parent 3f29bbd6b3
commit 5ab9dd1761

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="30.973" height="26.747" viewBox="0 0 30.973 26.747">
<g id="Line" transform="translate(-2 -5.002)">
<path id="Path_4585" data-name="Path 4585" d="M2.7,35.894H32.269a.7.7,0,0,0,.7-.7V30.263a.7.7,0,0,0-.7-.7H30.861a2.112,2.112,0,1,1,0-4.224h1.408a.7.7,0,0,0,.7-.7V19.7a.7.7,0,0,0-.7-.7H2.7a.7.7,0,0,0-.7.7v4.927a.7.7,0,0,0,.7.7H4.112a2.112,2.112,0,0,1,0,4.224H2.7a.7.7,0,0,0-.7.7V35.19a.7.7,0,0,0,.7.7ZM23.118,22.52a.7.7,0,1,1,1.408,0v1.408a.7.7,0,0,1-1.408,0Zm0,4.224a.7.7,0,1,1,1.408,0v1.408a.7.7,0,0,1-1.408,0Zm0,4.224a.7.7,0,1,1,1.408,0v1.408a.7.7,0,1,1-1.408,0ZM11.151,23.224H19.6a.7.7,0,1,1,0,1.408H11.151a.7.7,0,1,1,0-1.408Zm0,3.52H19.6a.7.7,0,0,1,0,1.408H11.151a.7.7,0,1,1,0-1.408Zm0,3.52H19.6a.7.7,0,0,1,0,1.408H11.151a.7.7,0,0,1,0-1.408Z" transform="translate(0 -4.144)" fill="#28323a"/>
<path id="Path_4586" data-name="Path 4586" d="M8.428,5.437,6.556,9.992a.662.662,0,0,0,0,.542.7.7,0,0,0,.38.38l1.323.535a2.112,2.112,0,0,1,1.281,2H29.722L9.35,5.057a.7.7,0,0,0-.922.38Z" transform="translate(-1.332)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21.959" height="28.681" viewBox="0 0 21.959 28.681">
<g id="place_2_" data-name="place (2)" transform="translate(-60)">
<g id="Group_7415" data-name="Group 7415" transform="translate(60)">
<path id="Path_4580" data-name="Path 4580" d="M70.979,0a10.975,10.975,0,0,0-8.749,17.615L70.5,28.681h.954l8.272-11.067A10.98,10.98,0,0,0,70.979,0Zm0,14.621a3.641,3.641,0,1,1,3.641-3.641A3.645,3.645,0,0,1,70.979,14.621Z" transform="translate(-60)" fill="#2b353e"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 535 B

@ -0,0 +1,29 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31" height="22.071" viewBox="0 0 31 22.071">
<g id="credit-card_2_" data-name="credit-card (2)" transform="translate(0 -55.05)">
<g id="Group_7417" data-name="Group 7417" transform="translate(0 55.05)">
<g id="Group_7416" data-name="Group 7416" transform="translate(0 0)">
<path id="Path_4581" data-name="Path 4581" d="M24.7,55.05H1.791A1.818,1.818,0,0,0,0,56.881v14.09a1.775,1.775,0,0,0,1.791,1.751h.928V61.231a3.4,3.4,0,0,1,3.415-3.383H26.477v-.968A1.8,1.8,0,0,0,24.7,55.05Z" transform="translate(0 -55.05)" fill="#28323a"/>
</g>
</g>
<g id="Group_7419" data-name="Group 7419" transform="translate(21.863 71.291)">
<g id="Group_7418" data-name="Group 7418" transform="translate(0 0)">
<path id="Path_4582" data-name="Path 4582" d="M278.733,258.462a1.282,1.282,0,0,0-1.807.16.848.848,0,0,1-.12.12.8.8,0,0,1-1.128-.12,1.288,1.288,0,1,0-.984,2.111,1.251,1.251,0,0,0,.992-.464.794.794,0,0,1,.616-.288.773.773,0,0,1,.616.28,1.114,1.114,0,0,0,.168.168,1.283,1.283,0,1,0,1.647-1.967Z" transform="translate(-273.399 -258.15)" fill="#28323a"/>
</g>
</g>
<g id="Group_7421" data-name="Group 7421" transform="translate(4.318 59.448)">
<g id="Group_7420" data-name="Group 7420" transform="translate(0 0)">
<path id="Path_4583" data-name="Path 4583" d="M78.734,110.049H55.815A1.8,1.8,0,0,0,54,111.833v1.176H80.557v-1.176A1.8,1.8,0,0,0,78.734,110.049Z" transform="translate(-54 -110.049)" fill="#28323a"/>
</g>
</g>
<g id="Group_7423" data-name="Group 7423" transform="translate(4.318 64.006)">
<g id="Group_7422" data-name="Group 7422">
<rect id="Rectangle_17400" data-name="Rectangle 17400" width="27" height="2" transform="translate(-0.318 0.044)" fill="#28323a"/>
</g>
</g>
<g id="Group_7425" data-name="Group 7425" transform="translate(4.318 67.685)">
<g id="Group_7424" data-name="Group 7424" transform="translate(0 0)">
<path id="Path_4584" data-name="Path 4584" d="M54,213.05v7.6a1.828,1.828,0,0,0,1.815,1.831h22.91a1.84,1.84,0,0,0,1.823-1.831v-7.6Zm24.462,6.509a2.894,2.894,0,0,1-4.014.776,2.85,2.85,0,0,1-1.615.5,2.891,2.891,0,0,1,0-5.782,2.85,2.85,0,0,1,1.615.5,2.891,2.891,0,0,1,4.014,4.014Z" transform="translate(-54 -213.05)" fill="#28323a"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.5" height="24.229" viewBox="0 0 28.5 24.229">
<path id="Path_4503" data-name="Path 4503" d="M28.249,59.946,15.745,39.21a1.746,1.746,0,0,0-2.991,0L.251,59.946a1.746,1.746,0,0,0,1.5,2.648H26.754a1.746,1.746,0,0,0,1.5-2.648ZM14.259,45.538a1.183,1.183,0,0,1,1.326,1.123c0,2.191-.258,5.34-.258,7.531,0,.571-.626.81-1.068.81-.589,0-1.086-.239-1.086-.81,0-2.191-.258-5.34-.258-7.531C12.915,45.943,13.5,45.538,14.259,45.538Zm.018,13.57a1.418,1.418,0,1,1,1.4-1.418A1.439,1.439,0,0,1,14.278,59.108Z" transform="translate(0 -38.365)" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 599 B

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="25.689" height="25.695" viewBox="0 0 25.689 25.695">
<g id="Group_7427" data-name="Group 7427" transform="translate(-0.002 0.002)">
<path id="Subtraction_2" data-name="Subtraction 2" d="M20640.422,21049.7h-19.064a3.317,3.317,0,0,1-3.312-3.312v-17.062a3.315,3.315,0,0,1,3.313-3.309h2.3v-1.209a.806.806,0,0,1,1.611,0v1.209h11.236v-1.209a.8.8,0,0,1,1.607,0v1.209h2.307a3.315,3.315,0,0,1,3.313,3.309v17.063A3.317,3.317,0,0,1,20640.422,21049.7Zm-13.744-4.977,0,0a5.611,5.611,0,0,0,9.438-1.666l-1.3-.508a4.219,4.219,0,0,1-7.322.957h1.385v-1.406h-3.6v3.916h1.406v-1.295Zm6.223-6.135V21040h3.6v-3.914h-1.406v1.221a5.615,5.615,0,0,0-9.439,1.668l1.3.508a4.189,4.189,0,0,1,3.924-2.674,4.233,4.233,0,0,1,3.451,1.787h-1.437Zm-13.25-5.752c-.033,0-.051,0-.061.018s0,.047.02.086a.391.391,0,0,1,.041.15v.148c.037.025,6.074.037,11.734.037,5.17,0,10.705-.01,10.744-.037v-.148a.38.38,0,0,1,.033-.137l.006-.014c.018-.039.027-.068.018-.088s-.025-.016-.057-.016Z" transform="translate(-20618.043 -21024.008)" fill="#28323a"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,4 @@
<svg id="survey_1_" data-name="survey (1)" xmlns="http://www.w3.org/2000/svg" width="27.787" height="27.787" viewBox="0 0 27.787 27.787">
<path id="Path_4575" data-name="Path 4575" d="M196.632,144h-5.669a10.809,10.809,0,0,1,.079,1.3,10.678,10.678,0,0,1-1.142,4.816l1.223,1.223,2.111-2.111a.814.814,0,0,1,1.151,1.151l-2.111,2.111,2.111,2.111a.814.814,0,1,1-1.151,1.151l-2.111-2.111-2.111,2.111a.814.814,0,1,1-1.151-1.151l2.111-2.111-.941-.941a10.746,10.746,0,0,1-8.03,4.471V158.6a2.336,2.336,0,0,0,2.334,2.334h9.621l4.77,2.919a.814.814,0,0,0,1.239-.694V146.334A2.337,2.337,0,0,0,196.632,144Z" transform="translate(-171.179 -136.185)" fill="#28323a"/>
<path id="Path_4576" data-name="Path 4576" d="M18.235,9.118A9.118,9.118,0,1,0,1.387,13.952L.051,17.567A.814.814,0,0,0,1.1,18.613l3.809-1.408a9.12,9.12,0,0,0,13.33-8.088ZM13.357,7.441l-4.1,4.1a.814.814,0,0,1-1.151,0L5.964,9.395A.814.814,0,0,1,7.115,8.244L8.683,9.812,12.205,6.29a.814.814,0,0,1,1.151,1.151Z" fill="#28323a"/>
</svg>

After

Width:  |  Height:  |  Size: 985 B

@ -37,6 +37,7 @@ const Map localizedValues = {
'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'},
'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'},
'schedule': {'en': 'Schedule', 'ar': 'جدول'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'},
'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'},

@ -1,16 +1,17 @@
class HeaderModel{
class HeaderModel {
String doctorName;
String doctorImageURL;
List<String> speciality;
String invoiceNo;
String projectName;
DateTime orderDate;
DateTime date;
String time;
String nationalityFlagURL;
int doctorRate;
int actualDoctorRate;
int totalReviews;
String email;
HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.orderDate, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate, this.email);
}
HeaderModel(this.doctorName, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, this.actualDoctorRate,
this.totalReviews, this.email);
}

@ -21,8 +21,7 @@ class AnicllaryOrdersDetails extends StatefulWidget {
_AnicllaryOrdersState createState() => _AnicllaryOrdersState();
}
class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
with SingleTickerProviderStateMixin {
class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTickerProviderStateMixin {
void initState() {
super.initState();
}
@ -34,8 +33,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
@override
Widget build(BuildContext context) {
return BaseView<AnciallryOrdersViewModel>(
onModelReady: (model) =>
model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
onModelReady: (model) => model.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
@ -70,9 +68,12 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
label: TranslationBase.of(context).payNow,
backgroundColor: Colors.red[800],
onTap: () {
Navigator.push(context,
FadePage(page: OrdersPayment(),
),);
Navigator.push(
context,
FadePage(
page: OrdersPayment(),
),
);
},
)
],
@ -153,10 +154,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
// ),
Texts(" : "),
Texts(
DateUtil.getFormattedDate(
DateUtil.convertStringToDate(
model.ancillaryListsDetails[0].appointmentDate),
"MMM dd,yyyy"),
DateUtil.getFormattedDate(DateUtil.convertStringToDate(model.ancillaryListsDetails[0].appointmentDate), "MMM dd,yyyy"),
)
],
),
@ -223,50 +221,41 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Row(
children: [
],
children: [],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Texts(
TranslationBase.of(context).price,
color: Colors.grey[500],
fontSize: 14,
),
SizedBox(width: 15),
Texts(
TranslationBase.of(context).vat,
color: Colors.grey[500],
fontSize: 14,
),
SizedBox(width: 15),
Texts(
TranslationBase.of(context).total,
color: Colors.grey[500],
fontSize: 14,
),
] ),
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
Texts(
TranslationBase.of(context).price,
color: Colors.grey[500],
fontSize: 14,
),
SizedBox(width: 15),
Texts(
TranslationBase.of(context).vat,
color: Colors.grey[500],
fontSize: 14,
),
SizedBox(width: 15),
Texts(
TranslationBase.of(context).total,
color: Colors.grey[500],
fontSize: 14,
),
]),
],
),
Divider(
color: Colors.black26,
),
],
));
}
Widget getAncillaryDetails(model) {
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList,
(obj) => obj.procedureCategoryName);
Map newMap = groupBy(model.ancillaryListsDetails[0].ancillaryOrderProcDetailsList, (obj) => obj.procedureCategoryName);
print(newMap);
return Padding(
padding: EdgeInsets.only(top: 10, bottom: 10),
child: getHeaderDetails(newMap));
return Padding(padding: EdgeInsets.only(top: 10, bottom: 10), child: getHeaderDetails(newMap));
}
Widget getHeaderDetails(newMap) {
@ -295,8 +284,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
String getTotalValue(value) {
double total = 0.0;
value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList
.forEach((result) => {total += result.companyShareWithTax});
value.ancillaryListsDetails[0].ancillaryOrderProcDetailsList.forEach((result) => {total += result.companyShareWithTax});
return total.toStringAsFixed(2);
}
@ -310,10 +298,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
flex: 3,
child: Text(result.procedureName.toString(),
overflow: TextOverflow.ellipsis)),
Expanded(flex: 3, child: Text(result.procedureName.toString(), overflow: TextOverflow.ellipsis)),
Expanded(child: AppText(result.companyShare.toString())),
Expanded(child: AppText(result.companyTaxAmount.toString())),
Expanded(
@ -325,6 +310,4 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails>
}).toList(),
);
}
}

@ -55,10 +55,8 @@ class _OvulationPeriodState extends State<OvulationPeriod> {
deliveryDue = selectedDateTime.add(Duration(days: 280));
// babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK);
babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
.diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.WEEK);
babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day])
.diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.DAY);
babyAgeWeeks = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.WEEK);
babyAgeDays = Jiffy([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy([selectedDateTime.year, selectedDateTime.month, dateTo.day]), Units.DAY);
});
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -29,8 +31,7 @@ class AppointmentDetails extends StatefulWidget {
_AppointmentDetailsState createState() => _AppointmentDetailsState();
}
class _AppointmentDetailsState extends State<AppointmentDetails>
with SingleTickerProviderStateMixin {
class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTickerProviderStateMixin {
static TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List();
@ -56,6 +57,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
return AppScaffold(
appBarTitle: widget.appo.doctorNameObj,
isShowAppBar: true,
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true,
bottomSheet: AppointmentDetails.showFooterButton
? Container(
width: MediaQuery.of(context).size.width,
@ -73,15 +77,15 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: goToBookConfirm,
child: Text(TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)),
),
),
)
: null,
body: Container(
color: new Color(0xFFf6f6f6),
color: new Color(0xFFf8f8f8),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -90,100 +94,99 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: Alignment.center,
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.appo.doctorImageURL,
fit: BoxFit.fill, height: 120.0, width: 120.0),
),
),
Container(
margin:
EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
alignment: Alignment.center,
child: Text(
widget.appo.doctorTitle +
" " +
widget.appo.doctorNameObj,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(
getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating: widget.appo.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
InkWell(
onTap: () {
getDoctorRatingsDetails();
},
child: Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: Text(
"(" +
widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews +
")",
style: TextStyle(
fontSize: 14.0,
color: Colors.blue[800],
letterSpacing: 1.0,
decoration: TextDecoration.underline,
)),
),
),
Container(
alignment: Alignment.center,
child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(
widget.appo.appointmentDate),
projectViewModel.isArabic ? "ar" : "en")),
),
Container(
alignment: Alignment.center,
child: Text(widget.appo.startTime.substring(0, 5)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Divider(
color: Colors.grey[500],
// Container(
// margin: EdgeInsets.only(top: 20.0),
// alignment: Alignment.center,
// child: ClipRRect(
// borderRadius: BorderRadius.circular(100.0),
// child: Image.network(widget.appo.doctorImageURL, fit: BoxFit.fill, height: 120.0, width: 120.0),
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
// alignment: Alignment.center,
// child:
// Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, color: Colors.grey[900], letterSpacing: 1.0)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// alignment: Alignment.center,
// child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality), style: TextStyle(fontSize: 12.0, color: Colors.grey[900], letterSpacing: 1.0)),
// ),
// Container(
// margin: EdgeInsets.only(top: 5.0),
// alignment: Alignment.center,
// child: RatingBar.readOnly(
// initialRating: widget.appo.actualDoctorRate.toDouble(),
// size: 35.0,
// filledColor: Colors.yellow[700],
// emptyColor: Colors.grey[500],
// isHalfAllowed: true,
// halfFilledIcon: Icons.star_half,
// filledIcon: Icons.star,
// emptyIcon: Icons.star,
// ),
// ),
// InkWell(
// onTap: () {
// getDoctorRatingsDetails();
// },
// child: Container(
// margin: EdgeInsets.only(top: 5.0),
// alignment: Alignment.center,
// child: Text("(" + widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews + ")",
// style: TextStyle(
// fontSize: 14.0,
// color: Colors.blue[800],
// letterSpacing: 1.0,
// decoration: TextDecoration.underline,
// )),
// ),
// ),
// Container(
// alignment: Alignment.center,
// child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(DateUtil.convertStringToDate(widget.appo.appointmentDate), projectViewModel.isArabic ? "ar" : "en")),
// ),
// Container(
// alignment: Alignment.center,
// child: Text(widget.appo.startTime.substring(0, 5)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// child: Divider(
// color: Colors.grey[500],
// ),
// ),
DoctorHeader(
headerModel: HeaderModel(
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
widget.appo.doctorImageURL,
widget.appo.doctorSpeciality,
"",
widget.appo.projectName,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.startTime.substring(0, 5),
null,
widget.appo.doctorRate,
widget.appo.actualDoctorRate,
widget.appo.noOfPatientsRate,
"",
//model.user.emailAddress,
),
isNeedToShowButton: _tabController.index == 1,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
onRatingAndReviewTap: getDoctorRatingsDetails,
onTap: (){},
),
SizedBox(height: 10),
TabBar(
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor) {
_tabController.index =
_tabController.previousIndex;
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
@ -192,21 +195,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
});
},
tabs: [
Tab(
child: Text(TranslationBase.of(context).appoActions,
style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor
? Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.grey)),
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)
: Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.black)),
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
@ -219,14 +214,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
AppointmentActions(
appo: widget.appo,
tabController: _tabController,
enableFooterButton: enableFooterButton),
DocAvailableAppointments(
doctor: getDoctorObject(),
isLiveCareAppointment:
widget.appo.isLiveCareAppointment)
AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton),
DocAvailableAppointments(doctor: getDoctorObject(), isLiveCareAppointment: widget.appo.isLiveCareAppointment)
],
controller: _tabController,
),
@ -262,7 +251,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
selectedTime: DocAvailableAppointments.selectedTime)));
}
getDoctorRatingsDetails() {
void getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appo.doctorID, context).then((res) {
@ -308,27 +297,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
child: Text(
TranslationBase.of(context).doctorRating,
style: TextStyle(
fontSize: 22.0, color: Colors.white))),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Text(
this
.widget
.appo
.actualDoctorRate
.ceilToDouble()
.toString(),
style: TextStyle(
fontSize: 32.0, color: Colors.black))),
child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.widget.appo.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating:
this.widget.appo.actualDoctorRate.toDouble(),
initialRating: this.widget.appo.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
@ -340,30 +315,19 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
this.widget.appo.noOfPatientsRate.toString() +
" " +
TranslationBase.of(context).reviews,
style: TextStyle(
fontSize: 14.0, color: Colors.black))),
child: Text(this.widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).excellent,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[0].patientNumber),
width: getRatingWidth(doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
@ -378,18 +342,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).v_good,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[1].patientNumber),
width: getRatingWidth(doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
@ -404,18 +362,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).good,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[2].patientNumber),
width: getRatingWidth(doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
@ -430,18 +382,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context).average,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[3].patientNumber),
width: getRatingWidth(doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
@ -456,19 +402,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(
top: 10.0, left: 15.0, right: 15.0),
child: Text(
TranslationBase.of(context)
.below_average,
style: TextStyle(
fontSize: 13.0,
color: Colors.black))),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(
doctorDetailsList[4].patientNumber),
width: getRatingWidth(doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
@ -478,9 +417,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
],
),
),
Container(
margin: EdgeInsets.only(top: 40.0),
child: Divider()),
Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
@ -502,9 +439,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
onPressed: () {
Navigator.of(context).pop();
},
child: Text(
TranslationBase.of(context).cancel,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -532,13 +467,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString();
return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString();
}
String getDoctorSpeciality(List<String> docSpecial) {

@ -6,50 +6,50 @@ class ArrivedButtons {
{
"title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
"icon": "assets/images/new-design/medicine_prescriptions_icon.png",
"caller": "prescriptions"
"icon": "medicine_prescription.svg",
"caller": "prescriptions",
},
{
"title": TranslationBase.of(AppGlobal.context).radiology,
"subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle,
"icon": "assets/images/new-design/radiology_service_icon.png",
"caller": "radiology"
"icon": 'radiology.svg',
"caller": "radiology",
},
{
"title": TranslationBase.of(AppGlobal.context).lab,
"subtitle": TranslationBase.of(AppGlobal.context).labSubtitle,
"icon": "assets/images/new-design/lab_result_icon.png",
"caller": "labResult"
"icon": 'lab_result.svg',
"caller": "labResult",
},
{
"title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
"icon": "assets/images/new-design/vital_signs.png",
"caller": "VitalSigns"
"icon": 'vital_signs.svg',
"caller": "VitalSigns",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/feedback_icon.png",
"caller": "insertComplaint"
"icon": "raise_comp.svg",
"caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).insuranceApproval,
"subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png",
"caller": "Insurance"
"icon": 'insurance_approval.svg',
"caller": "Insurance",
},
{
"title": TranslationBase.of(AppGlobal.context).askDoctor,
"subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle,
"icon": "assets/images/new-design/ask_doctor_icon.png",
"caller": "askDoc"
"icon": 'ask_doctor.svg',
"caller": "askDoc",
},
{
"title": TranslationBase.of(AppGlobal.context).appoSurvey,
"subtitle": TranslationBase.of(AppGlobal.context).service,
"icon": "assets/images/new-design/survey.png",
"caller": "Survey"
"icon": "survey.svg",
"caller": "Survey",
}
];
}
}

@ -7,43 +7,43 @@ class BookedButtonsAllowCheckIn {
"title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/confirm_icon.png",
"caller": "confirmAppointment"
"caller": "confirmAppointment",
},
{
"title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/reschedule_icon.png",
"caller": "openReschedule"
"icon": "reschedule.svg",
"caller": "openReschedule",
},
{
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/cancel_icon.png",
"caller": "onCancelAppointment"
"caller": "onCancelAppointment",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/Complaint_icon.png",
"caller": "insertComplaint"
"caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder"
"caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "assets/images/new-design/location_icon.png",
"caller": "navigateToProject"
"caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "assets/images/new-design/check-in.png",
"caller": "goToTodoList"
"caller": "goToTodoList",
}
];
}

@ -6,38 +6,38 @@ class ConfirmedButtonsAllowCheckIn {
{
"title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/reschedule_icon.png",
"caller": "openReschedule"
"icon": "reschedule.svg",
"caller": "openReschedule",
},
{
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
"icon": "assets/images/new-design/cancel_icon.png",
"caller": "onCancelAppointment"
"caller": "onCancelAppointment",
},
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/Complaint_icon.png",
"caller": "insertComplaint"
"icon": "raise_comp.svg",
"caller": "insertComplaint",
},
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder"
"caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "assets/images/new-design/location_icon.png",
"caller": "navigateToProject"
"icon": "hosp_location.svg",
"caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "assets/images/new-design/check-in.png",
"caller": "goToTodoList"
"icon": "online_payment.svg",
"caller": "goToTodoList",
}
];
}

@ -27,6 +27,7 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@ -41,10 +42,7 @@ class AppointmentActions extends StatefulWidget {
final Function enableFooterButton;
MyInAppBrowser browser;
AppointmentActions(
{@required this.appo,
@required this.tabController,
@required this.enableFooterButton});
AppointmentActions({@required this.appo, @required this.tabController, @required this.enableFooterButton});
@override
_AppointmentActionsState createState() => _AppointmentActionsState();
@ -66,11 +64,31 @@ class _AppointmentActionsState extends State<AppointmentActions> {
ProjectViewModel projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic
? ((size.height - kToolbarHeight - 24) * 0.5) / 2
: ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2;
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(21),
shrinkWrap: true,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
_handleButtonClicks(appoButtonsList[index]);
},
child: MedicalProfileItem(
title: appoButtonsList[index].title,
imagePath: appoButtonsList[index].icon,
subTitle: appoButtonsList[index].subtitle,
hasBadge: true,
isEnable: projectViewModel.havePrivilege(5),
),
);
},
itemCount: appoButtonsList.length,
);
return Container(
margin: EdgeInsets.all(5.0),
child: CustomScrollView(
@ -90,15 +108,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
child: Container(
margin: EdgeInsets.all(8.0),
padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey[400],
blurRadius: 2.0,
spreadRadius: 0.0)
],
borderRadius: BorderRadius.circular(10),
color: Colors.white),
decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Row(
children: [
Expanded(
@ -107,8 +117,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin:
EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 5.0),
child: Texts(
e.title,
color: Color(0xffB8382C),
@ -117,8 +126,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
),
),
Container(
margin:
EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Texts(
e.subtitle,
color: Colors.black,
@ -130,16 +138,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
),
),
Container(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(
10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(
0.0, 7.0, 10.0, 8.0),
child: Image.asset(e.icon,
width: 40.0, height: 40.0),
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0) : EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
child: Image.asset(e.icon, width: 40.0, height: 40.0),
),
],
),
@ -181,8 +182,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
break;
case "navigateToProject":
openMap(double.parse(widget.appo.latitude),
double.parse(widget.appo.longitude));
openMap(double.parse(widget.appo.latitude), double.parse(widget.appo.longitude));
break;
case "addReminder":
@ -297,8 +297,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async {
print("_getBookedCheckInAppoActionsList");
BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn =
new BookedButtonsAllowCheckIn();
BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn = new BookedButtonsAllowCheckIn();
print(bookedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) {
@ -334,8 +333,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async {
print("_getConfirmedAllowCheckInAppoActionsList");
ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn =
new ConfirmedButtonsAllowCheckIn();
ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn = new ConfirmedButtonsAllowCheckIn();
print(confirmedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) {
@ -423,17 +421,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
PatientLabOrders patientLabOrders = new PatientLabOrders();
service
.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo,
widget.appo.projectID, widget.appo.clinicID, context)
.then((res) {
service.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo, widget.appo.projectID, widget.appo.clinicID, context).then((res) {
print(res['ListLabResultsByAppNo']);
GifLoaderDialogUtils.hideDialog(context);
if (res['ListLabResultsByAppNo'] != null) {
patientLabOrders.orderNo =
res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo =
res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.projectID = widget.appo.projectID.toString();
print(patientLabOrders.invoiceNo);
@ -453,14 +446,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology();
service
.getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
.then((res) {
service.getPatientRadOrders(widget.appo.appointmentNo.toString(), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']);
finalRadiology =
new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
finalRadiology = new FinalRadiology.fromJson(res['FinalRadiologyList'][0]);
print(finalRadiology.reportData);
navigateToRadiologyDetails(finalRadiology);
} else {
@ -484,8 +474,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']);
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
@ -496,37 +485,20 @@ class _AppointmentActionsState extends State<AppointmentActions> {
});
}
Future navigateToMedicinePrescriptionReport(
List<PrescriptionReportEnh> prescriptionReportEnhList,
dynamic listPres) async {
Navigator.push(
context,
FadePage(
page: PrescriptionReportPage(
prescriptionReportEnhList: prescriptionReportEnhList,
listPres: listPres,
appo: widget.appo)));
Future navigateToMedicinePrescriptionReport(List<PrescriptionReportEnh> prescriptionReportEnhList, dynamic listPres) async {
Navigator.push(context, FadePage(page: PrescriptionReportPage(prescriptionReportEnhList: prescriptionReportEnhList, listPres: listPres, appo: widget.appo)));
}
Future navigateToLabResults(PatientLabOrders patientLabOrders) async {
Navigator.push(
context,
FadePage(
page: LaboratoryResultPage(patientLabOrders: patientLabOrders)))
.then((value) {});
Navigator.push(context, FadePage(page: LaboratoryResultPage(patientLabOrders: patientLabOrders))).then((value) {});
}
Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async {
Navigator.push(
context,
FadePage(
page: RadiologyDetailsPage(finalRadiology: finalRadiology)))
.then((value) {});
Navigator.push(context, FadePage(page: RadiologyDetailsPage(finalRadiology: finalRadiology))).then((value) {});
}
static Future<void> openMap(double latitude, double longitude) async {
String googleUrl =
'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
String googleUrl = 'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
if (await canLaunch(googleUrl)) {
await launch(googleUrl);
} else {
@ -546,10 +518,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
child: ReminderDialog(
eventId: appo.appointmentNo.toString(),
title: "Doctor Appointment",
description: "You have an appointment with " +
appo.doctorTitle +
" " +
appo.doctorNameObj,
description: "You have an appointment with " + appo.doctorTitle + " " + appo.doctorNameObj,
startDate: appo.appointmentDate,
endDate: appo.appointmentDate,
location: appo.projectName,
@ -573,8 +542,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
if (res['PatientDoctorAppointmentResultList'].length != 0) {
getCallRequestType();
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).askDocNotAllowed);
AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -605,11 +573,9 @@ class _AppointmentActionsState extends State<AppointmentActions> {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: AskDocDialog(requestData: requestData),
@ -633,9 +599,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
sendAskDocRequest(int requestType) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.sendAskDocCallRequest(widget.appo, requestType.toString(), context)
.then((res) {
service.sendAskDocCallRequest(widget.appo, requestType.toString(), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully");
@ -652,10 +616,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
confirmAppointment() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service
.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
widget.appo.projectID, widget.appo.isLiveCareAppointment, context)
.then((res) {
service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
@ -670,8 +631,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
navigateToInsuranceApprovals(int appoNo) {
Navigator.push(
context, FadePage(page: InsuranceApproval(appointmentNo: appoNo)));
Navigator.push(context, FadePage(page: InsuranceApproval(appointmentNo: appoNo)));
}
navigateToVitalSigns(int appoNo, int projectID) {
@ -686,15 +646,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
navigateToInsertComplaint() {
Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,)));
Navigator.push(
context,
FadePage(
page: FeedbackHomePage(
messageType: MessageType.ComplaintOnAnAppointment,
appointment: widget.appo,
)));
}
rateAppointment() {
widget.browser = new MyInAppBrowser();
widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' +
widget.appo.projectID.toString() +
'.' +
widget.appo.appointmentNo.toString() +
'&c=1');
widget.browser.openBrowser('http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1');
}
}

@ -53,9 +53,11 @@ class PrescriptionItemsPage extends StatelessWidget {
"",
prescriptions.name,
DateUtil.convertStringToDate(prescriptions.appointmentDate),
null,
prescriptions.nationalityFlagURL,
prescriptions.doctorRate,
prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate,
model.user.emailAddress,
),
isNeedToShowButton: projectViewModel.havePrivilege(13),

@ -41,8 +41,20 @@ class RadiologyDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
DoctorHeader(
headerModel: new HeaderModel(finalRadiology.doctorName, finalRadiology.doctorImageURL, finalRadiology.speciality, finalRadiology.invoiceNo.toString(), finalRadiology.projectName,
finalRadiology.orderDate, finalRadiology.nationalityFlagURL, finalRadiology.doctorRate, finalRadiology.actualDoctorRate, model.user.emailAddress),
headerModel: new HeaderModel(
finalRadiology.doctorName,
finalRadiology.doctorImageURL,
finalRadiology.speciality,
finalRadiology.invoiceNo.toString(),
finalRadiology.projectName,
finalRadiology.orderDate,
null,
finalRadiology.nationalityFlagURL,
finalRadiology.doctorRate,
finalRadiology.actualDoctorRate,
finalRadiology.noOfPatientsRate,
model.user.emailAddress,
),
onTap: () {
showConfirmMessage(finalRadiology: finalRadiology, model: model);
},

@ -38,6 +38,8 @@ class TranslationBase {
String get mySchedule => localizedValues['mySchedule'][locale.languageCode];
String get schedule => localizedValues['schedule'][locale.languageCode];
String get replay2 => localizedValues['replay2'][locale.languageCode];
String get logout => localizedValues['logout'][locale.languageCode];
@ -1185,6 +1187,8 @@ class TranslationBase {
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
String get invoiceDate => localizedValues['InvoiceDate'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode];
String get generalResult => localizedValues['GeneralResult'][locale.languageCode];

@ -60,9 +60,11 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
widget.billNo,
widget.patientLabOrder.projectName,
widget.patientLabOrder.orderDate,
null,
widget.patientLabOrder.nationalityFlagURL,
widget.patientLabOrder.doctorRate,
widget.patientLabOrder.actualDoctorRate,
widget.patientLabOrder.noOfPatientsRate,
model.user.emailAddress),
onTap: widget.onTap,
),

@ -58,10 +58,10 @@ class DoctorCard extends StatelessWidget {
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: isLiveCareAppointment
? Color(0xff404545)
? Color(0xff2E303A)
: !isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
? Color(0xffD02127)
: Color(0xffa9a089),
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10),
@ -161,14 +161,12 @@ class DoctorCard extends StatelessWidget {
// todo 'sikander' move this widget to separate file
Widget myRichText(String title, String value) {
return RichText(
text: TextSpan(
text: title,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
children: <TextSpan>[
TextSpan(
text: " $value",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
maxLines: 1,
text: TextSpan(text: title, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10), children: <TextSpan>[
TextSpan(
text: " $value",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
)
]),
);
}
}

@ -33,7 +33,7 @@ class MedicalProfileItem extends StatelessWidget {
height: double.infinity,
width: double.infinity,
margin: EdgeInsets.all(0),
decoration: containerColorRadiusBorderWidth(Colors.white, 20, CustomColors.pharmacyGreyColor, 1),
decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.pharmacyGreyColor, 1),
clipBehavior: Clip.antiAlias,
child: Stack(
children: [

@ -13,10 +13,22 @@ import 'package:rating_bar/rating_bar.dart';
class DoctorHeader extends StatelessWidget {
final HeaderModel headerModel;
final VoidCallback onTap;
final VoidCallback onRatingAndReviewTap;
final bool showConfirmMessageDialog;
final String buttonTitle;
final String buttonIcon;
final bool isNeedToShowButton;
DoctorHeader({Key key, @required this.headerModel, @required this.buttonTitle, @required this.onTap, this.isNeedToShowButton = true}) : super(key: key);
DoctorHeader(
{Key key,
@required this.headerModel,
@required this.buttonTitle,
@required this.onTap,
this.isNeedToShowButton = true,
this.buttonIcon,
this.showConfirmMessageDialog = true,
this.onRatingAndReviewTap})
: super(key: key);
@override
Widget build(BuildContext context) {
@ -59,11 +71,11 @@ class DoctorHeader extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(headerModel.orderDate),
DateUtil.formatDateToDate(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Text(
DateUtil.formatDateToTime(headerModel.orderDate),
headerModel.time ?? DateUtil.formatDateToTime(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
// Padding(
@ -78,32 +90,45 @@ class DoctorHeader extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 21),
RatingBar.readOnly(
initialRating: headerModel.doctorRate + 0.0,
size: 15.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
SizedBox(width: 6),
Text(
"${headerModel.actualDoctorRate} ${TranslationBase.of(context).reviews}",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
],
InkWell(
onTap: onRatingAndReviewTap,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 21),
RatingBar.readOnly(
initialRating: headerModel.actualDoctorRate + 0.0,
size: 15.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
SizedBox(width: 6),
Text(
"${headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12,
decoration: onRatingAndReviewTap != null ? TextDecoration.underline : null,
),
),
],
),
),
isNeedToShowButton
? InkWell(
onTap: () {
showConfirmMessage(context, onTap, headerModel.email);
if (showConfirmMessageDialog)
showConfirmMessage(context, onTap, headerModel.email);
else
onTap();
},
child: Container(
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
@ -111,7 +136,7 @@ class DoctorHeader extends StatelessWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
SvgPicture.asset('assets/images/new/email.svg', width: 19.0),
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
SizedBox(width: 6),
Text(
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,

Loading…
Cancel
Save