FeatureExtraction
FeatureExtraction copied to clipboard
Temporal annual distribution functionality
Supporting https://github.com/OHDSI/WebAPI/issues/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
@anthonysena Anthony, I can't assign reviewers, please do so
@alex-odysseus thanks for reviewing this with me on Atlas/WebAPI WG call. Here are some specific tasks from our discussion:
- Remove
inst/csv/PrespecTemporalAnnualAnalysis.csvas it is redundant with the analyses already defined in the package. - Add an
annualPrevalenceparameter to the getDbCovariateData function to expose the ability to compute the annual prevalence. Make sure this is passed to the Java layer so it can properly pass this to the SQL layer... - Tidy up the Java class based on the feedback above. For the
createQuerySqlfunction of that class, expose anannualPrevalenceparameter to enable passing in the parameter from R and the SkeletonCohortCharacterization layers respectively.
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.
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?
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() ────────────
FeatureExtraction:::.onLoad(libname = "FeatureExtraction", pkgname = "FeatureExtraction") produced warnings.
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 inst/csv/jarChecksum.txt?
Anthony and Chris, I am getting a strange error, when I use a simple Java program to generate a checksum
import org.ohdsi.featureExtraction.JarChecksum;
public class JarChecksumGenerator {
public static void main(String[] args) {
System.out.println(JarChecksum.computeJarChecksum());
}
}
java.io.FileNotFoundException: <my-source-folder-here>\FeatureExtraction\target\classes (Access is denied)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.ohdsi.featureExtraction.JarChecksum.computeJarChecksum(JarChecksum.java:29)
at JarChecksumGenerator.main(JarChecksumGenerator.java:6)
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.