Merge branch 'development' into home-refactoring

merge-requests/648/head
mosazaid 5 years ago
commit 70480cc09e

@ -135,17 +135,9 @@ class LabsViewModel extends BaseViewModel {
.toList();
if (patientLabOrdersClinic.length != 0) {
var value =
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.where((e) =>
e.sampleCollectedOn == element.sampleCollectedOn &&
e.resultValue == element.resultValue)
.toList();
if (value.isEmpty)
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
} else {
labResultLists
.add(LabResultList(filterName: element.testCode, lab: element));

@ -128,11 +128,8 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
model.labResultLists.length,
(index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder,
filterName: model
.labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
filterName: model.labResultLists[index].filterName,
patientLabResultList: model.labResultLists[index].patientLabResultList,
patient: widget.patient,
isInpatient: widget.isInpatient,
),

@ -1430,17 +1430,17 @@ class _PrescriptionFormWidgetState extends State<PrescriptionFormWidget> {
// .join(' '),
dose: strengthController.text,
doseUnit: model.itemMedicineListUnit.length == 1
? model.itemMedicineListUnit[0]['parameterCode']
? model.itemMedicineListUnit[0]['parameterCode'].toString()
: units['parameterCode'].toString(),
patient: widget.patient,
doseTimeIn: doseTime['id'].toString(),
model: widget.model,
duration: duration['id'].toString(),
frequency: model.itemMedicineList.length == 1
? model.itemMedicineList[0]['parameterCode']
? model.itemMedicineList[0]['parameterCode'].toString()
: frequency['parameterCode'].toString(),
route: model.itemMedicineListRoute.length == 1
? model.itemMedicineListRoute[0]['parameterCode']
? model.itemMedicineListRoute[0]['parameterCode'].toString()
: route['parameterCode'].toString(),
drugId: _selectedMedication.itemId.toString(),
strength: strengthController.text,

Loading…
Cancel
Save