Temporal annual distribution functionality#271
Conversation
Referencing SqlRender 1.18.1 Version 3.7.0-SNAPSHOT as 3.6.0 has been released even though there were no changes to pom.xml Merge remote-tracking branch 'remotes/origin/ATL-10' into develop # Conflicts: # inst/java/featureExtraction-3.3.0-SNAPSHOT.jar # java/org/ohdsi/featureExtraction/FeatureExtraction.java
|
@anthonysena Anthony, I can't assign reviewers, please do so |
anthonysena
left a comment
There was a problem hiding this comment.
@alex-odysseus - I've provided some feedback on this PR for your review. I have not reviewed the other associated PRs so I'm unsure of the impact this proposed change would have on this feature. That said, here is my feedback:
- We need to make sure any enhancements to FeatureExtraction are done so that users from the R side can access this functionality. As it currently stands, I don't see a way that an R user could invoke this functionality.
- I think we can simplify the way in which this feature is invoked by simply passing in an option to perform the annual distribution as noted in the comments.
- All R command checks and unit tests must pass for this to be considered in a state for merging into the
developbranch.
Thanks!
| row_id, | ||
| 1 AS covariate_value | ||
| } | ||
| {@temporal_annual} ? {, event_year} |
There was a problem hiding this comment.
The temporal_annual appears to be the way in which a user would indicate to FeatureExtraction to compute the annual distribution yet this parameter is never exposed to the user best I can tell. In reviewing the code, the approach appears to be: specify the analysis IDs in the PrespecTemporalAnnualAnalysis.csv and then the Java layer will then inject the temporal_annual parameter value.
There was a problem hiding this comment.
PrespecTemporalAnnualAnalysis.csv contains Feature Analysis entries (for instance, demographics related) which were intentionally omit in a new CSV file being created
In OHDSI/SkeletonCohortCharacterization#46 CCBuilder.buildSettings there are separate Maps for that reason not to mix up
I would propose to leave it separate
|
@alex-odysseus thanks for reviewing this with me on Atlas/WebAPI WG call. Here are some specific tasks from our discussion:
|
|
The main outstanding issue is that R-CMD-Check is not passing, so we can merge this in once the errors are cleared. |
|
I'll also note that this will be a Java-only enabled feature until we find a use-case for this in the R side. |
…-annual-distribution # Conflicts: # java/org/ohdsi/featureExtraction/FeatureExtraction.java # pom.xml
| temporalSequence = jsonObject.getBoolean(TEMPORAL_SEQUENCE); | ||
| } catch(Exception e) {} | ||
| boolean temporal = jsonObject.getBoolean(TEMPORAL); | ||
| boolean temporalAnnual = jsonObject.has(TEMPORAL_ANNUAL) && jsonObject.getBoolean(TEMPORAL_ANNUAL); |
There was a problem hiding this comment.
Unit tests are failing since the TEMPORAL_ANNUAL parameter is not found in the jsonObject. I'd suggest wrapping it in a try/catch as was done for TEMPORAL_SEQUENCE (see a few lines above it). You'll also want to make sure the FeatureExtraction .jar file is recreated once you've made those changes.
There was a problem hiding this comment.
Anthony, it is rather a workaround not to adapt the existing tests
For some reason
boolean temporal = jsonObject.getBoolean(TEMPORAL);
doesn't fail
Catching an exception and not having any log entry might be dangerous in the future while troubleshooting
Referencing SqlRender 1.19.1 Targeting the 3.8.0 release
|
Anthony, could you please check why some of the tests are still failing, for example test-GetCohortBasedCovariates? @anthonysena Or test-FeatureExtractionInternal onLoad is expected to be silent Is it possible that a version of SqlRender has an impact? |
… tests will be passing after (it could be a great catch!)
|
Anthony, Finally, I found a bug, thanks to tests! @anthonysena So only one is failing, please help ── Failure ('test-FeatureExtractionInternal.R:6:3'): Test .onLoad() ──────────── |
|
Nicely done @alex-odysseus! So for the last error, this is due to the jarChecksum.txt being out-of-date. Could you update it using the following code: https://github.com/OHDSI/FeatureExtraction/blob/main/extras/PackageMaintenance.R#L87-L88 and then commit the updated |
|
Anthony and Chris, I am getting a strange error, when I use a simple Java program to generate a checksum Could you, please, try to generate it on your end? @anthonysena @chrisknoll |
|
Hi @anthonysena @chrisknoll , could you please take a look (I`ve generated the checksum for the jar file) and merge if windows/ubuntu images check is sufficient (mac failed due to a memory limit issue) and if you have no other objections. Thank you. |
|
@oleg-odysseus this looks good and the Mac error has been noted in #294 so I think we're set to merge this. Let me just tag @ginberg for awareness and we'll work to get this into a release. |
Supporting OHDSI/WebAPI#2331 to enable temporal annual distribution extending the existing temporal functionality
Temporal annual distribution will be effective for Feature Analyses specified in newly added PrespecTemporalAnnualAnalysis.csv
The idea of the functionality is to extract an underlying year for a Covariate of interest so that it can be easily grouped by in Cohort Characterization result visualization in WebAPI / ATLAS
Minor refactoring using Stream and StreamSupport classes
Standard Java formatting applied in a few places (hopefully acceptable)
Referencing SqlRender 1.18.1 in pom.xml
Targeting feature for 3.7.0 (for an unknown reason there is still 3.5.1-SNAPSHOT in 'develop' pom.xml even though 3.6.0 has been officially released