getPrescription method
Implementation
Future getPrescription(int consultationID, String savePath) async {
final response = await callApi(
endpoint: 'consultations/$consultationID/download-prescription',
method: 'get');
if (response.statusCode == 200) {
final file = await File(savePath).writeAsBytes(response.bodyBytes);
return file.path;
} else {
throw Exception(response);
}
}