getAllForOwner method
Find all StudyProtocol
's owned by the owner with ownerId
.
In the CARP web service, the ownerId
is the logged in user's accountId
.
Returns the last version of each StudyProtocol
owned by the requested owner,
or an empty list when none are found.
Implementation
@override
Future<List<StudyProtocol>> getAllForOwner(String ownerId) async {
final response = await _rpc(GetAllForOwner(ownerId));
List<dynamic> items = response['items'] as List<dynamic>;
return items
.map((item) => StudyProtocol.fromJson(item as Map<String, dynamic>))
.toList();
}