OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
126 stars 156 forks source link

Calculation function within Cohort Definitions #2325

Open alex-odysseus opened 7 months ago

alex-odysseus commented 7 months ago

Business Requirements

As the OMOP CDM Data Set entries don't necessary contain the events of interest for there further inclusion in analyses there should be a possibility:

Design Ideas and Functional Requirements

Calculations between multiple Measurements use case

There are two alternative Circe model extensions to consider:

image

To avoid any ambiguity when an event in the calculation is taken into consideration in a formula there should be a possibility to define if the first or the last one should be used when multiple. Belonging to the same Visit option shouldn't be neglected as well when required

The calculations should be allowed between "value as number" attributes in Measurements and the following operators should be supported "+", "-"

The start of a pregnancy use case

The date adjustment attribute is suggested to use with an additional sign control ("-" or "+") image

Note: As the edit controls support entering negative numbers introducing the new sign controls are rather redundant

Open Questions

@mrechkem @Sathyaraos @tomwhite (please supplement the issue with any further use cases)

chrisknoll commented 7 months ago

The date adjustment with additional control for +/- isn't necessary and should be removed from this since it's not about a calculation function (nor should it be the case that in order to add or subtract values should be implemented as a 'calculation function').