Add dateRangeBegin and dateRangeEnd parameters#124
Conversation
| export. | ||
| filter_logic : string | ||
| specify the filterLogic to be sent to the API. | ||
| date_begin : string |
There was a problem hiding this comment.
Rather than parsing a string to a datetime object (requiring a dependency on python-dateutil and then reformatting it out to a string, these two parameters can be datetimes. So it's on the caller to make datetime objects, but I don't think that's too much to ask.
There was a problem hiding this comment.
Easy enough to change. Thanks for your reply.
|
One thing I don't have access to is older versions of REDCap on which to test this. Right now, both instances I have are 10.0.11. I don't know what happens if a payload with dateRangeBegin and dateRangeEnd are sent to a version of the API that doesn't support these parameters. The payload won't include the parameters if the user doesn't specify them when calling the method; so hopefully that's within the bounds of not too much to ask. |
pwildenhain
left a comment
There was a problem hiding this comment.
Thanks for adding this in 🥇 😁
Im relatively new to REDCap and have found this library very helpful. It looks as if work was discontinued on the project before the date range filtering was added to the Export Records call. My use case requires using this, so I went ahead and forked and made the simple change.
I just followed the template in the code and added two new keys to the data payload. I use the dateutil.parser.parse method to make it so the input values for the dates can be a little flexible. This meant updating requirements.txt as well.
I didn't see any appropriate tests to modify.
I'm opening this issue here, and will attach a pull request. This is my first github pull request, so feedback welcome.
Fixes #123