From 0dc6bbca34d2d0354f4c8b5891bc0999293dff30 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 12 Apr 2021 17:13:09 +0300 Subject: [PATCH 01/12] finish the new design on the progress note (SOAP) --- lib/screens/procedures/ProcedureCard.dart | 5 +++-- lib/screens/procedures/procedure_screen.dart | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 1b51ba30..43be9b71 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_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/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; @@ -147,7 +148,7 @@ class ProcedureCard extends StatelessWidget { color: Colors.grey, ), Texts( - entityList.clinicDescription.toString(), + entityList.clinicDescription??"", bold: true, fontSize: 12, ), @@ -163,7 +164,7 @@ class ProcedureCard extends StatelessWidget { if (entityList.categoryID == 2 || entityList.categoryID == 4) InkWell( - child: Icon(Icons.edit), + child: Icon(DoctorApp.edit), onTap: onTap, ) ], diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index e8fdd882..9e44df17 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -35,7 +35,6 @@ class ProcedureScreen extends StatelessWidget { baseViewModel: model, child: SingleChildScrollView( child: Container( - color: Colors.white, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ From 8dca4768986eb66d03b3930a97c3d0bdea64b83d Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 12 Apr 2021 18:55:31 +0300 Subject: [PATCH 02/12] add lab & add radiology design update --- .../procedures/add-procedure-form.dart | 2 + lib/screens/procedures/add_lab_orders.dart | 43 +++++++-------- .../procedures/add_radiology_order.dart | 41 +++++++------- .../entity_list_checkbox_search_widget.dart | 54 ++++++++++++++----- 4 files changed, 80 insertions(+), 60 deletions(-) diff --git a/lib/screens/procedures/add-procedure-form.dart b/lib/screens/procedures/add-procedure-form.dart index 39aed026..31dabcd2 100644 --- a/lib/screens/procedures/add-procedure-form.dart +++ b/lib/screens/procedures/add-procedure-form.dart @@ -343,6 +343,8 @@ class _AddSelectedProcedureState extends State { AppButton( title: TranslationBase.of(context) .addSelectedProcedures, + color: Color(0xff359846), + fontWeight: FontWeight.w700, onPressed: () { //print(entityList.toString()); onPressed: diff --git a/lib/screens/procedures/add_lab_orders.dart b/lib/screens/procedures/add_lab_orders.dart index 93773c8f..d255308f 100644 --- a/lib/screens/procedures/add_lab_orders.dart +++ b/lib/screens/procedures/add_lab_orders.dart @@ -157,29 +157,24 @@ class _AddSelectedLabOrderState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Column( + Row( children: [ - Row( - children: [ - InkWell( - child: Icon( - Icons.close, - size: 24.0, - ), - onTap: () { - Navigator.pop(context); - }, - ), - ], + AppText( + 'New Lab Order', + fontWeight: FontWeight.w700, + fontSize: 20, ), - Row( - children: [ - AppText( - 'New Lab Order', - fontWeight: FontWeight.w700, - fontSize: 20, - ), - ], + SizedBox( + width: MediaQuery.of(context).size.width * 0.48, + ), + InkWell( + child: Icon( + Icons.close, + size: 28.0, + ), + onTap: () { + Navigator.pop(context); + }, ), ], ), @@ -261,8 +256,10 @@ class _AddSelectedLabOrderState extends State { alignment: WrapAlignment.center, children: [ AppButton( - title: TranslationBase.of(context) - .addSelectedProcedures, + title: + "Add Lab Order", //TranslationBase.of(context) + fontWeight: FontWeight.w700, + //.addSelectedProcedures, color: Color(0xff359846), onPressed: () { //print(entityList.toString()); diff --git a/lib/screens/procedures/add_radiology_order.dart b/lib/screens/procedures/add_radiology_order.dart index 9fc76dc4..2f74060e 100644 --- a/lib/screens/procedures/add_radiology_order.dart +++ b/lib/screens/procedures/add_radiology_order.dart @@ -157,29 +157,24 @@ class _AddSelectedRadiologyOrderState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Column( + Row( children: [ - Row( - children: [ - InkWell( - child: Icon( - Icons.close, - size: 24.0, - ), - onTap: () { - Navigator.pop(context); - }, - ), - ], + AppText( + 'New Radiology Order', + fontWeight: FontWeight.w700, + fontSize: 20, ), - Row( - children: [ - AppText( - 'New Radiology Order', - fontWeight: FontWeight.w700, - fontSize: 20, - ), - ], + SizedBox( + width: MediaQuery.of(context).size.width * 0.48, + ), + InkWell( + child: Icon( + Icons.close, + size: 28.0, + ), + onTap: () { + Navigator.pop(context); + }, ), ], ), @@ -261,9 +256,9 @@ class _AddSelectedRadiologyOrderState extends State { alignment: WrapAlignment.center, children: [ AppButton( - title: TranslationBase.of(context) - .addSelectedProcedures, + title: 'Add Radiology Order', color: Color(0xff359846), + fontWeight: FontWeight.w700, onPressed: () { //print(entityList.toString()); onPressed: diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 4846c8c9..679739e2 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -74,16 +74,18 @@ class _EntityListCheckboxSearchWidgetState child: Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(8), color: Colors.white), child: ListView( children: [ TextFields( hintText: TranslationBase.of(context).searchProcedures, suffixIcon: EvaIcons.search, + suffixIconColor: Color(0xff2B353E), onChanged: (value) { filterSearchResults(value); }, + hasBorder: false, ), SizedBox( height: 15, @@ -99,7 +101,7 @@ class _EntityListCheckboxSearchWidgetState Checkbox( value: widget.isEntityListSelected( historyInfo), - activeColor: Colors.red[800], + activeColor: Color(0xffD02127), onChanged: (bool newValue) { setState(() { if (widget.isEntityListSelected( @@ -118,6 +120,7 @@ class _EntityListCheckboxSearchWidgetState horizontal: 10, vertical: 0), child: Texts( historyInfo.procedureName, + fontSize: 14.0, variant: "bodyText", bold: true, color: Color(0xff575757)), @@ -130,18 +133,32 @@ class _EntityListCheckboxSearchWidgetState child: Padding( padding: EdgeInsets.symmetric( horizontal: 12), - child: Row( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context) - .orderType, - fontWeight: FontWeight.w700, + Row( + children: [ + Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 11), + child: AppText( + TranslationBase.of( + context) + .orderType, + fontWeight: + FontWeight.w700, + color: Color(0xff2B353E), + ), + ), + ], ), Row( children: [ Radio( activeColor: - Color(0xFFB9382C), + Color(0xFFD02127), value: 0, groupValue: selectedType, onChanged: (value) { @@ -153,10 +170,14 @@ class _EntityListCheckboxSearchWidgetState value.toString(); }, ), - Text('routine'), + AppText( + 'routine', + color: Color(0xff575757), + fontWeight: FontWeight.w600, + ), Radio( activeColor: - Color(0xFFB9382C), + Color(0xFFD02127), groupValue: selectedType, value: 1, onChanged: (value) { @@ -168,9 +189,12 @@ class _EntityListCheckboxSearchWidgetState value.toString(); }, ), - Text(TranslationBase.of( - context) - .urgent), + AppText( + TranslationBase.of(context) + .urgent, + color: Color(0xff575757), + fontWeight: FontWeight.w600, + ), ], ), ], @@ -192,11 +216,13 @@ class _EntityListCheckboxSearchWidgetState }, minLines: 3, maxLines: 5, + borderWidth: 0.5, + borderColor: Colors.grey[500], ), ), + DividerWithSpacesAround(), ], ), - DividerWithSpacesAround(), ], ); }).toList(), From 9d4584097d20a6567d9a284ab6d756aa7c5117b5 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 12:34:16 +0300 Subject: [PATCH 03/12] fix flag on slider --- assets/images/saudi-arabia-flag.png | Bin 0 -> 760 bytes assets/images/usa-flag.png | Bin 0 -> 595 bytes lib/screens/profile_screen.dart | 8 +++--- lib/widgets/shared/app_drawer_widget.dart | 29 ++++++++++++++------- lib/widgets/shared/drawer_item_widget.dart | 10 ++++++- 5 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 assets/images/saudi-arabia-flag.png create mode 100644 assets/images/usa-flag.png diff --git a/assets/images/saudi-arabia-flag.png b/assets/images/saudi-arabia-flag.png new file mode 100644 index 0000000000000000000000000000000000000000..932eb11ace10469245e326640c6dc6eeab402aa0 GIT binary patch literal 760 zcmVPx#IAvH#W=%~1DgXcg2mk?xX#fNO00031000^Q000000-yo_1ONa40RR917N7$F z1ONa40RR915C8xG0I;d#zyJUOZb?KzR5%f}luJ(&Q547jcc#x7`m#-1pcSZ!jmAXO zXu?j7x-4<$j*lSUz>RA@fQiAi(csF&C8>!fE>spEXoHd#Vr$FLcRLTyy=0mWC>!)N zXYTaebAEFkcZOkcE{s-l5x^X2nDnHw1VvqNq19RiAyhR9bAHbm< q2RgjRhh@;w>ytW!v1jlr4}Sy24d@wB+4?sC0000TzkQp z+etLVQJ}P5WwMXZ{=jZIvAa57nhk!cz293|d4EG%vF-%D`yqjszSszUsp6`0Rq7HE z>tf08+xIwhKX=2$&ozRprdqvH{=W2bP-kAqDxtzT3(UeCuY|7%s(*Q1;9ai5ocUF8 z9~nQ+J0f{~WnRT4$2CD7=UvxJAO6lFJ1MD6{KxKptY+qG9?IN*ZN5XBRiv{@WmO2% z<2zq2iD$&e9A4{xV09O}{o%c=#|&eN=4A4|9PO+e2#DVdGp%2 zj(PKzef+ZIuSwFD_2D{s^WO_^H+dz@)>FVdQ&MBb@0CU0lZ~y=R literal 0 HcmV?d00001 diff --git a/lib/screens/profile_screen.dart b/lib/screens/profile_screen.dart index 283649aa..1e9e2459 100644 --- a/lib/screens/profile_screen.dart +++ b/lib/screens/profile_screen.dart @@ -57,25 +57,25 @@ class _ProfileScreenState extends State { children: [ DrawerItem( TranslationBase.of(context).gender, - Icons.person_pin, + icon: Icons.person_pin, color: Colors.black, subTitle: doctorProfile.genderDescription //"Male" , ), - DrawerItem(TranslationBase.of(context).clinic, Icons.build, + DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build, color: Colors.black, subTitle: doctorProfile.clinicDescription //"Neurology Clinic", ), DrawerItem( TranslationBase.of(context).hospital, - Icons.local_hospital, + icon: Icons.local_hospital, color: Colors.black, subTitle: doctorProfile.projectName, //"Al-Takkassussi", ), DrawerItem( TranslationBase.of(context).speciality, - Icons.crop_square, + icon: Icons.crop_square, color: Colors.black, subTitle: doctorProfile.doctorRate == 0 ? TranslationBase.of(context).beingBad diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 324269c6..ee4e7aaf 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -113,7 +113,7 @@ class _AppDrawerState extends State { InkWell( child: DrawerItem( TranslationBase.of(context).applyOrRescheduleLeave, - DoctorApp.reschedule__1, + icon: DoctorApp.reschedule__1, // subTitle: , ), onTap: () { @@ -129,8 +129,10 @@ class _AppDrawerState extends State { SizedBox(height: 15), InkWell( child: DrawerItem( - TranslationBase.of(context).myQRCode, - DoctorApp.qr_code_3, + TranslationBase + .of(context) + .myQRCode, + icon: DoctorApp.qr_code_3, // subTitle: , ), ), @@ -149,7 +151,7 @@ class _AppDrawerState extends State { ), ), SizedBox( - height: 130, + height: MediaQuery.of(context).size.height * 0.09, ), Container( margin: EdgeInsets.symmetric(horizontal: 20), @@ -157,10 +159,17 @@ class _AppDrawerState extends State { children: [ InkWell( child: DrawerItem( - projectsProvider.isArabic - ? TranslationBase.of(context).lanEnglish - : TranslationBase.of(context).lanArabic, - DoctorApp.qr_code), + projectsProvider.isArabic + ? 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',), onTap: () { if (projectsProvider.isArabic) projectsProvider.changeLanguage('en'); @@ -171,7 +180,9 @@ class _AppDrawerState extends State { SizedBox(height: 10), InkWell( child: DrawerItem( - TranslationBase.of(context).logout, DoctorApp.logout_1), + TranslationBase + .of(context) + .logout, icon: DoctorApp.logout_1,), onTap: () async { Navigator.pop(context); await helpers.logout(); diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index 1a34a8ca..3dcac4c9 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -15,8 +15,9 @@ class DrawerItem extends StatefulWidget { final String subTitle; final IconData icon; final Color color; + final String assetLink; - DrawerItem(this.title, this.icon, {this.color, this.subTitle = ''}); + DrawerItem(this.title, {this.icon, this.color, this.subTitle = '', this.assetLink}); @override _DrawerItemState createState() => _DrawerItemState(); @@ -30,6 +31,13 @@ class _DrawerItemState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ + if(widget.assetLink!=null) + Container( + height: 20, + width: 20, + child: Image.asset(widget.assetLink), + ), + if(widget.assetLink==null) Icon( widget.icon, color: widget.color ?? Colors.black87, From fea6501b9e5256d9f60d0e9b42f713e1b2205d4a Mon Sep 17 00:00:00 2001 From: mosazaid Date: Tue, 13 Apr 2021 13:12:48 +0300 Subject: [PATCH 04/12] design fixes issues --- assets/images/patient/ic_ref_arrow_left.png | Bin 0 -> 453 bytes assets/images/patient/ic_ref_arrow_up.png | Bin 0 -> 453 bytes .../profile/UCAF/UCAF-input-screen.dart | 36 ++++--- .../profile/UCAF/page-stepper-widget.dart | 37 ++++--- .../admission-request-first-screen.dart | 6 +- .../referral/refer-patient-screen.dart | 17 +++- .../LineChartCurvedBloodPressure.dart | 6 +- .../patient-referral-item-widget.dart | 27 +---- lib/widgets/shared/app-textfield-custom.dart | 93 +++++++++--------- 9 files changed, 118 insertions(+), 104 deletions(-) create mode 100644 assets/images/patient/ic_ref_arrow_left.png create mode 100644 assets/images/patient/ic_ref_arrow_up.png diff --git a/assets/images/patient/ic_ref_arrow_left.png b/assets/images/patient/ic_ref_arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..09e05ab220a7f2c2f67191a18bd4abe139fe672d GIT binary patch literal 453 zcmeAS@N?(olHy`uVBq!ia0vp^l0dA$!3-oXI4PR|snr2KA+A9BKMd^OzyHjcGmjrX zzIgHC?c2AnUcGw#`gI`V&Ye5gu3fu%^CpCQMBarIq&lV>hozIOAL z-3O1HJay*k^*i?;J$?4-!^f}Re*FHYeWJP?Xa-}Fx4R4De(vn-#?TwMrGOwZJLmN^c_wVp1w>zbF7eXlz8%Fbrl+|+8uAGSF~ who@qrmq(NYcfwQwQ*+^ia@vp7gap_a7X6U^B5b^Y6X+fWPgg&ebxsLQ0K>cU-2eap literal 0 HcmV?d00001 diff --git a/assets/images/patient/ic_ref_arrow_up.png b/assets/images/patient/ic_ref_arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..8294cfed692ae722747c409c629116ab39d938ed GIT binary patch literal 453 zcmeAS@N?(olHy`uVBq!ia0vp^3P3E$!3-qRFWy-Uq*es@gt!9f|6s6x|Nh&zZ{NRv z|Jk!=7cX7}GA>=ZboJ_0px~`rx2|8m4rJW8aRW%+ym=ES0%QY8h#*7+NWvLFS%?B4 z2@!{r$RfyWhytLQaFxgmkw1Q>K)0Hg1o;IsFfp^Rb8vAB2nvZRscGw3+PHXl`})P_ zHuO%LHE-#vO){&D(b$K7RT6`>*J=50XG57?Zr+T^Ro}>D~i! zIy_w*Lp096J?|;sm>_cWq4S9dNvAfWG_5HQYyRiE{Yt!88y)>4|9r8yctxnp+0`dj zzL}^UyZ8F^nr#{@zdh@_ZL7SCwbGnzopr0KK3CJpcdz literal 0 HcmV?d00001 diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index 95afd136..c39464bd 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -116,7 +116,8 @@ class _UCAFInputScreenState extends State { title: AppText( TranslationBase.of(context).inPatient, fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 2.1, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, ), value: _inPatient, onChanged: (newValue) { @@ -124,6 +125,7 @@ class _UCAFInputScreenState extends State { _inPatient = newValue; }); }, + activeColor: HexColor("#D02127"), controlAffinity: ListTileControlAffinity.leading, contentPadding: EdgeInsets.all(0), @@ -132,7 +134,8 @@ class _UCAFInputScreenState extends State { title: AppText( TranslationBase.of(context).emergencyCase, fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 2.1, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, ), value: _emergencyCase, onChanged: (newValue) { @@ -140,12 +143,12 @@ class _UCAFInputScreenState extends State { _emergencyCase = newValue; }); }, + activeColor: HexColor("#D02127"), controlAffinity: ListTileControlAffinity.leading, contentPadding: EdgeInsets.all(0), ), AppTextFieldCustom( - height: screenSize.height * 0.075, hintText: TranslationBase.of(context) .durationOfIllness, dropDownText: "3", @@ -170,7 +173,7 @@ class _UCAFInputScreenState extends State { color: Color(0xFFCC9B14), ), SizedBox( - width: 4, + width: 8, ), AppText( "BP (H/L)", @@ -192,7 +195,7 @@ class _UCAFInputScreenState extends State { ], ), SizedBox( - width: 4, + width: 6, ), Expanded( child: Row( @@ -205,7 +208,7 @@ class _UCAFInputScreenState extends State { fontWeight: FontWeight.normal, ), SizedBox( - width: 8, + width: 4, ), Expanded( child: AppText( @@ -222,7 +225,7 @@ class _UCAFInputScreenState extends State { ], ), SizedBox( - height: 4, + height: 2, ), Row( mainAxisAlignment: @@ -231,14 +234,14 @@ class _UCAFInputScreenState extends State { Row( children: [ AppText( - "${TranslationBase.of(context).pulseBeats} :", + "${TranslationBase.of(context).pulseBeats}:", fontSize: SizeConfig.textMultiplier * 1.8, color: Colors.black, fontWeight: FontWeight.normal, ), SizedBox( - width: 8, + width: 4, ), AppText( "${model.patientVitalSigns.pulseBeatPerMinute}", @@ -258,8 +261,9 @@ class _UCAFInputScreenState extends State { TranslationBase.of(context) .chiefComplaintsAndSymptoms, fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 2.1, + fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), ), SizedBox( height: 4, @@ -269,6 +273,7 @@ class _UCAFInputScreenState extends State { .patientFeelsPainInHisBackAndCough, fontFamily: 'Poppins', fontWeight: FontWeight.normal, + color: Color(0xFF575757), fontSize: SizeConfig.textMultiplier * 1.8, ), SizedBox( @@ -292,7 +297,8 @@ class _UCAFInputScreenState extends State { AppText( TranslationBase.of(context).otherConditions, fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.0, + fontSize: SizeConfig.textMultiplier * 2.1, + color: Color(0xFF2E303A), ), ...List.generate( conditionsData.length, @@ -302,6 +308,7 @@ class _UCAFInputScreenState extends State { fontWeight: FontWeight.normal, fontSize: SizeConfig.textMultiplier * 2.1, + fontFamily: 'Poppins', ), value: conditionsData[index] ['isChecked'], @@ -319,7 +326,6 @@ class _UCAFInputScreenState extends State { height: 8, ), AppTextFieldCustom( - height: screenSize.height * 0.075, hintText: TranslationBase.of(context).other, dropDownText: "None", enabled: false, @@ -328,7 +334,6 @@ class _UCAFInputScreenState extends State { height: 8, ), AppTextFieldCustom( - height: screenSize.height * 0.075, hintText: TranslationBase.of(context).how, dropDownText: "None", enabled: false, @@ -340,7 +345,6 @@ class _UCAFInputScreenState extends State { children: [ Expanded( child: AppTextFieldCustom( - height: screenSize.height * 0.075, hintText: TranslationBase.of(context).when, dropDownText: "None", @@ -352,7 +356,6 @@ class _UCAFInputScreenState extends State { ), Expanded( child: AppTextFieldCustom( - height: screenSize.height * 0.075, hintText: TranslationBase.of(context).where, dropDownText: "None", @@ -379,7 +382,8 @@ class _UCAFInputScreenState extends State { AppText( TranslationBase.of(context).significantSigns, fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2.1, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.2, ), SizedBox( height: 8, diff --git a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart index 58bcbab0..fa3d5daa 100644 --- a/lib/screens/patients/profile/UCAF/page-stepper-widget.dart +++ b/lib/screens/patients/profile/UCAF/page-stepper-widget.dart @@ -4,6 +4,15 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; +/// * +/// By Mousa Zaid Mousa Abuzaid +/// At 13/4/2021 + +/* + All hex value from 100% to 0% alpha: used in line 122 + https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4 + */ + class PageStepperWidget extends StatelessWidget { final int stepsCount; final int currentStepIndex; @@ -13,7 +22,7 @@ class PageStepperWidget extends StatelessWidget { @override Widget build(BuildContext context) { - double dividerWidth = (screenSize.width / stepsCount) - (5 * stepsCount); + double dividerWidth = (screenSize.width / stepsCount) - (10 * stepsCount); return Container( margin: EdgeInsets.symmetric(vertical: 16.0, horizontal: 16.0), @@ -38,6 +47,7 @@ class PageStepperWidget extends StatelessWidget { } class StepWidget extends StatelessWidget { + final int index; final bool isInProgress; final bool isFinalStep; @@ -71,24 +81,25 @@ class StepWidget extends StatelessWidget { width: 30, height: 30, decoration: BoxDecoration( - color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), + color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846), shape: BoxShape.circle, border: Border.all( - color: isInProgress ? Color(0xFFCC9B14) : Color(0xFFC9C9C9), + color: status == StepStatus.InProgress ? Color(0xFFCC9B14) : status == StepStatus.Locked ? Color(0xFFE3E3E3) : Color(0xFF359846), width: 1), ), child: Center( child: Icon( Icons.check, size: 20, - color: status == StepStatus.InProgress ? Colors.white : status == StepStatus.Locked ? Colors.grey.shade800 : Color(0xFF359846), + color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.white, )), ), if (!isFinalStep) Container( + margin: EdgeInsets.symmetric(horizontal: 4), width: dividerWidth, height: 2, - color: Colors.grey, + color: status == StepStatus.Completed ? Color(0xFF359846) : Color(0xFFCCCCCC), ), ], ), @@ -98,23 +109,27 @@ class StepWidget extends StatelessWidget { AppText( "${TranslationBase.of(context).step} $index", fontWeight: FontWeight.bold, - color: status == StepStatus.InProgress ? Colors.black : status == StepStatus.Locked ? Colors.grey : Color(0xFF359846), + color: status == StepStatus.Locked ? Color(0xFF969696) : Colors.black, fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.6, ), Container( margin: EdgeInsets.symmetric(vertical: 4), - padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4), decoration: BoxDecoration( color: status == StepStatus.InProgress ? Color(0xFFF1E9D3) : status == StepStatus.Locked - ? Color(0xFFD8E8DB) - : Color(0xFFCCCCCC), + ? Color(0x29797979) + : Color(0xFFD8E8D8), borderRadius: BorderRadius.all( - Radius.circular(8.0), + Radius.circular(4.0), ), - border: Border.all(color: HexColor('#707070'), width: 0.30), + border: Border.all(color: status == StepStatus.InProgress + ? Color(0xFFF1E9D3) + : status == StepStatus.Locked + ? Color(0x29797979) + : Color(0xFFD8E8D8), width: 0.30), ), child: AppText( status == StepStatus.InProgress diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index 8095d04a..69886efb 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -118,14 +118,14 @@ class _AdmissionRequestThirdScreenState hintText: TranslationBase.of(context).clinic, isDropDown: true, dropDownText: _selectedClinic != null - ? _selectedClinic['clinicGroupName'] + ? projectViewModel.isArabic? _selectedClinic['clinicNameArabic'] : _selectedClinic['clinicNameEnglish'] : null, enabled: false, onClick: model.clinicList != null && model.clinicList.length > 0 ? () { openListDialogField( - 'clinicGroupName', + projectViewModel.isArabic? 'clinicNameArabic' : 'clinicNameEnglish', 'clinicID', model.clinicList, (selectedValue) { setState(() { @@ -142,7 +142,7 @@ class _AdmissionRequestThirdScreenState if (model.state == ViewState.Idle && model.clinicList.length > 0) { openListDialogField( - 'clinicGroupName', + projectViewModel.isArabic? 'clinicNameArabic' : 'clinicNameEnglish', 'clinicID', model.clinicList, (selectedValue) { setState(() { diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 2619b200..4922f3a1 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; @@ -71,7 +72,9 @@ class _PatientMakeReferralScreenState extends State { builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).referPatient, - isShowAppBar: false, + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), body: SingleChildScrollView( child: Container( child: Column( @@ -80,8 +83,8 @@ class _PatientMakeReferralScreenState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PatientProfileHeaderNewDesign( - patient, patientType, arrivalType), + /*PatientProfileHeaderNewDesign( + patient, patientType, arrivalType),*/ Container( margin: EdgeInsets.all(16.0), child: Column( @@ -357,7 +360,13 @@ class _PatientMakeReferralScreenState extends State { }, ); } - : null, + : (){ + if(_selectedClinic == null){ + DrAppToastMsg.showErrorToast("You need to select a clinic first"); + } else if(model.doctorsList == null || model.doctorsList.length == 0){ + DrAppToastMsg.showErrorToast("There is no doctors for this clinic"); + } + }, ), SizedBox( height: 10, diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 5eea8f3d..3c0e4add 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -90,10 +90,10 @@ class LineChartCurvedBloodPressure extends StatelessWidget { height: 20, decoration: BoxDecoration( shape: BoxShape.rectangle, - color: Colors.grey), + color: Colors.red), ), SizedBox(width: 5,), - AppText(TranslationBase.of(context).diastolicLng) + AppText(TranslationBase.of(context).diastolicLng,) ], ), ], @@ -248,7 +248,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { final LineChartBarData lineChartBarData2 = LineChartBarData( spots: spots2, isCurved: true, - colors: [Colors.grey], + colors: [Colors.red], barWidth: 5, isStrokeCapRound: true, dotData: FlDotData( diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 606dccde..ddc41c82 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -455,28 +455,11 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - width: 2, - height: 30, - color: Color(0xFFD9D9D9), - - /* - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border( - bottom: BorderSide( - color: Color(0xFFD9D9D9), width: 2.5), - left: BorderSide( - color: Color(0xFFD9D9D9), width: 2.5), - )), - */ - ), - Container( - margin: EdgeInsets.only( - left: 0, top: 20, right: 0, bottom: 0), - child: Icon( - Icons.arrow_forward, - color: Color(0xFFD9D9D9), - size: 30, + margin: EdgeInsets.only(left: 10, right: 0), + child: Image.asset( + infoIcon != null ? 'assets/images/patient/ic_ref_arrow_up.png' : 'assets/images/patient/ic_ref_arrow_left.png', + height: 50, + width: 30, ), ), Container( diff --git a/lib/widgets/shared/app-textfield-custom.dart b/lib/widgets/shared/app-textfield-custom.dart index 6c52001b..67d9c921 100644 --- a/lib/widgets/shared/app-textfield-custom.dart +++ b/lib/widgets/shared/app-textfield-custom.dart @@ -46,7 +46,7 @@ class _AppTextFieldCustomState extends State { @override Widget build(BuildContext context) { return Container( - height: widget.height != 0 ? widget.height : null, + height: widget.height != 0 ? widget.height + 8 : null, decoration: widget.hasBorder ? containerBorderDecoration(Color(0Xffffffff), Color(0xFFEFEFEF)) : null, @@ -57,53 +57,56 @@ class _AppTextFieldCustomState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if ((widget.controller != null && - widget.controller.text != "") || - widget.dropDownText != null) - AppText( - widget.hintText, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - ), - widget.dropDownText == null - ? TextField( - textAlign: TextAlign.left, - decoration: textFieldSelectorDecoration( - widget.hintText, null, true), - style: TextStyle( - fontSize: SizeConfig.textMultiplier * 1.7, + child: Container( + padding: widget.dropDownText == null ? EdgeInsets.symmetric(vertical: 0): EdgeInsets.symmetric(vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if ((widget.controller != null && + widget.controller.text != "") || + widget.dropDownText != null) + AppText( + widget.hintText, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.4, + fontWeight: FontWeight.w700, + ), + widget.dropDownText == null + ? TextField( + textAlign: TextAlign.left, + decoration: textFieldSelectorDecoration( + widget.hintText, null, true), + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.7, + fontFamily: 'Poppins', + color: Colors.grey.shade800, + ), + controller: widget.controller, + keyboardType: widget.inputType, + enabled: widget.enabled, + minLines: widget.minLines, + maxLines: widget.maxLines, + inputFormatters: widget.inputFormatters != null + ? widget.inputFormatters + : [], + onChanged: (value) { + if (widget.onChanged != null){ + widget.onChanged(value); + setState(() { + + }); + } + }, + ) + : AppText( + widget.dropDownText, fontFamily: 'Poppins', color: Colors.grey.shade800, + fontSize: SizeConfig.textMultiplier * 1.7, ), - controller: widget.controller, - keyboardType: widget.inputType, - enabled: widget.enabled, - minLines: widget.minLines, - maxLines: widget.maxLines, - inputFormatters: widget.inputFormatters != null - ? widget.inputFormatters - : [], - onChanged: (value) { - if (widget.onChanged != null){ - widget.onChanged(value); - setState(() { - - }); - } - }, - ) - : AppText( - widget.dropDownText, - fontFamily: 'Poppins', - color: Colors.grey.shade800, - fontSize: SizeConfig.textMultiplier * 1.7, - ), - ], + ], + ), ), ), widget.isDropDown From 7dfe9f843fe2d0703bf85afe8916cb98bb5432d0 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 13 Apr 2021 13:13:40 +0300 Subject: [PATCH 05/12] hot fix in the expandable widget --- ios/Podfile.lock | 2 +- lib/main.dart | 2 +- lib/widgets/shared/expandable-widget-header-body.dart | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2f4607e0..878a1850 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -322,4 +322,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.0.rc.1 +COCOAPODS: 1.10.1 diff --git a/lib/main.dart b/lib/main.dart index a7515e7b..b5e8414d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -46,7 +46,7 @@ class MyApp extends StatelessWidget { child: Consumer( builder: (context, projectProvider, child) => MaterialApp( showSemanticsDebugger: false, - title: 'Flutter Demo', + title: 'Doctors App', locale: projectProvider.appLocal, localizationsDelegates: [ TranslationBaseDelegate(), diff --git a/lib/widgets/shared/expandable-widget-header-body.dart b/lib/widgets/shared/expandable-widget-header-body.dart index 97930285..20d95bcd 100644 --- a/lib/widgets/shared/expandable-widget-header-body.dart +++ b/lib/widgets/shared/expandable-widget-header-body.dart @@ -26,7 +26,12 @@ class _HeaderBodyExpandableNotifierState } @override Widget build(BuildContext context) { - + setState(() { + if (widget.isExpand == true) { + widget.expandFlag = widget.isExpand; + widget.controller.expanded = true; + } + }); return ExpandableNotifier( child: Padding( padding: const EdgeInsets.only(left: 0, right: 0), From ff157b417e116bec3481eef2889c24cd4a1eaa42 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 13:47:17 +0300 Subject: [PATCH 06/12] fix add medication and soap index --- lib/screens/dashboard_screen.dart | 12 ++-- .../soap_update/expandable_SOAP_widget.dart | 1 - .../profile/soap_update/steps_widget.dart | 40 ++++++----- .../subjective/update_medication_widget.dart | 72 ++++++++++++------- .../soap_update/update_soap_index.dart | 27 ++++++- 5 files changed, 102 insertions(+), 50 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 13e17077..b0c3bcde 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1020,12 +1020,12 @@ class _DashboardScreenState extends State { ), hasBorder: false, onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // SearchMedicinePatientScreen(), - // )); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + SearchMedicinePatientScreen(), + )); }, ) ], diff --git a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart index 32876539..81bdf613 100644 --- a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -44,7 +44,6 @@ class ExpandableSOAPWidget extends StatelessWidget { if(isRequired) Icon( FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, size: 12, ) ], diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index b1432752..973c4138 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -24,19 +24,23 @@ class StepsWidget extends StatelessWidget { height: height == 0 ? 150 : height, width: MediaQuery.of(context).size.width * 0.9, color: Colors.transparent, - child: Center( - child: Container( - width: MediaQuery.of(context).size.width * 0.86, - child: Divider( - color: Colors.grey, - height: 0.75, - thickness: 0.75, - ), - ), - ), + // child:, ), Positioned( - top: 43, + top: 30 + , + child: Center( + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), + ), + )), + Positioned( + top: 10, left: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -87,7 +91,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: MediaQuery .of(context) .size @@ -143,7 +147,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: MediaQuery .of(context) .size @@ -201,7 +205,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, @@ -271,7 +275,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -321,7 +325,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: MediaQuery .of(context) .size @@ -374,7 +378,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, right: MediaQuery .of(context) .size @@ -432,7 +436,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 43, + top: 10, left: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart index 2d9f5cd5..440252fa 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart @@ -1,4 +1,5 @@ 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'; @@ -41,30 +42,52 @@ class _UpdateMedicationWidgetState extends State { return Column( children: [ - Container( - child: TextFields( - hintText: TranslationBase.of(context).addMedication, - borderColor: HexColor('#707070'), - borderWidth: 0.30, - fontSize: 13.5, - borderRadius: 12, - onTapTextFields: () { - openMedicationList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: Color(0xFF2B353E), - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), + InkWell( + onTap: () { + openMedicationList(context); + }, + child: Container( + padding: EdgeInsets.symmetric( + vertical: 8, horizontal: 8.0), + margin: + EdgeInsets.symmetric(vertical: 8), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(8), + ), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + "${TranslationBase.of(context).addMedication}", + fontSize: SizeConfig + .textMultiplier * + 1.8, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + )), + Icon( + Icons.add_box_rounded, + size: 25, + ) + ], + ), + ), ), SizedBox( height: 20, @@ -78,6 +101,7 @@ class _UpdateMedicationWidgetState extends State { showModalBottomSheet( backgroundColor: Colors.white, isScrollControlled: true, + isDismissible: false, context: context, builder: (context) { return AddMedication( diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 0c69d71d..2f839633 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -1,3 +1,4 @@ +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'; @@ -6,11 +7,13 @@ 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/update_assessment_page.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/update_plan_page.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -79,6 +82,7 @@ class _UpdateSoapIndexState extends State color: Theme.of(context).scaffoldBackgroundColor), child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ // PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), @@ -87,6 +91,27 @@ class _UpdateSoapIndexState extends State height: 1, color: Color(0xffCCCCCC), ), + Container( + margin: EdgeInsets.only( + top: 10, + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + + child: AppText( + TranslationBase.of(context).createNew, + fontSize: 3 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w500, + ), + ), + Container( + margin: EdgeInsets.only( + left: MediaQuery.of(context).size.width * 0.05, + right: MediaQuery.of(context).size.width * 0.05), + child: AppText(TranslationBase.of(context).episode, + fontSize: 3.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + ), Container( color: Theme.of(context).scaffoldBackgroundColor, margin: EdgeInsets.only( @@ -95,7 +120,7 @@ class _UpdateSoapIndexState extends State child: StepsWidget( index: _currentIndex, changeCurrentTab: changePageViewIndex, - height: 135,//MediaQuery.of(context).size.height * 0.17, + height: 100,//MediaQuery.of(context).size.height * 0.17, ), ), Container( From 3047b655cf28382bfea5e99961ceba3de165924b Mon Sep 17 00:00:00 2001 From: mosazaid Date: Tue, 13 Apr 2021 14:07:14 +0300 Subject: [PATCH 07/12] add Validation for customtextfield --- lib/config/localized_values.dart | 4 + .../referral/refer-patient-screen.dart | 31 +++ lib/util/translations_delegate_base.dart | 2 +- lib/widgets/shared/app-textfield-custom.dart | 179 +++++++++++------- 4 files changed, 143 insertions(+), 73 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 19c05230..20cb9ef7 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -843,6 +843,10 @@ const Map> localizedValues = { "en": "Step", "ar": "خطوة" }, + "fieldRequired": { + "en": "This field is required", + "ar": "هذه الخانة مطلوبه" + }, "applyOrRescheduleLeave": { "en": "Apply Or Reschedule Leave", "ar": "التقدم بطلب أو إعادة جدولة الإجازة" diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 4922f3a1..815ec93d 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -39,6 +39,11 @@ class _PatientMakeReferralScreenState extends State { DateTime appointmentDate; final _remarksController = TextEditingController(); + String branchError = null; + String hospitalError = null; + String clinicError = null; + String doctorError = null; + @override void initState() { super.initState(); @@ -148,6 +153,28 @@ class _PatientMakeReferralScreenState extends State { fontWeight: FontWeight.w700, color: HexColor("#359846"), onPressed: () { + setState(() { + if(_referTo == null){ + branchError = TranslationBase.of(context).fieldRequired; + }else { + branchError = null; + } + if(_selectedBranch == null){ + hospitalError = TranslationBase.of(context).fieldRequired; + }else { + hospitalError = null; + } + if(_selectedClinic == null){ + clinicError = TranslationBase.of(context).fieldRequired; + }else { + clinicError = null; + } + if(_selectedDoctor == null){ + doctorError = TranslationBase.of(context).fieldRequired; + }else { + doctorError = null; + } + }); if (appointmentDate == null || _selectedBranch == null || _selectedClinic == null || @@ -189,6 +216,7 @@ class _PatientMakeReferralScreenState extends State { dropDownText: _referTo != null ? _referTo['name'] : null, enabled: false, isDropDown: true, + validationError: branchError, onClick: referToList != null ? () { ListSelectDialog dialog = ListSelectDialog( @@ -241,6 +269,7 @@ class _PatientMakeReferralScreenState extends State { : null, enabled: false, isDropDown: true, + validationError: hospitalError, onClick: model.branchesList != null && model.branchesList.length > 0 && _referTo != null && @@ -288,6 +317,7 @@ class _PatientMakeReferralScreenState extends State { : null, enabled: false, isDropDown: true, + validationError: clinicError, onClick: _selectedBranch != null && model.clinicsList != null && model.clinicsList.length > 0 @@ -335,6 +365,7 @@ class _PatientMakeReferralScreenState extends State { _selectedDoctor != null ? _selectedDoctor['DoctorName'] : null, enabled: false, isDropDown: true, + validationError: doctorError, onClick: _selectedClinic != null && model.doctorsList != null && model.doctorsList.length > 0 diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 265c7280..0a0248a6 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -1216,7 +1216,7 @@ class TranslationBase { String get remove => localizedValues['remove'][locale.languageCode]; String get step => localizedValues['step'][locale.languageCode]; - + String get fieldRequired => localizedValues['fieldRequired'][locale.languageCode]; String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; String get changeOfSchedule => localizedValues['changeOfSchedule'][locale.languageCode]; diff --git a/lib/widgets/shared/app-textfield-custom.dart b/lib/widgets/shared/app-textfield-custom.dart index 67d9c921..9f671c66 100644 --- a/lib/widgets/shared/app-textfield-custom.dart +++ b/lib/widgets/shared/app-textfield-custom.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'app_texts_widget.dart'; @@ -19,6 +20,7 @@ class AppTextFieldCustom extends StatefulWidget { final int maxLines; final List inputFormatters; final Function(String) onChanged; + final String validationError; AppTextFieldCustom({ this.height = 0, @@ -36,6 +38,7 @@ class AppTextFieldCustom extends StatefulWidget { this.maxLines = 1, this.inputFormatters, this.onChanged, + this.validationError, }); @override @@ -45,83 +48,115 @@ class AppTextFieldCustom extends StatefulWidget { class _AppTextFieldCustomState extends State { @override Widget build(BuildContext context) { - return Container( - height: widget.height != 0 ? widget.height + 8 : null, - decoration: widget.hasBorder - ? containerBorderDecoration(Color(0Xffffffff), Color(0xFFEFEFEF)) - : null, - padding: EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0), - child: InkWell( - onTap: widget.onClick ?? null, - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: Container( - padding: widget.dropDownText == null ? EdgeInsets.symmetric(vertical: 0): EdgeInsets.symmetric(vertical: 8), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if ((widget.controller != null && - widget.controller.text != "") || - widget.dropDownText != null) - AppText( - widget.hintText, - fontFamily: 'Poppins', - fontSize: SizeConfig.textMultiplier * 1.4, - fontWeight: FontWeight.w700, - ), - widget.dropDownText == null - ? TextField( - textAlign: TextAlign.left, - decoration: textFieldSelectorDecoration( - widget.hintText, null, true), - style: TextStyle( - fontSize: SizeConfig.textMultiplier * 1.7, - fontFamily: 'Poppins', - color: Colors.grey.shade800, - ), - controller: widget.controller, - keyboardType: widget.inputType, - enabled: widget.enabled, - minLines: widget.minLines, - maxLines: widget.maxLines, - inputFormatters: widget.inputFormatters != null - ? widget.inputFormatters - : [], - onChanged: (value) { - if (widget.onChanged != null){ - widget.onChanged(value); - setState(() { - - }); - } - }, - ) - : AppText( - widget.dropDownText, + return Column( + children: [ + Container( + height: widget.height != 0 ? widget.height + 8 : null, + decoration: widget.hasBorder + ? containerBorderDecoration( + Color(0Xffffffff), + widget.validationError == null + ? Color(0xFFEFEFEF) + : Colors.red.shade700) + : null, + padding: + EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0), + child: InkWell( + onTap: widget.onClick ?? null, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Container( + padding: widget.dropDownText == null + ? EdgeInsets.symmetric(vertical: 0) + : EdgeInsets.symmetric(vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if ((widget.controller != null && + widget.controller.text != "") || + widget.dropDownText != null) + AppText( + widget.hintText, fontFamily: 'Poppins', - color: Colors.grey.shade800, - fontSize: SizeConfig.textMultiplier * 1.7, + fontSize: SizeConfig.textMultiplier * 1.4, + fontWeight: FontWeight.w700, ), - ], + widget.dropDownText == null + ? TextField( + textAlign: TextAlign.left, + decoration: textFieldSelectorDecoration( + widget.hintText, null, true), + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.7, + fontFamily: 'Poppins', + color: Colors.grey.shade800, + ), + controller: widget.controller, + keyboardType: widget.inputType, + enabled: widget.enabled, + minLines: widget.minLines, + maxLines: widget.maxLines, + inputFormatters: widget.inputFormatters != null + ? widget.inputFormatters + : [], + onChanged: (value) { + if (widget.onChanged != null) { + widget.onChanged(value); + setState(() {}); + } + }, + ) + : AppText( + widget.dropDownText, + fontFamily: 'Poppins', + color: Colors.grey.shade800, + fontSize: SizeConfig.textMultiplier * 1.7, + ), + ], + ), + ), ), - ), + widget.isDropDown + ? widget.suffixIcon != null + ? widget.suffixIcon + : Icon( + Icons.keyboard_arrow_down, + color: widget.dropDownColor != null + ? widget.dropDownColor + : Colors.black, + ) + : Container(), + ], ), - widget.isDropDown - ? widget.suffixIcon != null - ? widget.suffixIcon - : Icon( - Icons.keyboard_arrow_down, - color: widget.dropDownColor != null - ? widget.dropDownColor - : Colors.black, - ) - : Container(), - ], + ), ), - ), + if (widget.validationError != null) + Container( + margin: EdgeInsets.only(top: 8, right: 8, left: 8, bottom: 8), + child: Row( + children: [ + Icon( + DoctorApp.warning, + size: 20, + color: Colors.red.shade700, + ), + SizedBox( + width: 12, + ), + AppText( + widget.validationError, + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 1.7, + color: Colors.red.shade700, + fontWeight: FontWeight.w700, + ), + ], + ), + ), + ], ); } From 844bd9ba27f6d45a9c7a8d78af88c17dae66f636 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Tue, 13 Apr 2021 14:10:39 +0300 Subject: [PATCH 08/12] add lab & add radiology update --- .../profile/lab_result/labs_home_page.dart | 20 +- .../radiology/radiology_home_page.dart | 58 ++-- lib/screens/procedures/add_lab_orders.dart | 289 +++++++++--------- .../procedures/add_radiology_order.dart | 285 ++++++++--------- 4 files changed, 345 insertions(+), 307 deletions(-) diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 23f40f06..79920811 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -36,7 +36,8 @@ class LabsHomePage extends StatelessWidget { builder: (context, ProcedureViewModel model, widget) => AppScaffold( baseViewModel: model, isShowAppBar: true, - appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', patientType), + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString() ?? '0', patientType), body: SingleChildScrollView( physics: BouncingScrollPhysics(), child: FractionallySizedBox( @@ -66,11 +67,24 @@ class LabsHomePage extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7' && patient.patientStatusType == 43) + if (patientType != null && + patientType == '7' && + patient.patientStatusType == 43) InkWell( onTap: () { - addSelectedLabOrder(context, model, patient); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddSelectedLabOrder( + patient: patient, + model: model, + )), + ); }, + + // () { + // addSelectedLabOrder(context, model, patient); + // }, child: Container( width: double.maxFinite, height: 140, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 5cb14b8a..9adb8ae8 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -33,7 +33,8 @@ class RadiologyHomePage extends StatelessWidget { builder: (_, model, widget) => AppScaffold( isShowAppBar: true, // appBarTitle: TranslationBase.of(context).radiology, - appBar: PatientProfileHeaderNewDesignAppBar(patient, patient.patientType.toString() ?? '0', arrivalType), + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patient.patientType.toString() ?? '0', arrivalType), baseViewModel: model, body: FractionallySizedBox( widthFactor: 1.0, @@ -62,11 +63,23 @@ class RadiologyHomePage extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7' && patient.patientStatusType == 43) + if (patientType != null && + patientType == '7' && + patient.patientStatusType == 43) InkWell( onTap: () { - addSelectedRadiologyOrder(context, model, patient); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddSelectedRadiologyOrder( + patient: patient, + model: model, + )), + ); }, + // () { + // addSelectedRadiologyOrder(context, model, patient); + // }, child: Container( width: double.maxFinite, height: 140, @@ -108,25 +121,26 @@ class RadiologyHomePage extends StatelessWidget { ), ), ), - ...List.generate(model.radiologyList.length, (index) => InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: RadiologyDetailsPage( - finalRadiology: model.radiologyList[index], - patient: patient, - ), - ), - ), - child: DoctorCard( - doctorName: model.radiologyList[index].doctorName, - profileUrl: model.radiologyList[index].doctorImageURL, - invoiceNO: '${model.radiologyList[index].invoiceNo}', - branch: '${model.radiologyList[index].projectName}', - appointmentDate: model.radiologyList[index].orderDate, - ), - )), - + ...List.generate( + model.radiologyList.length, + (index) => InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: RadiologyDetailsPage( + finalRadiology: model.radiologyList[index], + patient: patient, + ), + ), + ), + child: DoctorCard( + doctorName: model.radiologyList[index].doctorName, + profileUrl: model.radiologyList[index].doctorImageURL, + invoiceNO: '${model.radiologyList[index].invoiceNo}', + branch: '${model.radiologyList[index].projectName}', + appointmentDate: model.radiologyList[index].orderDate, + ), + )), ], ), ), diff --git a/lib/screens/procedures/add_lab_orders.dart b/lib/screens/procedures/add_lab_orders.dart index d255308f..252dce0b 100644 --- a/lib/screens/procedures/add_lab_orders.dart +++ b/lib/screens/procedures/add_lab_orders.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -142,154 +143,158 @@ class _AddSelectedLabOrderState extends State { onModelReady: (model) => model.getProcedureCategory( categoryName: "Laboratory", categoryID: "02"), builder: (BuildContext context, ProcedureViewModel model, Widget child) => - NetworkBaseView( - baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.20, - child: Padding( - padding: EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - 'New Lab Order', - fontWeight: FontWeight.w700, - fontSize: 20, - ), - SizedBox( - width: MediaQuery.of(context).size.width * 0.48, - ), - InkWell( - child: Icon( - Icons.close, - size: 28.0, + AppScaffold( + isShowAppBar: false, + body: NetworkBaseView( + baseViewModel: model, + child: DraggableScrollableSheet( + minChildSize: 0.90, + initialChildSize: 0.95, + maxChildSize: 1.0, + builder: + (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + 'New Lab Order', + fontWeight: FontWeight.w700, + fontSize: 20, ), - onTap: () { - Navigator.pop(context); - }, - ), - ], - ), - SizedBox( - height: 10.0, - ), - if (widget.model.categoriesList.length != 0) - NetworkBaseView( - baseViewModel: model, - child: EntityListCheckboxSearchWidget( - model: widget.model, - masterList: - widget.model.categoriesList[0].entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); + SizedBox( + width: MediaQuery.of(context).size.width * 0.48, + ), + InkWell( + child: Icon( + Icons.close, + size: 28.0, + ), + onTap: () { + Navigator.pop(context); }, - isEntityListSelected: (master) => - isEntityListSelected(master), - )), - SizedBox( - height: 15.0, - ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - // Container( - // child: Row( - // children: [ - // AppText( - // TranslationBase.of(context).orderType), - // Radio( - // activeColor: Color(0xFFB9382C), - // value: 1, - // groupValue: selectedType, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text('routine'), - // Radio( - // activeColor: Color(0xFFB9382C), - // groupValue: selectedType, - // value: 0, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text(TranslationBase.of(context).urgent), - // ], - // ), - // ), - // SizedBox( - // height: 15.0, - // ), - // TextFields( - // hintText: TranslationBase.of(context).remarks, - // controller: remarksController, - // minLines: 3, - // maxLines: 5, - // ), - SizedBox( - height: 100.0, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: - "Add Lab Order", //TranslationBase.of(context) - fontWeight: FontWeight.w700, - //.addSelectedProcedures, - color: Color(0xff359846), - onPressed: () { - //print(entityList.toString()); - onPressed: - if (entityList.isEmpty == true) { - DrAppToastMsg.showErrorToast( - "Fill the mandatory procedure details"); - return; - } + ), + ], + ), + SizedBox( + height: 10.0, + ), + if (widget.model.categoriesList.length != 0) + NetworkBaseView( + baseViewModel: model, + child: EntityListCheckboxSearchWidget( + model: widget.model, + masterList: + widget.model.categoriesList[0].entityList, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + addSelectedHistories: () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: (master) => + isEntityListSelected(master), + )), + SizedBox( + height: 15.0, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // Container( + // child: Row( + // children: [ + // AppText( + // TranslationBase.of(context).orderType), + // Radio( + // activeColor: Color(0xFFB9382C), + // value: 1, + // groupValue: selectedType, + // onChanged: (value) { + // setSelectedType(value); + // }, + // ), + // Text('routine'), + // Radio( + // activeColor: Color(0xFFB9382C), + // groupValue: selectedType, + // value: 0, + // onChanged: (value) { + // setSelectedType(value); + // }, + // ), + // Text(TranslationBase.of(context).urgent), + // ], + // ), + // ), + // SizedBox( + // height: 15.0, + // ), + // TextFields( + // hintText: TranslationBase.of(context).remarks, + // controller: remarksController, + // minLines: 3, + // maxLines: 5, + // ), + SizedBox( + height: 100.0, + ), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: + "Add Lab Order", //TranslationBase.of(context) + fontWeight: FontWeight.w700, + //.addSelectedProcedures, + color: Color(0xff359846), + onPressed: () { + //print(entityList.toString()); + onPressed: + if (entityList.isEmpty == true) { + DrAppToastMsg.showErrorToast( + "Fill the mandatory procedure details"); + return; + } - Navigator.pop(context); - postProcedure( - orderType: selectedType.toString(), - entityList: entityList, - patient: patient, - model: widget.model, - remarks: remarksController.text); - }, - ), - ], + Navigator.pop(context); + postProcedure( + orderType: selectedType.toString(), + entityList: entityList, + patient: patient, + model: widget.model, + remarks: remarksController.text); + }, + ), + ], + ), ), - ), - ], - ) - ], + ], + ) + ], + ), ), ), - ), - ); - }), + ); + }), + ), ), ); } diff --git a/lib/screens/procedures/add_radiology_order.dart b/lib/screens/procedures/add_radiology_order.dart index 2f74060e..aa897569 100644 --- a/lib/screens/procedures/add_radiology_order.dart +++ b/lib/screens/procedures/add_radiology_order.dart @@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -142,152 +143,156 @@ class _AddSelectedRadiologyOrderState extends State { onModelReady: (model) => model.getProcedureCategory( categoryName: "Radiology", categoryID: "03"), builder: (BuildContext context, ProcedureViewModel model, Widget child) => - NetworkBaseView( - baseViewModel: model, - child: DraggableScrollableSheet( - minChildSize: 0.90, - initialChildSize: 0.95, - maxChildSize: 1.0, - builder: (BuildContext context, ScrollController scrollController) { - return SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 1.20, - child: Padding( - padding: EdgeInsets.all(12.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - 'New Radiology Order', - fontWeight: FontWeight.w700, - fontSize: 20, - ), - SizedBox( - width: MediaQuery.of(context).size.width * 0.48, - ), - InkWell( - child: Icon( - Icons.close, - size: 28.0, + AppScaffold( + isShowAppBar: false, + body: NetworkBaseView( + baseViewModel: model, + child: DraggableScrollableSheet( + minChildSize: 0.90, + initialChildSize: 0.95, + maxChildSize: 1.0, + builder: + (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 1.0, + child: Padding( + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + AppText( + 'New Radiology Order', + fontWeight: FontWeight.w700, + fontSize: 20, ), - onTap: () { - Navigator.pop(context); - }, - ), - ], - ), - SizedBox( - height: 10.0, - ), - if (widget.model.categoriesList.length != 0) - NetworkBaseView( - baseViewModel: model, - child: EntityListCheckboxSearchWidget( - model: widget.model, - masterList: - widget.model.categoriesList[0].entityList, - removeHistory: (item) { - setState(() { - entityList.remove(item); - }); - }, - addHistory: (history) { - setState(() { - entityList.add(history); - }); - }, - addSelectedHistories: () { - //TODO build your fun herr - // widget.addSelectedHistories(); + SizedBox( + width: MediaQuery.of(context).size.width * 0.48, + ), + InkWell( + child: Icon( + Icons.close, + size: 28.0, + ), + onTap: () { + Navigator.pop(context); }, - isEntityListSelected: (master) => - isEntityListSelected(master), - )), - SizedBox( - height: 15.0, - ), - Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - // Container( - // child: Row( - // children: [ - // AppText( - // TranslationBase.of(context).orderType), - // Radio( - // activeColor: Color(0xFFB9382C), - // value: 1, - // groupValue: selectedType, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text('routine'), - // Radio( - // activeColor: Color(0xFFB9382C), - // groupValue: selectedType, - // value: 0, - // onChanged: (value) { - // setSelectedType(value); - // }, - // ), - // Text(TranslationBase.of(context).urgent), - // ], - // ), - // ), - // SizedBox( - // height: 15.0, - // ), - // TextFields( - // hintText: TranslationBase.of(context).remarks, - // controller: remarksController, - // minLines: 3, - // maxLines: 5, - // ), - SizedBox( - height: 100.0, - ), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: 'Add Radiology Order', - color: Color(0xff359846), - fontWeight: FontWeight.w700, - onPressed: () { - //print(entityList.toString()); - onPressed: - if (entityList.isEmpty == true) { - DrAppToastMsg.showErrorToast( - "Fill the mandatory procedure details"); - return; - } + ), + ], + ), + SizedBox( + height: 10.0, + ), + if (widget.model.categoriesList.length != 0) + NetworkBaseView( + baseViewModel: model, + child: EntityListCheckboxSearchWidget( + model: widget.model, + masterList: + widget.model.categoriesList[0].entityList, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + addSelectedHistories: () { + //TODO build your fun herr + // widget.addSelectedHistories(); + }, + isEntityListSelected: (master) => + isEntityListSelected(master), + )), + SizedBox( + height: 15.0, + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // Container( + // child: Row( + // children: [ + // AppText( + // TranslationBase.of(context).orderType), + // Radio( + // activeColor: Color(0xFFB9382C), + // value: 1, + // groupValue: selectedType, + // onChanged: (value) { + // setSelectedType(value); + // }, + // ), + // Text('routine'), + // Radio( + // activeColor: Color(0xFFB9382C), + // groupValue: selectedType, + // value: 0, + // onChanged: (value) { + // setSelectedType(value); + // }, + // ), + // Text(TranslationBase.of(context).urgent), + // ], + // ), + // ), + // SizedBox( + // height: 15.0, + // ), + // TextFields( + // hintText: TranslationBase.of(context).remarks, + // controller: remarksController, + // minLines: 3, + // maxLines: 5, + // ), + SizedBox( + height: 100.0, + ), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: 'Add Radiology Order', + color: Color(0xff359846), + fontWeight: FontWeight.w700, + onPressed: () { + //print(entityList.toString()); + onPressed: + if (entityList.isEmpty == true) { + DrAppToastMsg.showErrorToast( + "Fill the mandatory procedure details"); + return; + } - Navigator.pop(context); - postProcedure( - orderType: selectedType.toString(), - entityList: entityList, - patient: patient, - model: widget.model, - remarks: remarksController.text); - }, - ), - ], + Navigator.pop(context); + postProcedure( + orderType: selectedType.toString(), + entityList: entityList, + patient: patient, + model: widget.model, + remarks: remarksController.text); + }, + ), + ], + ), ), - ), - ], - ) - ], + ], + ) + ], + ), ), ), - ), - ); - }), + ); + }), + ), ), ); } From 8055fa17eb023027296a8a02dc659ca700cf06da Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 13 Apr 2021 14:39:48 +0300 Subject: [PATCH 09/12] add the branch in all doctors card and add no data image --- assets/images/no-data.png | Bin 0 -> 3565 bytes .../viewModel/medical_file_view_model.dart | 2 +- .../medical-file/medical_file_page.dart | 175 --------------- .../lab_result/laboratory_result_page.dart | 2 + .../profile/lab_result/labs_home_page.dart | 1 + .../radiology/radiology_details_page.dart | 3 + .../radiology/radiology_home_page.dart | 1 + .../prescription/prescription_items_page.dart | 1 + lib/screens/procedures/procedure_screen.dart | 208 +++++++++--------- ...ent-profile-header-new-design-app-bar.dart | 4 +- ..._header_with_appointment_card_app_bar.dart | 8 +- lib/widgets/shared/doctor_card.dart | 135 ++++++------ lib/widgets/shared/network_base_view.dart | 10 +- 13 files changed, 197 insertions(+), 353 deletions(-) create mode 100644 assets/images/no-data.png diff --git a/assets/images/no-data.png b/assets/images/no-data.png new file mode 100644 index 0000000000000000000000000000000000000000..4fd47e0fa675a44eb2e56d389f54cd90ee75b9a5 GIT binary patch literal 3565 zcmbtX*FPJK*N;#{%&Mq8TRYU=T6;94Mo_W$EJ})^_KH%ws2audpjH&IDQa(uA_=u> z*H+Z)x%vGA@5T3=@7WjU;(Sg#TwjZdf|&vU08r^@s~g_xSGVvWC%u($ev!#rMfB28 zOBGNx%KGcpkaaZEae~1Bg14L;Kosi=Ao(xl7Rk@W zNM~yi!4X{VtQ*bGsh~o^P|mF7#+{-)rzxm=5uT?@^~^oZT}}7tvt3zGq0i*UpXU+{ z$!GHm^9vUEi}q90+4sxApV@)V>v@5AXJ?cX>NK-|e!6Q*V~!0mO<8mEsHJYlZLZ0< z0P+sI1VCWfVfR}(6|yL%ft%U3C?K*8Z&nc0G=dNg!{w3_It^>!wcQyc*cp)DVs~p2 zN$?N;nM>XN%g?dgq1?&I4hfV#jr+~86g5Uw=a?eJ%NtS58~Qr0!eqTuUID6ct@*r( zQasPDn;`eT4h`KuuifliKQhw&sX!@m0M3ch6>GcLe#7-rAH1j>oMwpoOgRE zC^Dw;)2R4I4#j%}>d!}q%TOEEoIjnzK z_vPnl;s=~HCK1Zei|=xBX&>EF`!dyKLa`&Sd^_h$}0%pV3Ct`(vcE&k3Qs$X&q^d1$1SvW)xBjvC=jGa)P zeRJv9%6$_+z|AyCWu9YLprLCrf0RUf1?aYX<=OSfY%#$nTI6e1T}Sdajw)%ypi0 zA=iGNPcoN92X2xc=9Obv`P578E}GocWBI4InGZ8+t6+do>h*3$PAsR>7ARFnFzr$@ z&a+u-3~v)=Z(}7$*MKqZc4XdXwcCza(oF;kqk)!ZiQK`Z#Wuc>6s=L0MHLP-u!b{! ziL-@S{XOAw{sg0!i^={gg*i@Uh}G;Yzo8bg>{nJJ47-v=t}i12-e z?i2peKIMN!wj9qmIIl0h!qJQN*Rc)0*P({~?@02hfpAu50BW_ka<=5929)6?j zg)&Ml)fn7-@+;vBO`OLg-;lfY9mbar#;iMN^v6$ zwaV+fJLdNN-}fvwj_x^1)0e*|m5bVIe@*N;-zq=`Iu-acc63v8hGT)V6a&H3--qA3 z*6>A+bbY$&(WX_wQ+vzuuW0_s3{_aqhlNH9U!@ z%m04ho=QdKRHx?XLi~Z#BRCjoqPA#nLJDlo#moCd@#Pq^WX*QQfvdv54eO`(Wmz^& zm#o^F2j&&Mt+SU)gFMI`JhE#`q3N)dupfXsI_|Is=`;p%u{>$oponx~Ul|f6Hl^cY zU$?k`#X-rTIN{w)?B!`(!qiD%F^IC`{L6r@CKs#&-F7%Sa_p2*Q-j{e6j>+h{bp9~m(r>5Q&6cuHhh&bLzm-2|bK_B=1%#(aXx8&39aldh%%ukPN z$I2fQatK4pXf9XTQSZ=Y48(RgO)lL1Y;up@F*;eK7xuFDl^Y4iUs0io`e%JnkA&^l z-(Y{fFQ=#O&qE@<<=&q-8r!VgoOvD;Hs-K9-uk8(HYAzIbe@Z}PFGZJ-HLea^_Dj3 z(}P@Zgp8KBs%8>QtnGZZR6ZcG0zLBBzQ1WKl9?W zIwg|3m3VD5v;O3seL&k4M|d_N*lB9b$q0_65)>3iT9?dI;upcU8VibJ)~?_B{gZ3 zP8f1U_S~73wI~&c50@gdz<9ingXzf%mj?M4YF|SA>%(zCv2s&yQj!0n3q*F6uUnE<2Yv}W-XW_L@rb{^sZxbD(YWa z1=EXSn(DVbo*_k5vff7_$BqJ#x%)gCvVA2>v!vL)8cHGAbfh;Mh48d*m%kX+=M4EF z(X7e0Byy%+Uy5f}US3{zMl>t7H!0|f#kOxJp(;u8M6^tA}-$UZf?HJ3H9GLJ{80a zOb*tIBgeZj88Jdp&EV#ZQg;FlXQiyMRruq_^TUhaUl5`5;H2HA_c|}|?UtnVg@xf) zp(-;oGZP66LYtl8#9M961UjTTQC~P(O0bh8>?-Xs*jTF>z}}uVAnsjJPI>v@P&W9- z!UCwCH2hNneXKI7;a&~ z;%D+#q<+qmKKfbwp01a=l*;lat1?OTHG1YhNY)S zfRIbr>sq~w`mi#>x+#NcGY$yF2BBs7_ae4A#ZJnxge{Sk0xY;HvU9p(C8DA+E^-Bm zr3M;RCxEMP+|&sz1bOnOZG!)gA}=QFxkjcc-xVq*Z(y3(R{^CxjpqnC+S{z9mps_N znVXjuSct(#%l z_h3WQpe%)i=&yEMPd-Ho{%4PAYjE=mq6hq`5WQei@}NE3$;Fq!Ri3n81XWNlT<7N5 z1D^EmEV25IU&HxKC!!CtR5X4J0rsD;11^!<$&5o*-mbTss?mS;>?(^NJZi@zJ*OK2 zBV*iOM;IGBxD~S_2ne9ro4LsSJk(A5Ey$VXpULDL38c4;g{4A0<)LT4v zi0j+U;LE)&2@T-^o zl^9bNT`+NcPfIwtrZet-l`~*d-rEk^ee{K5^XT?Ei)D { ), ); - // return Padding( - // padding: EdgeInsets.symmetric( - // horizontal: 12.0, vertical: 8.0), - // child: InkWell( - // child: Container( - // width: double.infinity, - // margin: EdgeInsets.only( - // top: 10, left: 10, right: 10), - // padding: EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // color: Colors.white, - // borderRadius: BorderRadius.all( - // Radius.circular(10.0), - // ), - // border: Border.all( - // color: Colors.grey[200], width: 0.5), - // ), - // child: Column( - // children: [ - // Row( - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Row( - // children: [ - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .doctorName, - // fontWeight: FontWeight.w700, - // fontSize: 17.0, - // fontFamily: 'Poppins', - // ) - // ], - // ), - // Row( - // children: [ - // AppText( - // Helpers.convertStringToDate(model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .date) - // .day - // .toString() + - // "/", - // ), - // AppText( - // Helpers.convertStringToDate(model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .date) - // .month - // .toString() + - // "/", - // ), - // AppText( - // Helpers.convertStringToDate( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .date) - // .year - // .toString(), - // ), - // ], - // ) - // ], - // ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.all(8.0), - // child: Column( - // children: [ - // ClipRRect( - // borderRadius: - // BorderRadius.all( - // Radius.circular(30)), - // child: Image.network( - // 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg', - // fit: BoxFit.cover, - // width: 60, - // height: 70, - // ), - // ), - // ], - // ), - // ), - // Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .clinic + - // ": ", - // ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .clinicName, - // fontWeight: FontWeight.w600, - // ), - // ], - // ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment - // .spaceBetween, - // children: [ - // AppText( - // TranslationBase.of(context) - // .branch + - // ": ", - // ), - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[index] - // .projectName, - // fontWeight: FontWeight.w600, - // ), - // ], - // ), - // ], - // ), - // ], - // ), - // Row( - // mainAxisAlignment: - // MainAxisAlignment.end, - // children: [ - // Column( - // children: [ - // Icon( - // Icons.remove_red_eye, - // size: 30.0, - // ) - // ], - // ) - // ], - // ), - // ], - // ), - // ), - // onTap: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // MedicalFileDetails( - // age: patient.age, - // firstName: patient.firstName, - // lastName: patient.lastName, - // gender: patient.genderDescription, - // encounterNumber: index, - // pp: patient.patientId, - // patient: patient, - // )), - // ); - // }, - // ), - // ); }) : Column( children: [ diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart index a61477e7..0d8b1749 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_page.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_page.dart @@ -43,6 +43,8 @@ class _LaboratoryResultPageState extends State { orderNo: widget.patientLabOrders.orderNo, appointmentDate:widget.patientLabOrders.orderDate, doctorName: widget.patientLabOrders.doctorName, + branch: widget.patientLabOrders.projectName, + clinic: widget.patientLabOrders.clinicDescription, profileUrl: widget.patientLabOrders.doctorImageURL, invoiceNO: widget.patientLabOrders.invoiceNo, ), diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 23f40f06..b1516ba8 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -136,6 +136,7 @@ class LabsHomePage extends StatelessWidget { invoiceNO: ' ${labOrder.invoiceNo}', profileUrl: labOrder.doctorImageURL, branch: labOrder.projectName, + clinic: labOrder.clinicDescription, appointmentDate: labOrder.orderDate, orderNo: labOrder.orderNo, ); diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index c5921438..235aacf6 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -43,6 +43,8 @@ class RadiologyDetailsPage extends StatelessWidget { arrivalType: arrivalType ?? "0", appointmentDate: finalRadiology.orderDate, doctorName: finalRadiology.doctorName, + clinic: finalRadiology.clinicDescription, + branch: finalRadiology.projectName, profileUrl: finalRadiology.doctorImageURL, invoiceNO: finalRadiology.invoiceNo.toString(), ), @@ -54,6 +56,7 @@ class RadiologyDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( + width: double.maxFinite, margin: EdgeInsets.all(8), decoration: BoxDecoration( color: Colors.white, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 5cb14b8a..d688710f 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -123,6 +123,7 @@ class RadiologyHomePage extends StatelessWidget { profileUrl: model.radiologyList[index].doctorImageURL, invoiceNO: '${model.radiologyList[index].invoiceNo}', branch: '${model.radiologyList[index].projectName}', + clinic: model.radiologyList[index].clinicDescription, appointmentDate: model.radiologyList[index].orderDate, ), )), diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index f2bbe274..a92f5365 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -36,6 +36,7 @@ class PrescriptionItemsPage extends StatelessWidget { patientType: patientType??"0", arrivalType: arrivalType??"0", clinic: prescriptions.clinicDescription, + branch: prescriptions.name, isPrescriptions: true, appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), doctorName: prescriptions.doctorName, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 9e44df17..646665b7 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -29,121 +29,119 @@ class ProcedureScreen extends StatelessWidget { builder: (BuildContext context, ProcedureViewModel model, Widget child) => AppScaffold( isShowAppBar: true, + baseViewModel: model, appBar: PatientProfileHeaderNewDesignAppBar( patient, arrivalType ?? '0', patientType), - body: NetworkBaseView( - baseViewModel: model, - child: SingleChildScrollView( - child: Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 12, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - 'Order Test or', - style: "caption2", - color: Colors.black, - fontSize: 13, - ), - Texts( - 'Procedure', - bold: true, - fontSize: 22, - ), - ], - ), + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + 'Order Test or', + style: "caption2", + color: Colors.black, + fontSize: 13, + ), + Texts( + 'Procedure', + bold: true, + fontSize: 22, + ), + ], ), - if (patientType != null && patientType == '7' && patient.patientStatusType == 43) - InkWell( - onTap: () { - addSelectedProcedure(context, model, patient); - }, - child: Container( - width: double.maxFinite, - height: 140, - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.grey[300], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Container( - height: 90, - child: Column( - children: [ - Container( - height: 40, - width: 40, - decoration: BoxDecoration( - color: Colors.grey[600], - borderRadius: BorderRadius.circular(10), - ), - child: Center( - child: Icon( - Icons.add, - color: Colors.white, - ), - ), + ), + if (patientType != null && patientType == '7' && patient.patientStatusType == 43) + InkWell( + onTap: () { + addSelectedProcedure(context, model, patient); + }, + child: Container( + width: double.maxFinite, + height: 140, + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.grey[300], + borderRadius: BorderRadius.circular(10), + ), + child: Center( + child: Container( + height: 90, + child: Column( + children: [ + Container( + height: 40, + width: 40, + decoration: BoxDecoration( + color: Colors.grey[600], + borderRadius: BorderRadius.circular(10), ), - SizedBox( - height: 10, + child: Center( + child: Icon( + Icons.add, + color: Colors.white, + ), ), - Texts( - 'Add More Procedure', - color: Colors.grey[600], - fontWeight: FontWeight.w600, - ) - ], - ), + ), + SizedBox( + height: 10, + ), + Texts( + 'Add More Procedure', + color: Colors.grey[600], + fontWeight: FontWeight.w600, + ) + ], ), ), ), ), - if (model.procedureList.isNotEmpty) - ...List.generate( - model.procedureList[0].rowcount, - (index) => ProcedureCard( - categoryID: - model.procedureList[0].entityList[index].categoryID, - entityList: model.procedureList[0].entityList[index], - onTap: () { - if (model.procedureList[0].entityList[index].categoryID == - 2 || - model.procedureList[0].entityList[index].categoryID == 4) - updateProcedureForm(context, - model: model, - patient: patient, - remarks: model - .procedureList[0].entityList[index].remarks, - orderType: model.procedureList[0] - .entityList[index].orderType - .toString(), - orderNo: model - .procedureList[0].entityList[index].orderNo, - procedureName: model.procedureList[0] - .entityList[index].procedureName, - categoreId: model.procedureList[0] - .entityList[index].categoryID - .toString(), - procedureId: model.procedureList[0] - .entityList[index].procedureId, - limetNo: model.procedureList[0] - .entityList[index].lineItemNo); - // } else - // helpers.showErrorToast( - // 'You Cant Update This Procedure'); - }, - ), + ), + if (model.procedureList.isNotEmpty) + ...List.generate( + model.procedureList[0].rowcount, + (index) => ProcedureCard( + categoryID: + model.procedureList[0].entityList[index].categoryID, + entityList: model.procedureList[0].entityList[index], + onTap: () { + if (model.procedureList[0].entityList[index].categoryID == + 2 || + model.procedureList[0].entityList[index].categoryID == 4) + updateProcedureForm(context, + model: model, + patient: patient, + remarks: model + .procedureList[0].entityList[index].remarks, + orderType: model.procedureList[0] + .entityList[index].orderType + .toString(), + orderNo: model + .procedureList[0].entityList[index].orderNo, + procedureName: model.procedureList[0] + .entityList[index].procedureName, + categoreId: model.procedureList[0] + .entityList[index].categoryID + .toString(), + procedureId: model.procedureList[0] + .entityList[index].procedureId, + limetNo: model.procedureList[0] + .entityList[index].lineItemNo); + // } else + // helpers.showErrorToast( + // 'You Cant Update This Procedure'); + }, ), - ], - ), + ), + ], ), ), ), diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index bfe8fcad..0b80c788 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -171,7 +171,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget Container( child: AppText( convertDateFormat2( - patient.appointmentDate.toString() ?? ''), + patient.appointmentDate ?? ''), fontSize: 1.5 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, ), @@ -281,7 +281,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget date.day.toString().padLeft(2, '0'); } - return newDate.toString(); + return newDate??''; } isToday(date) { diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index ddb52e84..3031b0d1 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -380,7 +380,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre fontWeight: FontWeight.w600, fontSize: 12, ), - if (orderNo != null && !isPrescriptions) + if (orderNo != null ) Row( children: [ Texts( @@ -393,7 +393,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if (invoiceNO != null && !isPrescriptions) + if (invoiceNO != null ) Row( children: [ Texts( @@ -407,7 +407,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if(isPrescriptions && branch!=null) + if( branch!=null) Row( children: [ Texts( @@ -421,7 +421,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if(isPrescriptions) + if(clinic!=null) Row( children: [ Texts( diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 9ba055fc..df5cbe33 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -82,7 +82,7 @@ class DoctorCard extends StatelessWidget { ], ), Row( - crossAxisAlignment: CrossAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( child: LargeAvatar( @@ -93,74 +93,81 @@ class DoctorCard extends StatelessWidget { height: 55, ), Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (orderNo != null && !isPrescriptions) - Row( - children: [ - Texts( - 'order No:', - color: Colors.grey[500], - fontSize: 14, - ), - Texts( - orderNo ?? '', - fontSize: 14, - ) - ], - ), - if (invoiceNO != null && !isPrescriptions) - Row( + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( - 'Invoice:', - fontSize: 14, - color: Colors.grey[500], + if (orderNo != null && !isPrescriptions) + Row( + children: [ + Texts( + 'order No:', + color: Colors.grey[500], + fontSize: 14, + ), + Texts( + orderNo ?? '', + fontSize: 14, + ) + ], + ), + if (invoiceNO != null && !isPrescriptions) + Row( + children: [ + Texts( + 'Invoice:', + fontSize: 14, + color: Colors.grey[500], + ), + Texts( + invoiceNO, + fontSize: 14, + ) + ], + ), + if(clinic!=null) + Row( + children: [ + Texts( + 'Clinic: ', + color: Colors.grey[500], + fontSize: 14, + ), + Texts( + clinic, + fontSize: 14, + ) + ], ), - Texts( - invoiceNO, - fontSize: 14, + if(branch!=null) + Row( + children: [ + Texts( + 'Branch: ', + fontSize: 14, + color: Colors.grey[500], + ), + Texts( + branch, + fontSize: 14, + ) + ], ) - ], - ), - if(isPrescriptions) - Row( - children: [ - Texts( - 'Clinic: ', - color: Colors.grey[500], - fontSize: 14, - ), - Texts( - clinic, - fontSize: 14, - ) - ], - ), - if(branch!=null) - Row( - children: [ - Texts( - 'Branch: ', - fontSize: 14, - color: Colors.grey[500], - ), - Texts( - branch, - fontSize: 14, - ) - ], - ) - ]), + ]), + ), + ), + Icon( + EvaIcons.eye, + ) + ], ), ), - Icon( - EvaIcons.eye, - ) + ], ), ], diff --git a/lib/widgets/shared/network_base_view.dart b/lib/widgets/shared/network_base_view.dart index 139b85e8..adba46cd 100644 --- a/lib/widgets/shared/network_base_view.dart +++ b/lib/widgets/shared/network_base_view.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -32,8 +33,13 @@ class NetworkBaseView extends StatelessWidget { break; case ViewState.Error: return Center( - child: DrAppEmbeddedError( - error: baseViewModel.error, + child: Column( + children: [ + SizedBox(height: 100,), + Image.asset('assets/images/no-data.png',height: 250), + Texts(baseViewModel.error??'') + + ], ), ); break; From e9d04527a67b3c369e869ed9d09e622adbd0d20e Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 14:47:07 +0300 Subject: [PATCH 10/12] add stepper in all soap steps --- .../profile/soap_update/SOAP_step_header.dart | 45 +++ .../objective/update_objective_page.dart | 7 +- .../subjective/update_subjective_page.dart | 14 +- .../soap_update/update_assessment_page.dart | 13 +- .../profile/soap_update/update_plan_page.dart | 336 +++++++++--------- .../soap_update/update_soap_index.dart | 37 +- 6 files changed, 244 insertions(+), 208 deletions(-) create mode 100644 lib/widgets/patients/profile/soap_update/SOAP_step_header.dart diff --git a/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart b/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart new file mode 100644 index 00000000..dcd0daa1 --- /dev/null +++ b/lib/widgets/patients/profile/soap_update/SOAP_step_header.dart @@ -0,0 +1,45 @@ +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/patients/profile/soap_update/steps_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +class SOAPStepHeader extends StatelessWidget { + const SOAPStepHeader({ + Key key, + this.currentIndex, this.changePageViewIndex, + }) : super(key: key); + + final int currentIndex; + final Function changePageViewIndex; + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).createNew, + fontSize: 3 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w500, + ), + AppText(TranslationBase.of(context).episode, + fontSize: 3.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: StepsWidget( + index: currentIndex, + changeCurrentTab: changePageViewIndex, + height: 100,//MediaQuery.of(context).size.height * 0.17, + ), + ), + SizedBox( + height: 30, + ), + ], + ); + } +} diff --git a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart index e8c3b831..ce0f6064 100644 --- a/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/objective/update_objective_page.dart @@ -26,13 +26,14 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; +import '../SOAP_step_header.dart'; import 'examination-item-card.dart'; import 'objective-add-examination-page.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; final Function changeLoadingState; - + final int currentIndex; final List mySelectedExamination; final PatiantInformtion patientInfo; @@ -41,7 +42,7 @@ class UpdateObjectivePage extends StatefulWidget { this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, - this.changeLoadingState}); + this.changeLoadingState, this.currentIndex}); @override _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); @@ -108,6 +109,8 @@ class _UpdateObjectivePageState extends State { body: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + Expanded( child: SingleChildScrollView( physics: ScrollPhysics(), diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 2d475624..68e02e2e 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -1,5 +1,6 @@ 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'; @@ -21,10 +22,13 @@ import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjecti import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/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'; class UpdateSubjectivePage extends StatefulWidget { final Function changePageViewIndex; @@ -32,13 +36,14 @@ class UpdateSubjectivePage extends StatefulWidget { final List myAllergiesList; final List myHistoryList; final PatiantInformtion patientInfo; + final int currentIndex; UpdateSubjectivePage( {Key key, this.changePageViewIndex, this.myAllergiesList, this.myHistoryList, - this.patientInfo, this.changeLoadingState}); + this.patientInfo, this.changeLoadingState, this.currentIndex}); @override _UpdateSubjectivePageState createState() => _UpdateSubjectivePageState(); @@ -231,10 +236,10 @@ class _UpdateSubjectivePageState extends State { widthFactor: 0.9, child: Column( mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 30, - ), + + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), ExpandableSOAPWidget( headerTitle: TranslationBase.of(context) .chiefComplaints @@ -535,3 +540,4 @@ class _UpdateSubjectivePageState extends State { + diff --git a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart index 0cf6303d..475596d4 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -14,6 +14,7 @@ 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/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.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'; @@ -28,6 +29,7 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; +import 'SOAP_step_header.dart'; import 'custom_validation_error.dart'; class UpdateAssessmentPage extends StatefulWidget { @@ -35,13 +37,13 @@ class UpdateAssessmentPage extends StatefulWidget { List mySelectedAssessmentList; final PatiantInformtion patientInfo; final Function changeLoadingState; - + final int currentIndex; UpdateAssessmentPage( {Key key, this.changePageViewIndex, this.mySelectedAssessmentList, this.patientInfo, - this.changeLoadingState}); + this.changeLoadingState, this.currentIndex}); @override _UpdateAssessmentPageState createState() => _UpdateAssessmentPageState(); @@ -122,9 +124,7 @@ class _UpdateAssessmentPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - SizedBox( - height: 30, - ), + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), Container( width: double.infinity, margin: EdgeInsets.only(top: 10, left: 10, right: 10), @@ -689,7 +689,8 @@ class _AddAssessmentDetailsState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( + + SizedBox( height: 16, ), Row( diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index 5c69a8ae..fecb6a14 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -1,6 +1,4 @@ -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/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; @@ -13,31 +11,33 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_subjective_page.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/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; -import 'package:doctor_app_flutter/widgets/shared/new_text_Field.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 'SOAP_step_header.dart'; + class UpdatePlanPage extends StatefulWidget { final Function changePageViewIndex; final PatiantInformtion patientInfo; final Function changeLoadingState; - GetPatientProgressNoteResModel patientProgressNote; + + final int currentIndex; + GetPatientProgressNoteResModel patientProgressNote; UpdatePlanPage( {Key key, this.changePageViewIndex, this.patientInfo, this.changeLoadingState, - this.patientProgressNote}); + this.patientProgressNote, + this.currentIndex}); @override _UpdatePlanPageState createState() => _UpdatePlanPageState(); @@ -96,185 +96,193 @@ class _UpdatePlanPageState extends State { child: Center( child: FractionallySizedBox( widthFactor: 0.95, - child: Container( - margin: EdgeInsets.all(8.0), - padding: EdgeInsets.all(12.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( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 10, + child: Column( + children: [ + SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex), + + SizedBox(height: 10,), + Container( + margin: EdgeInsets.all(8.0), + padding: EdgeInsets.all(12.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(12), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .progressNoteSOAP, - variant: isProgressNoteExpand ? "bodyText" : '', - bold: isProgressNoteExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: Colors.black, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isProgressNoteExpand = !isProgressNoteExpand; - }); - }, - child: Icon(isProgressNoteExpand - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down)) - ], - ), - bodyWidget: Column(children: [ + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( - height: 2, + height: 10, ), - Column( - children: [ - if(widget.patientProgressNote.planNote == null) - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - - child: AppTextFieldCustom( - hintText: TranslationBase.of(context).progressNote, - controller: progressNoteController, - minLines: 2, - maxLines: 4, - inputType: TextInputType.multiline, - onChanged: (value){ - // examination.remark = value; + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Row( + children: [ + Texts(TranslationBase + .of(context) + .progressNoteSOAP, + variant: isProgressNoteExpand ? "bodyText" : '', + bold: isProgressNoteExpand ? true : false, + color: Colors.black), + Icon( + FontAwesomeIcons.asterisk, + color: Colors.black, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isProgressNoteExpand = !isProgressNoteExpand; + }); }, - ), - ), + child: Icon(isProgressNoteExpand + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down)) + ], + ), + bodyWidget: Column(children: [ SizedBox( - height: 20, + height: 2, ), - if ( widget.patientProgressNote.planNote != null) - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - - SizedBox( - height: 8, + Column( + children: [ + if(widget.patientProgressNote.planNote == null) + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), + + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).progressNote, + controller: progressNoteController, + minLines: 2, + maxLines: 4, + inputType: TextInputType.multiline, + onChanged: (value){ + // examination.remark = value; + }, ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + ), + SizedBox( + height: 20, + ), + if ( widget.patientProgressNote.planNote != null) + Container( + margin: + EdgeInsets.only(left: 5, right: 5, top: 15), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ + + SizedBox( + height: 8, + ), Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Texts('Appointment No: '), - Texts(widget.patientProgressNote.appointmentNo.toString()), + Row( + children: [ + Texts('Appointment No: '), + Texts(widget.patientProgressNote.appointmentNo.toString()), + + ], + ), + AppText( + widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + fontWeight: FontWeight + .bold, + fontSize: 16, + ) ], ), - AppText( - widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), - fontWeight: FontWeight - .bold, - fontSize: 16, - ) - - ], - ), - Row( - children: [ - Texts('Condition: '), - Texts(widget.patientProgressNote.mName.toString()), + Row( + children: [ + Texts('Condition: '), + Texts(widget.patientProgressNote.mName.toString()), - ], - ), - if(widget.patientProgressNote.createdByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).createdBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.createdByName??"", - fontSize: 10, - color: Colors.grey, - ), - ], - ), - if(widget.patientProgressNote.editedByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).editedBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.editedByName??"", - fontSize: 10, - color: Colors.grey, + ], ), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 6, + if(widget.patientProgressNote.createdByName !=null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).createdBy, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText( + widget.patientProgressNote.createdByName??"", + fontSize: 10, + color: Colors.grey, + ), + ], ), - Padding( - padding: const EdgeInsets.all(0.0), - child: Container( - width: MediaQuery.of(context) - .size - .width * - 0.6, - child: Texts( - progressNoteController.text, + if(widget.patientProgressNote.editedByName !=null) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).editedBy, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText( + widget.patientProgressNote.editedByName??"", fontSize: 10, color: Colors.grey, ), - ), + ], + ), + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + SizedBox( + height: 6, + ), + Padding( + padding: const EdgeInsets.all(0.0), + child: Container( + width: MediaQuery.of(context) + .size + .width * + 0.6, + child: Texts( + progressNoteController.text, + fontSize: 10, + color: Colors.grey, + ), + ), + ), + ], ), ], ), - ], - ), - ) - ], - ) - ]), - isExpand: isProgressNoteExpand, - ), + ) + ], + ) + ]), + isExpand: isProgressNoteExpand, + ), - ], - ), + ], + ), + ), + ], ), ), ), diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 2f839633..afeeca4b 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -91,41 +91,10 @@ class _UpdateSoapIndexState extends State height: 1, color: Color(0xffCCCCCC), ), - Container( - margin: EdgeInsets.only( - top: 10, - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: AppText( - TranslationBase.of(context).createNew, - fontSize: 3 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w500, - ), - ), - Container( - margin: EdgeInsets.only( - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: AppText(TranslationBase.of(context).episode, - fontSize: 3.5 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - ), - Container( - color: Theme.of(context).scaffoldBackgroundColor, - margin: EdgeInsets.only( - left: MediaQuery.of(context).size.width * 0.05, - right: MediaQuery.of(context).size.width * 0.05), - child: StepsWidget( - index: _currentIndex, - changeCurrentTab: changePageViewIndex, - height: 100,//MediaQuery.of(context).size.height * 0.17, - ), - ), Container( color: Theme.of(context).scaffoldBackgroundColor, - height: MediaQuery.of(context).size.height * 0.50, + height: MediaQuery.of(context).size.height * 0.73, child: PageView( physics: NeverScrollableScrollPhysics(), controller: _controller, @@ -138,22 +107,26 @@ class _UpdateSoapIndexState extends State children: [ UpdateSubjectivePage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, myAllergiesList: myAllergiesList, myHistoryList: myHistoryList, patientInfo: patient, changeLoadingState: changeLoadingState), UpdateObjectivePage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, mySelectedExamination: mySelectedExamination, patientInfo: patient, changeLoadingState: changeLoadingState), UpdateAssessmentPage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, mySelectedAssessmentList: mySelectedAssessment, patientInfo: patient, changeLoadingState: changeLoadingState), UpdatePlanPage( changePageViewIndex: changePageViewIndex, + currentIndex: _currentIndex, patientInfo: patient, patientProgressNote: patientProgressNote, changeLoadingState: changeLoadingState) From 6db35c8de9c44ffca3d137481eaadd2726dc0e65 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 14:50:10 +0300 Subject: [PATCH 11/12] return commented code --- lib/screens/dashboard_screen.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index b0c3bcde..13e17077 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -1020,12 +1020,12 @@ class _DashboardScreenState extends State { ), hasBorder: false, onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - SearchMedicinePatientScreen(), - )); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // SearchMedicinePatientScreen(), + // )); }, ) ], From 440d714045b27c0f570e2f2842c009a27e4364b6 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 13 Apr 2021 14:54:19 +0300 Subject: [PATCH 12/12] bottom sheet fix --- .../soap_update/subjective/update_subjective_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 68e02e2e..6306e069 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -321,11 +321,11 @@ class _UpdateSubjectivePageState extends State { decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all( - Radius.circular(10.0), + Radius.circular(0.0), ), border: Border.all( color: HexColor('#707070'), - width: 0.30), + width: 0), ), height: MediaQuery .of(context)