|
|
|
@ -568,139 +568,154 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 810,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Select Procedure'.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: model.categoryList != null &&
|
|
|
|
|
model.categoryList.length > 0
|
|
|
|
|
? () {
|
|
|
|
|
ListSelectDialog dialog = ListSelectDialog(
|
|
|
|
|
list: model.categoryList,
|
|
|
|
|
attributeName: 'categoryName',
|
|
|
|
|
attributeValueId: 'categoryId',
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedCategory = selectedValue;
|
|
|
|
|
model.getProcedureCategory(
|
|
|
|
|
categoryName:
|
|
|
|
|
selectedCategory['categoryName']);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
//model.getProcedureCategory();
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
'Procedure Categorey',
|
|
|
|
|
selectedCategory != null
|
|
|
|
|
? selectedCategory['categoryName']
|
|
|
|
|
child: DraggableScrollableSheet(
|
|
|
|
|
minChildSize: 0.90,
|
|
|
|
|
initialChildSize: 0.95,
|
|
|
|
|
maxChildSize: 1.0,
|
|
|
|
|
builder: (BuildContext context, ScrollController scrollController) {
|
|
|
|
|
return SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 1.20,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Search Procedure Category'.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: model.categoryList != null &&
|
|
|
|
|
model.categoryList.length > 0
|
|
|
|
|
? () {
|
|
|
|
|
ListSelectDialog dialog = ListSelectDialog(
|
|
|
|
|
list: model.categoryList,
|
|
|
|
|
attributeName: 'categoryName',
|
|
|
|
|
attributeValueId: 'categoryId',
|
|
|
|
|
okText: TranslationBase.of(context).ok,
|
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedCategory = selectedValue;
|
|
|
|
|
model.getProcedureCategory(
|
|
|
|
|
categoryName: selectedCategory[
|
|
|
|
|
'categoryName']);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
showDialog(
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return dialog;
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
//model.getProcedureCategory();
|
|
|
|
|
}
|
|
|
|
|
: null,
|
|
|
|
|
true,
|
|
|
|
|
suffixIcon: Icon(
|
|
|
|
|
Icons.search,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
enabled: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (widget.model.categoriesList.length != 0)
|
|
|
|
|
EntityListCheckboxSearchWidget(
|
|
|
|
|
model: widget.model,
|
|
|
|
|
masterList: widget.model.categoriesList[0].entityList,
|
|
|
|
|
removeHistory: (item) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityList.remove(item);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addHistory: (history) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityList.add(history);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addSelectedHistories: () {
|
|
|
|
|
//TODO build your fun herr
|
|
|
|
|
// widget.addSelectedHistories();
|
|
|
|
|
},
|
|
|
|
|
isEntityListSelected: (master) =>
|
|
|
|
|
isEntityListSelected(master),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'Order Type'.toUpperCase(),
|
|
|
|
|
controller: procedureController,
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
'Procedure Categorey',
|
|
|
|
|
selectedCategory != null
|
|
|
|
|
? selectedCategory['categoryName']
|
|
|
|
|
: null,
|
|
|
|
|
true,
|
|
|
|
|
suffixIcon: Icon(
|
|
|
|
|
Icons.search,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
)),
|
|
|
|
|
enabled: false,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
TextFields(
|
|
|
|
|
hintText: 'Remarks',
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 50.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title: 'add Selected Procedures'.toUpperCase(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
postProcedure(
|
|
|
|
|
entityList: entityList,
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: widget.model,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
if (widget.model.categoriesList.length != 0)
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: EntityListCheckboxSearchWidget(
|
|
|
|
|
model: widget.model,
|
|
|
|
|
masterList:
|
|
|
|
|
widget.model.categoriesList[0].entityList,
|
|
|
|
|
removeHistory: (item) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityList.remove(item);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addHistory: (history) {
|
|
|
|
|
setState(() {
|
|
|
|
|
entityList.add(history);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addSelectedHistories: () {
|
|
|
|
|
//TODO build your fun herr
|
|
|
|
|
// widget.addSelectedHistories();
|
|
|
|
|
},
|
|
|
|
|
isEntityListSelected: (master) =>
|
|
|
|
|
isEntityListSelected(master),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'Order Type'.toUpperCase(),
|
|
|
|
|
controller: procedureController,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
TextFields(
|
|
|
|
|
hintText: 'Remarks',
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 50.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(
|
|
|
|
|
SizeConfig.widthMultiplier * 5),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
'add Selected Procedures'.toUpperCase(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
postProcedure(
|
|
|
|
|
entityList: entityList,
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: widget.model,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -760,7 +775,7 @@ void updateProcedureForm(context,
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
builder: (BuildContext bc) {
|
|
|
|
|
return Container(
|
|
|
|
|
height: 400,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.55,
|
|
|
|
|
child: Form(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
|
|
|
|
|