|
|
|
@ -1,43 +1,29 @@
|
|
|
|
|
import 'dart:math';
|
|
|
|
|
|
|
|
|
|
import 'package:badges/badges.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/medical/time_line_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import '../../locator.dart';
|
|
|
|
|
import 'active_medications/ActiveMedicationsPage.dart';
|
|
|
|
|
|
|
|
|
|
import 'allergies_page.dart';
|
|
|
|
|
import 'ask_doctor/ask_doctor_home_page.dart';
|
|
|
|
|
import 'balance/my_balance_page.dart';
|
|
|
|
|
import 'doctor/doctor_home_page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
|
|
|
|
|
import 'eye/EyeHomePage.dart';
|
|
|
|
|
import 'eye/EyeMeasurementsPage.dart';
|
|
|
|
|
import 'labs/labs_home_page.dart';
|
|
|
|
|
import 'my_trackers/my_trackers.dart';
|
|
|
|
|
|
|
|
|
|
class MedicalProfilePage extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
@ -45,6 +31,8 @@ class MedicalProfilePage extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
var authProvider = new AuthProvider();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
@ -73,18 +61,19 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
// color: Colors.black.withOpacity(0.0)
|
|
|
|
|
),
|
|
|
|
|
if(model.authenticatedUserObject.isLogin)
|
|
|
|
|
ListView.builder(
|
|
|
|
|
itemBuilder: (context, index) => TimeLineWidget(
|
|
|
|
|
isUp: index % 2 == 1,
|
|
|
|
|
appoitmentAllHistoryResul: model
|
|
|
|
|
.appoitmentAllHistoryResultList[index],
|
|
|
|
|
if (model.authenticatedUserObject.isLogin)
|
|
|
|
|
ListView.builder(
|
|
|
|
|
itemBuilder: (context, index) =>
|
|
|
|
|
TimeLineWidget(
|
|
|
|
|
isUp: index % 2 == 1,
|
|
|
|
|
appoitmentAllHistoryResul: model
|
|
|
|
|
.appoitmentAllHistoryResultList[index],
|
|
|
|
|
),
|
|
|
|
|
itemCount: model
|
|
|
|
|
.appoitmentAllHistoryResultList.length,
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
reverse: !projectViewModel.isArabic,
|
|
|
|
|
),
|
|
|
|
|
itemCount:
|
|
|
|
|
model.appoitmentAllHistoryResultList.length,
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
reverse: !projectViewModel.isArabic,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -109,34 +98,53 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.myAppointments,
|
|
|
|
|
imagePath: 'my_appointment_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.myAppointmentsList,
|
|
|
|
|
hasBadge: true,
|
|
|
|
|
),
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 0.0,
|
|
|
|
|
child: Badge(
|
|
|
|
|
toAnimate: false,
|
|
|
|
|
position: BadgePosition.topEnd(),
|
|
|
|
|
shape: BadgeShape.circle,
|
|
|
|
|
badgeColor: Color(0xFF40ACC9).withOpacity(1.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
badgeContent: Container(
|
|
|
|
|
padding: EdgeInsets.all(2.0),
|
|
|
|
|
child: Text(appoCountProvider.count.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 16.0)),
|
|
|
|
|
child: authProvider.isLogin
|
|
|
|
|
? Stack(children: [
|
|
|
|
|
MedicalProfileItem(
|
|
|
|
|
title:
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.myAppointments,
|
|
|
|
|
imagePath:
|
|
|
|
|
'my_appointment_icon.png',
|
|
|
|
|
subTitle:
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.myAppointmentsList,
|
|
|
|
|
hasBadge: true,
|
|
|
|
|
),
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 0.0,
|
|
|
|
|
child: Badge(
|
|
|
|
|
toAnimate: false,
|
|
|
|
|
position:
|
|
|
|
|
BadgePosition.topEnd(),
|
|
|
|
|
shape: BadgeShape.circle,
|
|
|
|
|
badgeColor: Color(0xFF40ACC9)
|
|
|
|
|
.withOpacity(1.0),
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(8),
|
|
|
|
|
badgeContent: Container(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.all(2.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
appoCountProvider.count
|
|
|
|
|
.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 16.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
])
|
|
|
|
|
: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.myAppointments,
|
|
|
|
|
imagePath:
|
|
|
|
|
'my_appointment_icon.png',
|
|
|
|
|
subTitle:
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.myAppointmentsList,
|
|
|
|
|
hasBadge: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
@ -233,9 +241,11 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap:()=> Navigator.push(context, FadePage(page: AllergiesPage())) ,
|
|
|
|
|
onTap: () => Navigator.push(context,
|
|
|
|
|
FadePage(page: AllergiesPage())),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).allergies,
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.allergies,
|
|
|
|
|
imagePath: 'my_allergies_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.allergiesSubtitle,
|
|
|
|
@ -263,13 +273,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context,
|
|
|
|
|
FadePage(page: InsuranceApproval()));
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: InsuranceApproval()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.insuranceApproval,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
imagePath:
|
|
|
|
|
'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.insuranceApprovalSubtitle,
|
|
|
|
|
),
|
|
|
|
@ -287,18 +300,24 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title:
|
|
|
|
|
TranslationBase.of(context).medical,
|
|
|
|
|
TranslationBase.of(context).medical,
|
|
|
|
|
imagePath: 'medical_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context)
|
|
|
|
|
.medicalSubtitle,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(child: Container(),),
|
|
|
|
|
Expanded(child: Container(),),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
SizedBox(height: MediaQuery.of(context).size.height * 0.12,)
|
|
|
|
|
SizedBox(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.12,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
@ -337,7 +356,6 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
|
'${model.user.patientID}',
|
|
|
|
|
color: Colors.white,
|
|
|
|
|