OHDSI / SkeletonCohortCharacterization

Apache License 2.0
2 stars 3 forks source link

Aggregate functions should be defined in this libary, not WebAPI #32

Open chrisknoll opened 3 years ago

chrisknoll commented 3 years ago

While trying to run through the code in SkeletonCohortCharacterization as a R package, I discovered that all the aggregate functions are specified in the design JSON, but those specifications are not part of the SkeletonCohortCharacterization. Instead, these aggregate types are defined as entities in WebAPI, and then handled by passing in the raw definitions over to SkeletonCC.

I think this is wrong: SkeletonCC should define all the aggregate functions that are supported, and not allow external parties to submit their own expressions (isn't that a SQL injection problem?!?). The SkeletonCohortChacterization should expose a function to read meta about the available aggregate types for WebAPI to consume/render...but webAPI shouldn't be the place to define the characterization aggregate functions...It makes using SkeletonCC hard to use as a stand-alone library.