|
|
|
|
@ -29,7 +29,7 @@ class UpdatePlanPage extends StatefulWidget {
|
|
|
|
|
final PatiantInformtion patientInfo;
|
|
|
|
|
final Function changeLoadingState;
|
|
|
|
|
final Function changeStateFun;
|
|
|
|
|
final SOAPViewModel sOAPViewModel;
|
|
|
|
|
final SOAPViewModel sOAPViewModel;
|
|
|
|
|
|
|
|
|
|
final int currentIndex;
|
|
|
|
|
|
|
|
|
|
@ -38,13 +38,16 @@ class UpdatePlanPage extends StatefulWidget {
|
|
|
|
|
this.changePageViewIndex,
|
|
|
|
|
this.patientInfo,
|
|
|
|
|
this.changeLoadingState,
|
|
|
|
|
this.currentIndex, this.sOAPViewModel, this.changeStateFun});
|
|
|
|
|
this.currentIndex,
|
|
|
|
|
this.sOAPViewModel,
|
|
|
|
|
this.changeStateFun});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_UpdatePlanPageState createState() => _UpdatePlanPageState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack {
|
|
|
|
|
class _UpdatePlanPageState extends State<UpdatePlanPage>
|
|
|
|
|
implements PlanCallBack {
|
|
|
|
|
bool isAddProgress = true;
|
|
|
|
|
bool isProgressExpanded = true;
|
|
|
|
|
GetPatientProgressNoteResModel patientProgressNote =
|
|
|
|
|
@ -76,17 +79,19 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getPatientProgressNote(SOAPViewModel model, {bool isAddProgress = false}) async {
|
|
|
|
|
getPatientProgressNote(SOAPViewModel model,
|
|
|
|
|
{bool isAddProgress = false}) async {
|
|
|
|
|
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()),
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
|
editedBy: '',
|
|
|
|
|
doctorID: '');
|
|
|
|
|
await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()),
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
|
editedBy: '',
|
|
|
|
|
doctorID: '');
|
|
|
|
|
await widget.sOAPViewModel
|
|
|
|
|
.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
|
|
|
|
|
///TODO set progressNote in model;
|
|
|
|
|
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
|
|
|
|
|
progressNoteController.text = Helpers.parseHtmlString(
|
|
|
|
|
@ -103,238 +108,251 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].editedByName;
|
|
|
|
|
patientProgressNote.appointmentNo =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].appointmentNo;
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = isAddProgress;
|
|
|
|
|
widget.sOAPViewModel.isAddProgress = isAddProgress;
|
|
|
|
|
widget.sOAPViewModel.progressNoteText = progressNoteController.text;
|
|
|
|
|
});
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = isAddProgress;
|
|
|
|
|
widget.sOAPViewModel.isAddProgress = isAddProgress;
|
|
|
|
|
widget.sOAPViewModel.progressNoteText = progressNoteController.text;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BaseView<SOAPViewModel>(
|
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
widget.sOAPViewModel.setPlanCallBack(this);
|
|
|
|
|
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()),
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
|
editedBy: '',
|
|
|
|
|
doctorID: '');
|
|
|
|
|
await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
widget.sOAPViewModel.setPlanCallBack(this);
|
|
|
|
|
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()),
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
|
editedBy: '',
|
|
|
|
|
doctorID: '');
|
|
|
|
|
await widget.sOAPViewModel
|
|
|
|
|
.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
|
|
|
|
|
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
|
|
|
|
|
progressNoteController.text = Helpers.parseHtmlString(
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].planNote);
|
|
|
|
|
patientProgressNote.planNote = progressNoteController.text;
|
|
|
|
|
patientProgressNote.createdByName =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].createdByName;
|
|
|
|
|
patientProgressNote.createdOn =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].createdOn;
|
|
|
|
|
patientProgressNote.editedOn =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].editedOn;
|
|
|
|
|
patientProgressNote.editedByName =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].editedByName;
|
|
|
|
|
patientProgressNote.appointmentNo =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].appointmentNo;
|
|
|
|
|
widget.sOAPViewModel.progressNoteText = progressNoteController.text;
|
|
|
|
|
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
|
|
|
|
|
progressNoteController.text = Helpers.parseHtmlString(
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].planNote);
|
|
|
|
|
patientProgressNote.planNote = progressNoteController.text;
|
|
|
|
|
patientProgressNote.createdByName =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].createdByName;
|
|
|
|
|
patientProgressNote.createdOn =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].createdOn;
|
|
|
|
|
patientProgressNote.editedOn =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].editedOn;
|
|
|
|
|
patientProgressNote.editedByName =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].editedByName;
|
|
|
|
|
patientProgressNote.appointmentNo =
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].appointmentNo;
|
|
|
|
|
widget.sOAPViewModel.progressNoteText = progressNoteController.text;
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = false;
|
|
|
|
|
widget.sOAPViewModel.isAddProgress = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
widget.changeLoadingState(false);
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.90,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SOAPStepHeader(
|
|
|
|
|
currentIndex: widget.currentIndex,
|
|
|
|
|
changePageViewIndex: widget.changePageViewIndex),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
|
headerTitle: TranslationBase.of(context).progressNote,
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isProgressExpanded = !isProgressExpanded;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = false;
|
|
|
|
|
widget.sOAPViewModel.isAddProgress = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
widget.changeLoadingState(false);
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.90,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SOAPStepHeader(
|
|
|
|
|
currentIndex: widget.currentIndex,
|
|
|
|
|
changePageViewIndex: widget.changePageViewIndex,
|
|
|
|
|
patientInfo: widget.patientInfo,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
|
headerTitle: TranslationBase.of(context).progressNote,
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isProgressExpanded = !isProgressExpanded;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
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) {
|
|
|
|
|
setState(() {
|
|
|
|
|
patientProgressNote.planNote = value;
|
|
|
|
|
model.progressNoteText = value;
|
|
|
|
|
widget.changeStateFun();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 9,
|
|
|
|
|
),
|
|
|
|
|
if (patientProgressNote.planNote != null &&
|
|
|
|
|
!isAddProgress)
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 5,
|
|
|
|
|
right: 5,
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
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) {
|
|
|
|
|
setState(() {
|
|
|
|
|
patientProgressNote.planNote =
|
|
|
|
|
value;
|
|
|
|
|
model.progressNoteText = value;
|
|
|
|
|
widget.changeStateFun();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 9,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
|
if (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: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Appointment No: ',
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Appointment No: ',
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3,
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
patientProgressNote
|
|
|
|
|
.appointmentNo !=
|
|
|
|
|
null
|
|
|
|
|
? patientProgressNote
|
|
|
|
|
.appointmentNo
|
|
|
|
|
.toString()
|
|
|
|
|
: '',
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
color: Color(0xFF2B353E),
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.6,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
patientProgressNote
|
|
|
|
|
.appointmentNo !=
|
|
|
|
|
patientProgressNote.createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? patientProgressNote
|
|
|
|
|
.appointmentNo
|
|
|
|
|
.toString()
|
|
|
|
|
: '',
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
DateTime.parse(
|
|
|
|
|
patientProgressNote
|
|
|
|
|
.createdOn))
|
|
|
|
|
: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
DateTime.now()),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
color: Color(0xFF2B353E),
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6,
|
|
|
|
|
),
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.6,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
patientProgressNote.createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// 'Condition: ',
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// patientProgressNote.mName ??
|
|
|
|
|
// '',
|
|
|
|
|
// fontWeight: FontWeight.w600),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
AppText(
|
|
|
|
|
patientProgressNote.createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? AppDateUtils.getHour(
|
|
|
|
|
DateTime.parse(
|
|
|
|
|
patientProgressNote
|
|
|
|
|
.createdOn))
|
|
|
|
|
: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
: AppDateUtils.getHour(
|
|
|
|
|
DateTime.now()),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.end,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// 'Condition: ',
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// ),
|
|
|
|
|
// AppText(
|
|
|
|
|
// patientProgressNote.mName ??
|
|
|
|
|
// '',
|
|
|
|
|
// fontWeight: FontWeight.w600),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
AppText(
|
|
|
|
|
patientProgressNote.createdOn !=
|
|
|
|
|
null
|
|
|
|
|
? AppDateUtils.getHour(
|
|
|
|
|
DateTime.parse(
|
|
|
|
|
patientProgressNote
|
|
|
|
|
.createdOn))
|
|
|
|
|
: AppDateUtils.getHour(
|
|
|
|
|
DateTime.now()),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
|
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.6,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
progressNoteController.text,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.6,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: AppText(
|
|
|
|
|
progressNoteController.text,
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = true;
|
|
|
|
|
widget.sOAPViewModel
|
|
|
|
|
.isAddProgress = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
DoctorApp.edit,
|
|
|
|
|
size: 18,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isAddProgress = true;
|
|
|
|
|
widget.sOAPViewModel.isAddProgress = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
DoctorApp.edit,
|
|
|
|
|
size: 18,
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
isExpanded: isProgressExpanded,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightVeryShort ? 20 : 10),
|
|
|
|
|
isExpanded: isProgressExpanded,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightVeryShort ? 20 : 10),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),)
|
|
|
|
|
);
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submitPlan(SOAPViewModel model) async {
|
|
|
|
|
@ -350,27 +368,29 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
|
|
|
|
|
editedBy: '');
|
|
|
|
|
|
|
|
|
|
if (widget.sOAPViewModel.patientProgressNoteList.isEmpty) {
|
|
|
|
|
await widget.sOAPViewModel.postProgressNote(postProgressNoteRequestModel);
|
|
|
|
|
await widget.sOAPViewModel
|
|
|
|
|
.postProgressNote(postProgressNoteRequestModel);
|
|
|
|
|
} else {
|
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
|
postProgressNoteRequestModel.editedBy = doctorProfile.doctorID;
|
|
|
|
|
await widget.sOAPViewModel.patchProgressNote(postProgressNoteRequestModel);
|
|
|
|
|
await widget.sOAPViewModel
|
|
|
|
|
.patchProgressNote(postProgressNoteRequestModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (widget.sOAPViewModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
Helpers.showErrorToast(widget.sOAPViewModel.error);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()),
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
|
editedBy: '',
|
|
|
|
|
doctorID: '');
|
|
|
|
|
await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
int.parse(widget.patientInfo.appointmentNo.toString()),
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString(),
|
|
|
|
|
editedBy: '',
|
|
|
|
|
doctorID: '');
|
|
|
|
|
await widget.sOAPViewModel
|
|
|
|
|
.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
|
|
|
|
|
progressNoteController.text = Helpers.parseHtmlString(
|
|
|
|
|
widget.sOAPViewModel.patientProgressNoteList[0].planNote);
|
|
|
|
|
@ -407,9 +427,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
Helpers.showErrorToast(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.progressNoteErrorMsg);
|
|
|
|
|
Helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|