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

@ -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_physical_exam_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 '../../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);
static const IconData edit =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData lab_results2 =
IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData leaves =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData logout =
@ -202,14 +203,14 @@ class DoctorApp {
IconData(0xe857, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData external_link =
IconData(0xe858, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_face =
// IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_sms =
// IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_face_2 =
IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_sms_2 =
IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home =
IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
// static const IconData verify_finger =
// IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData verify_finger_2 =
IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply_active =
IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData dr_reply =
@ -350,12 +351,16 @@ class DoctorApp {
IconData(0xe8a1, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData home_active_1 =
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 =
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/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/message_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart';
@ -40,25 +40,27 @@ class _LandingPageState extends State<LandingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0
? Text(getText(currentTab).toUpperCase())
: Text(''),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(DoctorApp.drawer_icon),
iconSize: 15,
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
),
centerTitle: true,
),
appBar: currentTab != 0
? AppBar(
elevation: 0,
backgroundColor: Colors.grey[100],
//textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: currentTab != 0
? Text(getText(currentTab).toUpperCase())
: SizedBox(),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(DoctorApp.drawer_icon),
iconSize: 15,
color: Colors.black,
onPressed: () => Scaffold.of(context).openDrawer(),
);
},
),
centerTitle: true,
)
: MyAppbar(),
drawer: SafeArea(child: AppDrawer()),
extendBody: true,
body: PageView(
@ -66,17 +68,21 @@ class _LandingPageState extends State<LandingPage> {
controller: pageController,
children: [
ShowCaseWidget(
builder: Builder(builder: (context) => DashboardScreen()),
builder: Builder(builder: (context) => HomeScreen()),
),
MyScheduleScreen(),
QrReaderScreen(),
DoctorReplyScreen(changeCurrentTab:(){
_changeCurrentTab(0);
},),
DoctorReplyScreen(
changeCurrentTab: () {
_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 {
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/screens/medical-file/medical_file_page.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/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/prescriptions_page.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/sick_leave.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/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/verify_account_screen.dart';
import './screens/blood_bank_screen.dart';
import './screens/dashboard_screen.dart';
import './screens/doctor/message_screen.dart';
import './screens/doctor/my_schedule_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/shared_pref_kay.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: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/models/dashboard/dashboard_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/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/screens/base/base_view.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:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import '../routes.dart';
import '../widgets/shared/app_texts_widget.dart';
import '../widgets/shared/rounded_container_widget.dart';
import '../../routes.dart';
import '../../widgets/shared/app_texts_widget.dart';
import '../../widgets/shared/rounded_container_widget.dart';
import 'home_page_card.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
Helpers helpers = Helpers();
class DashboardScreen extends StatefulWidget {
DashboardScreen({Key key, this.title}) : super(key: key);
class HomeScreen extends StatefulWidget {
HomeScreen({Key key, this.title}) : super(key: key);
final String title;
final String iconURL = 'assets/images/dashboard_icon/';
@override
_DashboardScreenState createState() => _DashboardScreenState();
_HomeScreenState createState() => _HomeScreenState();
}
class _DashboardScreenState extends State<DashboardScreen> {
class _HomeScreenState extends State<HomeScreen> {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
HospitalViewModel hospitalProvider;
AuthViewModel authProvider;
@ -78,6 +80,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
SessionID: "5G0yXn0Jnq",
IsLoginForDoctorApp: true,
PatientOutSA: false);
void didChangeDependencies() async {
super.didChangeDependencies();
if (_isInit) {
@ -109,9 +112,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
}
BuildContext myContext;
GlobalKey _one = GlobalKey();
@override
Widget build(BuildContext context) {
myContext = context;
@ -132,33 +132,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
body: ListView(children: [
Column(
children: <Widget>[
SizedBox(height: 20),
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(
children: <Widget>[
ProfileWelcomeWidget(
Row(
mainAxisAlignment: MainAxisAlignment.start,
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(
width: MediaQuery.of(context).size.width * .6,
// // height: 100,
@ -183,15 +171,42 @@ class _DashboardScreenState extends State<DashboardScreen> {
.map((item) {
return Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.end,
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,
fontSize: SizeConfig
.textMultiplier *
1.6,
fontSize: 12,
color: Colors.black,
fontWeight: FontWeight.bold,
textAlign:
TextAlign.center),
textAlign: TextAlign.end),
],
);
}).toList();
@ -205,9 +220,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
.doctorClinicsList
.map((item) {
return DropdownMenuItem(
child: Text(
child: AppText(
item.clinicName,
textAlign: TextAlign.end,
textAlign: TextAlign.right,
),
value: item.clinicID,
);
@ -222,16 +237,16 @@ class _DashboardScreenState extends State<DashboardScreen> {
isClilic: true,
),
Container(
height: MediaQuery.of(context).size.height * 0.20,
height: MediaQuery.of(context).size.height * 0.24,
),
],
),
Positioned(
right: 9.0,
left: 9,
top: MediaQuery.of(context).size.height * .05,
top: MediaQuery.of(context).size.height * .08,
child: Container(
height: MediaQuery.of(context).size.height * 0.30,
height: MediaQuery.of(context).size.height * 0.35,
child: model.dashboardItemsList.length > 0
? new Swiper(
onIndexChanged: (index) {
@ -242,10 +257,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
}
},
itemBuilder: (BuildContext context, int index) {
return getSwiperWidget(model)[index];
return getSwipeWidget(model)[index];
},
itemCount: 3,
itemHeight: 300,
pagination: new SwiperCustomPagination(builder:
(BuildContext context,
SwiperPluginConfig config) {
@ -253,7 +268,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
alignment: Alignment.bottomCenter,
children: [
Positioned(
bottom: -5,
bottom: 0,
child: Center(
child: InkWell(
onTap: () {},
@ -263,39 +278,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
MainAxisAlignment
.spaceBetween,
children: [
Container(
height: 10,
width: 50,
margin:
EdgeInsets.all(2),
color:
config.activeIndex ==
0
? Colors.black
: Colors
.grey),
Container(
height: 10,
width: 50,
margin:
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),
config.activeIndex == 0
? getSwiperPagiantion(
true)
: getSwiperPagiantion(
false),
config.activeIndex == 1
? getSwiperPagiantion(
true)
: getSwiperPagiantion(
false),
config.activeIndex == 2
? getSwiperPagiantion(
true)
: getSwiperPagiantion(
false),
],
)))))
]);
@ -305,430 +302,6 @@ class _DashboardScreenState extends State<DashboardScreen> {
// control: new SwiperControl(),
)
: 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
@ -739,7 +312,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 15,
height: 10,
),
sliderActiveIndex == 1
? Column(
@ -876,31 +449,37 @@ class _DashboardScreenState extends State<DashboardScreen> {
borderRadius: BorderRadius.only(
topRight: Radius.circular(50),
)),
padding: EdgeInsets.all(15),
margin: EdgeInsets.only(top: 15),
padding: EdgeInsets.only(left: 20, top: 10, right: 20),
margin: EdgeInsets.only(top: 10),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 15,
height: 10,
),
Row(
children: <Widget>[
Container(
width: 150,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).patient,
fontSize: SizeConfig.textMultiplier * 1.5,
fontWeight: FontWeight.bold,
Text(
TranslationBase.of(context).patients,
style: TextStyle(
fontSize: 12,
height: .5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
),
AppText(
Text(
TranslationBase.of(context).services,
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
),
],
)),
],
@ -912,7 +491,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
DashboardItem(
HomePageCard(
color: Colors.red[800],
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -933,6 +512,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.patientsreferral,
color: Colors.white,
textAlign: TextAlign.start,
fontSize: 15,
))
],
),
@ -947,7 +527,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
);
},
),
DashboardItem(
HomePageCard(
color: Colors.grey[300],
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -968,6 +548,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.arrivalpatient,
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
))
],
),
@ -981,7 +562,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
});
},
),
DashboardItem(
HomePageCard(
color: Colors.black,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -1002,7 +583,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
.searchmedicinepatient,
color: Colors.white,
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 [
RoundedContainer(
height: MediaQuery.of(context).size.height * 0.32,
margin: 5,
height: MediaQuery.of(context).size.height * 0.35,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding(
padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[1]))),
RoundedContainer(
height: MediaQuery.of(context).size.height * 0.32,
margin: 5,
height: MediaQuery.of(context).size.height * 0.35,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child: Padding(
padding: const EdgeInsets.all(5.0),
child: getOutPatientStack(model.dashboardItemsList[0]))),
RoundedContainer(
height: MediaQuery.of(context).size.height * 0.24,
margin: 5,
height: MediaQuery.of(context).size.height * 0.35,
margin: EdgeInsets.only(top: 15, bottom: 15, left: 10, right: 10),
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Expanded(
@ -1278,12 +859,32 @@ class _DashboardScreenState extends State<DashboardScreen> {
Expanded(
flex: 1,
child: Padding(
child: AppText(
TranslationBase.of(context).referral,
fontSize: 20,
fontWeight: FontWeight.bold,
),
padding: EdgeInsets.all(10))),
padding: EdgeInsets.all(8),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context)
.patients,
style: TextStyle(
fontSize: 12,
height: .5,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
),
Text(
TranslationBase.of(context)
.referral,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
),
],
))),
Expanded(
flex: 2,
child: Column(
@ -1341,91 +942,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
])),
];
}
}
// TODO Move to it file
class DashboardItem extends StatelessWidget {
const DashboardItem(
{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() {}
}
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,
);
getSwiperPagiantion(active) {
return active == true
? Container(
height: 5,
width: 30,
// margin: EdgeInsets.only(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5), color: Colors.black),
)
: Container(
height: 5,
width: 8,
margin: EdgeInsets.all(2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), color: Colors.grey));
}
}

@ -535,88 +535,10 @@ class _PatientsScreenState extends State<PatientsScreen> {
? _locationBar(context, model)
: 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(
height: 10.0,
),
// Divider(
// thickness: 0.8,
// color: Color(0xffCCCCCC),
// ),
Container(
// decoration: BoxDecoration(
// color: Color(0Xffffffff),
// borderRadius:
// BorderRadius.circular(20)),
child: (responseModelList.length >
0)
? 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/viewModel/labs_view_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/util/translations_delegate_base.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_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:hexcolor/hexcolor.dart';
import 'lab_result_chart_and_detials.dart';
@ -32,11 +36,26 @@ class FlowChartPage extends StatelessWidget {
labResult: model.labOrdersResultsList,
),
)
: Container(
child: Center(
child: Texts('no Data'),
),
: Center(
child: Column(
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/util/translations_delegate_base.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -13,10 +14,11 @@ import 'package:provider/provider.dart';
class LabResultWidget extends StatelessWidget {
final String filterName;
final List<LabResult> patientLabResultList;
final PatientLabOrders patientLabOrder;
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;
@override
Widget build(BuildContext context) {
@ -27,6 +29,31 @@ class LabResultWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
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(
children: [
Expanded(
@ -98,7 +125,7 @@ class LabResultWidget extends StatelessWidget {
),
),
),
)
),
],
),
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/viewModel/project_view_model.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/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -25,21 +27,59 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
decoration: BoxDecoration(
/* decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
border: Border.all(color: Colors.grey, width: 1),
),
margin: EdgeInsets.all(20),
),*/
margin: EdgeInsets.all(0),
child: Container(
color: Colors.transparent,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
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',
),
),
),
),
Expanded(
child: Container(
padding: EdgeInsets.all(8),
child: Container(
child: AppText(
TranslationBase.of(context).labResult,
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
// height: 60
),
),
)
],
),
const Divider(
height: 1,
thickness: 1,
color: Colors.black,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
),
children: fullData(projectViewModel),
),
@ -51,64 +91,32 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
List<TableRow> fullData(ProjectViewModel projectViewModel) {
List<TableRow> tableRow = [];
tableRow.add(TableRow(children: [
Container(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).date,
color: Colors.white,
),
),
height: 60,
),
),
Container(
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),
)
]));
widget.labResult.forEach((vital) {
var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime);
tableRow.add(TableRow(children: [
Container(
child: Container(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(8),
color: Colors.white,
child: Center(
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}',
textAlign: TextAlign.center,
),
child: AppText(
'${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}',
fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w600,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
),
),
),
Container(
child: Container(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(8),
color: Colors.white,
child: Center(
child: Texts(
'${vital.resultValue}',
textAlign: TextAlign.center,
),
child: AppText(
'${vital.resultValue}',
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/widgets/shared/app_texts_widget.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
@ -53,13 +55,12 @@ class LineChartCurvedState extends State<LineChartCurved> {
const SizedBox(
height: 4,
),
Text(
AppText(
widget.title,
style: TextStyle(
color: Colors.black,
fontSize: 32,
fontWeight: FontWeight.bold,
letterSpacing: 2),
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
textAlign: TextAlign.center,
),
Expanded(
@ -211,7 +212,7 @@ class LineChartCurvedState extends State<LineChartCurved> {
final LineChartBarData lineChartBarData1 = LineChartBarData(
spots: spots,
isCurved: true,
colors: [Theme.of(context).primaryColor],
colors: [Colors.red],
barWidth: 5,
isStrokeCapRound: true,
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/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:charts_flutter/flutter.dart' as charts;
@ -22,19 +24,45 @@ class LabResultChartAndDetails extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
AppExpandableNotifier(
headerWidget: Padding(
padding: const EdgeInsets.all(8.0),
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)
),
child: LineChartCurved(title: name,labResult:labResult,),
),
bodyWidget: LabResultDetailsWidget(
labResult: labResult.reversed.toList(),
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(),
),
],
),
),
isExpand: true,
),
],
],
),
);
}

@ -110,10 +110,22 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
duration: Duration(milliseconds: 7000),
child: Container(
width: double.infinity,
child: LabResultWidget(
patientLabOrder: widget.patientLabOrder,
patientLabResultList: model.labResultList,
patient:widget.patient,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
...List.generate(
model.labResultLists.length,
(index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder,
filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
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/patient/patiant_info_model.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/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/TextFields.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:provider/provider.dart';
import '../custom_validation_error.dart';
import '../../../../../widgets/shared/user-guid/custom_validation_error.dart';
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
@ -74,7 +74,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
if (widget.mySelectedAssessment.selectedICD != null)
icdNameController.text = widget.mySelectedAssessment.selectedICD.code;
}
final screenSize = MediaQuery.of(context).size;
InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{IconData icon}) {
@ -143,31 +142,15 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
height: 55.0,
hintText:
TranslationBase.of(context).appointmentNumber,
//fontSize: 13.5,
// hintColor: Colors.black,
//hasLabelText: appointmentIdController.text != ''
// ? true
// : false,
//showLabelText: true,
//fontWeight: FontWeight.w600,
//readOnly: true,
isDropDown: false,
enabled: false,
controller: appointmentIdController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// },
),
),
SizedBox(
height: 10,
),
Container(
// height: 60.0,
child: InkWell(
onTap: model.listOfICD10 != null
? () {
@ -284,25 +267,10 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
);
}
: null,
//hasLabelText:
// conditionController.text != '' ? true : false,
//showLabelText: true,
hintText: TranslationBase.of(context).condition,
//fontSize: 13.5,
//readOnly: true,
//suffixIcon: EvaIcons.arrowDown,
// hintColor: Colors.black,
//fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
controller: conditionController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context).emptyMessage;
// else
// return null;
// },
isDropDown: true,
enabled: false,
),
@ -324,8 +292,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
okFunction:
(MasterKeyModel selectedValue) {
setState(() {
// _selectedDiagnosisType =
// selectedValue;
widget.mySelectedAssessment
.selectedDiagnosisType =
selectedValue;
@ -345,28 +311,12 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
);
}
: null,
//hasLabelText:
// typeController.text != '' ? true : false,
//prefixIcon: Icon(Icons.add),
//showLabelText: true,
hintText: TranslationBase.of(context).dType,
//fontSize: 13.5,
//readOnly: true,
// hintColor: Colors.black,
//suffixIcon: EvaIcons.arrowDown,
//fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 1,
enabled: false,
isDropDown: true,
controller: typeController,
// validator: (value) {
// if (value == null)
// return TranslationBase.of(context).emptyMessage;
// else
// return null;
// },
),
if (isFormSubmitted &&
widget.mySelectedAssessment
@ -381,7 +331,6 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
child: TextFields(
hintText: TranslationBase.of(context).remarks,
fontSize: 13.5,
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 18,
minLines: 5,
@ -518,12 +467,9 @@ class _AddAssessmentDetailsState extends State<AddAssessmentDetails> {
mySelectedAssessment.doctorName = doctorProfile.doctorName;
if (!isUpdate) {
// widget.mySelectedAssessmentList.add(mySelectedAssessment);
widget.addSelectedAssessment(mySelectedAssessment, isUpdate);
}
Navigator.of(context).pop();
}
// widget.changePageViewIndex(3);
}
}

@ -18,11 +18,12 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../SOAP_open_items.dart';
import '../SOAP_step_header.dart';
import '../shared_soap_widgets/SOAP_open_items.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'add_assessment_details.dart';
import '../expandable_SOAP_widget.dart';
// ignore: must_be_immutable
class UpdateAssessmentPage extends StatefulWidget {
final Function changePageViewIndex;
List<MySelectedAssessment> mySelectedAssessmentList;
@ -107,7 +108,6 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
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/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/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-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/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:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
// Author Mosa Abuzaid
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);
});
}
}
}
// ignore: must_be_immutable
class AddExaminationWidget extends StatefulWidget {
MasterKeyModel item;
final Function(MasterKeyModel) removeHistory;
@ -277,10 +40,10 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
@override
void initState() {
examination.selectedExamination = widget.item;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -481,7 +244,7 @@ class _AddExaminationWidgetState extends State<AddExaminationWidget> {
minLines: 2,
maxLines: 4,
inputType: TextInputType.multiline,
onChanged: (value){
onChanged: (value) {
examination.remark = value;
},
),
@ -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:provider/provider.dart';
class ExaminationIitemCard extends StatelessWidget {
class ExaminationItemCard extends StatelessWidget {
final MySelectedExamination examination;
final Function removeExamination;
ExaminationIitemCard(this.examination, this.removeExamination);
ExaminationItemCard(this.examination, this.removeExamination);
@override
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/size_config.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/viewModel/SOAP_view_model.dart';
@ -19,18 +18,17 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../SOAP_open_items.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart';
import 'examination-item-card.dart';
import 'objective-add-examination-page.dart';
import '../shared_soap_widgets/SOAP_open_items.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'add_examination_page.dart';
import 'examination_item_card.dart';
class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex;
final Function changeLoadingState;
final int currentIndex;
final int currentIndex;
final List<MySelectedExamination> mySelectedExamination;
final PatiantInformtion patientInfo;
@ -63,9 +61,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
@override
Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size;
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<SOAPViewModel>(
onModelReady: (model) async {
widget.mySelectedExamination.clear();
@ -103,7 +98,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
@ -130,8 +124,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
Column(
children:
widget.mySelectedExamination.map((examination) {
return ExaminationIitemCard(examination, () {
removeExamination(examination.selectedExamination);
return ExaminationItemCard(examination, () {
removeExamination(
examination.selectedExamination);
});
}).toList(),
)
@ -234,7 +229,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
examType: exam.selectedExamination.typeId,
isAbnormal: exam.isAbnormal,
isNormal: exam.isNormal,
// masterDescription: exam.selectedExamination,
notExamined: exam.notExamined,
examinationType: exam.isNormal
? 1
@ -263,10 +257,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changePageViewIndex(2);
}
} else {
// widget.changeLoadingState(true);
//
// widget.changePageViewIndex(2);
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:hexcolor/hexcolor.dart';
import 'SOAP_step_header.dart';
import 'expandable_SOAP_widget.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_widget.dart';
class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex;
@ -99,7 +99,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
backgroundColor: Theme
.of(context)
.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/widgets/shared/app_texts_widget.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/widgets/patients/profile/soap_update/steps_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
@ -34,7 +33,7 @@ class SOAPStepHeader extends StatelessWidget {
child: StepsWidget(
index: currentIndex,
changeCurrentTab: changePageViewIndex,
height: 100,//MediaQuery.of(context).size.height * 0.17,
height: 100,
),
),
SizedBox(

@ -1,6 +1,5 @@
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
class BottomSheetTitle extends StatelessWidget {
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/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
@ -42,7 +41,6 @@ class ExpandableSOAPWidget extends StatelessWidget {
children: [
Texts(headerTitle,
variant: isExpanded ? "bodyText" : '',
// bold: isExpanded ? true : false,
fontSize: 15,
color: Colors.black),
if(isRequired)

@ -13,7 +13,6 @@ class StepsWidget extends StatelessWidget {
StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0});
// TODO : Add translation to name
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
@ -24,7 +23,6 @@ class StepsWidget extends StatelessWidget {
height: height == 0 ? 150 : height,
width: MediaQuery.of(context).size.width * 0.9,
color: Colors.transparent,
// child:,
),
Positioned(
top: 30
@ -245,7 +243,6 @@ class StepsWidget extends StatelessWidget {
AppText(
"Plan",
fontWeight: FontWeight.bold,
// textAlign: TextAlign.center,
fontSize: 12,
),
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:flutter/material.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 {
final Function addAllergiesFun;
@ -30,8 +29,6 @@ class AddAllergies extends StatefulWidget {
class _AddAllergiesState extends State<AddAllergies> {
List<MasterKeyModel> allergiesList;
List<MasterKeyModel> allergySeverityList;
MasterKeyModel _selectedAllergySeverity;
MasterKeyModel _selectedAllergy;
TextEditingController remarkController = TextEditingController();
TextEditingController severityController = TextEditingController();
TextEditingController allergyController = TextEditingController();
@ -74,8 +71,6 @@ class _AddAllergiesState extends State<AddAllergies> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
final screenSize = MediaQuery.of(context).size;
return FractionallySizedBox(
heightFactor: 1,
child: BaseView<SOAPViewModel>(
@ -121,8 +116,8 @@ class _AddAllergiesState extends State<AddAllergies> {
},
addAllergy:
(MySelectedAllergy mySelectedAllergy) {
AddAllergyLocally(mySelectedAllergy);
},
addAllergyLocally(mySelectedAllergy);
},
addSelectedAllergy: () => widget
.addAllergiesFun(myAllergiesListLocal),
isServiceSelected: (master) =>
@ -210,33 +205,29 @@ class _AddAllergiesState extends State<AddAllergies> {
return null;
}
AddAllergyLocally(MySelectedAllergy mySelectedAllergy) {
addAllergyLocally(MySelectedAllergy mySelectedAllergy) {
if (mySelectedAllergy.selectedAllergy == null) {
helpers.showErrorToast(TranslationBase.of(context).requiredMsg);
helpers.showErrorToast(TranslationBase
.of(context)
.requiredMsg);
} else {
setState(() {
List<MySelectedAllergy> allergy =
// ignore: missing_return
myAllergiesListLocal
.where((element) =>
mySelectedAllergy.selectedAllergy.id ==
element.selectedAllergy.id)
// ignore: missing_return
myAllergiesListLocal
.where((element) =>
mySelectedAllergy.selectedAllergy.id ==
element.selectedAllergy.id)
.toList();
if (allergy.isEmpty) {
myAllergiesListLocal.add(mySelectedAllergy);
// Navigator.of(context).pop();
} else {
allergy.first.selectedAllergy = mySelectedAllergy.selectedAllergy;
allergy.first.selectedAllergySeverity =
mySelectedAllergy.selectedAllergySeverity;
allergy.first.remark = mySelectedAllergy.remark;
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/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_scaffold_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/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:font_awesome_flutter/font_awesome_flutter.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 'add_allergies.dart';
// ignore: must_be_immutable
class UpdateAllergiesWidget extends StatefulWidget {
List<MySelectedAllergy> myAllergiesList;
@ -77,7 +67,6 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
? selectedAllergy.selectedAllergy.nameAr
: selectedAllergy.selectedAllergy.nameEn
.toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
@ -90,11 +79,9 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
: selectedAllergy.selectedAllergySeverity
.nameEn
.toUpperCase(),
// variant: "bodyText",
textDecoration: selectedAllergy.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: Color(0xFFCC9B14)),
],
),

@ -1,10 +1,10 @@
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:flutter/cupertino.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 {
const UpdateChiefComplaints({

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

@ -69,7 +69,7 @@ class _PriorityBarState extends State<PriorityBar> {
style: TextStyle(
fontSize: 14,
color: Colors.black, //Colors.black,
color: Colors.black,
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/models/SOAP/master_key_model.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/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:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import 'PriorityBar.dart';
import '../bottom_sheet_title.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_history_dialog.dart';
class UpdateHistoryWidget extends StatefulWidget {
@ -35,7 +23,6 @@ class UpdateHistoryWidget extends StatefulWidget {
class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 0;
changePageViewIndex(pageIndex) {
_controller.jumpToPage(pageIndex);
@ -80,7 +67,6 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: Colors.black),
width: MediaQuery
.of(context)
@ -101,9 +87,7 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
textDecoration: myHistory.isChecked
? null
: TextDecoration.lineThrough,
// bold: true,
color: HexColor("#B8382C"),),
// width: MediaQuery.of(context).size.width * 0.3,
),
Icon(
FontAwesomeIcons.times,

@ -17,9 +17,10 @@ import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../custom_validation_error.dart';
import '../bottom_sheet_title.dart';
import '../../../../../../widgets/shared/user-guid/custom_validation_error.dart';
import '../../shared_soap_widgets/bottom_sheet_title.dart';
// ignore: must_be_immutable
class AddMedication extends StatefulWidget {
final Function addMedicationFun;
TextEditingController medicationController;
@ -37,7 +38,6 @@ class _AddMedicationState extends State<AddMedication> {
MasterKeyModel _selectedMedicationRoute;
MasterKeyModel _selectedMedicationFrequency;
MasterKeyModel _selectedAllergy;
TextEditingController doseController = TextEditingController();
TextEditingController strengthController = TextEditingController();
TextEditingController routeController = TextEditingController();
@ -243,7 +243,6 @@ class _AddMedicationState extends State<AddMedication> {
: null,
hintText:
TranslationBase.of(context).doseTime,
//TODO add translation
maxLines: 2,
minLines: 2,
isDropDown: true,
@ -294,8 +293,6 @@ class _AddMedicationState extends State<AddMedication> {
: null,
hintText:
TranslationBase.of(context).strength,
// hintColor: Colors.black,
// fontWeight: FontWeight.w600,
maxLines: 2,
minLines: 2,
controller: strengthController,
@ -391,9 +388,7 @@ class _AddMedicationState extends State<AddMedication> {
: null,
hintText:
TranslationBase.of(context).frequency,
//TODO add translation
enabled: false,
// hintColor: Colors.black,
maxLines: 2,
minLines: 2,
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/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/viewstate.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/screens/base/base_view.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_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart';
import '../steps_widget.dart';
import '../shared_soap_widgets/SOAP_step_header.dart';
import '../shared_soap_widgets/expandable_SOAP_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 {
final Function changePageViewIndex;
@ -228,7 +225,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
backgroundColor: Theme
.of(context)
.scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Center(
@ -485,7 +481,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
widget.myHistoryList.forEach((history) {
if (postHistoriesRequestModel.listMedicalHistoryVM == null)
postHistoriesRequestModel.listMedicalHistoryVM = [];
//TODO: make static value dynamic
postHistoriesRequestModel.listMedicalHistoryVM.add(ListMedicalHistoryVM(
patientMRN: widget.patientInfo.patientMRN,
episodeId: widget.patientInfo.episodeNo,
@ -514,7 +509,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
formKey.currentState.save();
if(formKey.currentState.validate()){
PostChiefComplaintRequestModel postChiefComplaintRequestModel =
//TODO: make static value dynamic
new PostChiefComplaintRequestModel(
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo,
@ -528,7 +522,6 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
numberOfWeeks: 0);
if (model.patientChiefComplaintList.isEmpty) {
// TODO: make it postChiefComplaint after it start to work
postChiefComplaintRequestModel.editedBy = '';
await model.postChiefComplaint(postChiefComplaintRequestModel);
} 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/models/SOAP/GetGetProgressNoteResModel.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/patient/patiant_info_model.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/patients/profile/soap_update/steps_widget.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/screens/patients/profile/soap_update/subjective/update_subjective_page.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.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/material.dart';
import '../patient-profile-header-new-design.dart';
import 'assessment/update_assessment_page.dart';
import 'objective/update_objective_page.dart';
import 'plan/update_plan_page.dart';
class UpdateSoapIndex extends StatefulWidget {
final bool isUpdate;
@ -54,7 +50,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
@override
void initState() {
// TODO: implement initState
_controller = new PageController();
super.initState();
@ -72,7 +67,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
PatiantInformtion patient = routeArgs['patient'];
return BaseView<DoctorReplayViewModel>(
builder: (_, model, w) => AppScaffold(
// baseViewModel: model,
isLoading: _isLoading,
isShowAppBar: false,
body: SingleChildScrollView(
@ -88,7 +82,6 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
// PatientPageHeaderWidget(patient),
PatientProfileHeaderNewDesign(patient, '7', '7',),
Container(
width: double.infinity,

@ -31,42 +31,46 @@ class LineChartCurved extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(18)),
// color: Colors.white,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 4,
),
Container(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
title,
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
textAlign: TextAlign.center,
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(
height: 4,
),
Container(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
title,
fontSize: SizeConfig.textMultiplier * 2.1,
fontWeight: FontWeight.bold,
backGroundcolor: Colors.black,
fontFamily: 'Poppins',
textAlign: TextAlign.center,
),
],
),
],
),
),
SizedBox(
height: 16,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
const SizedBox(
height: 10,
SizedBox(
height: 16,
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 18.0, left: 16.0),
child: LineChart(
sampleData1(context),
swapAnimationDuration: const Duration(milliseconds: 250),
),
),
),
const SizedBox(
height: 10,
),
],
),
],
),

@ -1,11 +1,9 @@
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/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/translations_delegate_base.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:flutter/material.dart';

@ -76,7 +76,7 @@ class TranslationBase {
String get searchAbout => localizedValues['searchAbout'][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 todayStatistics =>
@ -1227,7 +1227,8 @@ class TranslationBase {
localizedValues['patientIDMobilenational'][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> {

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

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

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

@ -1,7 +1,7 @@
import 'package:doctor_app_flutter/config/config.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/widgets/patients/profile/soap_update/custom_validation_error.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.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();
ProjectViewModel projectsProvider;
@override
Widget build(BuildContext context) {
AuthViewModel authProvider = Provider.of(context);
@ -60,7 +59,7 @@ class _AppDrawerState extends State<AppDrawer> {
),
Container(
child: InkWell(
onTap: (){
onTap: () {
Navigator.pop(context);
},
child: Icon(
@ -130,9 +129,7 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 15),
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.myQRCode,
TranslationBase.of(context).myQRCode,
icon: DoctorApp.qr_code_3,
// subTitle: ,
),
@ -143,11 +140,8 @@ class _AppDrawerState extends State<AppDrawer> {
height: 80,
child: Image.asset('assets/images/qr_code.png'),
),
onTap: () {
},
onTap: () {},
),
],
),
),
@ -161,16 +155,13 @@ class _AppDrawerState extends State<AppDrawer> {
InkWell(
child: DrawerItem(
projectsProvider.isArabic
? TranslationBase
.of(context)
.lanEnglish
: TranslationBase
.of(context)
.lanArabic,
? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic,
// icon: DoctorApp.qr_code,
assetLink: projectsProvider.isArabic
? 'assets/images/usa-flag.png'
: 'assets/images/saudi-arabia-flag.png',),
: 'assets/images/saudi-arabia-flag.png',
),
onTap: () {
if (projectsProvider.isArabic)
projectsProvider.changeLanguage('en');
@ -181,16 +172,15 @@ class _AppDrawerState extends State<AppDrawer> {
SizedBox(height: 10),
InkWell(
child: DrawerItem(
TranslationBase
.of(context)
.logout, icon: DoctorApp.logout_1,),
TranslationBase.of(context).logout,
icon: DoctorApp.logout_1,
),
onTap: () async {
Navigator.pop(context);
await helpers.logout();
projectsProvider.isLogin = false;
},
),
],
),
),
@ -205,40 +195,43 @@ class _AppDrawerState extends State<AppDrawer> {
alignment: FractionalOffset.bottomCenter,
child: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width *0.3,
child: RichText(
text: TextSpan(
text: 'Powered by',
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.3,
child: RichText(
text: TextSpan(
text: 'Powered by',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.bold,
fontSize: 14,
fontFamily: 'Poppins',
),
children: <TextSpan>[
TextSpan(
text: ' Cloud Solutions',
style: TextStyle(
color: Color(0xFF989898),
fontWeight: FontWeight.bold,
fontSize: 14,
fontFamily: 'Poppins',),
children: <TextSpan>[
TextSpan(text: ' Cloud Solutions',
style: TextStyle(
color: Color(0xFF2E303A),
fontSize: 15,
fontFamily: 'Poppins',),
)
]
),),
),
// Text("Powered by"),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 20,
)
],
color: Color(0xFF2E303A),
fontSize: 15,
fontFamily: 'Poppins',
),
)
]),
),
),
// Text("Powered by"),
Image.asset(
'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 20,
)
],
))))
]))
])),
),
width: SizeConfig.realScreenWidth * 0.60,
margin: 0,
margin: EdgeInsets.all(0),
customCornerRaduis: false,
// 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/models/SOAP/master_key_model.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/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/app_buttons_widget.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 raduis;
final Color backgroundColor;
final double margin;
final EdgeInsets margin;
final double elevation;
final bool showBorder;
final Color borderColor;
@ -27,7 +27,7 @@ class RoundedContainer extends StatefulWidget {
this.height,
this.raduis = 10,
this.backgroundColor = Colors.white,
this.margin = 10,
this.margin,
this.elevation = 1,
this.showBorder = false,
this.borderColor = Colors.red,
@ -48,7 +48,7 @@ class _RoundedContainerState extends State<RoundedContainer> {
return Container(
width: widget.width,
height: widget.height,
margin: EdgeInsets.all(widget.margin),
margin: widget.margin,
decoration: widget.showBorder == true
? BoxDecoration(
color: Theme.of(context).primaryColor,

Loading…
Cancel
Save