I would like to know if it's possible to create a filter regarding dates. For example, I would like to have the state of the database at a specific date. So, any modifications to the data that occurred afterward should not be taken into account. Currently, I've tried using dateRangeEnd, but it keeps the individuals that were included before that date. However, if any of their information has been modified after my date, I'll get the modified value instead of the original value.
Thank you.
Thanks for clarifying! I'm not familiar with Stata, as my primary programming language is R, so though the syntax will differ, the process will likely be very similar. You can request the logs instead of records using the REDCap API by changing the raw parameter
contenttocontent=loginstead ofcontent=record. This opens up new parameters forlogtype(all events except page views, data exports, manage/design, record created-updated-deleted, page views, etc.),beginTime, andendTime. Those last two function quite similar to thedateRangeEndparameter because they allow you to filter the log using date-times (has to be in YYYY-MM-DD HH:MM:SS format). The response returnsactionanddetailskeys which contain your data of interest (e.g., the state of a given record at a given time).Actions relevant to you would probably be record creation, record updates, and record deletion.detailscontain the former and new values and you can perform additional data manipulation as you see fit. So in R, it might look something like this:Which then might print out something like the following (example modeled off of REDCapR package):