|
|
|
|
@ -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<UpdatePlanPage> {
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
TextEditingController typeController = TextEditingController();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -84,221 +89,251 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
|
},
|
|
|
|
|
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<UpdatePlanPage> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|