|
|
|
@ -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';
|
|
|
|
@ -14,31 +12,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();
|
|
|
|
@ -108,117 +108,137 @@ 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: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
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,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
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;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
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(
|
|
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
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),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts('Condition: ',fontSize: 12,),
|
|
|
|
|
Texts(widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600),
|
|
|
|
|
],
|
|
|
|
|
child: AppTextFieldCustom(
|
|
|
|
|
hintText: TranslationBase.of(context).progressNote,
|
|
|
|
|
controller: progressNoteController,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
maxLines: 4,
|
|
|
|
|
inputType: TextInputType.multiline,
|
|
|
|
|
onChanged: (value){
|
|
|
|
|
widget.patientProgressNote.planNote = value;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
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,
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: (){
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = true;
|
|
|
|
|
widget.changePageViewIndex(3,isChangeState:false);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(DoctorApp.edit,size: 18,))
|
|
|
|
|
],
|
|
|
|
|
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(
|
|
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts('Condition: ',
|
|
|
|
|
fontSize: 12,),
|
|
|
|
|
Texts(
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
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,))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|