|
|
|
@ -12,6 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.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/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
|
|
|
|
@ -142,154 +143,158 @@ class _AddSelectedLabOrderState extends State<AddSelectedLabOrder> {
|
|
|
|
|
onModelReady: (model) => model.getProcedureCategory(
|
|
|
|
|
categoryName: "Laboratory", categoryID: "02"),
|
|
|
|
|
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
|
|
|
|
|
NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
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: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'New Lab Order',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.48,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.close,
|
|
|
|
|
size: 28.0,
|
|
|
|
|
AppScaffold(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
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.0,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'New Lab Order',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10.0,
|
|
|
|
|
),
|
|
|
|
|
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();
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.48,
|
|
|
|
|
),
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.close,
|
|
|
|
|
size: 28.0,
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
isEntityListSelected: (master) =>
|
|
|
|
|
isEntityListSelected(master),
|
|
|
|
|
)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
// Container(
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(context).orderType),
|
|
|
|
|
// Radio(
|
|
|
|
|
// activeColor: Color(0xFFB9382C),
|
|
|
|
|
// value: 1,
|
|
|
|
|
// groupValue: selectedType,
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
|
// setSelectedType(value);
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// Text('routine'),
|
|
|
|
|
// Radio(
|
|
|
|
|
// activeColor: Color(0xFFB9382C),
|
|
|
|
|
// groupValue: selectedType,
|
|
|
|
|
// value: 0,
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
|
// setSelectedType(value);
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// Text(TranslationBase.of(context).urgent),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 15.0,
|
|
|
|
|
// ),
|
|
|
|
|
// TextFields(
|
|
|
|
|
// hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
// controller: remarksController,
|
|
|
|
|
// minLines: 3,
|
|
|
|
|
// maxLines: 5,
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 100.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(
|
|
|
|
|
SizeConfig.widthMultiplier * 5),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
"Add Lab Order", //TranslationBase.of(context)
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
//.addSelectedProcedures,
|
|
|
|
|
color: Color(0xff359846),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
//print(entityList.toString());
|
|
|
|
|
onPressed:
|
|
|
|
|
if (entityList.isEmpty == true) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
"Fill the mandatory procedure details");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10.0,
|
|
|
|
|
),
|
|
|
|
|
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(
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// AppText(
|
|
|
|
|
// TranslationBase.of(context).orderType),
|
|
|
|
|
// Radio(
|
|
|
|
|
// activeColor: Color(0xFFB9382C),
|
|
|
|
|
// value: 1,
|
|
|
|
|
// groupValue: selectedType,
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
|
// setSelectedType(value);
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// Text('routine'),
|
|
|
|
|
// Radio(
|
|
|
|
|
// activeColor: Color(0xFFB9382C),
|
|
|
|
|
// groupValue: selectedType,
|
|
|
|
|
// value: 0,
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
|
// setSelectedType(value);
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
// Text(TranslationBase.of(context).urgent),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 15.0,
|
|
|
|
|
// ),
|
|
|
|
|
// TextFields(
|
|
|
|
|
// hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
// controller: remarksController,
|
|
|
|
|
// minLines: 3,
|
|
|
|
|
// maxLines: 5,
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 100.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(
|
|
|
|
|
SizeConfig.widthMultiplier * 5),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
"Add Lab Order", //TranslationBase.of(context)
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
//.addSelectedProcedures,
|
|
|
|
|
color: Color(0xff359846),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
//print(entityList.toString());
|
|
|
|
|
onPressed:
|
|
|
|
|
if (entityList.isEmpty == true) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
"Fill the mandatory procedure details");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
postProcedure(
|
|
|
|
|
orderType: selectedType.toString(),
|
|
|
|
|
entityList: entityList,
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: widget.model,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
postProcedure(
|
|
|
|
|
orderType: selectedType.toString(),
|
|
|
|
|
entityList: entityList,
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: widget.model,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|