In my work, I saw a person who made communicate their cognitive tasks - which they had developed in JS - with Redcap to have their data automatically saved on Redcap.
Is it possible to create a php (or something else) script that would save the results of the Pavlovia experiment on Redcap? If so, do you have any clues to guide me?
Thank you very much!
Hi, thanks for your suggestion!
I did a brief examination of Redcap, but I couldn’t learn that much. There might be better documentation available if you’re a member of a certain consortium?
Regardless, PsychoJS is open source, so you can reverse-engineer the parts that communicate with a web-server and have it talk with something else. Some tech-savvy researchers have done so, which we’re OK with, but we don’t actively support it.
In summary, the best I can offer is this some advice and assurance. A PsychoJS - RedCap connection is feasible, but to achieve this efficiently, likely requires a developer that’s in this consortium and well-versed in Redcap. We won’t help you with it, but our software lets you do it, both now and in the future.
Alternatively, you could consider chaining the systems together so that Redcap would coordinate Pavlovia studies or vice versa. A bit like VESPR and Pavovia + Prolific.
Thank you very much for your answer! About the documentation, I don’t know. We had to do a lot of research on various websites to discover non-intuitive Redcap features. Would it be possible to have an indication to know where to start and save some time by knowing which parts communicate with a web-server?
I’ll talk to my team and see if we go for reverse engineering.
No worries, the code is quite clearcut; the obvious search terms will get you there
Here is a little update for those who are interested.
The process is actually very simple, you just have to access to Redcap and click on API to get your token. Then you can play with the API Playground which allows to simulate HTML requests.
You just have to enter the test data in JSON format: (here I wanted the participant “testcaro” to be a score of 4 in the field “panss6_p1" (all surveys have unique fields). Then it creates a query that you can run and test.
Then you just have to reproduce the same type of request on Psychopy/PsychoJS.
It is working well so far. Our fields on surveys are updating well.