From 4bf9650b4f574363f1bf3ba6ac03df4bd9ca1d46 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 7 Apr 2021 18:08:38 +0300 Subject: [PATCH 1/4] fix the design issues --- .../patients/insurance_approvals_details.dart | 314 ++++++++---------- .../soap_update/update_assessment_page.dart | 19 +- 2 files changed, 157 insertions(+), 176 deletions(-) diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index add08730..c5331910 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -160,95 +160,109 @@ class _InsuranceApprovalsDetailsState extends State { ), ], ), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - //mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 25.0, - ), - Row( - children: [ - Texts( - 'Clinic: ', - color: Colors.grey[500], - ), - Texts( - model - .insuranceApproval[ - indexInsurance] - .clinicName, - ) - ], - ), - Row( - children: [ - Texts( - 'Approval No: ', - color: Colors.grey[500], - ), - Texts( - model + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + //mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 25.0, + ), + Row( + children: [ + Texts( + 'Clinic: ', + color: Colors.grey[500], + fontSize: 14, + ), + Expanded( + child: Texts( + model + .insuranceApproval[ + indexInsurance] + .clinicName, + fontSize: 14, + ), + ) + ], + ), + Row( + children: [ + Texts( + 'Approval No: ', + color: Colors.grey[500], + fontSize: 14, + ), + Texts( + model + .insuranceApproval[ + indexInsurance] + .approvalNo + .toString(), + fontSize: 14, + ) + ], + ), + Row( + children: [ + Texts( + 'Unused Count:', + color: Colors.grey[500], + fontSize: 14, + ), + Texts(model .insuranceApproval[ indexInsurance] - .approvalNo + .unUsedCount .toString(), - ) - ], - ), - Row( - children: [ - Texts( - 'Unused Count:', - color: Colors.grey[500], - ), - Texts(model - .insuranceApproval[ - indexInsurance] - .unUsedCount - .toString()) - ], - ), - Row( - children: [ - Texts( - 'Company Name :', - color: Colors.grey[500], - ), - Texts('Sample') - ], - ), - Row( - children: [ - Texts( - 'Receipt on: ', - color: Colors.grey[500], - ), - Texts( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: FontWeight.w600, - ), - ], - ), - Row( - children: [ - Texts( - 'Exp on: ', - color: Colors.grey[500], - ), - Texts( - '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', - color: Colors.black, - fontWeight: FontWeight.w600, - ), - ], - ), - ], + fontSize: 14, + ) + + ], + ), + Row( + children: [ + Texts( + 'Company Name :', + color: Colors.grey[500], + ), + Texts('Sample') + ], + ), + Row( + children: [ + Texts( + 'Receipt on: ', + color: Colors.grey[500], + ), + Expanded( + child: Texts( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Texts( + 'Exp on: ', + color: Colors.grey[500], + ), + Texts( + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ], + ), + ], + ), ), ), ], @@ -264,34 +278,20 @@ class _InsuranceApprovalsDetailsState extends State { padding: const EdgeInsets.symmetric( horizontal: 8.0), child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.33, + Expanded( child: Texts( 'Procedure', fontWeight: FontWeight.w700, ), ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.33, + Expanded( child: Texts( 'Status', fontWeight: FontWeight.w700, ), ), - Container( - width: MediaQuery.of(context) - .size - .width * - 0.21, + Expanded( child: Texts( 'Usage Status', fontWeight: FontWeight.w700, @@ -316,78 +316,58 @@ class _InsuranceApprovalsDetailsState extends State { itemBuilder: (BuildContext context, int index) { return Container( - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceAround, - crossAxisAlignment: - CrossAxisAlignment.start, + child: Column( children: [ - Container( - height: - MediaQuery.of(context) - .size - .height * - 0.15, //130.0, - width: - MediaQuery.of(context) - .size - .width * - 0.33, - child: Texts(model - .insuranceApproval[ - indexInsurance] - ?.apporvalDetails[ - index] - ?.procedureName ?? - ""), - ), - Container( - height: - MediaQuery.of(context) - .size - .height * - 0.15, - width: - MediaQuery.of(context) - .size - .width * - 0.33, - child: Texts(model - .insuranceApproval[ - indexInsurance] - ?.apporvalDetails[ - index] - ?.status ?? - ""), + Row( + + children: [ + Expanded( + child: Container( + + child: Texts(model + .insuranceApproval[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.procedureName ?? + "",textAlign: TextAlign.start,), + ), + ), + Expanded( + child: Container( + + child: Texts(model + .insuranceApproval[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.status ?? + "",textAlign: TextAlign.center,), + ), + ), + Expanded( + child: Container( + child: Texts(model + .insuranceApproval[ + indexInsurance] + ?.apporvalDetails[ + index] + ?.isInvoicedDesc ?? + "",textAlign: TextAlign.center,), + ), + ), + ], ), - Container( - height: - MediaQuery.of(context) - .size - .height * - 0.15, - width: - MediaQuery.of(context) - .size - .width * - 0.21, - child: Texts(model - .insuranceApproval[ - indexInsurance] - ?.apporvalDetails[ - index] - ?.isInvoicedDesc ?? - ""), + SizedBox(width: 5,), + Divider( + color: Colors.black38, ), ], ), ); }), ), - Divider( - color: Colors.black45, - ), + ], ), ), 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 86016be9..db791416 100644 --- a/lib/widgets/patients/profile/soap_update/update_assessment_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_assessment_page.dart @@ -677,17 +677,18 @@ class _AddAssessmentDetailsState extends State { height: 16, ), Row( + children: [ - AppText( - TranslationBase.of(context) - .addAssessmentDetails - .toUpperCase(), - fontWeight: FontWeight.bold, - fontSize: 13, - ), - SizedBox( - width: MediaQuery.of(context).size.width * 0.42, + Expanded( + child: AppText( + TranslationBase.of(context) + .addAssessmentDetails + .toUpperCase(), + fontWeight: FontWeight.bold, + fontSize: 13, + ), ), + InkWell( child: Icon( Icons.close, From d105e0ef5ded055d797f804f52c7a458ec439aac Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 8 Apr 2021 23:36:13 +0300 Subject: [PATCH 2/4] fix the design issues --- lib/screens/dashboard_screen.dart | 12 +- .../profile/soap_update/update_plan_page.dart | 502 ++++++++---------- .../soap_update/update_soap_index.dart | 134 ++--- 3 files changed, 308 insertions(+), 340 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(), + // )); }, ) ], 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 e1388ef1..5c69a8ae 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -1,5 +1,6 @@ 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'; @@ -9,15 +10,18 @@ import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model. import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/util/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/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'; @@ -58,6 +62,7 @@ class _UpdatePlanPageState extends State { )), ); } + TextEditingController typeController = TextEditingController(); @override Widget build(BuildContext context) { @@ -84,221 +89,251 @@ class _UpdatePlanPageState extends State { }, builder: (_, model, w) => AppScaffold( // baseViewModel: model, + backgroundColor: Colors.grey[200], isShowAppBar: false, body: SingleChildScrollView( physics: ScrollPhysics(), child: Center( child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 30, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .progressNoteSOAP, - variant: isProgressNoteExpand ? "bodyText" : '', - bold: isProgressNoteExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isProgressNoteExpand = !isProgressNoteExpand; - }); - }, - child: Icon(isProgressNoteExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], + 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, ), - bodyWidget: Column(children: [ - SizedBox( - height: 20, - ), - Column( + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - if(widget.patientProgressNote.planNote == null) - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( + 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: 2, + ), + Column( + children: [ + if(widget.patientProgressNote.planNote == null) + Container( + margin: + EdgeInsets.only(left: 10, right: 10, top: 15), - hintText: TranslationBase - .of(context) - .addProgressNote, - fontSize: 13.5, - onTapTextFields: () { - openProgressNote(context); + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).progressNote, + controller: progressNoteController, + minLines: 2, + maxLines: 4, + inputType: TextInputType.multiline, + onChanged: (value){ + // examination.remark = value; }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - if ( widget.patientProgressNote.planNote != null) - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( + ), + ), + SizedBox( + height: 20, + ), + if ( widget.patientProgressNote.planNote != null) + Container( + margin: + EdgeInsets.only(left: 5, right: 5, top: 15), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ - widget.patientProgressNote.createdOn !=null?DateTime.parse(widget.patientProgressNote.createdOn).day.toString():DateTime.now().day.toString(), - fontWeight: FontWeight - .bold, - fontSize: 16, - ), - AppText( - Helpers.getMonth(widget.patientProgressNote.createdOn !=null?(DateTime.parse(widget.patientProgressNote.createdOn).month):DateTime.now().month).toUpperCase(), - fontSize: 10, - color: Colors.grey, - ), - ], - ) - ], - ), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - 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: AppText( - progressNoteController.text, - fontSize: 10, - color: Colors.grey, - ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + 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, + ) + + ], + ), + 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, + ), + 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, ), ), - ], - ), - SizedBox( - height: 8, - ), - 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, - ), - ], - ), - ], - ), - Column( - children: [ - InkWell( - onTap: () { - openProgressNote(context); - }, - child: Icon(EvaIcons.edit2Outline), - ) - ], - ), - ], - ), - ) - ], - ) - ]), - isExpand: isProgressNoteExpand, - ), - DividerWithSpacesAround( - height: 30, - ), - AppButton( - title: TranslationBase.of(context).next, - loading: model.state == ViewState.BusyLocal, - onPressed: () { - submitPlan(model); - // widget.changePageViewIndex(2); - }, - ), - SizedBox( - height: 30, - ), - ], + ), + ], + ), + ], + ), + ) + ], + ) + ]), + isExpand: isProgressNoteExpand, + ), + + ], + ), ), ), ), ), + bottomSheet: Container( + width: double.maxFinite, + height: 70, + child: Container( + margin: EdgeInsets.all(6), + child: Column( + children: [ + + Row( + children: [ + Expanded( + child: AppButton( + title: 'Previous', + color: Colors.white38, + fontColor: Colors.black, + fontWeight: FontWeight.w700, + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + setState(() { + widget.changePageViewIndex(2); + }); + }, + ), + ), + SizedBox(width: 5,), + Expanded( + child: AppButton( + title: TranslationBase.of(context).next, + fontWeight: FontWeight.w700, + loading: model.state == ViewState.BusyLocal, + disabled: progressNoteController.text.isEmpty, + onPressed: () async { + + if(widget.patientProgressNote.planNote.isEmpty) { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + setState(() { + widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName ?? doctorProfile.doctorName; + widget.patientProgressNote.editedByName = doctorProfile.doctorName; + widget.patientProgressNote.createdOn = DateTime.now().toString(); + widget.patientProgressNote.planNote = progressNoteController.text; + }); + + } else + submitPlan(model); + }, + ), + ), + ], + ), + + ], + ), + ), + ), ), ); } @@ -333,74 +368,5 @@ class _UpdatePlanPageState extends State { } } - openProgressNote(BuildContext context) { - showModalBottomSheet( - backgroundColor: Colors.white, - isScrollControlled: true, - context: context, - builder: (context) { - return FractionallySizedBox( - heightFactor: 0.6, - child: Container( - child: FractionallySizedBox( - widthFactor: 0.9, - child: ListView( - // crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).addProgressNote, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 10, - ), - Container( - margin: EdgeInsets.only(left: 0, right: 0, top: 15), - child: TextFields( - hasLabelText: progressNoteController.text != ''?true:false, - showLabelText: true, - hintText: TranslationBase.of(context).addProgressNote, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 16, - minLines: 8, - controller: progressNoteController, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ),SizedBox( - height: 10, - ), - AppButton( - title: TranslationBase.of(context).add.toUpperCase(), - onPressed: () async{ - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName??doctorProfile.doctorName; - widget.patientProgressNote.editedByName=doctorProfile.doctorName; - widget.patientProgressNote.createdOn= DateTime.now().toString() ; - widget.patientProgressNote.planNote = progressNoteController.text; - setState(() { - print(progressNoteController.text); - }); - Navigator.of(context).pop(); - }, - ), - ]), - )), - ); - }); - } } 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 b14a0479..f85f49f2 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -70,75 +70,77 @@ class _UpdateSoapIndexState extends State isShowAppBar: false, // appBarTitle: TranslationBase.of(context).healthRecordInformation, // TODO mousa removed the singleChildScrollView - body: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - decoration: BoxDecoration( - boxShadow: [], - color: Theme.of(context).scaffoldBackgroundColor), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - // PatientPageHeaderWidget(patient), - PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), - Container( - width: double.infinity, - height: 1, - color: Color(0xffCCCCCC), - ), - 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: MediaQuery.of(context).size.height * 0.21, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + boxShadow: [], + color: Theme.of(context).scaffoldBackgroundColor), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + // PatientPageHeaderWidget(patient), + PatientProfileHeaderNewDesign(patient, '7', '7', height: MediaQuery.of(context).size.height * 0.28,), + Container( + width: double.infinity, + height: 1, + color: Color(0xffCCCCCC), ), - ), - Container( - color: Theme.of(context).scaffoldBackgroundColor, - height: MediaQuery.of(context).size.height * 0.50, - child: PageView( - physics: NeverScrollableScrollPhysics(), - controller: _controller, - onPageChanged: (index) { - setState(() { - _currentIndex = index; - }); - }, - scrollDirection: Axis.horizontal, - children: [ - UpdateSubjectivePage( - changePageViewIndex: changePageViewIndex, - myAllergiesList: myAllergiesList, - myHistoryList: myHistoryList, - patientInfo: patient, - changeLoadingState: changeLoadingState), - UpdateObjectivePage( - changePageViewIndex: changePageViewIndex, - mySelectedExamination: mySelectedExamination, - patientInfo: patient, - changeLoadingState: changeLoadingState), - UpdateAssessmentPage( - changePageViewIndex: changePageViewIndex, - mySelectedAssessmentList: mySelectedAssessment, - patientInfo: patient, - changeLoadingState: changeLoadingState), - UpdatePlanPage( - changePageViewIndex: changePageViewIndex, - patientInfo: patient, - patientProgressNote: patientProgressNote, - changeLoadingState: changeLoadingState) - ], + 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: MediaQuery.of(context).size.height * 0.21, + ), ), - ) - ], + Container( + color: Theme.of(context).scaffoldBackgroundColor, + height: MediaQuery.of(context).size.height * 0.50, + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + UpdateSubjectivePage( + changePageViewIndex: changePageViewIndex, + myAllergiesList: myAllergiesList, + myHistoryList: myHistoryList, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdateObjectivePage( + changePageViewIndex: changePageViewIndex, + mySelectedExamination: mySelectedExamination, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdateAssessmentPage( + changePageViewIndex: changePageViewIndex, + mySelectedAssessmentList: mySelectedAssessment, + patientInfo: patient, + changeLoadingState: changeLoadingState), + UpdatePlanPage( + changePageViewIndex: changePageViewIndex, + patientInfo: patient, + patientProgressNote: patientProgressNote, + changeLoadingState: changeLoadingState) + ], + ), + ) + ], + ), ), - ), - ], + ], + ), ), ), ); From c87f235cd229f71fb627f866f8584c5aaf024fd2 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 8 Apr 2021 23:36:28 +0300 Subject: [PATCH 3/4] fix the design issues --- lib/screens/prescription/prescription_items_page.dart | 1 - lib/screens/procedures/procedure_screen.dart | 2 +- .../patient_profile_header_with_appointment_card_app_bar.dart | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 4197b5b6..f2bbe274 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -35,7 +35,6 @@ class PrescriptionItemsPage extends StatelessWidget { patient: patient, patientType: patientType??"0", arrivalType: arrivalType??"0", - branch: '', clinic: prescriptions.clinicDescription, isPrescriptions: true, appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 7d95fd35..7060a77f 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -61,7 +61,7 @@ class ProcedureScreen extends StatelessWidget { ], ), ), - if (patientType != null && patientType == '7') + if (patientType != null && patientType == '7' && patient.patientStatusType == 43) InkWell( onTap: () { addSelectedProcedure(context, model, patient); 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 a00ae6ef..4de0e439 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 @@ -406,7 +406,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ) ], ), - if(isPrescriptions) + if(isPrescriptions && branch!=null) Row( children: [ Texts( From 327e058fbd92a44c846b1d53b1b63c50d33e1588 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 8 Apr 2021 23:48:59 +0300 Subject: [PATCH 4/4] fix design issues and merge conflict --- lib/config/config.dart | 4 ++-- lib/widgets/otp/sms-popup.dart | 8 +++++--- .../patients/profile/soap_update/update_soap_index.dart | 2 +- pubspec.lock | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 52fb8c3f..654f704a 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; -//const BASE_URL = 'https://hmgwebservices.com/'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index 951e14ed..9cdda71b 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -236,9 +236,11 @@ class SMSOTP { Padding( padding: EdgeInsets.only(top: 10), child: Row(children: [ - AppText( - TranslationBase.of(context).validationMessage + ' ', - fontWeight: FontWeight.w600, + Expanded( + child: AppText( + TranslationBase.of(context).validationMessage + ' ', + fontWeight: FontWeight.w600, + ), ), AppText( displayTime, 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 288171c4..72c8c714 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -142,6 +142,6 @@ class _UpdateSoapIndexState extends State ), ), ), - ); + )); } } diff --git a/pubspec.lock b/pubspec.lock index e15e02c9..46eca7cf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -608,7 +608,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.4" + version: "1.3.0-nullsafety.3" mime: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.10.0-nullsafety.1" stream_channel: dependency: transitive description: @@ -1084,5 +1084,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <=2.11.0-213.1.beta" + dart: ">=2.10.0 <2.11.0" flutter: ">=1.22.0 <2.0.0"