add soap items as widget

merge-requests/484/head
Elham Rababah 5 years ago
parent b178bc418e
commit 1716c0925d

@ -322,4 +322,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.1
COCOAPODS: 1.10.0.rc.1

@ -287,7 +287,7 @@ const Map<String, Map<String, String>> localizedValues = {
'room': {'en': 'ROOM:', 'ar': 'الغرفة'},
'bed': {'en': 'BED:', 'ar': 'السرير'},
'next': {'en': 'Next', 'ar': 'التالي'},
'previous': {'en': 'PREVIOUS', 'ar': 'السابق'},
'previous': {'en': 'Previous', 'ar': 'السابق'},
'healthRecordInformation': {
'en': 'HEALTH RECORD INFORMATION',
'ar': 'معلومات السجل الصحي'
@ -596,8 +596,8 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "The verification code expires in",
"ar": "تنتهي صلاحية رمز التحقق خلال"
},
'addAssessment': {'en': "Add ASSESSMENT", 'ar': "أضف التقييم"},
'assessment': {'en': "ASSESSMENT", 'ar': " التقييم"},
'addAssessment': {'en': "Add Assessment", 'ar': "أضف التقييم"},
'assessment': {'en': "Assessment", 'ar': " التقييم"},
'physicalSystemExamination': {
'en': "Physical System / Examination",
'ar': "الفحص البدني / النظام"

@ -0,0 +1,62 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class SOAPOpenItems extends StatelessWidget {
final Function onTap;
final String label;
const SOAPOpenItems({Key key, this.onTap, this.label}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
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(
"$label",
fontSize:15,
color: Colors.black,
fontWeight: FontWeight.w600,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize:13,
color: Colors.grey.shade700,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
);
}
}

@ -19,13 +19,14 @@ class SOAPStepHeader extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 15,),
AppText(
TranslationBase.of(context).createNew,
fontSize: 3 * SizeConfig.textMultiplier,
fontSize: 14,
fontWeight: FontWeight.w500,
),
AppText(TranslationBase.of(context).episode,
fontSize: 3.5 * SizeConfig.textMultiplier,
fontSize: 26,
fontWeight: FontWeight.bold,
),
Container(

@ -36,7 +36,7 @@ class ExaminationIitemCard extends StatelessWidget {
: examination.selectedExamination.nameEn,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
color: Color(0x2B353E),
color: Color(0xFF2B353E),
fontSize: SizeConfig.textMultiplier * 1.8,
),
)),

@ -1,4 +1,3 @@
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/master_lookup_key.dart';
@ -14,19 +13,17 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.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/expandable-widget-header-body.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../SOAP_open_items.dart';
import '../SOAP_step_header.dart';
import '../expandable_SOAP_widget.dart';
import 'examination-item-card.dart';
import 'objective-add-examination-page.dart';
@ -104,205 +101,110 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> {
widget.changeLoadingState(false);
},
builder: (_, model, w) => AppScaffold(
isShowAppBar: false,
// baseViewModel: model,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SOAPStepHeader(currentIndex: widget.currentIndex, changePageViewIndex:widget.changePageViewIndex),
Expanded(
child: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
color: Color.fromRGBO(248, 248, 248, 1),
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: [
HeaderBodyExpandableNotifier(
headerWidget: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
"${TranslationBase.of(context).physicalSystemExamination}",
fontFamily: 'Poppins',
fontSize:
SizeConfig.textMultiplier * 2.1,
fontWeight: isSysExaminationExpand
? FontWeight.w700
: FontWeight.normal,
color: Color(0xFF2E303A),
),
Icon(
FontAwesomeIcons.asterisk,
color: Colors.black/*AppGlobal.appPrimaryColor*/,
size: 12,
)
],
),
InkWell(
onTap: () {
setState(() {
isSysExaminationExpand =
!isSysExaminationExpand;
});
},
child: Icon(isSysExaminationExpand
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down))
],
),
bodyWidget: Column(
children: [
InkWell(
onTap: () {
openExaminationList(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).addExamination}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Color(0xFF2E303A),
fontWeight: FontWeight.bold,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.grey.shade700,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
/* ...List.generate(
widget.mySelectedExamination.length,
(index) => Container(
child: ExaminationIitemCard(
widget.mySelectedExamination[
index], () {
removeExamination(widget
.mySelectedExamination[
index]
.selectedExamination);
}),
)),*/
Column(
children: widget.mySelectedExamination
.map((examination) {
return ExaminationIitemCard(
examination, () {
removeExamination(examination
.selectedExamination);
});
}).toList(),
)
],
),
isExpand: isSysExaminationExpand,
),
],
),
),
),
),
isShowAppBar: false,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
// baseViewModel: model,
body: SingleChildScrollView(
child: Center(
child: FractionallySizedBox(
widthFactor: 0.9,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SOAPStepHeader(
currentIndex: widget.currentIndex,
changePageViewIndex: widget.changePageViewIndex),
ExpandableSOAPWidget(
headerTitle:
TranslationBase.of(context).physicalSystemExamination,
onTap: () {
setState(() {
isSysExaminationExpand = !isSysExaminationExpand;
});
},
child: Column(
children: [
SOAPOpenItems(label: "${TranslationBase.of(context).addExamination}",onTap: () {
openExaminationList(context);
},),
Column(
children:
widget.mySelectedExamination.map((examination) {
return ExaminationIitemCard(examination, () {
removeExamination(examination.selectedExamination);
});
}).toList(),
)
],
),
isExpanded: isSysExaminationExpand,
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: HexColor("#EAEAEA"),
fontColor: Colors.black,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: 10,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
loading: model.state == ViewState.BusyLocal,
color: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? HexColor("#D02127")
: HexColor("#A5A5A5"),
fontColor: widget.mySelectedExamination != null &&
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
),
height: MediaQuery
.of(context)
.size
.height * 0.1,
width: double.infinity,
child: FractionallySizedBox(
widthFactor: 0.9,
child: Row(
children: [
Container(
width: MediaQuery.of(context).size.width *0.4,
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w600,
onPressed: () {
widget.changePageViewIndex(0);
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width *0.1,
),
Container(
width: MediaQuery.of(context).size.width *0.4,
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
color: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? Colors.red[700]
: HexColor("#A5A5A5"),
fontColor: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0 ? Colors.white : HexColor("#5A5A5A"),
disabled: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? false
: true,
fontWeight: FontWeight.bold,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
],
disabled: widget.mySelectedExamination != null &&
widget.mySelectedExamination.length > 0
? false
: true,
onPressed: () async {
await submitUpdateObjectivePage(model);
},
),
),
),
],
)));
],
),
),
),
),
);
}
submitUpdateObjectivePage(SOAPViewModel model) async {

@ -20,6 +20,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import 'add_allergies.dart';
class UpdateAllergiesWidget extends StatefulWidget {
@ -43,61 +44,11 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
return Column(
children: [
InkWell(
onTap: () {
openAllergiesList(context, changeAllState);
},
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).addAllergies}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.black,
fontWeight: FontWeight.bold,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.grey.shade700,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addAllergies}",onTap: () {
openAllergiesList(context, changeAllState);
},),
SizedBox(
height: 20,
),

@ -18,6 +18,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import 'PriorityBar.dart';
import '../bottom_sheet_title.dart';
import 'add_history_dialog.dart';
@ -52,61 +53,11 @@ class _UpdateHistoryWidgetState extends State<UpdateHistoryWidget>
ProjectViewModel projectViewModel = Provider.of(context);
return Column(
children: [
InkWell(
onTap: () {
openHistoryList(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).addHistory}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.black,
fontWeight: FontWeight.bold,
),
AppText(
"${TranslationBase.of(context).searchHere}",
fontSize: SizeConfig
.textMultiplier *
1.8,
color: Colors.grey.shade700,
fontWeight: FontWeight.bold,
),
],
)),
Icon(
Icons.add_box_rounded,
size: 25,
)
],
),
),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addHistory}",onTap: () {
openHistoryList(context);
},),
SizedBox(
height: 20,
),

@ -21,6 +21,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../SOAP_open_items.dart';
import '../../custom_validation_error.dart';
import '../bottom_sheet_title.dart';
import 'add_medication.dart';
@ -44,53 +45,11 @@ class _UpdateMedicationWidgetState extends State<UpdateMedicationWidget> {
return Column(
children: [
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,
)
],
),
),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addMedication}",onTap: () {
openMedicationList(context);
},),
SizedBox(
height: 20,
)

@ -345,7 +345,8 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w600,
color:Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
addSubjectiveInfo(

@ -1,6 +1,6 @@
import 'package:autocomplete_textfield/autocomplete_textfield.dart';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/config/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';
@ -14,7 +14,6 @@ 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';
@ -22,14 +21,12 @@ import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import 'SOAP_open_items.dart';
import 'SOAP_step_header.dart';
import 'custom_validation_error.dart';
import 'expandable_SOAP_widget.dart';
@ -148,29 +145,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
),
Column(
children: [
Container(
margin:
EdgeInsets.only(left: 5, right: 5, top: 15),
child: TextFields(
hintText: TranslationBase.of(context)
.addAssessment,
fontSize: 13.5,
onTapTextFields: () {
openAssessmentDialog(context,
isUpdate: false, model: model);
},
readOnly: true,
suffixIcon: EvaIcons.plusSquare,
suffixIconColor: Colors.black,
fontWeight: FontWeight.w600,
validator: (value) {
if (value == null)
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
SOAPOpenItems(label: "${TranslationBase.of(context).addAssessment}",onTap: () {
openAssessmentDialog(context,
isUpdate: false, model: model);
},),
SizedBox(
height: 20,
),
@ -464,10 +444,12 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: 'Previous',
color: Colors.white38,
title: TranslationBase
.of(context)
.previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(1);
@ -480,13 +462,18 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
Container(
width: MediaQuery.of(context).size.width * 0.4,
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w700,
title: TranslationBase
.of(context)
.next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
if (widget.mySelectedAssessmentList.isEmpty) {
helpers.showErrorToast(
TranslationBase.of(context).assessmentErrorMsg);
TranslationBase
.of(context)
.assessmentErrorMsg);
} else {
widget.changePageViewIndex(3);
widget.changeLoadingState(true);
@ -528,6 +515,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> {
}
}
class AddAssessmentDetails extends StatefulWidget {
final MySelectedAssessment mySelectedAssessment;
final List<MySelectedAssessment> mySelectedAssessmentList;

@ -21,8 +21,10 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'SOAP_step_header.dart';
import 'expandable_SOAP_widget.dart';
class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex;
@ -46,6 +48,7 @@ class UpdatePlanPage extends StatefulWidget {
class _UpdatePlanPageState extends State<UpdatePlanPage> {
bool isAddProgress = true;
bool isProgressExpanded = true;
TextEditingController progressNoteController =
TextEditingController(text: null);
@ -109,143 +112,146 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
physics: ScrollPhysics(),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.95,
widthFactor: 0.90,
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,
)),
),
ExpandableSOAPWidget(
headerTitle: TranslationBase.of(context).progressNote
,
onTap: () {
setState(() {
isProgressExpanded = !isProgressExpanded;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(isAddProgress)
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: Texts(TranslationBase
.of(context)
.progressNote)),
if(isAddProgress)
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){
widget.patientProgressNote.planNote = value;
},
),
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){
widget.patientProgressNote.planNote = value;
},
),
SizedBox(
height: 9,
),
if ( widget.patientProgressNote.planNote != null&& !isAddProgress)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
),
SizedBox(
height: 9,
),
if ( widget.patientProgressNote.planNote != null&& !isAddProgress)
Container(
margin:
EdgeInsets.only(left: 5, right: 5, ),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Texts('Appointment No: ',fontSize: 12,),
Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,),
],
),
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w600,
fontSize: 14,
)
Texts('Appointment No: ',fontSize: 12,),
Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,),
],
),
Row(
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w600,
fontSize: 14,
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Row(
children: [
Texts('Condition: ',
Texts('Condition: ',
fontSize: 12,),
Texts(
widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
],
),
widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
],
),
Texts(
widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(height: 8,
widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()),
fontWeight: FontWeight.w600,
fontSize: 14,
)
],
),
SizedBox(height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: Texts(
progressNoteController.text,
fontSize: 10,
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
child: Texts(
progressNoteController.text,
fontSize: 10,
),
InkWell(
onTap: (){
setState(() {
isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
});
},
child: Icon(DoctorApp.edit,size: 18,))
],
),
InkWell(
onTap: (){
setState(() {
isAddProgress = true;
widget.changePageViewIndex(3,isChangeState:false);
});
},
child: Icon(DoctorApp.edit,size: 18,))
],
),
],
),
)
],
),
)
],
),
],
),
isExpanded: isProgressExpanded,
),
],
),
),
),
),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(
color: HexColor('#707070'),
width: 0),
),
width: double.maxFinite,
height: 90,
child: Padding(
@ -258,10 +264,10 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
children: [
Expanded(
child: AppButton(
title: 'Previous',
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
fontWeight: FontWeight.w400,
fontWeight: FontWeight.w600,
loading: model.state == ViewState.BusyLocal,
onPressed: () async {
setState(() {
@ -274,9 +280,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
Expanded(
child: AppButton(
title: isAddProgress? TranslationBase.of(context).next: "Finish",
fontWeight: FontWeight.w400,
loading: model.state == ViewState.BusyLocal,
fontWeight: FontWeight.w600,
color: Colors.red[700],
loading: model.state == ViewState.BusyLocal,
disabled: progressNoteController.text.isEmpty,
onPressed: () async {

Loading…
Cancel
Save