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

Calculation function within Cohort Definitions #2325

Open
alex-odysseus opened this issue Nov 28, 2023 · 1 comment · May be fixed by #2400
Open

Calculation function within Cohort Definitions #2325

alex-odysseus opened this issue Nov 28, 2023 · 1 comment · May be fixed by #2400
Assignees
Labels

Comments

@alex-odysseus
Copy link
Contributor

alex-odysseus commented Nov 28, 2023

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:

  • to identify the start of a pregnancy based on the birth event code
  • to perform calculations between multiple Measurements and the result can be used further in Cohort Definitions

Design Ideas and Functional Requirements

Calculations between multiple Measurements use case

There are two alternative Circe model extensions to consider:

  • a new Combined Measurement with a possibility to define the first and the second Measurements used in a calculation as its attributes

image

  • an extension of the existing Measurement with a new attribute which will define an "adjacent" Measurement to be included in calculations (suggested by @chrisknoll in opposite to the initial idea above)

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 "+", "-", "*", "/"

image

image

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

  • it is possible that Measurements in a formula might have different units so that there should be a way to define a common denominator so that the result of the formula is adequate

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

@chrisknoll
Copy link
Collaborator

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

@anthonysena anthonysena linked a pull request Oct 8, 2024 that will close this issue
@anthonysena anthonysena modified the milestones: v2.15, v2.15 out of scope Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants