diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 79bc3dc4..1a3d4cfe 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -10,6 +10,7 @@
+
diff --git a/assets/images/new-design/video.png b/assets/images/new-design/video.png
new file mode 100644
index 00000000..2962aade
Binary files /dev/null and b/assets/images/new-design/video.png differ
diff --git a/assets/images/new-design/view_more.png b/assets/images/new-design/view_more.png
new file mode 100644
index 00000000..8b52a7e7
Binary files /dev/null and b/assets/images/new-design/view_more.png differ
diff --git a/assets/images/new-design/walkin.png b/assets/images/new-design/walkin.png
new file mode 100644
index 00000000..248c8788
Binary files /dev/null and b/assets/images/new-design/walkin.png differ
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 1a34e96d..66655e83 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -231,6 +231,8 @@ const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoice
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
+const GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts';
+
//URL to get medicine and pharmacies list
const CHANNEL = 3;
const GENERAL_ID = 'Cs2020@2016\$2958';
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index ee1dd7a7..f57e01f1 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -1625,5 +1625,13 @@ const Map localizedValues = {
"en": "To view the terms and conditions",
"ar": "لعرض الشروط والأحكام"
},
+ "WalkinAppo": {
+ "en": "Hospital Visit Appointment",
+ "ar": "موعد زيارة للمستشفى"
+ },
+ "videoAppo": {
+ "en": "Video Call Appointment",
+ "ar": "موعد اتصال فيديو"
+ },
// "visit": {"en" : "Visit", "ar": "الزيارة"},
};
diff --git a/lib/models/SmartWatch/HealthData.dart b/lib/models/SmartWatch/HealthData.dart
new file mode 100644
index 00000000..f01c3bf8
--- /dev/null
+++ b/lib/models/SmartWatch/HealthData.dart
@@ -0,0 +1,8 @@
+class healthData {
+ int MedCategoryID;
+ int MedSubCategoryID;
+ String Value;
+ String Notes;
+ String MachineDate;
+ int TransactionsListID;
+}
diff --git a/lib/models/SmartWatch/YearlyStepsResModel.dart b/lib/models/SmartWatch/YearlyStepsResModel.dart
new file mode 100644
index 00000000..728633d9
--- /dev/null
+++ b/lib/models/SmartWatch/YearlyStepsResModel.dart
@@ -0,0 +1,36 @@
+class YearlyStepsResModel {
+ double valueSum;
+ int medCategoryID;
+ int month;
+ String monthName;
+ int patientID;
+ int year;
+
+ YearlyStepsResModel(
+ {this.valueSum,
+ this.medCategoryID,
+ this.month,
+ this.monthName,
+ this.patientID,
+ this.year});
+
+ YearlyStepsResModel.fromJson(Map json) {
+ valueSum = json['ValueSum'];
+ medCategoryID = json['MedCategoryID'];
+ month = json['Month'];
+ monthName = json['MonthName'];
+ patientID = json['PatientID'];
+ year = json['Year'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ValueSum'] = this.valueSum;
+ data['MedCategoryID'] = this.medCategoryID;
+ data['Month'] = this.month;
+ data['MonthName'] = this.monthName;
+ data['PatientID'] = this.patientID;
+ data['Year'] = this.year;
+ return data;
+ }
+}
diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart
index 75282190..c384b7b5 100644
--- a/lib/pages/Blood/confirm_payment_page.dart
+++ b/lib/pages/Blood/confirm_payment_page.dart
@@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
-import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@@ -166,7 +165,7 @@ class ConfirmPaymentPage extends StatelessWidget {
patientID: int.parse(advanceModel.fileNumber),
projectID: advanceModel.hospitalsModel.iD)
.then((value) {
- GifLoaderDialogUtils.hideDialog(context);
+ GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog();
});
@@ -218,7 +217,8 @@ class ConfirmPaymentPage extends StatelessWidget {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
- browser);
+ browser,
+ false);
}
onBrowserLoadStart(String url) {
@@ -277,8 +277,8 @@ class ConfirmPaymentPage extends StatelessWidget {
String paymentReference = res['Fort_id'].toString();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service
- .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'],
- res['PaymentMethod'], AppGlobal.context)
+ .createAdvancePayment(appo, appo.projectID.toString(), res['Amount'],
+ res['Fort_id'], res['PaymentMethod'], AppGlobal.context)
.then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
@@ -315,5 +315,4 @@ class ConfirmPaymentPage extends StatelessWidget {
Future navigateToHome(context) async {
Navigator.of(context).pushNamed(HOME);
}
-
}
diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart
index d7e08a66..03a28d90 100644
--- a/lib/pages/BookAppointment/BookConfirm.dart
+++ b/lib/pages/BookAppointment/BookConfirm.dart
@@ -187,27 +187,29 @@ class _BookConfirmState extends State {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Container(
- margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
- child: Image.asset(
- "assets/images/new-design/icon_hospital.png"),
- ),
- Container(
- margin: EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
- child: Text(
- TranslationBase.of(context).hospital +
- ": " +
- widget.doctor.projectName,
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.grey[700],
- letterSpacing: 1.0)),
- ),
- ],
- ),
+ !widget.isLiveCareAppointment ? Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Container(
+ margin:
+ EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
+ child: Image.asset(
+ "assets/images/new-design/icon_hospital.png"),
+ ),
+ Container(
+ margin:
+ EdgeInsets.fromLTRB(20.0, 5.0, 10.0, 5.0),
+ child: Text(
+ TranslationBase.of(context).hospital +
+ ": " +
+ widget.doctor.projectName,
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.grey[700],
+ letterSpacing: 1.0)),
+ ),
+ ],
+ ) : Container(),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
@@ -325,7 +327,8 @@ class _BookConfirmState extends State {
Container(
margin: EdgeInsets.only(top: 5.0),
child: Text(
- TranslationBase.of(context).gender + ": " +
+ TranslationBase.of(context).gender +
+ ": " +
widget.authUser.genderDescription,
style: TextStyle(
fontSize: 12.0,
@@ -335,7 +338,9 @@ class _BookConfirmState extends State {
Container(
margin: EdgeInsets.only(top: 5.0, bottom: 3.0),
child: Text(
- TranslationBase.of(context).age + ": " + widget.authUser.age.toString(),
+ TranslationBase.of(context).age +
+ ": " +
+ widget.authUser.age.toString(),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
@@ -423,7 +428,8 @@ class _BookConfirmState extends State {
context)
.then((res) {
if (res['MessageStatus'] == 1) {
- AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
+ AppToast.showSuccessToast(
+ message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']);
Future.delayed(new Duration(milliseconds: 500), () {
@@ -543,13 +549,13 @@ class _BookConfirmState extends State {
getLiveCareAppointmentPatientShare(context, String appointmentNo,
int clinicID, int projectID, DoctorList docObject) {
- GifLoaderDialogUtils.hideDialog(context);
widget.service
.getLiveCareAppointmentPatientShare(
appointmentNo, clinicID, projectID, context)
.then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
+ GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart
index f513c434..bd6c242c 100644
--- a/lib/pages/BookAppointment/BookSuccess.dart
+++ b/lib/pages/BookAppointment/BookSuccess.dart
@@ -255,7 +255,7 @@ class _BookSuccessState extends State {
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
- color: new Color(0xFF40ACC9),
+ color: new Color(0xffc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
@@ -318,7 +318,7 @@ class _BookSuccessState extends State {
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
- color: new Color(0xFF40ACC9),
+ color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
@@ -637,7 +637,12 @@ class _BookSuccessState extends State {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
- widget.browser);
+ widget.browser,
+ widget.patientShareResponse.isLiveCareAppointment,
+ widget.patientShareResponse.appointmentDate,
+ widget.patientShareResponse.appointmentNo,
+ widget.patientShareResponse.clinicID,
+ widget.patientShareResponse.doctorID);
}
}
diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart
index d419e4af..1562c5f7 100644
--- a/lib/pages/BookAppointment/widgets/DoctorView.dart
+++ b/lib/pages/BookAppointment/widgets/DoctorView.dart
@@ -61,7 +61,7 @@ class DoctorView extends StatelessWidget {
letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(top: 3.0),
- child: Text(this.doctor.clinicName,
+ child: Text(this.doctor.clinicName != null ? this.doctor.clinicName : "",
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
index 3e58b657..f21a9718 100644
--- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
+++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart
@@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.da
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
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/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@@ -469,9 +470,7 @@ class _CovidTimeSlotsState extends State
}
bookCovidTestAppointment() {
-// Navigator.push(context,
-// MaterialPageRoute(builder: (context) => CovidPaymentAlert()));
-
+ GifLoaderDialogUtils.showMyDialog(context);
DoctorList docObject = new DoctorList();
docObject.doctorID = widget.selectedDoctorID;
docObject.clinicID = widget.selectedClinicID;
@@ -494,11 +493,12 @@ class _CovidTimeSlotsState extends State
print(res);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully");
- Future.delayed(new Duration(milliseconds: 1800), () {
- getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
- docObject.projectID, docObject);
- });
+ // Future.delayed(new Duration(milliseconds: 1800), () {
+ getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
+ docObject.projectID, docObject);
+ // });
} else {
+ GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
@@ -529,14 +529,16 @@ class _CovidTimeSlotsState extends State
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
BuildContext context) {
+ GifLoaderDialogUtils.showMyDialog(context);
ConfirmDialog.closeAlertDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) {
if (res['MessageStatus'] == 1) {
- Future.delayed(new Duration(milliseconds: 1500), () {
- insertAppointmentCovidTest(context, docObject);
- });
+ // Future.delayed(new Duration(milliseconds: 1500), () {
+ insertAppointmentCovidTest(context, docObject);
+ // });
} else {
+ GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
@@ -592,6 +594,7 @@ class _CovidTimeSlotsState extends State
});
} else {}
} else {
+ GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
index c4299e33..0d3ac2e5 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
@@ -166,7 +166,7 @@ class _ApointmentCardState extends State {
),
Container(
transform:
- Matrix4.translationValues(15.0, -40.0, 0.0),
+ Matrix4.translationValues(15.0, -40.0, 0.0),
child: projectViewModel.isArabic
? Image.asset(
"assets/images/new-design/arrow_menu_black-ar.png",
diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart
index 1066ca15..383bedb3 100644
--- a/lib/pages/ToDoList/ToDo.dart
+++ b/lib/pages/ToDoList/ToDo.dart
@@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
-import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@@ -26,7 +25,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
-import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
@@ -95,249 +93,315 @@ class _ToDoState extends State {
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.all(10.0),
- child: Card(
- margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
- color: Colors.white,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(10),
- ),
- child: Container(
- width: MediaQuery.of(context).size.width,
- padding: EdgeInsets.all(10.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.max,
- children: [
- Row(
- children: [
- Image.asset(
- "assets/images/new-design/time_icon.png",
- width: 20.0,
- height: 20.0),
- Container(
- margin:
- EdgeInsets.only(left: 10.0, right: 10.0),
- child: Text(
- DateUtil.getWeekDayMonthDayYearDateFormatted(
- DateUtil.convertStringToDate(
- widget.appoList[index]
- .appointmentDate),
- projectViewModel.isArabic
- ? "ar"
- : "en") +
- " " +
- widget.appoList[index].startTime
- .substring(0, 5),
- style: TextStyle(fontSize: 10.0)),
- ),
- widget.appoList[index].isLiveCareAppointment
- ? SvgPicture.asset(
- "assets/images/new-design/liveCare_logo_icon.svg",
- width: 20.0,
- height: 20.0)
- : Image.asset(
- "assets/images/new-design/hospital_address_icon.png",
- width: 20.0,
- height: 20.0),
- Container(
- margin:
- EdgeInsets.only(left: 5.0, right: 5.0),
- child: widget
- .appoList[index].isLiveCareAppointment
- ? Text(
- TranslationBase.of(context)
- .liveCareAppo,
- style: TextStyle(fontSize: 12.0))
- : Text(
- widget.appoList[index].projectName !=
- null
- ? widget
- .appoList[index].projectName
- : "-",
- overflow: TextOverflow.clip,
- maxLines: 2,
- style: TextStyle(fontSize: 10.0)),
- ),
- ],
- ),
- Container(
- margin: EdgeInsets.only(top: 5.0),
- child: Divider(
- color: Colors.grey[500],
- ),
+ child: Column(
+ children: [
+ Container(
+ child: Card(
+ margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
),
- Flex(
- direction: Axis.horizontal,
- children: [
- Expanded(
- flex: 1,
- child: Container(
- height: MediaQuery.of(context).size.height *
- 0.1,
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ padding: EdgeInsets.all(10.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Row(
+ children: [
+ Image.asset(
+ "assets/images/new-design/time_icon.png",
+ width: 20.0,
+ height: 20.0),
+ Container(
+ margin: EdgeInsets.only(
+ left: 10.0, right: 10.0),
+ child: Text(
+ DateUtil.getWeekDayMonthDayYearDateFormatted(
+ DateUtil.convertStringToDate(
+ widget.appoList[index]
+ .appointmentDate),
+ projectViewModel.isArabic
+ ? "ar"
+ : "en") +
+ " " +
+ widget.appoList[index].startTime
+ .substring(0, 5),
+ style: TextStyle(fontSize: 10.0)),
+ ),
+ !widget.appoList[index]
+ .isLiveCareAppointment
+ ? Image.asset(
+ "assets/images/new-design/hospital_address_icon.png",
+ width: 20.0,
+ height: 20.0)
+ : Container(),
+ Container(
+ margin: EdgeInsets.only(
+ left: 5.0, right: 5.0),
+ child: widget.appoList[index]
+ .isLiveCareAppointment
+ ? Container()
+ : Text(
+ widget.appoList[index]
+ .projectName !=
+ null
+ ? widget.appoList[index]
+ .projectName
+ : "-",
+ overflow: TextOverflow.clip,
+ maxLines: 2,
+ style:
+ TextStyle(fontSize: 10.0)),
+ ),
+ ],
+ ),
+ Container(
margin: EdgeInsets.only(top: 5.0),
- child: ClipRRect(
- borderRadius:
- BorderRadius.circular(100.0),
- child: Image.network(
- widget.appoList[index].doctorImageURL,
- fit: BoxFit.fill),
+ child: Divider(
+ color: Colors.grey[500],
),
),
- ),
- Expanded(
- flex: 3,
- child: Container(
- margin: EdgeInsets.only(
- top: 10.0, left: 20.0, right: 20.0),
- child: Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
- children: [
- Text(
- widget.appoList[index].doctorTitle +
- " " +
+ Flex(
+ direction: Axis.horizontal,
+ children: [
+ Expanded(
+ flex: 1,
+ child: Container(
+ height: MediaQuery.of(context)
+ .size
+ .height *
+ 0.1,
+ margin: EdgeInsets.only(top: 5.0),
+ child: ClipRRect(
+ borderRadius:
+ BorderRadius.circular(100.0),
+ child: Image.network(
widget.appoList[index]
- .doctorNameObj,
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.black,
- fontWeight: FontWeight.bold,
- letterSpacing: 1.0)),
- Container(
- margin: EdgeInsets.only(
- top: 3.0, bottom: 3.0),
- child: Text(
- getDoctorSpeciality(widget
- .appoList[index]
- .doctorSpeciality)
- .trim(),
- style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
- letterSpacing: 1.0)),
+ .doctorImageURL,
+ fit: BoxFit.fill),
+ ),
),
- Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- mainAxisSize: MainAxisSize.max,
- children: [
- RatingBar.readOnly(
- initialRating: widget
- .appoList[index]
- .actualDoctorRate
- .toDouble(),
- size: 20.0,
- filledColor: Colors.yellow[700],
- emptyColor: Colors.grey[500],
- isHalfAllowed: true,
- halfFilledIcon: Icons.star_half,
- filledIcon: Icons.star,
- emptyIcon: Icons.star,
- ),
- ],
+ ),
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 10.0,
+ left: 20.0,
+ right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Text(
+ widget.appoList[index]
+ .doctorTitle +
+ " " +
+ widget.appoList[index]
+ .doctorNameObj,
+ style: TextStyle(
+ fontSize: 14.0,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.bold,
+ letterSpacing: 1.0)),
+ Container(
+ margin: EdgeInsets.only(
+ top: 3.0, bottom: 3.0),
+ child: Text(
+ getDoctorSpeciality(widget
+ .appoList[index]
+ .doctorSpeciality)
+ .trim(),
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ Row(
+ mainAxisAlignment:
+ MainAxisAlignment
+ .spaceBetween,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ RatingBar.readOnly(
+ initialRating: widget
+ .appoList[index]
+ .actualDoctorRate
+ .toDouble(),
+ size: 20.0,
+ filledColor:
+ Colors.yellow[700],
+ emptyColor:
+ Colors.grey[500],
+ isHalfAllowed: true,
+ halfFilledIcon:
+ Icons.star_half,
+ filledIcon: Icons.star,
+ emptyIcon: Icons.star,
+ ),
+ ],
+ ),
+ Container(
+ child: CountdownTimer(
+ controller: new CountdownTimerController(
+ endTime: DateTime.now()
+ .millisecondsSinceEpoch +
+ (widget
+ .appoList[
+ index]
+ .remaniningHoursTocanPay *
+ 1000) *
+ 60),
+ widgetBuilder: (_,
+ CurrentRemainingTime
+ time) {
+ return time != null
+ ? Text(
+ '${time.days != null ? time.days : "0"}:${time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours}:${time.min}:${time.sec} ' +
+ TranslationBase.of(
+ context)
+ .upcomingTimeLeft,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Color(
+ 0xff40ACC9)))
+ : Container();
+ },
+ ),
+ ),
+ ],
+ ),
),
- Container(
- child: CountdownTimer(
- controller: new CountdownTimerController(
- endTime: DateTime.now()
- .millisecondsSinceEpoch +
- (widget.appoList[index]
- .remaniningHoursTocanPay *
- 1000) *
- 60),
- widgetBuilder:
- (_, CurrentRemainingTime time) {
- return time != null
- ? Text(
- '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
- TranslationBase.of(
- context)
- .upcomingTimeLeft,
+ ),
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () => performNextAction(
+ widget.appoList[index]),
+ child: Container(
+ margin: EdgeInsets.only(top: 20.0),
+ child: Column(
+ children: [
+ Image.asset(
+ getNextActionImage(widget
+ .appoList[index]
+ .nextAction),
+ width: 50.0,
+ height: 50.0),
+ Container(
+ margin:
+ EdgeInsets.only(top: 5.0),
+ child: Text(
+ getNextActionText(widget
+ .appoList[index]
+ .nextAction),
+ textAlign:
+ TextAlign.center,
style: TextStyle(
- fontSize: 12.0,
- color: Color(
- 0xff40ACC9)))
- : Container();
- },
+ fontSize: 12.0)),
+ )
+ ],
+ ),
),
),
- ],
- ),
+ )
+ ],
),
- ),
- Expanded(
- flex: 1,
- child: InkWell(
- onTap: () => performNextAction(
- widget.appoList[index]),
- child: Container(
- margin: EdgeInsets.only(top: 20.0),
- child: Column(
- children: [
- Image.asset(
- getNextActionImage(widget
+ Divider(
+ color: Colors.grey[500],
+ ),
+ Flex(
+ direction: Axis.horizontal,
+ children: [
+ Expanded(
+ flex: 2,
+ child: Container(
+ child: Text(
+ getNextActionDescription(widget
.appoList[index].nextAction),
- width: 50.0,
- height: 50.0),
- Container(
- margin: EdgeInsets.only(top: 5.0),
- child: Text(
- getNextActionText(widget
- .appoList[index]
- .nextAction),
- textAlign: TextAlign.center,
- style:
- TextStyle(fontSize: 12.0)),
- )
- ],
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[700])),
+ ),
),
- ),
+ Expanded(
+ flex: 1,
+ child: GestureDetector(
+ onTap: () {
+ navigateToAppointmentDetails(
+ context,
+ widget.appoList[index]);
+ },
+ child: Container(
+ child: Text(
+ TranslationBase.of(context)
+ .upcomingDetails,
+ textAlign: TextAlign.end,
+ style: TextStyle(
+ fontSize: 12.0,
+ color:
+ new Color(0xFF40ACC9),
+ decoration: TextDecoration
+ .underline)),
+ ),
+ ),
+ )
+ ],
),
- )
- ],
- ),
- Divider(
- color: Colors.grey[500],
+ ],
+ ),
),
- Flex(
- direction: Axis.horizontal,
- children: [
- Expanded(
- flex: 2,
- child: Container(
- child: Text(
- getNextActionDescription(
- widget.appoList[index].nextAction),
- style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[700])),
- ),
- ),
- Expanded(
- flex: 1,
- child: GestureDetector(
- onTap: () {
- navigateToAppointmentDetails(
- context, widget.appoList[index]);
- },
- child: Container(
- child: Text(
- TranslationBase.of(context)
- .upcomingDetails,
- textAlign: TextAlign.end,
- style: TextStyle(
- fontSize: 12.0,
- color: new Color(0xFF40ACC9),
- decoration:
- TextDecoration.underline)),
+ ),
+ ),
+ Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(10.0),
+ bottomRight: Radius.circular(10.0)),
+ color: Color(0xff20bc44),
+ ),
+ height: 30.0,
+ margin: projectViewModel.isArabic ? EdgeInsets.fromLTRB(160.0, 0.0, 30.0, 0.0) : EdgeInsets.fromLTRB(30.0, 0.0, 160.0, 0.0),
+ transform: Matrix4.translationValues(0.0, -8.0, 0.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ widget.appoList[index].isLiveCareAppointment
+ ? Container(
+ margin: EdgeInsets.fromLTRB(
+ 5.0, 0.0, 5.0, 0.0),
+ child: Image.asset(
+ "assets/images/new-design/video.png"),
+ )
+ : Container(
+ margin: EdgeInsets.fromLTRB(
+ 5.0, 0.0, 5.0, 0.0),
+ child: Image.asset(
+ "assets/images/new-design/walkin.png"),
),
- ),
- )
- ],
- ),
- ],
+ widget.appoList[index].isLiveCareAppointment
+ ? Container(
+ child: Text(TranslationBase.of(context).videoAppo,
+ style: TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 12.0)),
+ )
+ : Container(
+ child: Text(TranslationBase.of(context).walkinAppo,
+ style: TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 12.0)),
+ )
+ ],
+ ),
),
- ),
+ ],
),
);
},
@@ -567,12 +631,34 @@ class _ToDoState extends State {
}
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
- GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
+ if (appo.isLiveCareAppointment) {
+ getLiveCareAppointmentPatientShare(context, service, appo);
+ } else {
+ GifLoaderDialogUtils.showMyDialog(context);
+ service
+ .getPatientShare(appo.appointmentNo.toString(), appo.clinicID,
+ appo.projectID, context)
+ .then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
+ widget.patientShareResponse = new PatientShareResponse.fromJson(res);
+ openPaymentDialog(appo, widget.patientShareResponse);
+ }).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: err);
+ print(err);
+ });
+ }
+ }
+
+ getLiveCareAppointmentPatientShare(context, DoctorsListService service,
+ AppoitmentAllHistoryResultList appo) {
+ GifLoaderDialogUtils.showMyDialog(context);
service
- .getPatientShare(appo.appointmentNo.toString(), appo.clinicID,
- appo.projectID, context)
+ .getLiveCareAppointmentPatientShare(appo.appointmentNo.toString(),
+ appo.clinicID, appo.projectID, context)
.then((res) {
+ print(res);
GifLoaderDialogUtils.hideDialog(context);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
openPaymentDialog(appo, widget.patientShareResponse);
@@ -674,7 +760,12 @@ class _ToDoState extends State {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
- widget.browser);
+ widget.browser,
+ appo.isLiveCareAppointment,
+ appo.appointmentDate,
+ appo.appointmentNo,
+ appo.clinicID,
+ appo.doctorID);
}
onBrowserLoadStart(String url) {
diff --git a/lib/pages/ToDoList/widgets/upcomingCard.dart b/lib/pages/ToDoList/widgets/upcomingCard.dart
index 04930e59..3fefe616 100644
--- a/lib/pages/ToDoList/widgets/upcomingCard.dart
+++ b/lib/pages/ToDoList/widgets/upcomingCard.dart
@@ -197,7 +197,7 @@ class _TodoListCardState extends State {
),
)
],
- )
+ ),
],
),
),
diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart
index eabff77a..01a50fda 100644
--- a/lib/pages/landing/landing_page.dart
+++ b/lib/pages/landing/landing_page.dart
@@ -326,6 +326,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
Permission.notification,
Permission.accessMediaLocation,
Permission.calendar,
+ Permission.activityRecognition
].request();
var permissionsGranted = await deviceCalendarPlugin.hasPermissions();
diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart
index fc5c4eab..1974753f 100644
--- a/lib/pages/livecare/livecare_home.dart
+++ b/lib/pages/livecare/livecare_home.dart
@@ -49,6 +49,7 @@ class _LiveCareHomeState extends State
child: Column(children: [
/// this is will not colored with theme data
TabBar(
+ labelColor: Colors.black,
tabs: [
Tab(text: TranslationBase.of(context).consultation),
Tab(text: TranslationBase.of(context).logs),
diff --git a/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart b/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart
index 4309cc62..19144263 100644
--- a/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart
+++ b/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart
@@ -21,7 +21,7 @@ class _ScheduleClinicCardState extends State {
return Container(
child: Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 15.0, 8.0),
- color: widget.isSelected ? Colors.blue : Colors.white,
+ color: widget.isSelected ? Color(0xff06b806) : Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
@@ -35,8 +35,8 @@ class _ScheduleClinicCardState extends State {
Container(
child: Text(
widget.languageID == 'ar'
- ? widget.clinicsHaveScheduleList.clinicDescN
- : widget.clinicsHaveScheduleList.clinicDesc,
+ ? widget.clinicsHaveScheduleList.clinicDescN != null ? widget.clinicsHaveScheduleList.clinicDescN: ""
+ : widget.clinicsHaveScheduleList.clinicDesc != null ? widget.clinicsHaveScheduleList.clinicDesc: "Dermatology",
style: TextStyle(
fontSize: 16.0,
color:
diff --git a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart
index 25ec8514..15c14557 100644
--- a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart
+++ b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart
@@ -42,10 +42,11 @@ class _LiveCareHistoryCardState extends State {
),
child: Container(
width: MediaQuery.of(context).size.width,
- height: MediaQuery.of(context).size.height * 0.22,
+ // height: MediaQuery.of(context).size.height * 0.22,
padding: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
children: [
Text("Requested date:",
style:
diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart
index fc27d92b..195d8879 100644
--- a/lib/pages/livecare/widgets/clinic_list.dart
+++ b/lib/pages/livecare/widgets/clinic_list.dart
@@ -283,7 +283,8 @@ class _clinic_listState extends State {
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
- browser);
+ browser,
+ false);
}
onBrowserLoadStart(String url) {
diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart
index 8a69bf5d..eecb6abd 100644
--- a/lib/pages/medical/balance/confirm_payment_page.dart
+++ b/lib/pages/medical/balance/confirm_payment_page.dart
@@ -225,7 +225,8 @@ class ConfirmPaymentPage extends StatelessWidget {
advanceModel.patientName,
advanceModel.fileNumber,
authenticatedUser,
- browser);
+ browser,
+ false);
}
onBrowserLoadStart(String url) {
diff --git a/lib/pages/medical/smart_watch_health_data/stepsTracker.dart b/lib/pages/medical/smart_watch_health_data/stepsTracker.dart
new file mode 100644
index 00000000..467242e8
--- /dev/null
+++ b/lib/pages/medical/smart_watch_health_data/stepsTracker.dart
@@ -0,0 +1,248 @@
+import 'package:charts_flutter/flutter.dart' as charts;
+import 'package:diplomaticquarterapp/models/SmartWatch/YearlyStepsResModel.dart';
+import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:flutter/material.dart';
+
+class StepsTracker extends StatefulWidget {
+ @override
+ _StepsTrackerState createState() => _StepsTrackerState();
+}
+
+class _StepsTrackerState extends State
+ with SingleTickerProviderStateMixin {
+ TabController _tabController;
+
+ int weeklyStatsAvgValue = 0;
+ int monthlyStatsAvgValue = 0;
+ int yearlyStatsAvgValue = 0;
+
+ int avgStepsValue = 0;
+ int dataLength = 0;
+
+ List yearlyStepsList = List();
+
+ List yearlyTimeSeriesData = [];
+
+ bool isDataLoaded = false;
+
+ @override
+ void initState() {
+ _tabController = new TabController(length: 3, vsync: this);
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ getYearlyStepsData();
+ });
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return AppScaffold(
+ isShowAppBar: true,
+ appBarTitle: "Steps",
+ isShowDecPage: false,
+ body: Container(
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ TabBar(
+ tabs: [
+ Tab(text: TranslationBase.of(context).weekly),
+ Tab(text: TranslationBase.of(context).monthly),
+ Tab(text: TranslationBase.of(context).yearly),
+ ],
+ controller: _tabController,
+ ),
+ Expanded(
+ child: new TabBarView(
+ physics: NeverScrollableScrollPhysics(),
+ children: [
+ isDataLoaded ? getWeeklyStepsDetails() : Container(),
+ isDataLoaded ? getMonthlyStepsDetails() : Container(),
+ isDataLoaded ? getYearlyStepsDetails() : Container()
+ ],
+ controller: _tabController,
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ getYearlyStepsData() {
+ avgStepsValue = 0;
+ dataLength = 0;
+
+ DoctorsListService service = new DoctorsListService();
+ GifLoaderDialogUtils.showMyDialog(context);
+ service.getPatientHealthDataStats(6, 3, context).then((res) {
+ GifLoaderDialogUtils.hideDialog(context);
+ print(res['Med_GetYearStepsTransactionsStsList']);
+ yearlyStepsList.clear();
+ res['Med_GetYearStepsTransactionsStsList'].forEach((element) {
+ yearlyStepsList.add(new YearlyStepsResModel.fromJson(element));
+ if (element['ValueSum'] != null) {
+ double value = element['ValueSum'];
+ avgStepsValue += value.toInt();
+ dataLength++;
+ }
+ });
+
+ print(avgStepsValue);
+ print(dataLength);
+ setState(() {
+ yearlyStatsAvgValue = avgStepsValue ~/ dataLength;
+ isDataLoaded = true;
+ });
+ }).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ // AppToast.showErrorToast(message: err);
+ print(err);
+ });
+ }
+
+ generateData() {
+ if (yearlyStepsList.length > 0) {
+ yearlyTimeSeriesData.clear();
+ yearlyStepsList.forEach(
+ (element) {
+ yearlyTimeSeriesData.add(
+ TimeSeriesSales(
+ new DateTime(element.year, element.month, 1),
+ element.valueSum != null ? element.valueSum.toInt() : 0,
+ ),
+ );
+ },
+ );
+ yearlyTimeSeriesData.forEach((element) {
+ print(element.sales);
+ print(element.time);
+ });
+ }
+ return [
+ new charts.Series(
+ id: 'Sales',
+ colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
+ domainFn: (TimeSeriesSales sales, _) => sales.time,
+ measureFn: (TimeSeriesSales sales, _) => sales.sales,
+ data: yearlyTimeSeriesData,
+ )
+ ];
+ }
+
+ getWeeklyStepsDetails() {
+ return Container(
+ child: Text("Weekly"),
+ );
+ }
+
+ getMonthlyStepsDetails() {
+ return Container(
+ child: Text("Monthly"),
+ );
+ }
+
+ getYearlyStepsDetails() {
+ return Container(
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Container(
+ child: AppTimeSeriesChart(
+ seriesList: generateData(),
+ chartName: "Steps",
+ startDate: DateTime(
+ yearlyStepsList[0].year, yearlyStepsList[0].month, 1),
+ endDate: DateTime(
+ yearlyStepsList[yearlyStepsList.length - 1].year,
+ yearlyStepsList[yearlyStepsList.length - 1].month,
+ 1),
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 5.0),
+ child: Card(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ side: BorderSide(color: Colors.grey[400], width: 0.6)),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Container(
+ padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 15.0),
+ child:
+ Text("Average Steps", style: TextStyle(fontSize: 18.0)),
+ ),
+ Container(
+ margin: EdgeInsets.only(bottom: 10.0),
+ child: Text(yearlyStatsAvgValue.toString() + " Steps",
+ style: TextStyle(
+ fontSize: 20.0, fontWeight: FontWeight.bold)),
+ ),
+ ],
+ ),
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.all(10.0),
+ child: Divider(
+ color: Colors.grey[500],
+ ),
+ ),
+ Container(
+ transform: Matrix4.translationValues(0.0, -10.0, 0.0),
+ margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text("History", style: TextStyle(fontSize: 14.0)),
+ Row(
+ children: [
+ Text("view more", style: TextStyle(fontSize: 14.0)),
+ Container(
+ margin: EdgeInsets.only(left: 3.0, right: 3.0),
+ transform: Matrix4.translationValues(0.0, 1.5, 0.0),
+ width: 30.0,
+ height: 30.0,
+ child: Image.asset(
+ "assets/images/new-design/view_more.png",
+ fit: BoxFit.contain),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0),
+ child: Card(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ side: BorderSide(color: Colors.grey[400], width: 0.6)),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Container(
+ padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 15.0),
+ child: Text("Date",
+ style: TextStyle(
+ fontSize: 18.0, fontWeight: FontWeight.bold)),
+ ),
+ Container(
+ padding: EdgeInsets.fromLTRB(30.0, 0.0, 30.0, 0.0),
+ child: Text("Steps", style: TextStyle(fontSize: 18.0)),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart
index d26c74ad..72f18979 100644
--- a/lib/services/appointment_services/GetDoctorsList.dart
+++ b/lib/services/appointment_services/GetDoctorsList.dart
@@ -41,7 +41,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
- var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID =
+ await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
@@ -105,7 +106,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
- var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ var languageID =
+ await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
@@ -145,7 +147,8 @@ class DoctorsListService extends BaseService {
Future