|
|
|
|
@ -116,7 +116,7 @@ class _AddHistoryWidgetState extends State<AddHistoryWidget>
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (context) {
|
|
|
|
|
return AddHistoryDialog();
|
|
|
|
|
return AddHistoryDialog(changePageViewIndex:changePageViewIndex, controller: _controller,);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -218,11 +218,8 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
|
|
|
|
|
heightFactor: 0.7,
|
|
|
|
|
child: BaseView<SOAPViewModel>(
|
|
|
|
|
onModelReady: (model) async {
|
|
|
|
|
// if (model.listOfAllergies == null) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.Allergies);
|
|
|
|
|
// }
|
|
|
|
|
if (model.allergySeverityList == null) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.AllergySeverity);
|
|
|
|
|
if (model.historyFamilyList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistoryFamily);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
builder: (_, model, w) => AppScaffold(
|
|
|
|
|
@ -237,8 +234,19 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
PriorityBar(onTap: (activePriority) {
|
|
|
|
|
PriorityBar(onTap: (activePriority) async {
|
|
|
|
|
widget.changePageViewIndex(activePriority);
|
|
|
|
|
if(activePriority ==1) {
|
|
|
|
|
if (model.historySurgicalList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistorySurgical);
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistorySports);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(activePriority ==2) {
|
|
|
|
|
if (model.historyMedicalList.length == 0) {
|
|
|
|
|
await model.getMasterLookup(MasterKeysService.HistoryMedical);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
@ -254,240 +262,211 @@ class _AddHistoryDialogState extends State<AddHistoryDialog> {
|
|
|
|
|
},
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.5,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged: (bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts('History',
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color: Colors.black),
|
|
|
|
|
Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.5,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: model.historyFamilyList
|
|
|
|
|
.map((historyInfo) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged:
|
|
|
|
|
(bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
historyInfo.nameEn,
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color:
|
|
|
|
|
Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
if (model.state == ViewState.Idle)
|
|
|
|
|
AppButton(
|
|
|
|
|
title: "Add SELECTED HISTORIES".toUpperCase(),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
if (model.state == ViewState.Idle)
|
|
|
|
|
AppButton(
|
|
|
|
|
title: "Add SELECTED HISTORIES".toUpperCase(),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts("eee"),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.5,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: model.mergeHistorySurgicalWithHistorySportList
|
|
|
|
|
.map((historyInfo) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged:
|
|
|
|
|
(bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
historyInfo.nameEn,
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color:
|
|
|
|
|
Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
if (model.state == ViewState.Idle)
|
|
|
|
|
AppButton(
|
|
|
|
|
title: "Add SELECTED HISTORIES".toUpperCase(),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts("cccc"),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Container(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.5,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: model.historyMedicalList
|
|
|
|
|
.map((historyInfo) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Checkbox(
|
|
|
|
|
value: true,
|
|
|
|
|
activeColor:
|
|
|
|
|
Colors.red[800],
|
|
|
|
|
onChanged:
|
|
|
|
|
(bool newValue) {
|
|
|
|
|
setState(() {});
|
|
|
|
|
}),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
const EdgeInsets
|
|
|
|
|
.symmetric(
|
|
|
|
|
horizontal: 10,
|
|
|
|
|
vertical: 0),
|
|
|
|
|
child: Texts(
|
|
|
|
|
historyInfo.nameEn,
|
|
|
|
|
variant: "bodyText",
|
|
|
|
|
bold: true,
|
|
|
|
|
color:
|
|
|
|
|
Colors.black),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
if (model.state == ViewState.Idle)
|
|
|
|
|
AppButton(
|
|
|
|
|
title: "Add SELECTED HISTORIES".toUpperCase(),
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
|