|
|
|
@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/client/base_app_client.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.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/SOAP_view_model.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/patient/patiant_info_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/screens/base/base_view.dart';
|
|
|
|
@ -53,8 +54,21 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
|
|
|
|
|
|
|
|
return BaseView<SOAPViewModel>(
|
|
|
|
return BaseView<SOAPViewModel>(
|
|
|
|
// onModelReady: (model) => model.getMasterLookup(MasterKeysService.Allergies),
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
|
|
|
GetGetProgressNoteReqModel getGetProgressNoteReqModel =
|
|
|
|
|
|
|
|
GetGetProgressNoteReqModel(
|
|
|
|
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
|
|
|
|
patientMRN: widget.patientInfo.patientMRN,
|
|
|
|
|
|
|
|
episodeID: widget.patientInfo.episodeNo.toString());
|
|
|
|
|
|
|
|
await model.getPatientProgressNote(getGetProgressNoteReqModel);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model.patientProgressNoteList.isNotEmpty) {
|
|
|
|
|
|
|
|
progressNoteController.text =
|
|
|
|
|
|
|
|
model.patientProgressNoteList[0].planNote;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
|
|
|
baseViewModel: model,
|
|
|
|
isShowAppBar: false,
|
|
|
|
isShowAppBar: false,
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
@ -74,8 +88,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Texts('Progress Note',
|
|
|
|
Texts('Progress Note',
|
|
|
|
variant:
|
|
|
|
variant: isProgressNoteExpand ? "bodyText" : '',
|
|
|
|
isProgressNoteExpand ? "bodyText" : '',
|
|
|
|
|
|
|
|
bold: isProgressNoteExpand ? true : false,
|
|
|
|
bold: isProgressNoteExpand ? true : false,
|
|
|
|
color: Colors.black),
|
|
|
|
color: Colors.black),
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
@ -88,8 +101,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
isProgressNoteExpand =
|
|
|
|
isProgressNoteExpand = !isProgressNoteExpand;
|
|
|
|
!isProgressNoteExpand;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Icon(isProgressNoteExpand
|
|
|
|
child: Icon(isProgressNoteExpand
|
|
|
|
@ -105,7 +117,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin:
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
child: TextFields(
|
|
|
|
child: TextFields(
|
|
|
|
hintText: "Add Progress Note",
|
|
|
|
hintText: "Add Progress Note",
|
|
|
|
fontSize: 13.5,
|
|
|
|
fontSize: 13.5,
|
|
|
|
@ -120,8 +132,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
// controller: messageController,
|
|
|
|
// controller: messageController,
|
|
|
|
validator: (value) {
|
|
|
|
validator: (value) {
|
|
|
|
if (value == null)
|
|
|
|
if (value == null)
|
|
|
|
return TranslationBase
|
|
|
|
return TranslationBase.of(context)
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.emptyMessage;
|
|
|
|
.emptyMessage;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
@ -133,10 +144,10 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
if (progressNoteController.text.isNotEmpty)
|
|
|
|
if (progressNoteController.text.isNotEmpty)
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin:
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(left: 5, right: 5, top: 15),
|
|
|
|
EdgeInsets.only(left: 5, right: 5, top: 15),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
@ -144,9 +155,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
crossAxisAlignment:
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
"12".toUpperCase(),
|
|
|
|
"12".toUpperCase(),
|
|
|
|
@ -163,13 +174,12 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment
|
|
|
|
crossAxisAlignment:
|
|
|
|
.start,
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 6,
|
|
|
|
height: 6,
|
|
|
|
@ -177,25 +187,25 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.all(0.0),
|
|
|
|
padding: const EdgeInsets.all(0.0),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
width: MediaQuery
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
.of(context)
|
|
|
|
.size
|
|
|
|
.size
|
|
|
|
.width *
|
|
|
|
.width * 0.6,
|
|
|
|
0.6,
|
|
|
|
child: AppText(
|
|
|
|
child: AppText(
|
|
|
|
progressNoteController.text,
|
|
|
|
progressNoteController.text,
|
|
|
|
fontSize: 10,
|
|
|
|
fontSize: 10,
|
|
|
|
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
), SizedBox(
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
height: 8,
|
|
|
|
height: 8,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
"Created By : ",
|
|
|
|
"Created By : ",
|
|
|
|
@ -211,7 +221,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
"Edited By : ",
|
|
|
|
"Edited By : ",
|
|
|
|
@ -225,7 +235,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
@ -246,14 +255,13 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
isExpand: isProgressNoteExpand,
|
|
|
|
isExpand: isProgressNoteExpand,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
DividerWithSpacesAround(height: 30,),
|
|
|
|
DividerWithSpacesAround(
|
|
|
|
|
|
|
|
height: 30,
|
|
|
|
|
|
|
|
),
|
|
|
|
AppButton(
|
|
|
|
AppButton(
|
|
|
|
title: TranslationBase
|
|
|
|
title: TranslationBase.of(context).next,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.next,
|
|
|
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
|
|
|
|
submitPlan(model);
|
|
|
|
submitPlan(model);
|
|
|
|
// widget.changePageViewIndex(2);
|
|
|
|
// widget.changePageViewIndex(2);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -265,7 +273,9 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),),);
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
submitPlan(SOAPViewModel model) async {
|
|
|
|
submitPlan(SOAPViewModel model) async {
|
|
|
|
@ -276,8 +286,13 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
appointmentNo: widget.patientInfo.appointmentNo,
|
|
|
|
planNote: progressNoteController.text);
|
|
|
|
planNote: progressNoteController.text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(model.patientProgressNoteList.isEmpty){
|
|
|
|
|
|
|
|
await model.postProgressNote(postProgressNoteRequestModel);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
await model.patchProgressNote(postProgressNoteRequestModel);
|
|
|
|
|
|
|
|
|
|
|
|
await model.patchProgressNote(postProgressNoteRequestModel);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
helpers.showErrorToast(model.error);
|
|
|
|
helpers.showErrorToast(model.error);
|
|
|
|
|