Merge branch 'vital_sign' into 'master'

Vital sign

See merge request Cloud_Solution/diplomatic-quarter!26
merge-update-with-lab-changes
Mohammad Aljammal 6 years ago
commit 09561ac248

@ -13,11 +13,11 @@ class BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
BaseService() { BaseService() {
getUser(); _getUser();
} }
getUser() async { _getUser() async {
user = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
} }
} }

@ -24,21 +24,21 @@ class BaseAppClient {
try { try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
// body['SetupID'] = SETUP_ID; body['SetupID'] = body.containsKey('SetupID') ? body['SetupID']!=null? body['SetupID'] :SETUP_ID :SETUP_ID;
// body['VersionID'] = VERSION_ID; body['VersionID'] = body.containsKey('VersionID') ? body['VersionID']!=null? body['VersionID'] :VERSION_ID :VERSION_ID;
// body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
// body['LanguageID'] = LANGUAGE; body['LanguageID'] = languageID == 'ar' ? 1 : 2;
// body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
// body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
// // body['PatientOutSA'] = PATIENT_OUT_SA; body['PatientOutSA'] = body.containsKey('PatientOutSA') ? body['PatientOutSA']!=null? body['PatientOutSA'] :PATIENT_OUT_SA :PATIENT_OUT_SA;
// body['SessionID'] = null; //SESSION_ID; body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND;
// body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND; body['DeviceTypeID'] = DeviceTypeID;
// body['DeviceTypeID'] = DeviceTypeID; body['PatientType'] = body.containsKey('PatientType') ? body['PatientType']!=null? body['PatientType'] :PATIENT_TYPE :PATIENT_TYPE;
// body['PatientType'] = PATIENT_TYPE; body['PatientTypeID'] = body.containsKey('PatientTypeID') ? body['PatientTypeID']!=null? body['PatientTypeID'] :PATIENT_TYPE_ID :PATIENT_TYPE_ID;
// body['PatientTypeID'] = PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; //user['TokenID']; body['TokenID'] = token;
body['PatientID'] = user['PatientID']; body['PatientID'] = user['PatientID'];
body['PatientOutSA'] = user['OutSA']; body['PatientOutSA'] = user['OutSA'];
body['SessionID'] = getSessionId(token); body['SessionID'] = getSessionId(token);

@ -1,6 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
@ -19,6 +20,7 @@ class FeedbackService extends BaseService {
String attachment, String attachment,
AppointmentHistory appointHistory}) async { AppointmentHistory appointHistory}) async {
hasError = false; hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_requestInsertCOCItem.attachment = attachment; _requestInsertCOCItem.attachment = attachment;
_requestInsertCOCItem.title = title; _requestInsertCOCItem.title = title;
@ -31,7 +33,7 @@ class FeedbackService extends BaseService {
_requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName;
_requestInsertCOCItem.fileName = ""; _requestInsertCOCItem.fileName = "";
_requestInsertCOCItem.appVersion = VERSION_ID; _requestInsertCOCItem.appVersion = VERSION_ID;
_requestInsertCOCItem.uILanguage = "ar"; //TODO Change it to be dynamic _requestInsertCOCItem.uILanguage = languageID; //TODO Change it to be dynamic
_requestInsertCOCItem.browserInfo = Platform.localHostname; _requestInsertCOCItem.browserInfo = Platform.localHostname;
_requestInsertCOCItem.deviceInfo = Platform.localHostname; _requestInsertCOCItem.deviceInfo = Platform.localHostname;
_requestInsertCOCItem.resolution = "400x847"; _requestInsertCOCItem.resolution = "400x847";

@ -0,0 +1,21 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
class MedicalService extends BaseService {
List<AppoitmentAllHistoryResultList> appoitmentAllHistoryResultList = List();
getAppointmentHistory() async {
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY,
onSuccess: (response, statusCode) async {
appoitmentAllHistoryResultList.clear();
response['AppoimentAllHistoryResultList'].forEach((appoitment) {
appoitmentAllHistoryResultList
.add(AppoitmentAllHistoryResultList.fromJson(appoitment));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
}

@ -4,23 +4,20 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.
import '../base_service.dart'; import '../base_service.dart';
class VitalSignService extends BaseService { class VitalSignService extends BaseService {
List<VitalSignResModel> vitalSignResModelList = List(); List<VitalSignResModel> vitalSignResModelList = List();
Map<String, dynamic> body = Map();
Future getPatientRadOrders () async { Future getPatientRadOrders() async {
hasError = false; hasError = false;
await baseAppClient.post(GET_PATIENT_VITAL_SIGN, await baseAppClient.post(GET_PATIENT_VITAL_SIGN,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
vitalSignResModelList.clear(); vitalSignResModelList.clear();
response['List_DoctorPatientVitalSign'].forEach((vital) { response['List_DoctorPatientVitalSign'].forEach((vital) {
vitalSignResModelList.add(VitalSignResModel.fromJson(vital)); vitalSignResModelList.add(VitalSignResModel.fromJson(vital));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: Map()); }, body: Map());
} }
} }

@ -1,4 +1,7 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class BaseViewModel extends ChangeNotifier { class BaseViewModel extends ChangeNotifier {
@ -9,8 +12,21 @@ class BaseViewModel extends ChangeNotifier {
String error = ""; String error = "";
AuthenticatedUser user;
AppSharedPreferences sharedPref = AppSharedPreferences();
void setState(ViewState viewState) { void setState(ViewState viewState) {
_state = viewState; _state = viewState;
notifyListeners(); notifyListeners();
} }
BaseViewModel() {
_getUser();
}
_getUser() async {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
notifyListeners();
}
} }

@ -0,0 +1,22 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
class MedicalViewModel extends BaseViewModel {
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
List();
MedicalService _medicalService = locator<MedicalService>();
getAppointmentHistory() {
setState(ViewState.Busy);
_medicalService.getAppointmentHistory();
if (_medicalService.hasError) {
error = _medicalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}

@ -4,6 +4,7 @@ import 'package:get_it/get_it.dart';
import 'core/service/feedback/feedback_service.dart'; import 'core/service/feedback/feedback_service.dart';
import 'core/service/hospital_service.dart'; import 'core/service/hospital_service.dart';
import 'core/service/medical/labs_service.dart'; import 'core/service/medical/labs_service.dart';
import 'core/service/medical/medical_service.dart';
import 'core/service/medical/my_doctor_service.dart'; import 'core/service/medical/my_doctor_service.dart';
import 'core/service/medical/prescriptions_service.dart'; import 'core/service/medical/prescriptions_service.dart';
import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/radiology_service.dart';
@ -11,6 +12,7 @@ import 'core/service/medical/vital_sign_service.dart';
import 'core/viewModels/feedback/feedback_view_model.dart'; import 'core/viewModels/feedback/feedback_view_model.dart';
import 'core/viewModels/hospital_view_model.dart'; import 'core/viewModels/hospital_view_model.dart';
import 'core/viewModels/medical/labs_view_model.dart'; import 'core/viewModels/medical/labs_view_model.dart';
import 'core/viewModels/medical/medical_view_model.dart';
import 'core/viewModels/medical/my_doctor_view_model.dart'; import 'core/viewModels/medical/my_doctor_view_model.dart';
import 'core/viewModels/medical/prescriptions_view_model.dart'; import 'core/viewModels/medical/prescriptions_view_model.dart';
import 'core/viewModels/medical/radiology_view_model.dart'; import 'core/viewModels/medical/radiology_view_model.dart';
@ -34,7 +36,7 @@ void setupLocator() {
locator.registerLazySingleton(() => FeedbackService()); locator.registerLazySingleton(() => FeedbackService());
locator.registerLazySingleton(() => InsuranceCardService()); locator.registerLazySingleton(() => InsuranceCardService());
locator.registerLazySingleton(() => VitalSignService()); locator.registerLazySingleton(() => VitalSignService());
locator.registerLazySingleton(() => MedicalService());
/// View Model /// View Model
locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => HospitalViewModel());
@ -46,4 +48,5 @@ void setupLocator() {
locator.registerFactory(() => FeedbackViewModel()); locator.registerFactory(() => FeedbackViewModel());
locator.registerFactory(() => VitalSignViewModel()); locator.registerFactory(() => VitalSignViewModel());
locator.registerFactory(() => InsuranceViewModel()); locator.registerFactory(() => InsuranceViewModel());
locator.registerFactory(() => MedicalViewModel());
} }

@ -299,7 +299,6 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
); );
}), }),
), ),
////////////////
], ],
)) ))
], ],

@ -1,16 +1,21 @@
import 'dart:math'; import 'dart:math';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.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/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart'; import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
import '../../locator.dart';
import 'doctor/doctor_home_page.dart'; import 'doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
@ -22,202 +27,414 @@ class MedicalProfilePage extends StatefulWidget {
} }
class _MedicalProfilePageState extends State<MedicalProfilePage> { class _MedicalProfilePageState extends State<MedicalProfilePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return BaseView<MedicalViewModel>(
body: CustomScrollView( onModelReady: (model) => model.getAppointmentHistory(),
physics: BouncingScrollPhysics(), builder: (_, model, widget) => AppScaffold(
key: PageStorageKey("medical"), baseViewModel: model,
slivers: <Widget>[ body: SafeArea(
SliverPersistentHeader( child: SingleChildScrollView(
delegate: SliverAppBarDelegate( child: Column(
maxHeight: 200.0, children: <Widget>[
minHeight: 200.0, Stack(
child: Container( children: <Widget>[
width: double.infinity, Column(
height: 200, children: <Widget>[
color: Colors.grey, Container(
), width: double.infinity,
), color: Colors.grey,
), height: 150,
SliverPersistentHeader( ),
delegate: SliverAppBarDelegate( Padding(
maxHeight: double.maxFinite, padding: EdgeInsets.symmetric(vertical: 12.0),
minHeight: double.maxFinite, child: Column(
child: Padding( children: <Widget>[
padding: EdgeInsets.symmetric(vertical: 12.0), Container(
child: Column( width: double.infinity,
children: <Widget>[ height: 30,
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context, FadePage(page: DoctorHomePage()));
},
child: MedicalProfileItem(
title: 'My Doctor',
imagePath: 'doctor_icon.png',
subTitle: 'List',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {},
child: MedicalProfileItem(
title: 'Lab',
imagePath: 'lab_result_icon.png',
subTitle: 'Result',
), ),
), Row(
) children: <Widget>[
], Expanded(
), flex: 1,
Row( child: InkWell(
children: <Widget>[ onTap: () {
Expanded( Navigator.push(context,
flex: 1, FadePage(page: MyAppointments()));
child: InkWell( },
onTap: () => Navigator.push( child: MedicalProfileItem(
context, FadePage(page: RadiologyHomePage())), title: 'My Appointments',
child: MedicalProfileItem( imagePath: 'my_appointment_icon.png',
title: 'Radiology', subTitle: 'List',
imagePath: 'radiology_icon.png', ),
subTitle: 'Service', ),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
title: 'Radiology',
imagePath: 'radiology_icon.png',
subTitle: 'Service',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {},
child: MedicalProfileItem(
title: 'Lab',
imagePath: 'lab_result_icon.png',
subTitle: 'Result',
),
),
),
],
), ),
), Row(
), children: <Widget>[
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(
FadePage(page: HomePrescriptionsPage())); context,
}, FadePage(
child: MedicalProfileItem( page: HomePrescriptionsPage()));
title: 'Medicines', },
imagePath: 'prescription_icon.png', child: MedicalProfileItem(
subTitle: 'Prescriptions', title: 'Medicines',
imagePath: 'prescription_icon.png',
subTitle: 'Prescriptions',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: VitalSignDetailsScreen())),
child: MedicalProfileItem(
title: 'Vital Signs',
imagePath: 'medical_history_icon.png',
subTitle: 'Reports',
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () => Navigator.push(
// context, FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
title: 'My Medicines ',
imagePath: 'radiology_icon.png',
subTitle: 'Service',
),
),
),
],
), ),
), Row(
) children: <Widget>[
], Expanded(
), flex: 1,
Row( child: InkWell(
children: <Widget>[ onTap: () {
Expanded( Navigator.push(context,
flex: 1, FadePage(page: DoctorHomePage()));
child: InkWell( },
onTap: () { child: MedicalProfileItem(
Navigator.push( title: 'My Doctor',
context, FadePage(page: InsuranceCard())); imagePath: 'doctor_icon.png',
}, subTitle: 'List',
child: MedicalProfileItem( ),
title: 'Insurance', ),
imagePath: 'insurance_card_icon.png', ),
subTitle: 'Card', Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(context,
// FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title: 'Eye',
imagePath:
'insurance_approvals_icon.png',
subTitle: 'Measurement',
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(context,
FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
title: 'Insurance',
imagePath: 'insurance_card_icon.png',
subTitle: 'Card',
),
),
),
],
), ),
), Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
title: 'Update Insurance',
imagePath: 'insurance_card_icon.png',
subTitle: 'card',
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title: 'Insurance Approval',
imagePath: 'insurance_approvals_icon.png',
subTitle: '',
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Allergies',
imagePath: 'medical_history_icon.png',
subTitle: 'Diagnosed',
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
title: 'My Vaccines',
imagePath: 'insurance_card_icon.png',
subTitle: 'card',
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title: 'Medical',
imagePath: 'insurance_approvals_icon.png',
subTitle: 'Reports',
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Monthly',
imagePath: 'medical_history_icon.png',
subTitle: 'Report',
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
title: 'Sick',
imagePath: 'insurance_card_icon.png',
subTitle: 'Leaves',
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title: 'My Balance',
imagePath: 'insurance_approvals_icon.png',
subTitle: 'Credit',
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Patient Call',
imagePath: 'medical_history_icon.png',
subTitle: 'Service',
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
title: 'Smart Watches',
imagePath: 'insurance_card_icon.png',
subTitle: 'Pairing',
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title: 'My Trackers',
imagePath: 'insurance_approvals_icon.png',
subTitle: 'Service',
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Ask Your',
imagePath: 'medical_history_icon.png',
subTitle: 'Doctor',
),
),
]),
Row(children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
child: MedicalProfileItem(
title: 'Internet',
imagePath: 'insurance_card_icon.png',
subTitle: 'Pairing',
),
),
),
Expanded(
flex: 1,
child: InkWell(
// onTap: () {
// Navigator.push(
// context, FadePage(page: InsuranceApproval()));
// },
child: MedicalProfileItem(
title: 'My Trackers',
imagePath: 'insurance_approvals_icon.png',
subTitle: 'Service',
),
),
),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Ask Your',
imagePath: 'medical_history_icon.png',
subTitle: 'Doctor',
),
),
]),
],
), ),
Expanded( )
flex: 1, ],
child: InkWell( ),
onTap: () { if (model.user != null)
Navigator.push(context, Positioned(
FadePage(page: InsuranceApproval())); top: 110,
}, left: 20,
child: MedicalProfileItem( right: 20,
title: 'Insurance Approval', child: Container(
imagePath: 'insurance_approvals_icon.png', width: double.infinity,
subTitle: 'Card', height: 70,
), decoration: BoxDecoration(
), color: Colors.grey[600],
) shape: BoxShape.rectangle,
], border: Border.all(
), color: Colors.transparent, width: 0.5),
Row(children: <Widget>[ borderRadius: BorderRadius.all(Radius.circular(5)),
Expanded(
flex: 1,
child: MedicalProfileItem(
title: 'Medical',
imagePath: 'medical_history_icon.png',
subTitle: 'Reports',
), ),
), child: Column(
Expanded( crossAxisAlignment: CrossAxisAlignment.center,
flex: 1, children: <Widget>[
child: InkWell( SizedBox(
onTap: () => Navigator.push(context, height: 8,
FadePage(page: VitalSignDetailsScreen())),
child: MedicalProfileItem(
title: 'Vital Signs',
imagePath: 'medical_history_icon.png',
subTitle: 'Reports',
),
),
),
]),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context, FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: 'Insurance Update',
imagePath: 'insurance_card_icon.png',
subTitle: 'Card',
), ),
), Texts(
), model.user.firstName +
Expanded( " " +
flex: 1, model.user.lastName,
child: InkWell( color: Colors.white,
onTap: () {},
child: MedicalProfileItem(
title: 'new',
imagePath: 'insurance_card_icon.png',
subTitle: 'Card',
), ),
), SizedBox(
) height: 8,
],
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context, FadePage(page: MyAppointments()));
},
child: MedicalProfileItem(
title: 'My Appointments',
imagePath: 'my_appointment_icon.png',
subTitle: 'List',
), ),
), Texts(
), '${model.user.patientID}',
Expanded( color: Colors.white,
flex: 1, ),
child: Container(), ],
), ),
], ),
), )
], ],
),
), ),
), ],
), ),
]), ),
),
),
); );
} }
} }

@ -47,6 +47,13 @@ class AppSharedPreferences {
return prefs.getString(key); return prefs.getString(key);
} }
/// Get String [key] the key was saved
getStringWithDefaultValue(String key, String defaultVal) async {
final SharedPreferences prefs = await _prefs;
String value = prefs.getString(key);
return value == null ? defaultVal : value;
}
/// Get List of String [key] the key was saved /// Get List of String [key] the key was saved
getStringList(String key) async { getStringList(String key) async {
final SharedPreferences prefs = await _prefs; final SharedPreferences prefs = await _prefs;

@ -26,7 +26,7 @@ class MedicalProfileItem extends StatelessWidget {
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'), color: Hexcolor('#B8382C'),
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),

Loading…
Cancel
Save