Merge branch 'fix-issues' into 'development'

Prescription update filters

See merge request Cloud_Solution/doctor_app_flutter!332
merge-requests/333/merge
Mohammad Aljammal 4 years ago
commit 3a703da5d5

@ -424,6 +424,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
(selectedValue) {
setState(() {
units = selectedValue;
units['isDefault'] =
true;
});
},
);
@ -472,6 +474,7 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
okFunction: (selectedValue) {
setState(() {
route = selectedValue;
route['isDefault'] = true;
});
if (route == null) {
helpers.showErrorToast(
@ -519,6 +522,8 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
okFunction: (selectedValue) {
setState(() {
frequency = selectedValue;
frequency['isDefault'] =
true;
});
},
);

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

Loading…
Cancel
Save