|
|
@ -361,8 +361,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
0.550,
|
|
|
|
0.550,
|
|
|
|
child: TextFields(
|
|
|
|
child: TextFields(
|
|
|
|
inputFormatters: [
|
|
|
|
inputFormatters: [
|
|
|
|
// LengthLimitingTextInputFormatter(
|
|
|
|
LengthLimitingTextInputFormatter(
|
|
|
|
// 4),
|
|
|
|
5),
|
|
|
|
// WhitelistingTextInputFormatter
|
|
|
|
// WhitelistingTextInputFormatter
|
|
|
|
// .digitsOnly
|
|
|
|
// .digitsOnly
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -378,9 +378,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
strengthChar = value.length;
|
|
|
|
strengthChar = value.length;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (strengthChar >= 4) {
|
|
|
|
if (strengthChar >= 5) {
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
"Only 4 Digits allowed for strength");
|
|
|
|
"Only 5 Digits allowed for strength");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// validator: (value) {
|
|
|
|
// validator: (value) {
|
|
|
@ -757,6 +757,14 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
// formKey.currentState.save();
|
|
|
|
// formKey.currentState.save();
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// openDrugToDrug();
|
|
|
|
// openDrugToDrug();
|
|
|
|
|
|
|
|
if (_selectedMedication
|
|
|
|
|
|
|
|
.isNarcotic ==
|
|
|
|
|
|
|
|
true) {
|
|
|
|
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
|
|
|
|
"Narcotic medicine can only be prescribed from VIDA");
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (route == null ||
|
|
|
|
if (route == null ||
|
|
|
|
frequency == null ||
|
|
|
|
frequency == null ||
|
|
|
|
doseTime == null ||
|
|
|
|
doseTime == null ||
|
|
|
@ -775,10 +783,10 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (double.parse(
|
|
|
|
if (double.parse(
|
|
|
|
strengthController.text) ==
|
|
|
|
strengthController.text) <
|
|
|
|
0.0) {
|
|
|
|
0.0) {
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
"Streangth can't be zero");
|
|
|
|
"strength can't be zero");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -794,6 +802,9 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
// .join(',');
|
|
|
|
// .join(',');
|
|
|
|
postProcedure(
|
|
|
|
postProcedure(
|
|
|
|
icdCode: model
|
|
|
|
icdCode: model
|
|
|
|
|
|
|
|
.patientAssessmentList
|
|
|
|
|
|
|
|
.isNotEmpty
|
|
|
|
|
|
|
|
? model
|
|
|
|
.patientAssessmentList[
|
|
|
|
.patientAssessmentList[
|
|
|
|
0]
|
|
|
|
0]
|
|
|
|
.icdCode10ID
|
|
|
|
.icdCode10ID
|
|
|
@ -803,7 +814,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
|
|
|
|
.patientAssessmentList[
|
|
|
|
.patientAssessmentList[
|
|
|
|
0]
|
|
|
|
0]
|
|
|
|
.icdCode10ID
|
|
|
|
.icdCode10ID
|
|
|
|
.toString(),
|
|
|
|
.toString()
|
|
|
|
|
|
|
|
: "TEST",
|
|
|
|
// icdCode: model
|
|
|
|
// icdCode: model
|
|
|
|
// .patientAssessmentList
|
|
|
|
// .patientAssessmentList
|
|
|
|
// .map((value) => value
|
|
|
|
// .map((value) => value
|
|
|
|