fromAggregateDataValues static method

dynamic fromAggregateDataValues(
  1. List<DataValue> aggregateDataValues
)

Implementation

static fromAggregateDataValues(List<DataValue> aggregateDataValues) {
  Map<String, DataValueObject> entities = {};

  aggregateDataValues.forEach((aggregateDataValue) {
    final id =
        '${aggregateDataValue.dataElement}.${aggregateDataValue.categoryOptionCombo}';
    entities[id] = DataValueObject(id: id, value: aggregateDataValue.value);
  });
  return entities;
}