finish update on soap

episode_fixes
Elham Rababh 5 years ago
parent e58ce34aa4
commit a502308a8a

@ -27,6 +27,7 @@ import 'package:doctor_app_flutter/models/SOAP/post_histories_request_model.dart
import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.dart'; import 'package:doctor_app_flutter/models/SOAP/post_physical_exam_request_model.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/SOAP/selected_items/my_selected_examination.dart'; import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessmentCallBack.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/assessment/assessmentCallBack.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objectiveCallBack.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/objective/objectiveCallBack.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/plan/planCallBack.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/plan/planCallBack.dart';
@ -356,8 +357,21 @@ class SOAPViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} }
Future getPatientPhysicalExam( Future getPatientPhysicalExam(PatiantInformtion patientInfo,
GetPhysicalExamReqModel getPhysicalExamReqModel) async { ) async {
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel(
patientMRN: patientInfo.patientMRN,
episodeID: patientInfo.episodeNo.toString(),
appointmentNo: int.parse(
patientInfo.appointmentNo.toString(),
),
);
if(patientInfo.admissionNo !=null &&patientInfo.admissionNo.isNotEmpty)
getPhysicalExamReqModel.admissionNo =int.parse(patientInfo.admissionNo);
else
getPhysicalExamReqModel.admissionNo = 0;
setState(ViewState.Busy); setState(ViewState.Busy);
await _SOAPService.getPatientPhysicalExam(getPhysicalExamReqModel); await _SOAPService.getPatientPhysicalExam(getPhysicalExamReqModel);
if (_SOAPService.hasError) { if (_SOAPService.hasError) {

@ -299,8 +299,7 @@ class AuthenticationViewModel extends BaseViewModel {
clinicID: clinicInfo.clinicID, clinicID: clinicInfo.clinicID,
license: true, license: true,
projectID: clinicInfo.projectID, projectID: clinicInfo.projectID,
tokenID: '', languageID: 2);///TODO change the lan
languageID: 2);//TODO change the lan
await _authService.getDoctorProfileBasedOnClinic(docInfo); await _authService.getDoctorProfileBasedOnClinic(docInfo);
if (_authService.hasError) { if (_authService.hasError) {
error = _authService.error; error = _authService.error;

@ -1,6 +1,7 @@
class GetPhysicalExamReqModel { class GetPhysicalExamReqModel {
int patientMRN; int patientMRN;
int appointmentNo; int appointmentNo;
int admissionNo;
String episodeID; String episodeID;
String from; String from;
String to; String to;
@ -10,6 +11,7 @@ class GetPhysicalExamReqModel {
GetPhysicalExamReqModel({ GetPhysicalExamReqModel({
this.patientMRN, this.patientMRN,
this.appointmentNo, this.appointmentNo,
this.admissionNo,
this.episodeID, this.episodeID,
this.from, this.from,
this.to, this.to,
@ -31,6 +33,7 @@ class GetPhysicalExamReqModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['PatientMRN'] = this.patientMRN; data['PatientMRN'] = this.patientMRN;
data['AppointmentNo'] = this.appointmentNo; data['AppointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo;
data['EpisodeID'] = this.episodeID; data['EpisodeID'] = this.episodeID;
data['From'] = this.from; data['From'] = this.from;
data['To'] = this.to; data['To'] = this.to;

@ -1,12 +1,13 @@
class PostPhysicalExamRequestModel { class PostPhysicalExamRequestModel {
List<ListHisProgNotePhysicalExaminationVM> listHisProgNotePhysicalExaminationVM; List<ListHisProgNotePhysicalExaminationVM>
listHisProgNotePhysicalExaminationVM;
PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM}); PostPhysicalExamRequestModel({this.listHisProgNotePhysicalExaminationVM});
PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) { PostPhysicalExamRequestModel.fromJson(Map<String, dynamic> json) {
if (json['listHisProgNotePhysicalExaminationVM'] != null) { if (json['listHisProgNotePhysicalExaminationVM'] != null) {
listHisProgNotePhysicalExaminationVM = new List<ListHisProgNotePhysicalExaminationVM>(); listHisProgNotePhysicalExaminationVM =
new List<ListHisProgNotePhysicalExaminationVM>();
json['listHisProgNotePhysicalExaminationVM'].forEach((v) { json['listHisProgNotePhysicalExaminationVM'].forEach((v) {
listHisProgNotePhysicalExaminationVM listHisProgNotePhysicalExaminationVM
.add(new ListHisProgNotePhysicalExaminationVM.fromJson(v)); .add(new ListHisProgNotePhysicalExaminationVM.fromJson(v));
@ -17,8 +18,10 @@ class PostPhysicalExamRequestModel {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.listHisProgNotePhysicalExaminationVM != null) { if (this.listHisProgNotePhysicalExaminationVM != null) {
data['listHisProgNotePhysicalExaminationVM'] = data['listHisProgNotePhysicalExaminationVM'] = this
this.listHisProgNotePhysicalExaminationVM.map((v) => v.toJson()).toList(); .listHisProgNotePhysicalExaminationVM
.map((v) => v.toJson())
.toList();
} }
return data; return data;
} }
@ -27,6 +30,7 @@ class PostPhysicalExamRequestModel {
class ListHisProgNotePhysicalExaminationVM { class ListHisProgNotePhysicalExaminationVM {
int episodeId; int episodeId;
int appointmentNo; int appointmentNo;
int admissionNo;
int examType; int examType;
int examId; int examId;
int patientMRN; int patientMRN;
@ -48,6 +52,7 @@ class PostPhysicalExamRequestModel {
ListHisProgNotePhysicalExaminationVM( ListHisProgNotePhysicalExaminationVM(
{this.episodeId, {this.episodeId,
this.appointmentNo, this.appointmentNo,
this.admissionNo,
this.examType, this.examType,
this.examId, this.examId,
this.patientMRN, this.patientMRN,
@ -69,6 +74,8 @@ class PostPhysicalExamRequestModel {
ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) { ListHisProgNotePhysicalExaminationVM.fromJson(Map<String, dynamic> json) {
episodeId = json['episodeId']; episodeId = json['episodeId'];
appointmentNo = json['appointmentNo']; appointmentNo = json['appointmentNo'];
admissionNo = json['AdmissionNo'];
examType = json['examType']; examType = json['examType'];
examId = json['examId']; examId = json['examId'];
patientMRN = json['patientMRN']; patientMRN = json['patientMRN'];
@ -92,6 +99,7 @@ class PostPhysicalExamRequestModel {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['episodeId'] = this.episodeId; data['episodeId'] = this.episodeId;
data['appointmentNo'] = this.appointmentNo; data['appointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo;
data['examType'] = this.examType; data['examType'] = this.examType;
data['examId'] = this.examId; data['examId'] = this.examId;
data['patientMRN'] = this.patientMRN; data['patientMRN'] = this.patientMRN;

@ -475,73 +475,7 @@ class _UpdateAssessmentPageState extends State<UpdateAssessmentPage> implements
), ),
), ),
), ),
), ),),
bottomSheet: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: HexColor('#707070'), width: 0),
),
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 12 : 10),
width: double.infinity,
child: Column(
children: [
SizedBox(
height: 10,
),
Container(
child: FractionallySizedBox(
widthFactor: .80,
child: Center(
child: Row(
children: [
Expanded(
child: AppButton(
title: TranslationBase.of(context).previous,
color: Colors.grey[300],
fontColor: Colors.black,
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
fontWeight: FontWeight.w600,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
widget.changePageViewIndex(1);
},
),
),
SizedBox(
width: 5,
),
Expanded(
child: AppButton(
title: TranslationBase.of(context).next,
fontWeight: FontWeight.w600,
color: Colors.red[700],
height: SizeConfig.heightMultiplier *
(SizeConfig.isHeightVeryShort ? 8 : 6),
padding: 10,
disabled: model.state == ViewState.BusyLocal,
onPressed: () async {
},
),
),
],
),
),
),
),
SizedBox(
height: 5,
),
],
),
)),
); );
} }

@ -44,7 +44,8 @@ class UpdateObjectivePage extends StatefulWidget {
_UpdateObjectivePageState createState() => _UpdateObjectivePageState(); _UpdateObjectivePageState createState() => _UpdateObjectivePageState();
} }
class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements ObjectiveCallBack { class _UpdateObjectivePageState extends State<UpdateObjectivePage>
implements ObjectiveCallBack {
bool isSysExaminationExpand = false; bool isSysExaminationExpand = false;
List<MySelectedExamination> mySelectedExamination = List(); List<MySelectedExamination> mySelectedExamination = List();
@ -67,13 +68,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
onModelReady: (model) async { onModelReady: (model) async {
model.setObjectiveCallBack(this); model.setObjectiveCallBack(this);
mySelectedExamination.clear(); mySelectedExamination.clear();
GetPhysicalExamReqModel getPhysicalExamReqModel =
GetPhysicalExamReqModel( await model.getPatientPhysicalExam(widget.patientInfo);
patientMRN: widget.patientInfo.patientMRN,
episodeID: widget.patientInfo.episodeNo.toString(),
appointmentNo:
int.parse(widget.patientInfo.appointmentNo.toString()));
await model.getPatientPhysicalExam(getPhysicalExamReqModel);
if (model.patientPhysicalExamList.isNotEmpty) { if (model.patientPhysicalExamList.isNotEmpty) {
if (model.physicalExaminationList.length == 0) { if (model.physicalExaminationList.length == 0) {
await model.getMasterLookup(MasterKeysService.PhysicalExamination); await model.getMasterLookup(MasterKeysService.PhysicalExamination);
@ -112,7 +108,6 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SOAPStepHeader( SOAPStepHeader(
currentIndex: widget.currentIndex, currentIndex: widget.currentIndex,
@ -213,6 +208,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
// TODO Elham* // TODO Elham*
widget.changePageViewIndex(2); widget.changePageViewIndex(2);
/// TODO Elham* move this logic to view model
// if (mySelectedExamination.isNotEmpty) { // if (mySelectedExamination.isNotEmpty) {
// widget.changeLoadingState(true); // widget.changeLoadingState(true);
// Map profile = await sharedPref.getObj(DOCTOR_PROFILE); // Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
@ -225,9 +221,9 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
// null) // null)
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = // postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM =
// []; // [];
// // ListHisProgNotePhysicalExaminationVM
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM // listHisProgNotePhysicalExaminationVM =
// .add(ListHisProgNotePhysicalExaminationVM( // ListHisProgNotePhysicalExaminationVM(
// patientMRN: widget.patientInfo.patientMRN, // patientMRN: widget.patientInfo.patientMRN,
// episodeId: widget.patientInfo.episodeNo, // episodeId: widget.patientInfo.episodeNo,
// appointmentNo: widget.patientInfo.appointmentNo, // appointmentNo: widget.patientInfo.appointmentNo,
@ -251,7 +247,15 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
// : exam.isAbnormal // : exam.isAbnormal
// ? 'AbNormal' // ? 'AbNormal'
// : "Not Examined", // : "Not Examined",
// isNew: exam.isNew)); // isNew: exam.isNew,
// );
// if (widget.patientInfo.admissionNo != null &&
// widget.patientInfo.admissionNo.isNotEmpty) {
// listHisProgNotePhysicalExaminationVM.admissionNo =
// int.parse(widget.patientInfo.admissionNo);
// }
// postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM
// .add(listHisProgNotePhysicalExaminationVM);
// }); // });
// //
// if (model.patientPhysicalExamList.isEmpty) { // if (model.patientPhysicalExamList.isEmpty) {
@ -297,7 +301,8 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage> implements Ob
FadePage( FadePage(
page: AddExaminationPage( page: AddExaminationPage(
mySelectedExamination: mySelectedExamination, mySelectedExamination: mySelectedExamination,
addSelectedExamination: (List<MySelectedExamination> mySelectedExaminationLocal ) { addSelectedExamination:
(List<MySelectedExamination> mySelectedExaminationLocal) {
setState(() { setState(() {
{ {
mySelectedExaminationLocal.forEach((element) { mySelectedExaminationLocal.forEach((element) {

@ -28,6 +28,8 @@ class UpdatePlanPage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final PatiantInformtion patientInfo; final PatiantInformtion patientInfo;
final Function changeLoadingState; final Function changeLoadingState;
final Function changeStateFun;
final SOAPViewModel sOAPViewModel;
final int currentIndex; final int currentIndex;
@ -36,7 +38,7 @@ class UpdatePlanPage extends StatefulWidget {
this.changePageViewIndex, this.changePageViewIndex,
this.patientInfo, this.patientInfo,
this.changeLoadingState, this.changeLoadingState,
this.currentIndex}); this.currentIndex, this.sOAPViewModel, this.changeStateFun});
@override @override
_UpdatePlanPageState createState() => _UpdatePlanPageState(); _UpdatePlanPageState createState() => _UpdatePlanPageState();
@ -84,26 +86,27 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: ''); doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel); await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel);
///TODO set progressNote in model; ///TODO set progressNote in model;
if (model.patientProgressNoteList.isNotEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString( progressNoteController.text = Helpers.parseHtmlString(
model.patientProgressNoteList[0].planNote); widget.sOAPViewModel.patientProgressNoteList[0].planNote);
patientProgressNote.planNote = progressNoteController.text; patientProgressNote.planNote = progressNoteController.text;
patientProgressNote.createdByName = patientProgressNote.createdByName =
model.patientProgressNoteList[0].createdByName; widget.sOAPViewModel.patientProgressNoteList[0].createdByName;
patientProgressNote.createdOn = patientProgressNote.createdOn =
model.patientProgressNoteList[0].createdOn; widget.sOAPViewModel.patientProgressNoteList[0].createdOn;
patientProgressNote.editedOn = patientProgressNote.editedOn =
model.patientProgressNoteList[0].editedOn; widget.sOAPViewModel.patientProgressNoteList[0].editedOn;
patientProgressNote.editedByName = patientProgressNote.editedByName =
model.patientProgressNoteList[0].editedByName; widget.sOAPViewModel.patientProgressNoteList[0].editedByName;
patientProgressNote.appointmentNo = patientProgressNote.appointmentNo =
model.patientProgressNoteList[0].appointmentNo; widget.sOAPViewModel.patientProgressNoteList[0].appointmentNo;
setState(() { setState(() {
isAddProgress = isAddProgress; isAddProgress = isAddProgress;
model.isAddProgress = isAddProgress; widget.sOAPViewModel.isAddProgress = isAddProgress;
widget.sOAPViewModel.progressNoteText = progressNoteController.text;
}); });
} }
} }
@ -112,7 +115,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<SOAPViewModel>( return BaseView<SOAPViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
model.setPlanCallBack(this); widget.sOAPViewModel.setPlanCallBack(this);
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
GetGetProgressNoteReqModel( GetGetProgressNoteReqModel(
appointmentNo: appointmentNo:
@ -121,26 +124,27 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: ''); doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel); await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString( progressNoteController.text = Helpers.parseHtmlString(
model.patientProgressNoteList[0].planNote); widget.sOAPViewModel.patientProgressNoteList[0].planNote);
patientProgressNote.planNote = progressNoteController.text; patientProgressNote.planNote = progressNoteController.text;
patientProgressNote.createdByName = patientProgressNote.createdByName =
model.patientProgressNoteList[0].createdByName; widget.sOAPViewModel.patientProgressNoteList[0].createdByName;
patientProgressNote.createdOn = patientProgressNote.createdOn =
model.patientProgressNoteList[0].createdOn; widget.sOAPViewModel.patientProgressNoteList[0].createdOn;
patientProgressNote.editedOn = patientProgressNote.editedOn =
model.patientProgressNoteList[0].editedOn; widget.sOAPViewModel.patientProgressNoteList[0].editedOn;
patientProgressNote.editedByName = patientProgressNote.editedByName =
model.patientProgressNoteList[0].editedByName; widget.sOAPViewModel.patientProgressNoteList[0].editedByName;
patientProgressNote.appointmentNo = patientProgressNote.appointmentNo =
model.patientProgressNoteList[0].appointmentNo; widget.sOAPViewModel.patientProgressNoteList[0].appointmentNo;
widget.sOAPViewModel.progressNoteText = progressNoteController.text;
setState(() { setState(() {
isAddProgress = false; isAddProgress = false;
model.isAddProgress = false; widget.sOAPViewModel.isAddProgress = false;
}); });
} }
widget.changeLoadingState(false); widget.changeLoadingState(false);
@ -188,6 +192,8 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
patientProgressNote.planNote = value; patientProgressNote.planNote = value;
model.progressNoteText = value;
widget.changeStateFun();
}); });
}, },
), ),
@ -301,6 +307,7 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
onTap: () { onTap: () {
setState(() { setState(() {
isAddProgress = true; isAddProgress = true;
widget.sOAPViewModel.isAddProgress = true;
}); });
}, },
child: Icon( child: Icon(
@ -342,17 +349,17 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
doctorID: '', doctorID: '',
editedBy: ''); editedBy: '');
if (model.patientProgressNoteList.isEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isEmpty) {
await model.postProgressNote(postProgressNoteRequestModel); await widget.sOAPViewModel.postProgressNote(postProgressNoteRequestModel);
} else { } else {
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
postProgressNoteRequestModel.editedBy = doctorProfile.doctorID; postProgressNoteRequestModel.editedBy = doctorProfile.doctorID;
await model.patchProgressNote(postProgressNoteRequestModel); await widget.sOAPViewModel.patchProgressNote(postProgressNoteRequestModel);
} }
if (model.state == ViewState.ErrorLocal) { if (widget.sOAPViewModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(model.error); Helpers.showErrorToast(widget.sOAPViewModel.error);
} else { } else {
GetGetProgressNoteReqModel getGetProgressNoteReqModel = GetGetProgressNoteReqModel getGetProgressNoteReqModel =
@ -363,25 +370,25 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> implements PlanCallBack
episodeID: widget.patientInfo.episodeNo.toString(), episodeID: widget.patientInfo.episodeNo.toString(),
editedBy: '', editedBy: '',
doctorID: ''); doctorID: '');
await model.getPatientProgressNote(getGetProgressNoteReqModel); await widget.sOAPViewModel.getPatientProgressNote(getGetProgressNoteReqModel);
if (model.patientProgressNoteList.isNotEmpty) { if (widget.sOAPViewModel.patientProgressNoteList.isNotEmpty) {
progressNoteController.text = Helpers.parseHtmlString( progressNoteController.text = Helpers.parseHtmlString(
model.patientProgressNoteList[0].planNote); widget.sOAPViewModel.patientProgressNoteList[0].planNote);
patientProgressNote.planNote = progressNoteController.text; patientProgressNote.planNote = progressNoteController.text;
patientProgressNote.createdByName = patientProgressNote.createdByName =
model.patientProgressNoteList[0].createdByName; widget.sOAPViewModel.patientProgressNoteList[0].createdByName;
patientProgressNote.createdOn = patientProgressNote.createdOn =
model.patientProgressNoteList[0].createdOn; widget.sOAPViewModel.patientProgressNoteList[0].createdOn;
patientProgressNote.editedOn = patientProgressNote.editedOn =
model.patientProgressNoteList[0].editedOn; widget.sOAPViewModel.patientProgressNoteList[0].editedOn;
patientProgressNote.editedByName = patientProgressNote.editedByName =
model.patientProgressNoteList[0].editedByName; widget.sOAPViewModel.patientProgressNoteList[0].editedByName;
patientProgressNote.appointmentNo = patientProgressNote.appointmentNo =
model.patientProgressNoteList[0].appointmentNo; widget.sOAPViewModel.patientProgressNoteList[0].appointmentNo;
setState(() { setState(() {
isAddProgress = false; isAddProgress = false;
model.isAddProgress = false; widget.sOAPViewModel.isAddProgress = false;
}); });
} }
} }

@ -60,6 +60,11 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
}); });
} }
void changeStateFun(){
setState(() {
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -94,25 +99,27 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
}, },
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
children: <Widget>[ children: <Widget>[
UpdateSubjectivePage( // UpdateSubjectivePage(
changePageViewIndex: changePageViewIndex, // changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex, // currentIndex: _currentIndex,
patientInfo: patient, // patientInfo: patient,
changeLoadingState: changeLoadingState), // changeLoadingState: changeLoadingState),
UpdateObjectivePage( // UpdateObjectivePage(
changePageViewIndex: changePageViewIndex, // changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex, // currentIndex: _currentIndex,
patientInfo: patient, // patientInfo: patient,
changeLoadingState: changeLoadingState), // changeLoadingState: changeLoadingState),
UpdateAssessmentPage( // UpdateAssessmentPage(
changePageViewIndex: changePageViewIndex, // changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex, // currentIndex: _currentIndex,
patientInfo: patient, // patientInfo: patient,
changeLoadingState: changeLoadingState), // changeLoadingState: changeLoadingState),
UpdatePlanPage( UpdatePlanPage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
currentIndex: _currentIndex, currentIndex: _currentIndex,
patientInfo: patient, patientInfo: patient,
sOAPViewModel: model,
changeStateFun: changeStateFun,
changeLoadingState: changeLoadingState) changeLoadingState: changeLoadingState)
], ],
), ),
@ -123,7 +130,7 @@ class _UpdateSoapIndexState extends State<UpdateSoapIndex>
], ],
), ),
), ),
bottomSheet: Container( bottomSheet:_isLoading?Container(height: 0,): Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(

Loading…
Cancel
Save