Skip to content
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

Merged
merged 20 commits into from
Sep 16, 2024
Merged

Conversation

mpgxvii
Copy link
Member

@mpgxvii mpgxvii commented Jun 25, 2024

  • 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

@mpgxvii mpgxvii mentioned this pull request Jul 5, 2024
Copy link
Member

@yatharthranjan yatharthranjan left a 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).

@@ -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,
Copy link
Member

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?

Copy link
Member Author

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/util/RedCapClient.kt Outdated Show resolved Hide resolved
src/main/kotlin/org/radarbase/redcap/util/RedCapTrigger.kt Outdated Show resolved Hide resolved
src/main/kotlin/org/radarbase/redcap/util/RedCapTrigger.kt Outdated Show resolved Hide resolved
@mpgxvii
Copy link
Member Author

mpgxvii commented Jul 11, 2024

@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).

@mpgxvii mpgxvii merged commit b47d12c into dev Sep 16, 2024
3 checks passed
@mpgxvii mpgxvii deleted the fix/pull-fields branch September 16, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants