|
|
@ -122,15 +122,16 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
await model.getMedicationRoute();
|
|
|
|
await model.getMedicationRoute();
|
|
|
|
await model.getMedicationFrequency();
|
|
|
|
await model.getMedicationFrequency();
|
|
|
|
await model.getMedicationDoseTime();
|
|
|
|
await model.getMedicationDoseTime();
|
|
|
|
//await model.getItem(itemID: widget.drugId);
|
|
|
|
await model.getItem(itemID: widget.drugId);
|
|
|
|
//await model.getMedicationIndications();
|
|
|
|
//await model.getMedicationIndications();
|
|
|
|
route = model.getLookupById(model.medicationRouteList, widget.route);
|
|
|
|
route = model.getLookupByIdFilter(
|
|
|
|
|
|
|
|
model.itemMedicineListRoute, widget.route);
|
|
|
|
doseTime =
|
|
|
|
doseTime =
|
|
|
|
model.getLookupById(model.medicationDoseTimeList, widget.dose);
|
|
|
|
model.getLookupById(model.medicationDoseTimeList, widget.dose);
|
|
|
|
updatedDuration = model.getLookupById(
|
|
|
|
updatedDuration = model.getLookupById(
|
|
|
|
model.medicationDurationList, widget.duration);
|
|
|
|
model.medicationDurationList, widget.duration);
|
|
|
|
units = model.getLookupById(
|
|
|
|
units = model.getLookupByIdFilter(
|
|
|
|
model.medicationStrengthList, widget.doseUnit);
|
|
|
|
model.itemMedicineListUnit, widget.doseUnit);
|
|
|
|
frequencyUpdate = model.getLookupById(
|
|
|
|
frequencyUpdate = model.getLookupById(
|
|
|
|
model.medicationFrequencyList, widget.frequency);
|
|
|
|
model.medicationFrequencyList, widget.frequency);
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -300,7 +301,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
0.3700,
|
|
|
|
0.3700,
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap:
|
|
|
|
onTap:
|
|
|
|
model.medicationStrengthList !=
|
|
|
|
model.itemMedicineListUnit !=
|
|
|
|
null
|
|
|
|
null
|
|
|
|
? () {
|
|
|
|
? () {
|
|
|
|
Helpers.hideKeyboard(
|
|
|
|
Helpers.hideKeyboard(
|
|
|
@ -309,11 +310,11 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
dialog =
|
|
|
|
dialog =
|
|
|
|
ListSelectDialog(
|
|
|
|
ListSelectDialog(
|
|
|
|
list: model
|
|
|
|
list: model
|
|
|
|
.medicationStrengthList,
|
|
|
|
.itemMedicineListUnit,
|
|
|
|
attributeName:
|
|
|
|
attributeName:
|
|
|
|
'nameEn',
|
|
|
|
'description',
|
|
|
|
attributeValueId:
|
|
|
|
attributeValueId:
|
|
|
|
'id',
|
|
|
|
'parameterCode',
|
|
|
|
okText:
|
|
|
|
okText:
|
|
|
|
TranslationBase.of(
|
|
|
|
TranslationBase.of(
|
|
|
|
context)
|
|
|
|
context)
|
|
|
@ -343,7 +344,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
textFieldSelectorDecoration(
|
|
|
|
textFieldSelectorDecoration(
|
|
|
|
'UNIT Type',
|
|
|
|
'UNIT Type',
|
|
|
|
units != null
|
|
|
|
units != null
|
|
|
|
? units['nameEn']
|
|
|
|
? units[
|
|
|
|
|
|
|
|
'description']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
true),
|
|
|
|
true),
|
|
|
|
enabled: false,
|
|
|
|
enabled: false,
|
|
|
@ -361,15 +363,17 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
MediaQuery.of(context).size.height *
|
|
|
|
MediaQuery.of(context).size.height *
|
|
|
|
0.070,
|
|
|
|
0.070,
|
|
|
|
child: InkWell(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: model.medicationRouteList != null
|
|
|
|
onTap: model.itemMedicineListRoute !=
|
|
|
|
|
|
|
|
null
|
|
|
|
? () {
|
|
|
|
? () {
|
|
|
|
Helpers.hideKeyboard(context);
|
|
|
|
Helpers.hideKeyboard(context);
|
|
|
|
ListSelectDialog dialog =
|
|
|
|
ListSelectDialog dialog =
|
|
|
|
ListSelectDialog(
|
|
|
|
ListSelectDialog(
|
|
|
|
list:
|
|
|
|
list: model
|
|
|
|
model.medicationRouteList,
|
|
|
|
.itemMedicineListRoute,
|
|
|
|
attributeName: 'nameEn',
|
|
|
|
attributeName: 'description',
|
|
|
|
attributeValueId: 'id',
|
|
|
|
attributeValueId:
|
|
|
|
|
|
|
|
'parameterCode',
|
|
|
|
okText: TranslationBase.of(
|
|
|
|
okText: TranslationBase.of(
|
|
|
|
context)
|
|
|
|
context)
|
|
|
|
.ok,
|
|
|
|
.ok,
|
|
|
@ -397,7 +401,7 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
textFieldSelectorDecoration(
|
|
|
|
textFieldSelectorDecoration(
|
|
|
|
'Route',
|
|
|
|
'Route',
|
|
|
|
route != null
|
|
|
|
route != null
|
|
|
|
? route['nameEn']
|
|
|
|
? route['description']
|
|
|
|
: null,
|
|
|
|
: null,
|
|
|
|
true),
|
|
|
|
true),
|
|
|
|
enabled: false,
|
|
|
|
enabled: false,
|
|
|
@ -737,7 +741,8 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
: widget
|
|
|
|
: widget
|
|
|
|
.doseStreangth,
|
|
|
|
.doseStreangth,
|
|
|
|
newUnit: units != null
|
|
|
|
newUnit: units != null
|
|
|
|
? units['id'].toString()
|
|
|
|
? units['parameterCode']
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
: widget.doseUnit,
|
|
|
|
: widget.doseUnit,
|
|
|
|
doseUnit: widget.doseUnit,
|
|
|
|
doseUnit: widget.doseUnit,
|
|
|
|
doseStreangth:
|
|
|
|
doseStreangth:
|
|
|
@ -749,22 +754,24 @@ class _UpdatePrescriptionFormState extends State<UpdatePrescriptionForm> {
|
|
|
|
routeId: widget.route,
|
|
|
|
routeId: widget.route,
|
|
|
|
patient: widget.patient,
|
|
|
|
patient: widget.patient,
|
|
|
|
model: widget.model,
|
|
|
|
model: widget.model,
|
|
|
|
newDuration: updatedDuration !=
|
|
|
|
newDuration:
|
|
|
|
null
|
|
|
|
updatedDuration != null
|
|
|
|
? updatedDuration['id']
|
|
|
|
? updatedDuration['id']
|
|
|
|
.toString()
|
|
|
|
.toString()
|
|
|
|
: widget.duration,
|
|
|
|
: widget.duration,
|
|
|
|
drugId: widget.drugId,
|
|
|
|
drugId: widget.drugId,
|
|
|
|
remarks:
|
|
|
|
remarks: remarksController
|
|
|
|
remarksController.text,
|
|
|
|
.text,
|
|
|
|
route: route != null
|
|
|
|
route: route != null
|
|
|
|
? route['id'].toString()
|
|
|
|
? route['parameterCode']
|
|
|
|
: widget.route,
|
|
|
|
|
|
|
|
frequency: frequencyUpdate !=
|
|
|
|
|
|
|
|
null
|
|
|
|
|
|
|
|
? frequencyUpdate['id']
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
.toString()
|
|
|
|
: widget.frequency,
|
|
|
|
: widget.route,
|
|
|
|
|
|
|
|
frequency:
|
|
|
|
|
|
|
|
frequencyUpdate != null
|
|
|
|
|
|
|
|
? frequencyUpdate[
|
|
|
|
|
|
|
|
'id']
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
|
|
|
|
: widget.frequency,
|
|
|
|
dose: doseTime != null
|
|
|
|
dose: doseTime != null
|
|
|
|
? doseTime['id']
|
|
|
|
? doseTime['id']
|
|
|
|
.toString()
|
|
|
|
.toString()
|
|
|
|