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(); .toList();
if (patientLabOrdersClinic.length != 0) { if (patientLabOrdersClinic.length != 0) {
var value = labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])] .patientLabResultList
.patientLabResultList .add(element);
.where((e) =>
e.sampleCollectedOn == element.sampleCollectedOn &&
e.resultValue == element.resultValue)
.toList();
if (value.isEmpty)
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
} else { } else {
labResultLists labResultLists
.add(LabResultList(filterName: element.testCode, lab: element)); .add(LabResultList(filterName: element.testCode, lab: element));

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

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

Loading…
Cancel
Save