|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
@ -20,14 +19,13 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.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_buttons_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.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 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
|
|
|
|
|
import '../expandable_SOAP_widget.dart';
|
|
|
|
|
|
|
|
|
|
class UpdateSubjectivePage extends StatefulWidget {
|
|
|
|
|
final Function changePageViewIndex;
|
|
|
|
@ -220,6 +218,9 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
backgroundColor: Theme
|
|
|
|
|
.of(context)
|
|
|
|
|
.scaffoldBackgroundColor,
|
|
|
|
|
// baseViewModel: model,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
@ -232,46 +233,31 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(TranslationBase.of(context).chiefComplaints.toUpperCase(),
|
|
|
|
|
variant: isChiefExpand ? "bodyText" : '',
|
|
|
|
|
bold: isChiefExpand ? true : false,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
Icon(
|
|
|
|
|
FontAwesomeIcons.asterisk,
|
|
|
|
|
color: AppGlobal.appPrimaryColor,
|
|
|
|
|
size: 12,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isChiefExpand = !isChiefExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
isChiefExpand ? EvaIcons.minus : EvaIcons.plus))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Form(
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
|
headerTitle: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.chiefComplaints
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isChiefExpand = !isChiefExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Form(
|
|
|
|
|
key: formKey,
|
|
|
|
|
child: Column(children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hasLabelText: complaintsController.text != ''
|
|
|
|
|
? true
|
|
|
|
|
: false,
|
|
|
|
|
hintText: TranslationBase.of(context)
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.addChiefComplaints,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
// hintColor: Colors.black,
|
|
|
|
@ -297,11 +283,11 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hasLabelText: illnessController.text != ''
|
|
|
|
|
? true
|
|
|
|
|
: false,
|
|
|
|
|
hasLabelText:
|
|
|
|
|
illnessController.text != '' ? true : false,
|
|
|
|
|
showLabelText: true,
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
@ -326,12 +312,15 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
UpdateMedicationWidget(medicationController: medicationController,),
|
|
|
|
|
UpdateMedicationWidget(
|
|
|
|
|
medicationController: medicationController,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hasLabelText: medicationController.text != ''
|
|
|
|
|
? true
|
|
|
|
@ -358,117 +347,94 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
isExpand: isChiefExpand,
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 1,
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
isExpanded: isChiefExpand,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.histories
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
variant: isHistoryExpand ? "bodyText" : '',
|
|
|
|
|
bold: isHistoryExpand ? true : false,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isHistoryExpand = !isHistoryExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(isHistoryExpand
|
|
|
|
|
? EvaIcons.minus
|
|
|
|
|
: EvaIcons.plus))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Column(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
|
headerTitle: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.histories
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isHistoryExpand = !isHistoryExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
UpdateHistoryWidget(myHistoryList: widget.myHistoryList)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
isExpand: isHistoryExpand,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 1,
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
isExpanded: isHistoryExpand,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.allergiesSoap
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
variant: isAllergiesExpand ? "bodyText" : '',
|
|
|
|
|
bold: isAllergiesExpand ? true : false,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isAllergiesExpand = !isAllergiesExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Icon(isAllergiesExpand
|
|
|
|
|
? EvaIcons.minus
|
|
|
|
|
: EvaIcons.plus))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget:Column(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ExpandableSOAPWidget(
|
|
|
|
|
headerTitle: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.allergiesSoap
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
isAllergiesExpand = !isAllergiesExpand;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
UpdateAllergiesWidget(myAllergiesList: widget.myAllergiesList,),
|
|
|
|
|
UpdateAllergiesWidget(myAllergiesList: widget
|
|
|
|
|
.myAllergiesList,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
,
|
|
|
|
|
isExpand: isAllergiesExpand,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 1,
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
),
|
|
|
|
|
isExpanded: isAllergiesExpand,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30,
|
|
|
|
|
height:MediaQuery.of(context).size.height * 0.2,
|
|
|
|
|
),
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase.of(context).next,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
bottomSheet: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: HexColor('#707070'),
|
|
|
|
|
width: 0.30),
|
|
|
|
|
),
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height * 0.15,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Container(child: FractionallySizedBox(
|
|
|
|
|
widthFactor: .80,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppButton(
|
|
|
|
|
title: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.next,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
addSubjectiveInfo(
|
|
|
|
@ -477,11 +443,13 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
myHistoryList: widget.myHistoryList);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -624,12 +592,13 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> {
|
|
|
|
|
numberOfWeeks: 0);
|
|
|
|
|
if (model.patientChiefComplaintList.isEmpty) {
|
|
|
|
|
// TODO: make it postChiefComplaint after it start to work
|
|
|
|
|
postChiefComplaintRequestModel.editedBy='';
|
|
|
|
|
postChiefComplaintRequestModel.editedBy = '';
|
|
|
|
|
await model.postChiefComplaint(postChiefComplaintRequestModel);
|
|
|
|
|
} else {
|
|
|
|
|
await model.patchChiefComplaint(postChiefComplaintRequestModel);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|