castoredc / castoRedc

R wrapper to Castor EDC API
MIT License
3 stars 8 forks source link

Empty instances #39

Closed reiniervlinschoten closed 4 months ago

reiniervlinschoten commented 4 months ago

This update makes sure the empty repeating data instances and survey instances are also retrieved from the api when getting study data. The issue is that the data-point level API calls only retrieve existing data points. For surveys or repeating data that have no data points, nothing is returned. This is fixed by now also calling all repeating data and survey instances, and left joining the existing data points hereon.

This is a fix in the code for only one work flow (using getStudyData) and the functions it relies upon getSurveyInstances and getRepeatingDataInstances. I am not sure if there are other functions that now do not return empty surveys/repeating data instances. This requires an overhaul of the code structure, which I will propose to do in the update after v2.0.0