Skip to content

Cohort Definition Service endpoint /{id} broke compatability in 2.7.2. #1229

Description

@chrisknoll

As a result of this commit: 9bb28d7 (which was committed as 'check name uniqueness', the endpoint response was altered from a cohort definition which returns a string-representation of the expression (which could be CIRCE json or even custom SQL), to returning a physical object of type org.ohdsi.circe.CohortExpression.

This has the following issues:

  • Changing the return type between 2.7.0 and 2.7.2 should not be allowed. It shouldn't even happen between 2.7 and 2.8. Dependencies on the endpoint response will break.
  • The point of the WebAPI cohort definition was to wrap a cohort definition expression (which could be any of the types enumerated in org.ohdsi.webapi.cohortdefinition.ExpressionType) and embed the cohort expression as a string. In this way, a cohort definition could be authored as SQL, a circe JSON, or some other type (by adding new types to ExpressionType. The way it is presented here, all cohort definitons must be expressed as a circe expression.
  • Unfortunately, since this this assumption (that all cohort expressions are circe expressions) has now proliferated across the standard analysis API specifications, so fixing this so that the endpiont returns to the pre-2.7.2 form may require a lot of refactoring of code, so in order to address this, we will need multiple people to address the different areas that this impacts: exports, UI loading, back-end generation, etc.

Tagging @anthonysena , @pavgra , @aklochkova, @wivern.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions