We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f7efad commit 7157072Copy full SHA for 7157072
1 file changed
dr-lib.js
@@ -77,8 +77,11 @@ async function getPatientsList (questionnaryId, limit = 100) {
77
}
78
79
// -- get the patients
80
- for (const patientEvent of Object.values(uniques)) {
81
- const patient = await getPatientDetails(questionnaryId, patientEvent);
+ const patientPromises = Object.values(uniques).map((patientEvent) => getPatientDetails(questionnaryId, patientEvent));
+ const patientsResults = await Promise.all(patientPromises);
82
+
83
+ const patients = {};
84
+ for (const patient of patientsResults) {
85
if (patient) {
86
patients[patient.apiEndpoint] = patient;
87
console.log('## Patient details', patient);
0 commit comments