diff --git a/src/helpers/Api.js b/src/helpers/Api.js index 83ab4d68..3b442dc8 100644 --- a/src/helpers/Api.js +++ b/src/helpers/Api.js @@ -67,8 +67,8 @@ export const fetchParticipantExperimentCounts = async (redcapId) => { export const fetchParticipantClinicalDataset = async (redcapId) => { const query = gql` - query participantClinicalDataset($redcapId: String) { - participantClinicalDataset(redcapId: $redcapId){ + query participantSummaryDataset($redcapId: String) { + participantSummaryDataset(redcapId: $redcapId){ clinicalData } }`; @@ -78,9 +78,9 @@ export const fetchParticipantClinicalDataset = async (redcapId) => { redcapId: redcapId } }); - if (response && response.data && response.data.participantClinicalDataset) { - return response.data.participantClinicalDataset; + if (response && response.data && response.data.participantSummaryDataset) { + return response.data.participantSummaryDataset; } else { - store.dispatch(sendMessageToBackend("Could not retrieve participantClinicalDataset: " + response.error)); + store.dispatch(sendMessageToBackend("Could not retrieve participantSummaryDataset (clinical data): " + response.error)); } }; \ No newline at end of file