|
|
|
|
@ -12,15 +12,11 @@ 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/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/expandable-widget-header-body.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
import 'SOAP_step_header.dart';
|
|
|
|
|
@ -268,7 +264,6 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|
fontColor: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.changePageViewIndex(2);
|
|
|
|
|
@ -285,22 +280,33 @@ class _UpdatePlanPageState extends State<UpdatePlanPage> {
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
disabled: progressNoteController.text.isEmpty,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
|
|
|
|
|
if (progressNoteController.text.isNotEmpty) {
|
|
|
|
|
if (isAddProgress) {
|
|
|
|
|
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
|
|
|
|
DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile);
|
|
|
|
|
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;
|
|
|
|
|
widget.patientProgressNote.createdByName =
|
|
|
|
|
widget.patientProgressNote
|
|
|
|
|
.createdByName ??
|
|
|
|
|
doctorProfile.doctorName;
|
|
|
|
|
widget.patientProgressNote.editedByName =
|
|
|
|
|
doctorProfile.doctorName;
|
|
|
|
|
widget.patientProgressNote.createdOn =
|
|
|
|
|
DateTime.now().toString();
|
|
|
|
|
widget.patientProgressNote.planNote =
|
|
|
|
|
progressNoteController.text;
|
|
|
|
|
isAddProgress = !isAddProgress;
|
|
|
|
|
});
|
|
|
|
|
submitPlan(model);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
helpers.showErrorToast(TranslationBase.of(context)
|
|
|
|
|
.progressNoteErrorMsg);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|