deletePatients method
Future<List<IdWithRevDto> >
deletePatients(
- UserDto user,
- List<
DecryptedPatientDto> patients, - CryptoConfig<
DecryptedPatientDto, PatientDto> config
Implementation
Future<List<IdWithRevDto>> deletePatients(
UserDto user, List<DecryptedPatientDto> patients, CryptoConfig<DecryptedPatientDto, PatientDto> config) async {
final int currentTime = DateTime.now().millisecondsSinceEpoch;
final List<DecryptedPatientDto> updatedPatients = patients.map((patient) {
patient.endOfLife = currentTime;
return patient;
}).toList();
return modifyPatients(user, updatedPatients, config);
}