Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into development

merge-requests/616/head
Haroon Amjad 5 years ago
commit 6fc72328b7

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

@ -33,6 +33,7 @@ const Map<String, Map<String, String>> localizedValues = {
'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'},
'searchAbout': {'en': 'Search', 'ar': 'البحث عن'}, 'searchAbout': {'en': 'Search', 'ar': 'البحث عن'},
'patient': {'en': 'Patient', 'ar': ' مريض'}, 'patient': {'en': 'Patient', 'ar': ' مريض'},
'patients': {'en': "Patient's", 'ar': ' مريض'},
'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'}, 'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'},
'lab': {'en': 'Lab', 'ar': 'المختبر'}, 'lab': {'en': 'Lab', 'ar': 'المختبر'},
'result': {'en': 'Result', 'ar': 'نتيجة'}, 'result': {'en': 'Result', 'ar': 'نتيجة'},
@ -148,7 +149,7 @@ const Map<String, Map<String, String>> localizedValues = {
'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'}, 'welcomeTo': {'en': 'Welcome to', 'ar': 'مرحبا بك'},
'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '}, 'welcomeBackTo': {'en': 'Welcome Back to', 'ar': 'مرحبًا بعودتك الى '},
'home': {'en': 'Home', 'ar': 'الرئيسية'}, 'home': {'en': 'Home', 'ar': 'الرئيسية'},
'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, 'services': {'en': 'Services', 'ar': 'الخدمات'},
'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'}, 'sms': {'en': 'SMS', 'ar': 'رسالة قصيرة'},
'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'}, 'fingerprint': {'en': 'Fingerprint', 'ar': 'بصمة'},
'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'}, 'faceId': {'en': 'Face ID', 'ar': 'معرف الوجه'},

@ -21,7 +21,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart';
import 'base/lookup-service.dart'; import 'base/lookup-service.dart';

@ -25,7 +25,6 @@ import 'package:doctor_app_flutter/models/SOAP/post_chief_complaint_request_mode
import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart';
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../locator.dart'; import '../../locator.dart';

File diff suppressed because one or more lines are too long

@ -131,7 +131,8 @@ class DoctorApp {
IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData edit = static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results2 =
IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves = static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout = static const IconData logout =
@ -202,14 +203,14 @@ class DoctorApp {
IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData external_link = static const IconData external_link =
IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_face = static const IconData verify_face_2 =
// IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_sms = static const IconData verify_sms_2 =
// IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home = static const IconData home =
IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_finger = static const IconData verify_finger_2 =
// IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_active = static const IconData dr_reply_active =
IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply = static const IconData dr_reply =
@ -350,12 +351,16 @@ class DoctorApp {
IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_active_1 = static const IconData home_active_1 =
IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe8a2, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_whtsapp =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger =
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_face = static const IconData verify_face =
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); IconData(0xe8a3, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger =
IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_whtsapp =
IconData(0xe8a5, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms =
IconData(0xe8a6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData 124 = IconData(0xe8a7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData 123 = IconData(0xe8a8, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData menu =
IconData(0xe8ad, fontFamily: _kFontFam, fontPackage: _kFontPkg);
} }

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/screens/QR_reader_screen.dart'; import 'package:doctor_app_flutter/screens/QR_reader_screen.dart';
import 'package:doctor_app_flutter/screens/dashboard_screen.dart'; import 'package:doctor_app_flutter/screens/home/home_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/doctor_reply_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/doctor_reply_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/message_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/message_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart';
@ -40,13 +40,14 @@ class _LandingPageState extends State<LandingPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: currentTab != 0
? AppBar(
elevation: 0, elevation: 0,
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)), //textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0 title: currentTab != 0
? Text(getText(currentTab).toUpperCase()) ? Text(getText(currentTab).toUpperCase())
: Text(''), : SizedBox(),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return IconButton( return IconButton(
@ -58,7 +59,8 @@ class _LandingPageState extends State<LandingPage> {
}, },
), ),
centerTitle: true, centerTitle: true,
), )
: MyAppbar(),
drawer: SafeArea(child: AppDrawer()), drawer: SafeArea(child: AppDrawer()),
extendBody: true, extendBody: true,
body: PageView( body: PageView(
@ -66,17 +68,21 @@ class _LandingPageState extends State<LandingPage> {
controller: pageController, controller: pageController,
children: [ children: [
ShowCaseWidget( ShowCaseWidget(
builder: Builder(builder: (context) => DashboardScreen()), builder: Builder(builder: (context) => HomeScreen()),
), ),
MyScheduleScreen(), MyScheduleScreen(),
QrReaderScreen(), QrReaderScreen(),
DoctorReplyScreen(changeCurrentTab:(){ DoctorReplyScreen(
changeCurrentTab: () {
_changeCurrentTab(0); _changeCurrentTab(0);
},
},), ),
], ],
), ),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab,index: currentTab,), bottomNavigationBar: BottomNavBar(
changeIndex: _changeCurrentTab,
index: currentTab,
),
); );
} }
@ -93,3 +99,16 @@ class _LandingPageState extends State<LandingPage> {
} }
} }
} }
class MyAppbar extends StatelessWidget with PreferredSizeWidget {
@override
final Size preferredSize;
MyAppbar({Key key})
: preferredSize = Size.fromHeight(0.0),
super(key: key);
@override
Widget build(BuildContext context) {
return Container();
}
}

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
class PostPhysicalExamRequestModel { class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM; List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM;

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/root_page.dart'; import 'package:doctor_app_flutter/root_page.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_page.dart';
import 'package:doctor_app_flutter/screens/patients/ECGPage.dart'; import 'package:doctor_app_flutter/screens/patients/ECGPage.dart';
@ -13,14 +12,13 @@ import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_
import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart';
import 'package:doctor_app_flutter/screens/live_care/video_call.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart';
import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart';
import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart';
import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart';
import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_soap_index.dart';
import './screens/QR_reader_screen.dart'; import './screens/QR_reader_screen.dart';
import './screens/auth/change_password_screen.dart'; import './screens/auth/change_password_screen.dart';
@ -28,7 +26,6 @@ import './screens/auth/login_screen.dart';
import './screens/auth/verification_methods_screen.dart'; import './screens/auth/verification_methods_screen.dart';
import './screens/auth/verify_account_screen.dart'; import './screens/auth/verify_account_screen.dart';
import './screens/blood_bank_screen.dart'; import './screens/blood_bank_screen.dart';
import './screens/dashboard_screen.dart';
import './screens/doctor/message_screen.dart'; import './screens/doctor/message_screen.dart';
import './screens/doctor/my_schedule_screen.dart'; import './screens/doctor/my_schedule_screen.dart';
import './screens/doctor/services_screen.dart'; import './screens/doctor/services_screen.dart';

@ -0,0 +1,62 @@
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class HomePageCard extends StatelessWidget {
const HomePageCard({this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4})
: super(key: key);
final bool hasBorder;
final String imageName;
final Widget child;
final Function onTap;
final double width;
final double height;
final Color color;
final double opacity;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
height: height != null
? height
: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.18
: MediaQuery.of(context).size.height * 0.36,
decoration: BoxDecoration(
color: !hasBorder
? color != null
? color
: HexColor('#050705').withOpacity(opacity)
: Colors.white,
borderRadius: BorderRadius.circular(15.0),
border: hasBorder
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null
? DecorationImage(
image: AssetImage('assets/images/dashboard/${imageName}'),
fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn),
)
: null,
),
child: Center(
child: child,
),
),
);
}
getDashboardWidget() {}
}

@ -1,14 +1,15 @@
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart'; import 'package:doctor_app_flutter/models/doctor/profile_req_Model.dart';
import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/search_medicine_patient_screen.dart';
@ -27,25 +28,26 @@ import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import '../routes.dart'; import '../../routes.dart';
import '../widgets/shared/app_texts_widget.dart'; import '../../widgets/shared/app_texts_widget.dart';
import '../widgets/shared/rounded_container_widget.dart'; import '../../widgets/shared/rounded_container_widget.dart';
import 'home_page_card.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers(); Helpers helpers = Helpers();
class DashboardScreen extends StatefulWidget { class HomeScreen extends StatefulWidget {
DashboardScreen({Key key, this.title}) : super(key: key); HomeScreen({Key key, this.title}) : super(key: key);
final String title; final String title;
final String iconURL = 'assets/images/dashboard_icon/'; final String iconURL = 'assets/images/dashboard_icon/';
@override @override
_DashboardScreenState createState() => _DashboardScreenState(); _HomeScreenState createState() => _HomeScreenState();
} }
class _DashboardScreenState extends State<DashboardScreen> { class _HomeScreenState extends State<HomeScreen> {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
HospitalViewModel hospitalProvider; HospitalViewModel hospitalProvider;
AuthViewModel authProvider; AuthViewModel authProvider;
@ -78,6 +80,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
SessionID: "5G0yXn0Jnq", SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true, IsLoginForDoctorApp: true,
PatientOutSA: false); PatientOutSA: false);
void didChangeDependencies() async { void didChangeDependencies() async {
super.didChangeDependencies(); super.didChangeDependencies();
if (_isInit) { if (_isInit) {
@ -109,9 +112,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
} }
BuildContext myContext; BuildContext myContext;
GlobalKey _one = GlobalKey();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
myContext = context; myContext = context;
@ -132,33 +132,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
body: ListView(children: [ body: ListView(children: [
Column( Column(
children: <Widget>[ children: <Widget>[
SizedBox(height: 20),
Stack(children: [ Stack(children: [
IconButton(
icon: Image.asset('assets/images/menu.png',
height: 50, width: 50),
iconSize: 18,
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),
),
Column( Column(
children: <Widget>[ children: <Widget>[
ProfileWelcomeWidget( ProfileWelcomeWidget(
Row( Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Container(
padding: EdgeInsets.all(4),
margin: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red[800],
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
projectsProvider.doctorClinicsList.length
.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectsProvider.isArabic ? 10 : 11,
),
textAlign: TextAlign.center,
),
),
Container( Container(
width: MediaQuery.of(context).size.width * .6, width: MediaQuery.of(context).size.width * .6,
// // height: 100, // // height: 100,
@ -183,15 +171,42 @@ class _DashboardScreenState extends State<DashboardScreen> {
.map((item) { .map((item) {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
color: Colors.red[800],
borderRadius:
BorderRadius.circular(
20),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
projectsProvider
.doctorClinicsList
.length
.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectsProvider
.isArabic
? 10
: 11,
),
textAlign: TextAlign.center,
),
),
AppText(item.clinicName, AppText(item.clinicName,
fontSize: SizeConfig fontSize: 12,
.textMultiplier *
1.6,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
textAlign: textAlign: TextAlign.end),
TextAlign.center),
], ],
); );
}).toList(); }).toList();
@ -205,9 +220,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
.doctorClinicsList .doctorClinicsList
.map((item) { .map((item) {
return DropdownMenuItem( return DropdownMenuItem(
child: Text( child: AppText(
item.clinicName, item.clinicName,
textAlign: TextAlign.end, textAlign: TextAlign.right,
), ),
value: item.clinicID, value: item.clinicID,
); );
@ -222,16 +237,16 @@ class _DashboardScreenState extends State<DashboardScreen> {
isClilic: true, isClilic: true,
), ),
Container( Container(
height: MediaQuery.of(context).size.height * 0.20, height: MediaQuery.of(context).size.height * 0.24,
), ),
], ],
), ),
Positioned( Positioned(
right: 9.0, right: 9.0,
left: 9, left: 9,
top: MediaQuery.of(context).size.height * .05, top: MediaQuery.of(context).size.height * .08,
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.30, height: MediaQuery.of(context).size.height * 0.35,
child: model.dashboardItemsList.length > 0 child: model.dashboardItemsList.length > 0
? new Swiper( ? new Swiper(
onIndexChanged: (index) { onIndexChanged: (index) {
@ -242,10 +257,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
} }
}, },
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return getSwiperWidget(model)[index]; return getSwipeWidget(model)[index];
}, },
itemCount: 3, itemCount: 3,
itemHeight: 300,
pagination: new SwiperCustomPagination(builder: pagination: new SwiperCustomPagination(builder:
(BuildContext context, (BuildContext context,
SwiperPluginConfig config) { SwiperPluginConfig config) {
@ -253,7 +268,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
children: [ children: [
Positioned( Positioned(
bottom: -5, bottom: 0,
child: Center( child: Center(
child: InkWell( child: InkWell(
onTap: () {}, onTap: () {},
@ -263,39 +278,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
MainAxisAlignment MainAxisAlignment
.spaceBetween, .spaceBetween,
children: [ children: [
Container( config.activeIndex == 0
height: 10, ? getSwiperPagiantion(
width: 50, true)
margin: : getSwiperPagiantion(
EdgeInsets.all(2), false),
color: config.activeIndex == 1
config.activeIndex == ? getSwiperPagiantion(
0 true)
? Colors.black : getSwiperPagiantion(
: Colors false),
.grey), config.activeIndex == 2
Container( ? getSwiperPagiantion(
height: 10, true)
width: 50, : getSwiperPagiantion(
margin: false),
EdgeInsets.all(2),
color:
config.activeIndex ==
1
? Colors.black
: Colors
.grey),
Container(
height: 10,
width: 50,
margin:
EdgeInsets.all(2),
color:
config.activeIndex ==
2
? Colors.black
: Colors
.grey),
], ],
))))) )))))
]); ]);
@ -305,430 +302,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
// control: new SwiperControl(), // control: new SwiperControl(),
) )
: SizedBox()), : SizedBox()),
//ExpandableCardContainer(
// expandedChild: Container(
// margin: EdgeInsets.only(left: 10, right: 10),
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.22
// : MediaQuery.of(context).size.height * 0.25,
// width: double.infinity,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// DashboardItem(
// onTap: () {
// setState(() {
// this.isExpanded = false;
// });
// },
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// children: [
// Row(
// children: [
// Expanded(
// child: Column(
// children: [
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[0]
// .value
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[0]
// .value
// .toString()
// : "",
// fontWeight: FontWeight.bold,
// color: Colors.white,
// fontSize: 24,
// ),
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[0]
// .kPIParameter
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[0]
// .kPIParameter
// : "",
// //'My Admitted Patient',
// color: Colors.white,
// textAlign: TextAlign.center,
// fontSize: 12,
// )
// ],
// )),
// Expanded(
// child: Column(
// children: [
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[1]
// .value
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[1]
// .value
// .toString()
// : "",
// fontWeight: FontWeight.bold,
// color: Colors.white,
// fontSize: 28,
// ),
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[1]
// .kPIParameter
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[1]
// .kPIParameter
// : "",
// color: Colors.white,
// textAlign: TextAlign.center,
// fontSize: 12,
// )
// ],
// )),
// Expanded(
// child: Column(
// children: [
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[2]
// .value
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[2]
// .value
// .toString()
// : "",
// fontWeight: FontWeight.bold,
// color: Colors.white,
// fontSize: 28),
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[2]
// .kPIParameter
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[2]
// .kPIParameter
// .toString()
// : "",
// color: Colors.white,
// fontSize: 12,
// textAlign: TextAlign.center)
// ],
// ))
// ],
// ),
// Row(
// children: [
// Expanded(
// child: Column(
// children: [
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[3]
// .value
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[3]
// .value
// .toString()
// : "",
// fontWeight: FontWeight.bold,
// color: Colors.white,
// fontSize: 28),
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[3]
// .kPIParameter
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[3]
// .kPIParameter
// .toString()
// : "",
// color: Colors.white,
// fontSize: 12,
// textAlign: TextAlign.center)
// ],
// )),
// Expanded(
// child: Column(
// children: [
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[
// 4]
// .value
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[
// 4]
// .value
// .toString()
// : "",
// fontWeight: FontWeight.bold,
// color: Colors.white,
// fontSize: 28),
// AppText(
// model.dashboardItemsList
// .length >
// 0
// ? isInpatient == 'in'
// ? model
// .dashboardItemsList[
// 0]
// .summaryoptions[
// 4]
// .kPIParameter
// .toString()
// : model
// .dashboardItemsList[
// 1]
// .summaryoptions[
// 4]
// .kPIParameter
// .toString()
// : "",
// color: Colors.white,
// fontSize: 12,
// textAlign: TextAlign.center)
// ],
// ),
// ),
// Expanded(
// child: Container(),
// )
// ],
// )
// ],
// )),
// imageName: '5.png',
// color: HexColor('#B8382C'),
// hasBorder: false,
// width: MediaQuery.of(context).size.width * 0.9,
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.22
// : MediaQuery.of(context).size.height * 0.25,
// ),
// ],
// ),
// ),
// collapsedChild: Container(
// margin: EdgeInsets.only(left: 10, right: 10),
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.15
// : MediaQuery.of(context).size.height * 0.25,
// width: double.infinity,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// DashboardItem(
// onTap: () {
// setState(() {
// this.isExpanded = true;
// this.isInpatient = 'in';
// });
// },
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: <Widget>[
// Column(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: <Widget>[
// AppText(
// model.dashboardItemsList.length > 0
// ? getPatientCount(
// model.dashboardItemsList[0])
// : "",
// fontSize:
// SizeConfig.textMultiplier * 6,
// color: Colors.white,
// ),
// Flexible(
// child: AppText(
// TranslationBase.of(context).inPatient,
// color: Colors.white,
// textOverflow: TextOverflow.ellipsis,
// )),
// ],
// ),
// Padding(
// padding: EdgeInsets.all(5),
// child: Column(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Icon(
// DoctorApp.in_patient_white,
// size: 35,
// color: Colors.white,
// )
// ],
// ))
// ],
// ),
// ),
// imageName: '4.png',
// color: HexColor('#B8382C'),
// hasBorder: false,
// width: MediaQuery.of(context).size.width * 0.44,
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.15
// : MediaQuery.of(context).size.height * 0.25,
// ),
// DashboardItem(
// onTap: () {
// setState(() {
// isExpanded = true;
// this.isInpatient = 'out';
// });
// },
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: <Widget>[
// Column(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: <Widget>[
// AppText(
// model.dashboardItemsList.length > 0
// ? getPatientCount(
// model.dashboardItemsList[1])
// : "",
// fontSize:
// SizeConfig.textMultiplier * 6,
// color: Colors.white,
// ),
// Flexible(
// child: AppText(
// TranslationBase.of(context)
// .outPatients,
// color: Colors.white,
// textOverflow: TextOverflow.ellipsis,
// )),
// ],
// ),
// Padding(
// padding: EdgeInsets.all(5),
// child: Column(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Icon(
// DoctorApp.out_patient,
// size: 35,
// color: Colors.white,
// )
// ],
// ))
// ],
// ),
// ),
// imageName: '5.png',
// color: HexColor('#B8382C'),
// hasBorder: false,
// width: MediaQuery.of(context).size.width * 0.44,
// height: MediaQuery.of(context).orientation ==
// Orientation.portrait
// ? MediaQuery.of(context).size.height * 0.15
// : MediaQuery.of(context).size.height * 0.25,
// ),
// ],
// ),
// ),
// isExpanded: isExpanded,
// ))
) )
]), ]),
model.dashboardItemsList.length > 0 model.dashboardItemsList.length > 0
@ -739,7 +312,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 15, height: 10,
), ),
sliderActiveIndex == 1 sliderActiveIndex == 1
? Column( ? Column(
@ -876,31 +449,37 @@ class _DashboardScreenState extends State<DashboardScreen> {
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(50), topRight: Radius.circular(50),
)), )),
padding: EdgeInsets.all(15), padding: EdgeInsets.only(left: 20, top: 10, right: 20),
margin: EdgeInsets.only(top: 15), margin: EdgeInsets.only(top: 10),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 15, height: 10,
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Container( Container(
width: 150, width: 150,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AppText( Text(
TranslationBase.of(context).patient, TranslationBase.of(context).patients,
fontSize: SizeConfig.textMultiplier * 1.5, style: TextStyle(
fontSize: 12,
height: .5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
), ),
AppText( Text(
TranslationBase.of(context).services, TranslationBase.of(context).services,
fontSize: SizeConfig.textMultiplier * 3, style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) fontFamily: 'Poppins'),
),
], ],
)), )),
], ],
@ -912,7 +491,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
DashboardItem( HomePageCard(
color: Colors.red[800], color: Colors.red[800],
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -933,6 +512,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.patientsreferral, .patientsreferral,
color: Colors.white, color: Colors.white,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 15,
)) ))
], ],
), ),
@ -947,7 +527,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
); );
}, },
), ),
DashboardItem( HomePageCard(
color: Colors.grey[300], color: Colors.grey[300],
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -968,6 +548,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.arrivalpatient, .arrivalpatient,
color: Colors.black, color: Colors.black,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 15,
)) ))
], ],
), ),
@ -981,7 +562,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
}); });
}, },
), ),
DashboardItem( HomePageCard(
color: Colors.black, color: Colors.black,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -1002,7 +583,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.searchmedicinepatient, .searchmedicinepatient,
color: Colors.white, color: Colors.white,
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 14, fontSize: 13,
)) ))
], ],
), ),
@ -1244,23 +825,23 @@ class _DashboardScreenState extends State<DashboardScreen> {
]); ]);
} }
List<Widget> getSwiperWidget(model) { List<Widget> getSwipeWidget(model) {
return [ return [
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.32, height: MediaQuery.of(context).size.height * 0.35,
margin: 5, margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[1]))), child: getOutPatientStack(model.dashboardItemsList[1]))),
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.32, height: MediaQuery.of(context).size.height * 0.35,
margin: 5, margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[0]))), child: getOutPatientStack(model.dashboardItemsList[0]))),
RoundedContainer( RoundedContainer(
height: MediaQuery.of(context).size.height * 0.24, height: MediaQuery.of(context).size.height * 0.35,
margin: 5, margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Expanded( Expanded(
@ -1278,12 +859,32 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded( Expanded(
flex: 1, flex: 1,
child: Padding( child: Padding(
child: AppText( padding: EdgeInsets.all(8),
TranslationBase.of(context).referral, child: Column(
fontSize: 20, mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context)
.patients,
style: TextStyle(
fontSize: 12,
height: .5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
), ),
padding: EdgeInsets.all(10))), Text(
TranslationBase.of(context)
.referral,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
),
],
))),
Expanded( Expanded(
flex: 2, flex: 2,
child: Column( child: Column(
@ -1341,91 +942,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
])), ])),
]; ];
} }
}
// TODO Move to it file getSwiperPagiantion(active) {
class DashboardItem extends StatelessWidget { return active == true
const DashboardItem( ? Container(
{this.hasBorder = false, height: 5,
this.imageName, width: 30,
@required this.child, // margin: EdgeInsets.only(10),
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4})
: super(key: key);
final bool hasBorder;
final String imageName;
final Widget child;
final Function onTap;
final double width;
final double height;
final Color color;
final double opacity;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
height: height != null
? height
: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.18
: MediaQuery.of(context).size.height * 0.36,
decoration: BoxDecoration( decoration: BoxDecoration(
color: !hasBorder borderRadius: BorderRadius.circular(5), color: Colors.black),
? color != null
? color
: HexColor('#050705').withOpacity(opacity)
: Colors.white,
borderRadius: BorderRadius.circular(15.0),
border: hasBorder
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null
? DecorationImage(
image: AssetImage('assets/images/dashboard/${imageName}'),
fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn),
) )
: null, : Container(
), height: 5,
child: Center( width: 8,
child: child, margin: EdgeInsets.all(2),
), decoration: BoxDecoration(
), borderRadius: BorderRadius.circular(10), color: Colors.grey));
);
}
getDashboardWidget() {}
}
class ExpandableCardContainer extends StatefulWidget {
final bool isExpanded;
final Widget collapsedChild;
final Widget expandedChild;
const ExpandableCardContainer(
{Key key, this.isExpanded, this.collapsedChild, this.expandedChild})
: super(key: key);
@override
_ExpandableCardContainerState createState() =>
_ExpandableCardContainerState();
}
class _ExpandableCardContainerState extends State<ExpandableCardContainer> {
@override
Widget build(BuildContext context) {
return new AnimatedContainer(
duration: new Duration(milliseconds: 1000),
curve: Curves.easeInOut,
child: widget.isExpanded ? widget.expandedChild : widget.collapsedChild,
);
} }
} }

@ -535,88 +535,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
? _locationBar(context, model) ? _locationBar(context, model)
: Container(), : Container(),
), ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceEvenly,
// children: [
// AppButton(
// title: TranslationBase.of(context)
// .all,
// onPressed: () {
// setState(() {
// selectedFilter = 1;
// filterPatients();
// });
// },
// color: selectedFilter == 1
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 1
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .today,
// onPressed: () {
// setState(() {
// selectedFilter = 2;
// filterPatients();
// });
// },
// color: selectedFilter == 2
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 2
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .tomorrow,
// onPressed: () {
// setState(() {
// selectedFilter = 3;
// filterPatients();
// });
// },
// color: selectedFilter == 3
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 3
// ? Colors.white
// : Colors.black,
// ),
// AppButton(
// title: TranslationBase.of(context)
// .nextWeek,
// onPressed: () {
// setState(() {
// selectedFilter = 4;
// // filterPatients();
// });
// },
// color: selectedFilter == 4
// ? Colors.red[800]
// : Colors.grey[300],
// fontColor: selectedFilter == 4
// ? Colors.white
// : Colors.black,
// ),
// ],
// ),
SizedBox( SizedBox(
height: 10.0, height: 10.0,
), ),
// Divider(
// thickness: 0.8,
// color: Color(0xffCCCCCC),
// ),
Container( Container(
// decoration: BoxDecoration(
// color: Color(0Xffffffff),
// borderRadius:
// BorderRadius.circular(20)),
child: (responseModelList.length > child: (responseModelList.length >
0) 0)
? Column( ? Column(
@ -673,14 +595,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
) )
], ],
), ),
) )),
// : Center(
// child: DrAppEmbeddedError(
// error: TranslationBase.of(
// context)
// .youDontHaveAnyPatient),
// ),
),
], ],
), ),
) )

@ -1,11 +1,15 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart'; import 'package:doctor_app_flutter/core/model/labs/patient_lab_orders.dart';
import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:hexcolor/hexcolor.dart';
import 'lab_result_chart_and_detials.dart'; import 'lab_result_chart_and_detials.dart';
@ -32,9 +36,24 @@ class FlowChartPage extends StatelessWidget {
labResult: model.labOrdersResultsList, labResult: model.labOrdersResultsList,
), ),
) )
: Container( : Center(
child: Center( child: Column(
child: Texts('no Data'), crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 100,
),
Image.asset('assets/images/no-data.png'),
Padding(
padding: const EdgeInsets.all(8.0),
child: AppText(
TranslationBase.of(context).noDataAvailable,
fontWeight: FontWeight.normal,
color: HexColor("#B8382B"),
fontSize: SizeConfig.textMultiplier * 2.5,
),
)
],
), ),
), ),
), ),

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/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';
@ -13,10 +14,11 @@ import 'package:provider/provider.dart';
class LabResultWidget extends StatelessWidget { class LabResultWidget extends StatelessWidget {
final String filterName;
final List<LabResult> patientLabResultList; final List<LabResult> patientLabResultList;
final PatientLabOrders patientLabOrder; final PatientLabOrders patientLabOrder;
final PatiantInformtion patient; final PatiantInformtion patient;
LabResultWidget({Key key, this.patientLabResultList, this.patientLabOrder, this.patient}) : super(key: key); LabResultWidget({Key key, this.filterName, this.patientLabResultList, this.patientLabOrder, this.patient}) : super(key: key);
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -27,6 +29,31 @@ class LabResultWidget extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(filterName),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: FlowChartPage(
filterName: filterName,
patientLabOrder: patientLabOrder,
patient: patient,
),
),
);
},
child: Texts(
TranslationBase.of(context).showMoreBtn,
textDecoration: TextDecoration.underline,
color: Colors.blue,
),
),
],
),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -98,7 +125,7 @@ class LabResultWidget extends StatelessWidget {
), ),
), ),
), ),
) ),
], ],
), ),
Divider(), Divider(),

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -25,90 +27,96 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( /* decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1), border: Border.all(color: Colors.grey, width: 1),
), ),*/
margin: EdgeInsets.all(20), margin: EdgeInsets.all(0),
child: Container( child: Container(
color: Colors.transparent, color: Colors.transparent,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Table( Row(
border: TableBorder.symmetric( children: [
inside: BorderSide(width: 2.0, color: Colors.grey[300]), Expanded(
child: Container(
child: Container(
padding: EdgeInsets.all(8),
child: AppText(
TranslationBase.of(context).date,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
children: fullData(projectViewModel),
), ),
],
), ),
), ),
); Expanded(
}
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container( child: Container(
decoration: BoxDecoration( padding: EdgeInsets.all(8),
color: Theme.of(context).primaryColor, child: Container(
borderRadius: BorderRadius.only( child: AppText(
topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), TranslationBase.of(context).labResult,
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0), fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
// height: 60
), ),
child: Center(
child: Texts(
TranslationBase.of(context).date,
color: Colors.white,
), ),
)
],
), ),
height: 60, const Divider(
height: 1,
thickness: 1,
color: Colors.black,
), ),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
), ),
Container( children: fullData(projectViewModel),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
), ),
],
), ),
child: Center(
child: Texts(TranslationBase.of(context).labResult, color: Colors.white),
), ),
height: 60), );
) }
]));
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
widget.labResult.forEach((vital) { widget.labResult.forEach((vital) {
var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime); var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime);
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: Texts(
'${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}', '${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}',
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),
Container( Container(
child: Container( child: Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(8),
color: Colors.white, color: Colors.white,
child: Center( child: AppText(
child: Texts(
'${vital.resultValue}', '${vital.resultValue}',
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8,
), fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
), ),
), ),
), ),

@ -1,4 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -53,13 +55,12 @@ class LineChartCurvedState extends State<LineChartCurved> {
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
Text( AppText(
widget.title, widget.title,
style: TextStyle( fontSize: SizeConfig.textMultiplier * 2.1,
color: Colors.black,
fontSize: 32,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
letterSpacing: 2), backGroundcolor: Colors.black,
fontFamily: 'Poppins',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
Expanded( Expanded(
@ -211,7 +212,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
final LineChartBarData lineChartBarData1 = LineChartBarData( final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots, spots: spots,
isCurved: true, isCurved: true,
colors: [Theme.of(context).primaryColor], colors: [Colors.red],
barWidth: 5, barWidth: 5,
isStrokeCapRound: true, isStrokeCapRound: true,
dotData: FlDotData( dotData: FlDotData(

@ -1,6 +1,8 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts; import 'package:charts_flutter/flutter.dart' as charts;
@ -22,19 +24,45 @@ class LabResultChartAndDetails extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppExpandableNotifier( Container(
headerWidget: Padding( margin: EdgeInsets.symmetric(horizontal: 8),
padding: const EdgeInsets.all(8.0), decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: LineChartCurved(title: name,labResult:labResult,), child: LineChartCurved(title: name,labResult:labResult,),
), ),
bodyWidget: LabResultDetailsWidget( Container(
margin: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
padding: EdgeInsets.only(top: 16, right: 18.0, left: 16.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
"Graph Details",
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
SizedBox(height: 8,),
LabResultDetailsWidget(
labResult: labResult.reversed.toList(), labResult: labResult.reversed.toList(),
), ),
isExpand: true, ],
),
), ),
], ],
),
); );
} }

@ -110,11 +110,23 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
duration: Duration(milliseconds: 7000), duration: Duration(milliseconds: 7000),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
child: LabResultWidget( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
...List.generate(
model.labResultLists.length,
(index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder, patientLabOrder: widget.patientLabOrder,
patientLabResultList: model.labResultList, filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
patient:widget.patient, patient:widget.patient,
), ),
)
],
),
), ),
), ),
], ],

@ -12,8 +12,8 @@ import 'package:doctor_app_flutter/models/SOAP/post_assessment_request_model.dar
import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
@ -24,7 +24,7 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../custom_validation_error.dart'; import '../../../../../widgets/shared/user-guid/custom_validation_error.dart';
class AddAssessmentDetails extends StatefulWidget { class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment; final MySelectedAssessment mySelectedAssessment;
@ -74,7 +74,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
if (widget.mySelectedAssessment.selectedICD != null) if (widget.mySelectedAssessment.selectedICD != null)
icdNameController.text = widget.mySelectedAssessment.selectedICD.code; icdNameController.text = widget.mySelectedAssessment.selectedICD.code;
} }
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration( InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown, String hintText, String selectedText, bool isDropDown,
{IconData icon}) { {IconData icon}) {
@ -143,31 +142,15 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 55.0, height: 55.0,
hintText: hintText:
TranslationBase.of(context).appointmentNumber, TranslationBase.of(context).appointmentNumber,
//fontSize: 13.5,
// hintColor: Colors.black,
//hasLabelText: appointmentIdController.text != ''
// ? true
// : false,
//showLabelText: true,
//fontWeight: FontWeight.w600,
//readOnly: true,
isDropDown: false, isDropDown: false,
enabled: false, enabled: false,
controller: appointmentIdController, controller: appointmentIdController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
), ),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
// height: 60.0,
child: InkWell( child: InkWell(
onTap: model.listOfICD10 != null onTap: model.listOfICD10 != null
? () { ? () {
@ -284,25 +267,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
); );
} }
: null, : null,
//hasLabelText:
// conditionController.text != '' ? true : false,
//showLabelText: true,
hintText: TranslationBase.of(context).condition, hintText: TranslationBase.of(context).condition,
//fontSize: 13.5,
//readOnly: true,
//suffixIcon: EvaIcons.arrowDown,
// hintColor: Colors.black,
//fontWeight: FontWeight.w600,
maxLines: 2, maxLines: 2,
minLines: 1, minLines: 1,
controller: conditionController, controller: conditionController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context).emptyMessage;
// else
// return null;
// },
isDropDown: true, isDropDown: true,
enabled: false, enabled: false,
), ),
@ -324,8 +292,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction: okFunction:
(MasterKeyModel selectedValue) { (MasterKeyModel selectedValue) {
setState(() { setState(() {
// _selectedDiagnosisType =
// selectedValue;
widget.mySelectedAssessment widget.mySelectedAssessment
.selectedDiagnosisType = .selectedDiagnosisType =
selectedValue; selectedValue;
@ -345,28 +311,12 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
); );
} }
: null, : null,
//hasLabelText:
// typeController.text != '' ? true : false,
//prefixIcon: Icon(Icons.add),
//showLabelText: true,
hintText: TranslationBase.of(context).dType, hintText: TranslationBase.of(context).dType,
//fontSize: 13.5,
//readOnly: true,
// hintColor: Colors.black,
//suffixIcon: EvaIcons.arrowDown,
//fontWeight: FontWeight.w600,
maxLines: 2, maxLines: 2,
minLines: 1, minLines: 1,
enabled: false, enabled: false,
isDropDown: true, isDropDown: true,
controller: typeController, controller: typeController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context).emptyMessage;
// else
// return null;
// },
), ),
if (isFormSubmitted && if (isFormSubmitted &&
widget.mySelectedAssessment widget.mySelectedAssessment
@ -381,7 +331,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextFields( child: TextFields(
hintText: TranslationBase.of(context).remarks, hintText: TranslationBase.of(context).remarks,
fontSize: 13.5, fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
maxLines: 18, maxLines: 18,
minLines: 5, minLines: 5,
@ -518,12 +467,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
mySelectedAssessment.doctorName = doctorProfile.doctorName; mySelectedAssessment.doctorName = doctorProfile.doctorName;
if (!isUpdate) { if (!isUpdate) {
// widget.mySelectedAssessmentList.add(mySelectedAssessment);
widget.addSelectedAssessment(mySelectedAssessment, isUpdate); widget.addSelectedAssessment(mySelectedAssessment, isUpdate);
} }
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
// widget.changePageViewIndex(3);
} }
} }

@ -18,11 +18,12 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../SOAP_open_items.dart'; import '../shared_soap_widgets/SOAP_open_items.dart';
import '../SOAP_step_header.dart'; import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'add_assessment_details.dart'; import 'add_assessment_details.dart';
import '../expandable_SOAP_widget.dart';
// ignore: must_be_immutable
class UpdateAssessmentPage extends StatefulWidget { class UpdateAssessmentPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
List<MySelectedAssessment> mySelectedAssessmentList; List<MySelectedAssessment> mySelectedAssessmentList;
@ -107,7 +108,6 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
backgroundColor: Theme backgroundColor: Theme
.of(context) .of(context)
.scaffoldBackgroundColor, .scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(

@ -0,0 +1,148 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'examinations_list_search_widget.dart';
class AddExaminationPage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination;
final Function(MasterKeyModel) removeExamination;
AddExaminationPage(
{this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination});
@override
_AddExaminationPageState createState() => _AddExaminationPageState();
}
class _AddExaminationPageState extends State<AddExaminationPage> {
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding:
EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).addExamination}",
fontSize: SizeConfig.textMultiplier * 3.3,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.clear,
size: 40,
),
)
],
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.all(16.0),
padding: EdgeInsets.all(0.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
child: Column(
children: [
ExaminationsListSearchWidget(
masterList: model.physicalExaminationList,
isServiceSelected: (master) =>
isServiceSelected(master),
removeHistory: (history) {
setState(() {
widget.removeExamination(history);
});
},
addHistory: (selectedExamination) {
setState(() {
widget.mySelectedExamination
.add(selectedExamination);
});
},
),
],
),
),
],
),
),
),
Container(
padding: EdgeInsets.all(16),
color: Colors.white,
child: BorderedButton(
"${TranslationBase.of(context).addExamination}",
backgroundColor: HexColor("#359846"),
textColor: Colors.white,
vPadding: 12,
radius: 12,
fontWeight: FontWeight.w600,
fontSize: SizeConfig.textMultiplier * 2.5,
fontFamily: 'Poppins',
handler: () {
widget.addSelectedExamination();
},
),
)
],
),
),
);
}
isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
(element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) {
return true;
}
return false;
}
}

@ -1,254 +1,17 @@
// ignore: must_be_immutable
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
// Author Mosa Abuzaid // ignore: must_be_immutable
class AddExaminationPage extends StatefulWidget {
final List<MySelectedExamination> mySelectedExamination;
final Function addSelectedExamination;
final Function(MasterKeyModel) removeExamination;
AddExaminationPage(
{this.mySelectedExamination,
this.addSelectedExamination,
this.removeExamination});
@override
_AddExaminationPageState createState() => _AddExaminationPageState();
}
class _AddExaminationPageState extends State<AddExaminationPage> {
@override
Widget build(BuildContext context) {
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination);
}
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
backgroundColor: Color.fromRGBO(248, 248, 248, 1),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
padding:
EdgeInsets.only(left: 16, top: 70, right: 16, bottom: 16),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: AppText(
"${TranslationBase.of(context).addExamination}",
fontSize: SizeConfig.textMultiplier * 3.3,
color: Colors.black,
fontWeight: FontWeight.w700,
),
),
InkWell(
onTap: () {
Navigator.of(context).pop();
},
child: Icon(
Icons.clear,
size: 40,
),
)
],
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.all(16.0),
padding: EdgeInsets.all(0.0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey.shade400,
width: 0.4,
)),
),
child: Column(
children: [
ExaminationsListSearchWidget(
masterList: model.physicalExaminationList,
isServiceSelected: (master) =>
isServiceSelected(master),
removeHistory: (history) {
setState(() {
widget.removeExamination(history);
});
},
addHistory: (selectedExamination) {
setState(() {
widget.mySelectedExamination
.add(selectedExamination);
});
},
),
],
),
),
],
),
),
),
Container(
padding: EdgeInsets.all(16),
color: Colors.white,
child: BorderedButton(
"${TranslationBase.of(context).addExamination}",
backgroundColor: HexColor("#359846"),
textColor: Colors.white,
vPadding: 12,
radius: 12,
fontWeight: FontWeight.w600,
fontSize: SizeConfig.textMultiplier * 2.5,
fontFamily: 'Poppins',
handler: () {
widget.addSelectedExamination();
},
),
)
],
),
),
);
}
isServiceSelected(MasterKeyModel masterKey) {
Iterable<MySelectedExamination> exam = widget.mySelectedExamination.where(
(element) =>
masterKey.id == element.selectedExamination.id &&
masterKey.typeId == element.selectedExamination.typeId);
if (exam.length > 0) {
return true;
}
return false;
}
}
class ExaminationsListSearchWidget extends StatefulWidget {
final Function(MasterKeyModel) removeHistory;
final Function(MySelectedExamination) addHistory;
final bool Function(MasterKeyModel) isServiceSelected;
final List<MasterKeyModel> masterList;
ExaminationsListSearchWidget(
{this.removeHistory,
this.addHistory,
this.isServiceSelected,
this.masterList});
@override
_ExaminationsListSearchWidgetState createState() =>
_ExaminationsListSearchWidgetState();
}
class _ExaminationsListSearchWidgetState
extends State<ExaminationsListSearchWidget> {
int expandedIndex = -1;
List<MasterKeyModel> items = List();
TextEditingController filteredSearchController = TextEditingController();
@override
void initState() {
items.addAll(widget.masterList);
super.initState();
}
@override
Widget build(BuildContext context) {
return Column(
children: [
AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.080,
hintText: TranslationBase.of(context).searchExamination,
isDropDown: true,
hasBorder: false,
controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: Icon(
Icons.search,
color: Colors.black,
),
),
DividerWithSpacesAround(
height: 2,
),
...items.mapIndexed((index, item) {
return AddExaminationWidget(
item: item,
addHistory: widget.addHistory,
removeHistory: widget.removeHistory,
isServiceSelected: widget.isServiceSelected,
isExpand: index == expandedIndex,
expandClick: () {
setState(() {
if (expandedIndex == index) {
expandedIndex = -1;
} else {
expandedIndex = index;
}
});
},
);
}).toList(),
],
);
}
void filterSearchResults(String query) {
List<MasterKeyModel> dummySearchList = List();
dummySearchList.addAll(widget.masterList);
if (query.isNotEmpty) {
List<MasterKeyModel> dummyListData = List();
dummySearchList.forEach((item) {
if (item.nameAr.toLowerCase().contains(query.toLowerCase()) ||
item.nameEn.toLowerCase().contains(query.toLowerCase())) {
dummyListData.add(item);
}
});
setState(() {
items.clear();
items.addAll(dummyListData);
});
return;
} else {
setState(() {
items.clear();
items.addAll(widget.masterList);
});
}
}
}
class AddExaminationWidget extends StatefulWidget { class AddExaminationWidget extends StatefulWidget {
MasterKeyModel item; MasterKeyModel item;
final Function(MasterKeyModel) removeHistory; final Function(MasterKeyModel) removeHistory;
@ -277,10 +40,10 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
@override @override
void initState() { void initState() {
examination.selectedExamination = widget.item; examination.selectedExamination = widget.item;
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
@ -494,13 +257,3 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
); );
} }
} }
extension FicListExtension<T> on List<T> {
/// Maps each element of the list.
/// The [map] function gets both the original [item] and its [index].
Iterable<E> mapIndexed<E>(E Function(int index, T item) map) sync* {
for (var index = 0; index < length; index++) {
yield map(index, this[index]);
}
}
}

@ -6,11 +6,11 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ExaminationIitemCard extends StatelessWidget { class ExaminationItemCard extends StatelessWidget {
final MySelectedExamination examination; final MySelectedExamination examination;
final Function removeExamination; final Function removeExamination;
ExaminationIitemCard(this.examination, this.removeExamination); ExaminationItemCard(this.examination, this.removeExamination);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -0,0 +1,115 @@
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:flutter/material.dart';
import 'add_examination_widget.dart';
class ExaminationsListSearchWidget extends StatefulWidget {
final Function(MasterKeyModel) removeHistory;
final Function(MySelectedExamination) addHistory;
final bool Function(MasterKeyModel) isServiceSelected;
final List<MasterKeyModel> masterList;
ExaminationsListSearchWidget(
{this.removeHistory,
this.addHistory,
this.isServiceSelected,
this.masterList});
@override
_ExaminationsListSearchWidgetState createState() =>
_ExaminationsListSearchWidgetState();
}
class _ExaminationsListSearchWidgetState
extends State<ExaminationsListSearchWidget> {
int expandedIndex = -1;
List<MasterKeyModel> items = List();
TextEditingController filteredSearchController = TextEditingController();
@override
void initState() {
items.addAll(widget.masterList);
super.initState();
}
@override
Widget build(BuildContext context) {
return Column(
children: [
AppTextFieldCustom(
height: MediaQuery.of(context).size.height * 0.080,
hintText: TranslationBase.of(context).searchExamination,
isDropDown: true,
hasBorder: false,
controller: filteredSearchController,
onChanged: (value) {
filterSearchResults(value);
},
suffixIcon: Icon(
Icons.search,
color: Colors.black,
),
),
DividerWithSpacesAround(
height: 2,
),
...items.mapIndexed((index, item) {
return AddExaminationWidget(
item: item,
addHistory: widget.addHistory,
removeHistory: widget.removeHistory,
isServiceSelected: widget.isServiceSelected,
isExpand: index == expandedIndex,
expandClick: () {
setState(() {
if (expandedIndex == index) {
expandedIndex = -1;
} else {
expandedIndex = index;
}
});
},
);
}).toList(),
],
);
}
void filterSearchResults(String query) {
List<MasterKeyModel> dummySearchList = List();
dummySearchList.addAll(widget.masterList);
if (query.isNotEmpty) {
List<MasterKeyModel> dummyListData = List();
dummySearchList.forEach((item) {
if (item.nameAr.toLowerCase().contains(query.toLowerCase()) ||
item.nameEn.toLowerCase().contains(query.toLowerCase())) {
dummyListData.add(item);
}
});
setState(() {
items.clear();
items.addAll(dummyListData);
});
return;
} else {
setState(() {
items.clear();
items.addAll(widget.masterList);
});
}
}
}
extension FicListExtension<T> on List<T> {
/// Maps each element of the list.
/// The [map] function gets both the original [item] and its [index].
Iterable<E> mapIndexed<E>(E Function(int index, T item) map) sync* {
for (var index = 0; index < length; index++) {
yield map(index, this[index]);
}
}
}

@ -1,5 +1,4 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -19,13 +18,12 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../SOAP_open_items.dart'; import '../shared_soap_widgets/SOAP_open_items.dart';
import '../SOAP_step_header.dart'; import '../shared_soap_widgets/SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart'; import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'examination-item-card.dart'; import 'add_examination_page.dart';
import 'objective-add-examination-page.dart'; import 'examination_item_card.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -63,9 +61,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
widget.mySelectedExamination.clear(); widget.mySelectedExamination.clear();
@ -103,7 +98,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: false, isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
@ -130,8 +124,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Column( Column(
children: children:
widget.mySelectedExamination.map((examination) { widget.mySelectedExamination.map((examination) {
return ExaminationIitemCard(examination, () { return ExaminationItemCard(examination, () {
removeExamination(examination.selectedExamination); removeExamination(
examination.selectedExamination);
}); });
}).toList(), }).toList(),
) )
@ -234,7 +229,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
examType: exam.selectedExamination.typeId, examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal, isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal, isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination,
notExamined: exam.notExamined, notExamined: exam.notExamined,
examinationType: exam.isNormal examinationType: exam.isNormal
? 1 ? 1
@ -263,10 +257,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changePageViewIndex(2); widget.changePageViewIndex(2);
} }
} else { } else {
// widget.changeLoadingState(true);
//
// widget.changePageViewIndex(2);
helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg); helpers.showErrorToast(TranslationBase.of(context).examinationErrorMsg);
} }
} }

@ -19,8 +19,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'SOAP_step_header.dart'; import '../shared_soap_widgets/SOAP_step_header.dart';
import 'expandable_SOAP_widget.dart'; import '../shared_soap_widgets/expandable_SOAP_widget.dart';
class UpdatePlanPage extends StatefulWidget { class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -99,7 +99,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.changeLoadingState(false); widget.changeLoadingState(false);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
backgroundColor: Theme backgroundColor: Theme
.of(context) .of(context)
.scaffoldBackgroundColor, .scaffoldBackgroundColor,

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steps_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -34,7 +33,7 @@ class SOAPStepHeader extends StatelessWidget {
child: StepsWidget( child: StepsWidget(
index: currentIndex, index: currentIndex,
changeCurrentTab: changePageViewIndex, changeCurrentTab: changePageViewIndex,
height: 100,//MediaQuery.of(context).size.height * 0.17, height: 100,
), ),
), ),
SizedBox( SizedBox(

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class BottomSheetTitle extends StatelessWidget { class BottomSheetTitle extends StatelessWidget {
const BottomSheetTitle({ const BottomSheetTitle({

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -42,7 +41,6 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [ children: [
Texts(headerTitle, Texts(headerTitle,
variant: isExpanded ? "bodyText" : '', variant: isExpanded ? "bodyText" : '',
// bold: isExpanded ? true : false,
fontSize: 15, fontSize: 15,
color: Colors.black), color: Colors.black),
if(isRequired) if(isRequired)

@ -13,7 +13,6 @@ class StepsWidget extends StatelessWidget {
StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0}); StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0});
// TODO : Add translation to name
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
@ -24,7 +23,6 @@ class StepsWidget extends StatelessWidget {
height: height == 0 ? 150 : height, height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent, color: Colors.transparent,
// child:,
), ),
Positioned( Positioned(
top: 30 top: 30
@ -245,7 +243,6 @@ class StepsWidget extends StatelessWidget {
AppText( AppText(
"Plan", "Plan",
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
// textAlign: TextAlign.center,
fontSize: 12, fontSize: 12,
), ),
StatusLabel( StatusLabel(

@ -12,9 +12,8 @@ import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_all
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../bottom_sheet_title.dart'; import '../../shared_soap_widgets/bottom_sheet_title.dart';
class AddAllergies extends StatefulWidget { class AddAllergies extends StatefulWidget {
final Function addAllergiesFun; final Function addAllergiesFun;
@ -30,8 +29,6 @@ class AddAllergies extends StatefulWidget {
class _AddAllergiesState extends State<AddAllergies> { class _AddAllergiesState extends State<AddAllergies> {
List<MasterKeyModel> allergiesList; List<MasterKeyModel> allergiesList;
List<MasterKeyModel> allergySeverityList; List<MasterKeyModel> allergySeverityList;
MasterKeyModel _selectedAllergySeverity;
MasterKeyModel _selectedAllergy;
TextEditingController remarkController = TextEditingController(); TextEditingController remarkController = TextEditingController();
TextEditingController severityController = TextEditingController(); TextEditingController severityController = TextEditingController();
TextEditingController allergyController = TextEditingController(); TextEditingController allergyController = TextEditingController();
@ -74,8 +71,6 @@ class _AddAllergiesState extends State<AddAllergies> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final screenSize = MediaQuery.of(context).size;
return FractionallySizedBox( return FractionallySizedBox(
heightFactor: 1, heightFactor: 1,
child: BaseView<SOAPViewModel>( child: BaseView<SOAPViewModel>(
@ -121,7 +116,7 @@ class _AddAllergiesState extends State<AddAllergies> {
}, },
addAllergy: addAllergy:
(MySelectedAllergy mySelectedAllergy) { (MySelectedAllergy mySelectedAllergy) {
AddAllergyLocally(mySelectedAllergy); addAllergyLocally(mySelectedAllergy);
}, },
addSelectedAllergy: () => widget addSelectedAllergy: () => widget
.addAllergiesFun(myAllergiesListLocal), .addAllergiesFun(myAllergiesListLocal),
@ -210,9 +205,11 @@ class _AddAllergiesState extends State<AddAllergies> {
return null; return null;
} }
AddAllergyLocally(MySelectedAllergy mySelectedAllergy) { addAllergyLocally(MySelectedAllergy mySelectedAllergy) {
if (mySelectedAllergy.selectedAllergy == null) { if (mySelectedAllergy.selectedAllergy == null) {
helpers.showErrorToast(TranslationBase.of(context).requiredMsg); helpers.showErrorToast(TranslationBase
.of(context)
.requiredMsg);
} else { } else {
setState(() { setState(() {
List<MySelectedAllergy> allergy = List<MySelectedAllergy> allergy =
@ -225,18 +222,12 @@ class _AddAllergiesState extends State<AddAllergies> {
if (allergy.isEmpty) { if (allergy.isEmpty) {
myAllergiesListLocal.add(mySelectedAllergy); myAllergiesListLocal.add(mySelectedAllergy);
// Navigator.of(context).pop();
} else { } else {
allergy.first.selectedAllergy = mySelectedAllergy.selectedAllergy; allergy.first.selectedAllergy = mySelectedAllergy.selectedAllergy;
allergy.first.selectedAllergySeverity = allergy.first.selectedAllergySeverity =
mySelectedAllergy.selectedAllergySeverity; mySelectedAllergy.selectedAllergySeverity;
allergy.first.remark = mySelectedAllergy.remark; allergy.first.remark = mySelectedAllergy.remark;
allergy.first.isChecked = mySelectedAllergy.isChecked; allergy.first.isChecked = mySelectedAllergy.isChecked;
// Navigator.of(context).pop();
// helpers.showErrorToast(TranslationBase
// .of(context)
// .itemExist);
} }
}); });
} }

@ -1,28 +1,18 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart'; import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_allergies.dart'; import 'add_allergies.dart';
// ignore: must_be_immutable
class UpdateAllergiesWidget extends StatefulWidget { class UpdateAllergiesWidget extends StatefulWidget {
List<MySelectedAllergy> myAllergiesList; List<MySelectedAllergy> myAllergiesList;
@ -77,7 +67,6 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
? selectedAllergy.selectedAllergy.nameAr ? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn : selectedAllergy.selectedAllergy.nameEn
.toUpperCase(), .toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked textDecoration: selectedAllergy.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
@ -90,11 +79,9 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
: selectedAllergy.selectedAllergySeverity : selectedAllergy.selectedAllergySeverity
.nameEn .nameEn
.toUpperCase(), .toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked textDecoration: selectedAllergy.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
// bold: true,
color: Color(0xFFCC9B14)), color: Color(0xFFCC9B14)),
], ],
), ),

@ -1,10 +1,10 @@
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/medication/update_medication_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../custom_validation_error.dart'; import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart';
import '../medication/update_medication_widget.dart';
class UpdateChiefComplaints extends StatelessWidget { class UpdateChiefComplaints extends StatelessWidget {
const UpdateChiefComplaints({ const UpdateChiefComplaints({

@ -11,8 +11,8 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../bottom_sheet_title.dart'; import '../../shared_soap_widgets/bottom_sheet_title.dart';
import 'PriorityBar.dart'; import 'priority_bar.dart';
class AddHistoryDialog extends StatefulWidget { class AddHistoryDialog extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -74,7 +74,6 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
controller: widget.controller, controller: widget.controller,
onPageChanged: (index) { onPageChanged: (index) {
setState(() { setState(() {
// currentIndex = index;
}); });
}, },
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,

@ -69,7 +69,7 @@ class _PriorityBarState extends State<PriorityBar> {
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Colors.black, //Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

@ -1,26 +1,14 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart'; import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'PriorityBar.dart';
import '../bottom_sheet_title.dart';
import 'add_history_dialog.dart'; import 'add_history_dialog.dart';
class UpdateHistoryWidget extends StatefulWidget { class UpdateHistoryWidget extends StatefulWidget {
@ -35,7 +23,6 @@ class UpdateHistoryWidget extends StatefulWidget {
class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget> class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
with TickerProviderStateMixin { with TickerProviderStateMixin {
PageController _controller; PageController _controller;
int _currentIndex = 0;
changePageViewIndex(pageIndex) { changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex); _controller.jumpToPage(pageIndex);
@ -80,7 +67,6 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked textDecoration: myHistory.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
// bold: true,
color: Colors.black), color: Colors.black),
width: MediaQuery width: MediaQuery
.of(context) .of(context)
@ -101,9 +87,7 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked textDecoration: myHistory.isChecked
? null ? null
: TextDecoration.lineThrough, : TextDecoration.lineThrough,
// bold: true,
color: HexColor("#B8382C"),), color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3,
), ),
Icon( Icon(
FontAwesomeIcons.times, FontAwesomeIcons.times,

@ -17,9 +17,10 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../custom_validation_error.dart'; import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart';
import '../bottom_sheet_title.dart'; import '../../shared_soap_widgets/bottom_sheet_title.dart';
// ignore: must_be_immutable
class AddMedication extends StatefulWidget { class AddMedication extends StatefulWidget {
final Function addMedicationFun; final Function addMedicationFun;
TextEditingController medicationController; TextEditingController medicationController;
@ -37,7 +38,6 @@ class _AddMedicationState extends State<AddMedication> {
MasterKeyModel _selectedMedicationRoute; MasterKeyModel _selectedMedicationRoute;
MasterKeyModel _selectedMedicationFrequency; MasterKeyModel _selectedMedicationFrequency;
MasterKeyModel _selectedAllergy;
TextEditingController doseController = TextEditingController(); TextEditingController doseController = TextEditingController();
TextEditingController strengthController = TextEditingController(); TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController(); TextEditingController routeController = TextEditingController();
@ -243,7 +243,6 @@ class _AddMedicationState extends State<AddMedication> {
: null, : null,
hintText: hintText:
TranslationBase.of(context).doseTime, TranslationBase.of(context).doseTime,
//TODO add translation
maxLines: 2, maxLines: 2,
minLines: 2, minLines: 2,
isDropDown: true, isDropDown: true,
@ -294,8 +293,6 @@ class _AddMedicationState extends State<AddMedication> {
: null, : null,
hintText: hintText:
TranslationBase.of(context).strength, TranslationBase.of(context).strength,
// hintColor: Colors.black,
// fontWeight: FontWeight.w600,
maxLines: 2, maxLines: 2,
minLines: 2, minLines: 2,
controller: strengthController, controller: strengthController,
@ -391,9 +388,7 @@ class _AddMedicationState extends State<AddMedication> {
: null, : null,
hintText: hintText:
TranslationBase.of(context).frequency, TranslationBase.of(context).frequency,
//TODO add translation
enabled: false, enabled: false,
// hintColor: Colors.black,
maxLines: 2, maxLines: 2,
minLines: 2, minLines: 2,
isDropDown: true, isDropDown: true,

@ -0,0 +1,54 @@
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_medication.dart';
class UpdateMedicationWidget extends StatefulWidget {
final TextEditingController medicationController;
UpdateMedicationWidget({
Key key,
this.medicationController,
});
@override
_UpdateMedicationWidgetState createState() => _UpdateMedicationWidgetState();
}
class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
@override
Widget build(BuildContext context) {
return Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () {
openMedicationList(context);
},),
SizedBox(
height: 20,
)
],
);
}
openMedicationList(BuildContext context) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
isDismissible: false,
context: context,
builder: (context) {
return AddMedication(
addMedicationFun: (MySelectedAllergy mySelectedAllergy) {},
medicationController: widget.medicationController,
);
});
}
}

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
@ -17,18 +16,16 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/history/update_history_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import '../SOAP_step_header.dart'; import '../shared_soap_widgets/SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart'; import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import '../steps_widget.dart'; import 'allergies/update_allergies_widget.dart';
import 'history/update_history_widget.dart';
import 'cheif_complaints/update_Chief_complaints.dart';
class UpdateSubjectivePage extends StatefulWidget { class UpdateSubjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
@ -228,7 +225,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
backgroundColor: Theme backgroundColor: Theme
.of(context) .of(context)
.scaffoldBackgroundColor, .scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Center( child: Center(
@ -485,7 +481,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.myHistoryList.forEach((history) { widget.myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null) if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = []; postHistoriesRequestModel.listMedicalHistoryVM = [];
//TODO: make static value dynamic
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM( postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo, episodeId: widget.patientInfo.episodeNo,
@ -514,7 +509,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
formKey.currentState.save(); formKey.currentState.save();
if(formKey.currentState.validate()){ if(formKey.currentState.validate()){
PostChiefComplaintRequestModel postChiefComplaintRequestModel = PostChiefComplaintRequestModel postChiefComplaintRequestModel =
//TODO: make static value dynamic
new PostChiefComplaintRequestModel( new PostChiefComplaintRequestModel(
patientMRN: widget.patientInfo.patientMRN, patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo, episodeID: widget.patientInfo.episodeNo,
@ -528,7 +522,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
numberOfWeeks: 0); numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) { if (model.patientChiefComplaintList.isEmpty) {
// TODO: make it postChiefComplaint after it start to work
postChiefComplaintRequestModel.editedBy = ''; postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel); await model.postChiefComplaint(postChiefComplaintRequestModel);
} else { } else {

@ -1,4 +1,3 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
@ -7,18 +6,15 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/steps_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/assessment/update_assessment_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../patient-profile-header-new-design.dart'; import 'assessment/update_assessment_page.dart';
import 'objective/update_objective_page.dart'; import 'objective/update_objective_page.dart';
import 'plan/update_plan_page.dart';
class UpdateSoapIndex extends StatefulWidget { class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate; final bool isUpdate;
@ -54,7 +50,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
@override @override
void initState() { void initState() {
// TODO: implement initState
_controller = new PageController(); _controller = new PageController();
super.initState(); super.initState();
@ -72,7 +67,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
return BaseView<DoctorReplayViewModel>( return BaseView<DoctorReplayViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
isLoading: _isLoading, isLoading: _isLoading,
isShowAppBar: false, isShowAppBar: false,
body: SingleChildScrollView( body: SingleChildScrollView(
@ -88,7 +82,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7',), PatientProfileHeaderNewDesign(patient, '7', '7',),
Container( Container(
width: double.infinity, width: double.infinity,

@ -31,7 +31,9 @@ class LineChartCurved extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(18)), borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white, // color: Colors.white,
), ),
child: Column( child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[ children: <Widget>[
const SizedBox( const SizedBox(
@ -70,6 +72,8 @@ class LineChartCurved extends StatelessWidget {
), ),
], ],
), ),
],
),
), ),
); );
} }

@ -1,11 +1,9 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart'; import 'package:doctor_app_flutter/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart'; import 'package:doctor_app_flutter/widgets/charts/app_time_series_chart.dart';
import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -76,7 +76,7 @@ class TranslationBase {
String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; String get searchAbout => localizedValues['searchAbout'][locale.languageCode];
String get patient => localizedValues['patient'][locale.languageCode]; String get patient => localizedValues['patient'][locale.languageCode];
String get patients => localizedValues['patients'][locale.languageCode];
String get labResult => localizedValues['labResult'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode];
String get todayStatistics => String get todayStatistics =>
@ -1227,7 +1227,8 @@ class TranslationBase {
localizedValues['patientIDMobilenational'][locale.languageCode]; localizedValues['patientIDMobilenational'][locale.languageCode];
String get updateNow => localizedValues['updateNow'][locale.languageCode]; String get updateNow => localizedValues['updateNow'][locale.languageCode];
String get updateTheApp => localizedValues['updateTheApp'][locale.languageCode]; String get updateTheApp =>
localizedValues['updateTheApp'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -39,7 +39,7 @@ class _DashboardItemTextsState extends State<DashboardItemIconText> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new RoundedContainer( return new RoundedContainer(
margin: 10, margin: EdgeInsets.all(10),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Align( Align(

@ -60,7 +60,7 @@ class _DashboardItemTextsState extends State<DashboardItemTexts> {
backgroundColor: widget.backgroundColor, backgroundColor: widget.backgroundColor,
showBorder: widget.showBorder, showBorder: widget.showBorder,
borderColor: widget.borderColor, borderColor: widget.borderColor,
margin: 4, margin: EdgeInsets.all(4),
); );
} }
} }

@ -67,7 +67,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
backgroundColor: widget.backgroundColor, backgroundColor: widget.backgroundColor,
showBorder: widget.showBorder, showBorder: widget.showBorder,
borderColor: widget.borderColor, borderColor: widget.borderColor,
margin: 4, margin: EdgeInsets.all(4),
raduis: 10, raduis: 10,
); );
} }

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';

@ -1,77 +0,0 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import '../../custom_validation_error.dart';
import '../bottom_sheet_title.dart';
import 'add_medication.dart';
class UpdateMedicationWidget extends StatefulWidget {
final TextEditingController medicationController;
UpdateMedicationWidget({
Key key,
this.medicationController,
});
@override
_UpdateMedicationWidgetState createState() => _UpdateMedicationWidgetState();
}
class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () {
openMedicationList(context);
},),
SizedBox(
height: 20,
)
],
);
}
openMedicationList(BuildContext context) {
showModalBottomSheet(
backgroundColor: Colors.white,
isScrollControlled: true,
isDismissible: false,
context: context,
builder: (context) {
return AddMedication(
addMedicationFun: (MySelectedAllergy mySelectedAllergy) {},
medicationController: widget.medicationController,
);
});
}
}

@ -31,7 +31,6 @@ class _AppDrawerState extends State<AppDrawer> {
Helpers helpers = new Helpers(); Helpers helpers = new Helpers();
ProjectViewModel projectsProvider; ProjectViewModel projectsProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AuthViewModel authProvider = Provider.of(context); AuthViewModel authProvider = Provider.of(context);
@ -130,9 +129,7 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 15), SizedBox(height: 15),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase TranslationBase.of(context).myQRCode,
.of(context)
.myQRCode,
icon: DoctorApp.qr_code_3, icon: DoctorApp.qr_code_3,
// subTitle: , // subTitle: ,
), ),
@ -143,11 +140,8 @@ class _AppDrawerState extends State<AppDrawer> {
height: 80, height: 80,
child: Image.asset('assets/images/qr_code.png'), child: Image.asset('assets/images/qr_code.png'),
), ),
onTap: () { onTap: () {},
},
), ),
], ],
), ),
), ),
@ -161,16 +155,13 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
projectsProvider.isArabic projectsProvider.isArabic
? TranslationBase ? TranslationBase.of(context).lanEnglish
.of(context) : TranslationBase.of(context).lanArabic,
.lanEnglish
: TranslationBase
.of(context)
.lanArabic,
// icon: DoctorApp.qr_code, // icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic assetLink: projectsProvider.isArabic
? 'assets/images/usa-flag.png' ? 'assets/images/usa-flag.png'
: 'assets/images/saudi-arabia-flag.png',), : 'assets/images/saudi-arabia-flag.png',
),
onTap: () { onTap: () {
if (projectsProvider.isArabic) if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en'); projectsProvider.changeLanguage('en');
@ -181,16 +172,15 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 10), SizedBox(height: 10),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase TranslationBase.of(context).logout,
.of(context) icon: DoctorApp.logout_1,
.logout, icon: DoctorApp.logout_1,), ),
onTap: () async { onTap: () async {
Navigator.pop(context); Navigator.pop(context);
await helpers.logout(); await helpers.logout();
projectsProvider.isLogin = false; projectsProvider.isLogin = false;
}, },
), ),
], ],
), ),
), ),
@ -216,16 +206,19 @@ class _AppDrawerState extends State<AppDrawer> {
color: Color(0xFF989898), color: Color(0xFF989898),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
fontFamily: 'Poppins',), fontFamily: 'Poppins',
),
children: <TextSpan>[ children: <TextSpan>[
TextSpan(text: ' Cloud Solutions', TextSpan(
text: ' Cloud Solutions',
style: TextStyle( style: TextStyle(
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontSize: 15, fontSize: 15,
fontFamily: 'Poppins',), fontFamily: 'Poppins',
),
) )
] ]),
),), ),
), ),
// Text("Powered by"), // Text("Powered by"),
Image.asset( Image.asset(
@ -238,7 +231,7 @@ class _AppDrawerState extends State<AppDrawer> {
])), ])),
), ),
width: SizeConfig.realScreenWidth * 0.60, width: SizeConfig.realScreenWidth * 0.60,
margin: 0, margin: EdgeInsets.all(0),
customCornerRaduis: false, customCornerRaduis: false,
// topRight: 30, // topRight: 30,

@ -3,8 +3,8 @@ import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart';

@ -9,7 +9,7 @@ class RoundedContainer extends StatefulWidget {
final double height; final double height;
final double raduis; final double raduis;
final Color backgroundColor; final Color backgroundColor;
final double margin; final EdgeInsets margin;
final double elevation; final double elevation;
final bool showBorder; final bool showBorder;
final Color borderColor; final Color borderColor;
@ -27,7 +27,7 @@ class RoundedContainer extends StatefulWidget {
this.height, this.height,
this.raduis = 10, this.raduis = 10,
this.backgroundColor = Colors.white, this.backgroundColor = Colors.white,
this.margin = 10, this.margin,
this.elevation = 1, this.elevation = 1,
this.showBorder = false, this.showBorder = false,
this.borderColor = Colors.red, this.borderColor = Colors.red,
@ -48,7 +48,7 @@ class _RoundedContainerState extends State<RoundedContainer> {
return Container( return Container(
width: widget.width, width: widget.width,
height: widget.height, height: widget.height,
margin: EdgeInsets.all(widget.margin), margin: widget.margin,
decoration: widget.showBorder == true decoration: widget.showBorder == true
? BoxDecoration( ? BoxDecoration(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,

Loading…
Cancel
Save