-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify events when pulling fields from REDCap #69
Conversation
mpgxvii
commented
Jun 25, 2024
•
edited
Loading
edited
- Specify the enrolment event when pulling subject_id field from Redcap
- And in the case of multiple results when pulling other attributes, choose the first non-null result
- Updates Gradle to 7 (updated gradle build syntax as well) and Dockerfile
- Updates requests according to MP>=2.0
- Also adds GA
Add Github actions workflow
…-RedcapIntegration into fix/pull-fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. Thanks for this. Please find some comments below.
Moreover, I think we should test this with some deployments like the ART VHIR one which is external and we do not have direct access to their redcap, so it is only a one way integration. It would be good to test it gracefully fails on redcap pull and ensure previous functionality (that MP subject is created with redcap external id added).
src/main/kotlin/org/radarbase/redcap/managementportal/MpClient.kt
Outdated
Show resolved
Hide resolved
@@ -41,7 +41,7 @@ data class Subject( | |||
@JsonProperty("login") val subjectId: String, | |||
@JsonProperty("externalId") val externalId: Int? = null, | |||
@JsonProperty("externalLink") val externalLink: URL? = null, | |||
@JsonProperty("project") val project: Project, | |||
@JsonProperty("project") var project: Project? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this possible? How can subject exist without a project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes when querying the project endpoint, it did not return the Project
anymore. I updated the MP query to use the project endpoint because the subject endpoint was not working correctly.
src/main/kotlin/org/radarbase/redcap/integration/RedCapIntegator.kt
Outdated
Show resolved
Hide resolved
@yatharthranjan I've also tested it for a case when REDCap is inaccessible. It is able to create the subjects in MP correctly, but unable to update afterwards (i.e. for updates with attributes, etc). |