|
|
|
@ -51,24 +51,24 @@ postProcedure(
|
|
|
|
new PostPrescriptionReqModel();
|
|
|
|
new PostPrescriptionReqModel();
|
|
|
|
List<PrescriptionRequestModel> sss = List();
|
|
|
|
List<PrescriptionRequestModel> sss = List();
|
|
|
|
|
|
|
|
|
|
|
|
postProcedureReqModel.appointmentNo = 2016055159;
|
|
|
|
postProcedureReqModel.appointmentNo = patient.appointmentNo;
|
|
|
|
postProcedureReqModel.clinicID = 17;
|
|
|
|
postProcedureReqModel.clinicID = patient.clinicId;
|
|
|
|
postProcedureReqModel.episodeID = 200012330;
|
|
|
|
postProcedureReqModel.episodeID = patient.episodeNo;
|
|
|
|
postProcedureReqModel.patientMRN = 3120877;
|
|
|
|
postProcedureReqModel.patientMRN = patient.patientMRN;
|
|
|
|
postProcedureReqModel.vidaAuthTokenID =
|
|
|
|
postProcedureReqModel.vidaAuthTokenID =
|
|
|
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
|
|
|
|
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDAyIiwianRpIjoiOGFjNDRjZGQtOWE0Mi00M2YxLWE2YTQtMWQ4NzBmZmYwNTUyIiwiZW1haWwiOiIiLCJpZCI6IjEwMDIiLCJOYW1lIjoiVEVNUCAtIERPQ1RPUiIsIkVtcGxveWVlSWQiOiI0NzA5IiwiRmFjaWxpdHlHcm91cElkIjoiMDEwMjY2IiwiRmFjaWxpdHlJZCI6IjE1IiwiUGhhcmFtY3lGYWNpbGl0eUlkIjoiNTUiLCJJU19QSEFSTUFDWV9DT05ORUNURUQiOiJUcnVlIiwiRG9jdG9ySWQiOiI0NzA5IiwiU0VTU0lPTklEIjoiMjE1OTU2NDkiLCJDbGluaWNJZCI6IjEiLCJyb2xlIjpbIkRPQ1RPUlMiLCJIRUFEIERPQ1RPUlMiLCJBRE1JTklTVFJBVE9SUyIsIlJFQ0VQVElPTklTVCIsIkVSIE5VUlNFIiwiRVIgUkVDRVBUSU9OSVNUIiwiUEhBUk1BQ1kgQUNDT1VOVCBTVEFGRiIsIlBIQVJNQUNZIE5VUlNFIiwiSU5QQVRJRU5UIFBIQVJNQUNJU1QiLCJBRE1JU1NJT04gU1RBRkYiLCJBUFBST1ZBTCBTVEFGRiIsIkNPTlNFTlQgIiwiTUVESUNBTCBSRVBPUlQgLSBTSUNLIExFQVZFIE1BTkFHRVIiXSwibmJmIjoxNjA4NzM2NjY5LCJleHAiOjE2MDk2MDA2NjksImlhdCI6MTYwODczNjY2OX0.9EDgYrbe5fQA2CvgLdFT4s_PL7hD5R_Qggfpv4lDtUY";
|
|
|
|
sss.add(PrescriptionRequestModel(
|
|
|
|
sss.add(PrescriptionRequestModel(
|
|
|
|
covered: true,
|
|
|
|
covered: true,
|
|
|
|
dose: 1,
|
|
|
|
dose: 1,
|
|
|
|
itemId: int.parse(drugId),
|
|
|
|
itemId: drugId.isEmpty ? 1 : int.parse(drugId),
|
|
|
|
doseUnitId: 1,
|
|
|
|
doseUnitId: 1,
|
|
|
|
route: int.parse(route),
|
|
|
|
route: route.isEmpty ? 1 : int.parse(route),
|
|
|
|
frequency: int.parse(frequency),
|
|
|
|
frequency: frequency.isEmpty ? 1 : int.parse(frequency),
|
|
|
|
remarks: instruction,
|
|
|
|
remarks: instruction,
|
|
|
|
approvalRequired: true,
|
|
|
|
approvalRequired: true,
|
|
|
|
icdcode10Id: "test2",
|
|
|
|
icdcode10Id: "test2",
|
|
|
|
doseTime: int.parse(doseTimeIn),
|
|
|
|
doseTime: doseTimeIn.isEmpty ? 1 : int.parse(doseTimeIn),
|
|
|
|
duration: int.parse(duration),
|
|
|
|
duration: duration.isEmpty ? 1 : int.parse(duration),
|
|
|
|
doseStartDate: doseTime.toIso8601String()));
|
|
|
|
doseStartDate: doseTime.toIso8601String()));
|
|
|
|
postProcedureReqModel.prescriptionRequestModel = sss;
|
|
|
|
postProcedureReqModel.prescriptionRequestModel = sss;
|
|
|
|
//postProcedureReqModel.procedures = controlsProcedure;
|
|
|
|
//postProcedureReqModel.procedures = controlsProcedure;
|
|
|
|
@ -120,10 +120,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
List<dynamic> durationList;
|
|
|
|
List<dynamic> durationList;
|
|
|
|
List<dynamic> doseTimeList;
|
|
|
|
List<dynamic> doseTimeList;
|
|
|
|
List<dynamic> indicationList;
|
|
|
|
List<dynamic> indicationList;
|
|
|
|
|
|
|
|
String routeInatial = 'By Mouth';
|
|
|
|
|
|
|
|
|
|
|
|
//PatiantInformtion patient;
|
|
|
|
//PatiantInformtion patient;
|
|
|
|
dynamic _strength;
|
|
|
|
|
|
|
|
dynamic _selectedBranch;
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
@ -260,20 +259,21 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
|
|
|
|
|
|
|
|
return BaseView<PrescriptionViewModel>(
|
|
|
|
return BaseView<PrescriptionViewModel>(
|
|
|
|
onModelReady: (model) => model.getDrugs(),
|
|
|
|
onModelReady: (model) => model.getDrugs(),
|
|
|
|
builder: (BuildContext context, PrescriptionViewModel model,
|
|
|
|
builder:
|
|
|
|
Widget child) =>
|
|
|
|
(BuildContext context, PrescriptionViewModel model, Widget child) =>
|
|
|
|
DraggableScrollableSheet(
|
|
|
|
NetworkBaseView(
|
|
|
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
|
|
|
child: DraggableScrollableSheet(
|
|
|
|
initialChildSize: 0.90,
|
|
|
|
initialChildSize: 0.90,
|
|
|
|
maxChildSize: 0.90,
|
|
|
|
maxChildSize: 0.90,
|
|
|
|
minChildSize: 0.9,
|
|
|
|
minChildSize: 0.9,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context, ScrollController scrollController) {
|
|
|
|
(BuildContext context, ScrollController scrollController) {
|
|
|
|
|
|
|
|
return SingleChildScrollView(
|
|
|
|
return SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: 980,
|
|
|
|
height: 980,
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
padding:
|
|
|
|
horizontal: 12.0, vertical: 10.0),
|
|
|
|
EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
//mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
//mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
@ -307,16 +307,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
.ok,
|
|
|
|
.ok,
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
selectedDrug =
|
|
|
|
selectedDrug = selectedValue;
|
|
|
|
selectedValue;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -324,11 +322,16 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context).search,
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.searchMedicine,
|
|
|
|
selectedDrug != null
|
|
|
|
selectedDrug != null
|
|
|
|
? selectedDrug['GenericName']
|
|
|
|
? selectedDrug['GenericName']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
true),
|
|
|
|
true,
|
|
|
|
|
|
|
|
suffixIcon: Icon(
|
|
|
|
|
|
|
|
Icons.search,
|
|
|
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
|
|
|
)),
|
|
|
|
enabled: false,
|
|
|
|
enabled: false,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -337,45 +340,58 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
height: spaceBetweenTextFileds,
|
|
|
|
height: spaceBetweenTextFileds,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
child: Row(
|
|
|
|
child: InkWell(
|
|
|
|
children: [
|
|
|
|
onTap: referToList != null
|
|
|
|
AppText('Order Type'),
|
|
|
|
? () {
|
|
|
|
Radio(),
|
|
|
|
ListSelectDialog dialog =
|
|
|
|
Text('Regular'),
|
|
|
|
ListSelectDialog(
|
|
|
|
Radio(
|
|
|
|
list: referToList,
|
|
|
|
value: 1,
|
|
|
|
attributeName: 'name',
|
|
|
|
|
|
|
|
attributeValueId: 'id',
|
|
|
|
|
|
|
|
okText:
|
|
|
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.ok,
|
|
|
|
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
type = selectedValue;
|
|
|
|
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
showDialog(
|
|
|
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
|
|
|
context: context,
|
|
|
|
|
|
|
|
builder:
|
|
|
|
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
child: TextField(
|
|
|
|
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
|
|
|
.orderType,
|
|
|
|
|
|
|
|
type != null ? type['name'] : null,
|
|
|
|
|
|
|
|
true),
|
|
|
|
|
|
|
|
enabled: false,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('Urgent'),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// height: screenSize.height * 0.070,
|
|
|
|
|
|
|
|
// child: InkWell(
|
|
|
|
|
|
|
|
// onTap: referToList != null
|
|
|
|
|
|
|
|
// ? () {
|
|
|
|
|
|
|
|
// ListSelectDialog dialog =
|
|
|
|
|
|
|
|
// ListSelectDialog(
|
|
|
|
|
|
|
|
// list: referToList,
|
|
|
|
|
|
|
|
// attributeName: 'name',
|
|
|
|
|
|
|
|
// attributeValueId: 'id',
|
|
|
|
|
|
|
|
// okText:
|
|
|
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
|
|
|
// .ok,
|
|
|
|
|
|
|
|
// okFunction: (selectedValue) {
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
|
|
|
|
// type = selectedValue;
|
|
|
|
|
|
|
|
// _selectedBranch = null;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
// showDialog(
|
|
|
|
|
|
|
|
// barrierDismissible: false,
|
|
|
|
|
|
|
|
// context: context,
|
|
|
|
|
|
|
|
// builder:
|
|
|
|
|
|
|
|
// (BuildContext context) {
|
|
|
|
|
|
|
|
// return dialog;
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// : null,
|
|
|
|
|
|
|
|
// child: TextField(
|
|
|
|
|
|
|
|
// decoration: textFieldSelectorDecoration(
|
|
|
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
|
|
|
// .orderType,
|
|
|
|
|
|
|
|
// type != null ? type['name'] : null,
|
|
|
|
|
|
|
|
// true),
|
|
|
|
|
|
|
|
// enabled: false,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
SizedBox(height: spaceBetweenTextFileds),
|
|
|
|
SizedBox(height: spaceBetweenTextFileds),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
height: screenSize.height * 0.070,
|
|
|
|
@ -393,15 +409,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
strength = selectedValue;
|
|
|
|
strength = selectedValue;
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -409,8 +423,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).strength,
|
|
|
|
.strength,
|
|
|
|
|
|
|
|
strength != null
|
|
|
|
strength != null
|
|
|
|
? strength['name']
|
|
|
|
? strength['name']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
@ -436,15 +449,17 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
route = selectedValue;
|
|
|
|
route = selectedValue;
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
if (route == null) {
|
|
|
|
|
|
|
|
helpers.showErrorToast(
|
|
|
|
|
|
|
|
'plase fill');
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -453,9 +468,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context).route,
|
|
|
|
TranslationBase.of(context).route,
|
|
|
|
route != null
|
|
|
|
route != null ? route['name'] : null,
|
|
|
|
? route['name']
|
|
|
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
true),
|
|
|
|
true),
|
|
|
|
enabled: false,
|
|
|
|
enabled: false,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -478,15 +491,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
frequency = selectedValue;
|
|
|
|
frequency = selectedValue;
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -494,8 +505,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).frequency,
|
|
|
|
.frequency,
|
|
|
|
|
|
|
|
frequency != null
|
|
|
|
frequency != null
|
|
|
|
? frequency['name']
|
|
|
|
? frequency['name']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
@ -521,15 +531,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
doseTime = selectedValue;
|
|
|
|
doseTime = selectedValue;
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -537,8 +545,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).doseTime,
|
|
|
|
.doseTime,
|
|
|
|
|
|
|
|
doseTime != null
|
|
|
|
doseTime != null
|
|
|
|
? doseTime['name']
|
|
|
|
? doseTime['name']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
@ -563,17 +570,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
.ok,
|
|
|
|
.ok,
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
indicationList =
|
|
|
|
indication = selectedValue;
|
|
|
|
selectedValue;
|
|
|
|
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -600,8 +604,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration:
|
|
|
|
decoration:
|
|
|
|
Helpers.textFieldSelectorDecoration(
|
|
|
|
Helpers.textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).date,
|
|
|
|
.date,
|
|
|
|
|
|
|
|
selectedDate != null
|
|
|
|
selectedDate != null
|
|
|
|
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
|
|
|
|
? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}"
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
@ -631,15 +634,13 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
okFunction: (selectedValue) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
duration = selectedValue;
|
|
|
|
duration = selectedValue;
|
|
|
|
_selectedBranch = null;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
barrierDismissible: false,
|
|
|
|
barrierDismissible: false,
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
(BuildContext context) {
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
return dialog;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -647,8 +648,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
decoration: textFieldSelectorDecoration(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).duration,
|
|
|
|
.duration,
|
|
|
|
|
|
|
|
duration != null
|
|
|
|
duration != null
|
|
|
|
? duration['name']
|
|
|
|
? duration['name']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
@ -668,8 +668,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
child: TextFields(
|
|
|
|
child: TextFields(
|
|
|
|
maxLines: 6,
|
|
|
|
maxLines: 6,
|
|
|
|
minLines: 4,
|
|
|
|
minLines: 4,
|
|
|
|
hintText: TranslationBase.of(context)
|
|
|
|
hintText:
|
|
|
|
.instruction,
|
|
|
|
TranslationBase.of(context).instruction,
|
|
|
|
controller: instructionController,
|
|
|
|
controller: instructionController,
|
|
|
|
//keyboardType: TextInputType.number,
|
|
|
|
//keyboardType: TextInputType.number,
|
|
|
|
validator: (value) {
|
|
|
|
validator: (value) {
|
|
|
|
@ -694,8 +694,20 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
formKey.currentState.save();
|
|
|
|
formKey.currentState.save();
|
|
|
|
|
|
|
|
|
|
|
|
if (formKey.currentState
|
|
|
|
if (strength == null ||
|
|
|
|
.validate()) {
|
|
|
|
route == null ||
|
|
|
|
|
|
|
|
frequency == null ||
|
|
|
|
|
|
|
|
indication == null ||
|
|
|
|
|
|
|
|
doseTime == null ||
|
|
|
|
|
|
|
|
duration == null ||
|
|
|
|
|
|
|
|
selectedDrug == null ||
|
|
|
|
|
|
|
|
selectedDate == null) {
|
|
|
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
|
|
|
"Please Fill All Fields");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (formKey.currentState.validate()) {
|
|
|
|
postProcedure(
|
|
|
|
postProcedure(
|
|
|
|
patient: widget.patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
doseTimeIn:
|
|
|
|
doseTimeIn:
|
|
|
|
@ -703,8 +715,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
model: widget.model,
|
|
|
|
model: widget.model,
|
|
|
|
duration:
|
|
|
|
duration:
|
|
|
|
duration['id'].toString(),
|
|
|
|
duration['id'].toString(),
|
|
|
|
frequency: frequency['id']
|
|
|
|
frequency:
|
|
|
|
.toString(),
|
|
|
|
frequency['id'].toString(),
|
|
|
|
route: route['id'].toString(),
|
|
|
|
route: route['id'].toString(),
|
|
|
|
drugId: selectedDrug['ItemId']
|
|
|
|
drugId: selectedDrug['ItemId']
|
|
|
|
.toString(),
|
|
|
|
.toString(),
|
|
|
|
@ -713,8 +725,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
indication:
|
|
|
|
indication:
|
|
|
|
indicationController.text,
|
|
|
|
indicationController.text,
|
|
|
|
instruction:
|
|
|
|
instruction:
|
|
|
|
instructionController
|
|
|
|
instructionController.text,
|
|
|
|
.text,
|
|
|
|
|
|
|
|
doseTime: selectedDate);
|
|
|
|
doseTime: selectedDate);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -741,6 +752,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|