add stepper in all soap steps

merge-requests/473/head
Elham Rababah 5 years ago
parent ff157b417e
commit e9d04527a6

@ -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,
),
],
);
}
}

@ -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> 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<UpdateObjectivePage> {
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
Expanded(
child: SingleChildScrollView(
physics: ScrollPhysics(),

@ -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<MySelectedAllergy> myAllergiesList;
final List<MySelectedHistory> 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<UpdateSubjectivePage> {
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<UpdateSubjectivePage> {

@ -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<MySelectedAssessment> 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<UpdateAssessmentPage> {
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<AddAssessmentDetails> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
SizedBox(
height: 16,
),
Row(

@ -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<UpdatePlanPage> {
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,
),
],
),
],
),
),
],
),
),
),

@ -91,41 +91,10 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
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<UpdateSoapIndex>
children: <Widget>[
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)

Loading…
Cancel
Save