getParticipantDataList method
Get currently set data for all expected participant data for a set of study
deployments with studyDeploymentIds
.
Data which is not set equals null.
Implementation
@override
Future<List<ParticipantData>> getParticipantDataList(
List<String> studyDeploymentIds) async {
// early out if empty list
if (studyDeploymentIds.isEmpty) return [];
Map<String, dynamic> responseJson =
await _rpc(GetParticipantDataList(studyDeploymentIds));
// we expect a list of 'items'
List<dynamic> items = responseJson['items'] as List<dynamic>;
if (items.isEmpty) return [];
List<ParticipantData> data = [];
for (var item in items) {
data.add(ParticipantData.fromJson(item as Map<String, dynamic>));
}
return data;
}