|
|
|
|
@ -33,8 +33,15 @@ class ProcedureScreen extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
int selectedType = 0;
|
|
|
|
|
int testNum = 1;
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
setSelectedType(int val) {
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedType = val;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TextEditingController procedureController = TextEditingController();
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -45,7 +52,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBarTitle: 'ORDER PROCEDURE',
|
|
|
|
|
appBarTitle: TranslationBase.of(context).orderProcedure,
|
|
|
|
|
body: NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
@ -199,7 +206,8 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
' Add more procedure',
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.addMoreProcedure,
|
|
|
|
|
fontWeight: FontWeight.w100,
|
|
|
|
|
fontSize: 12.5,
|
|
|
|
|
),
|
|
|
|
|
@ -275,7 +283,10 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Code #: ',
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.codeNo +
|
|
|
|
|
" : ",
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
@ -297,7 +308,10 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
width: 12.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Order Type: ',
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.orderType +
|
|
|
|
|
" : ",
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
@ -312,8 +326,8 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
: 'Urgent',
|
|
|
|
|
fontSize:
|
|
|
|
|
13.0,
|
|
|
|
|
color: Colors
|
|
|
|
|
.red,
|
|
|
|
|
color: Color(
|
|
|
|
|
0xFFB9382C),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -342,7 +356,10 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Price: ',
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.price +
|
|
|
|
|
" : ",
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.w700,
|
|
|
|
|
@ -409,6 +426,12 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
onTap: () {
|
|
|
|
|
updateProcedureForm(
|
|
|
|
|
context,
|
|
|
|
|
remarks: model
|
|
|
|
|
.procedureList[
|
|
|
|
|
0]
|
|
|
|
|
.entityList[
|
|
|
|
|
index]
|
|
|
|
|
.remarks,
|
|
|
|
|
procedureName: model
|
|
|
|
|
.procedureList[
|
|
|
|
|
0]
|
|
|
|
|
@ -452,6 +475,109 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
|
|
|
|
|
)),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updateProcedureForm(context,
|
|
|
|
|
{String procedureName,
|
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
String procedureId,
|
|
|
|
|
String remarks,
|
|
|
|
|
String categoreId}) {
|
|
|
|
|
ProcedureViewModel model = ProcedureViewModel();
|
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
|
TextEditingController orderController = TextEditingController();
|
|
|
|
|
showModalBottomSheet(
|
|
|
|
|
context: context,
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
builder: (BuildContext bc) {
|
|
|
|
|
return Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.55,
|
|
|
|
|
child: Form(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
procedureName.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(TranslationBase.of(context).orderType),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFB9382C),
|
|
|
|
|
value: 0,
|
|
|
|
|
groupValue: selectedType,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setSelectedType(value);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(TranslationBase.of(context).regular),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFB9382C),
|
|
|
|
|
groupValue: selectedType,
|
|
|
|
|
value: 1,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setSelectedType(value);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(TranslationBase.of(context).urgent),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: remarks,
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 100.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.updateProcedure
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
updateProcedure(
|
|
|
|
|
categorieId: categoreId,
|
|
|
|
|
procedureId: procedureId,
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: model,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
// authorizationForm(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
postProcedure(
|
|
|
|
|
@ -553,6 +679,7 @@ class AddSelectedProcedure extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
int selectedType;
|
|
|
|
|
ProcedureViewModel model;
|
|
|
|
|
PatiantInformtion patient;
|
|
|
|
|
_AddSelectedProcedureState({this.patient, this.model});
|
|
|
|
|
@ -560,6 +687,12 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
|
List<EntityList> entityList = List();
|
|
|
|
|
dynamic selectedCategory;
|
|
|
|
|
setSelectedType(int val) {
|
|
|
|
|
setState(() {
|
|
|
|
|
selectedType = val;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final screenSize = MediaQuery.of(context).size;
|
|
|
|
|
@ -582,11 +715,13 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
'Search Procedure Category'.toUpperCase(),
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.selectProcedures
|
|
|
|
|
.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5.0,
|
|
|
|
|
height: 10.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
|
@ -620,7 +755,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
: null,
|
|
|
|
|
child: TextField(
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
'Procedure Categorey',
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.procedureCategorise,
|
|
|
|
|
selectedCategory != null
|
|
|
|
|
? selectedCategory['categoryName']
|
|
|
|
|
: null,
|
|
|
|
|
@ -665,21 +801,36 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
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: Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).orderType),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFB9382C),
|
|
|
|
|
value: 0,
|
|
|
|
|
groupValue: selectedType,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setSelectedType(value);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(TranslationBase.of(context).regular),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFB9382C),
|
|
|
|
|
groupValue: selectedType,
|
|
|
|
|
value: 1,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
setSelectedType(value);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
Text(TranslationBase.of(context).urgent),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15.0,
|
|
|
|
|
),
|
|
|
|
|
TextFields(
|
|
|
|
|
hintText: 'Remarks',
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
@ -694,8 +845,8 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title:
|
|
|
|
|
'add Selected Procedures'.toUpperCase(),
|
|
|
|
|
title: TranslationBase.of(context)
|
|
|
|
|
.addSelectedProcedures,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
postProcedure(
|
|
|
|
|
@ -761,86 +912,3 @@ class _AddSelectedProcedureState extends State<AddSelectedProcedure> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void updateProcedureForm(context,
|
|
|
|
|
{String procedureName,
|
|
|
|
|
PatiantInformtion patient,
|
|
|
|
|
String procedureId,
|
|
|
|
|
String categoreId}) {
|
|
|
|
|
ProcedureViewModel model = ProcedureViewModel();
|
|
|
|
|
TextEditingController remarksController = TextEditingController();
|
|
|
|
|
TextEditingController orderController = TextEditingController();
|
|
|
|
|
showModalBottomSheet(
|
|
|
|
|
context: context,
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
builder: (BuildContext bc) {
|
|
|
|
|
return Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.55,
|
|
|
|
|
child: Form(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
procedureName.toUpperCase(),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 30.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'Order ',
|
|
|
|
|
controller: orderController,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6.0)),
|
|
|
|
|
border: Border.all(
|
|
|
|
|
width: 1.0, color: HexColor("#CCCCCC"))),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'Remarks',
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
minLines: 3,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 100.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 2),
|
|
|
|
|
child: Wrap(
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppButton(
|
|
|
|
|
title: 'Update procedure'.toUpperCase(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
updateProcedure(
|
|
|
|
|
categorieId: categoreId,
|
|
|
|
|
procedureId: procedureId,
|
|
|
|
|
patient: patient,
|
|
|
|
|
model: model,
|
|
|
|
|
remarks: remarksController.text);
|
|
|
|
|
// authorizationForm(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|