CommonDataModel icon indicating copy to clipboard operation
CommonDataModel copied to clipboard

Revisit the *_ERA queries

Open clairblacketer opened this issue 4 years ago • 6 comments
trafficstars

Right now the ERA queries use all data to create eras, even data outside of observation periods. We should make a decision on how the eras should be built and revise the queries accordingly.

clairblacketer avatar Sep 29 '21 19:09 clairblacketer

Yikes. Let's bring it on. Obviously, the closed system with the two axioms (everything that happened has a record, if there is no record it didn't happen) is only defined to be true within the observation period.

cgreich avatar Sep 30 '21 03:09 cgreich

@cgreich I am going to add it to our list of conventions to discuss in the coming year.

clairblacketer avatar Sep 30 '21 13:09 clairblacketer

Is the "DOSE_ERA" SQL available on the CDM website? I don't see it here https://ohdsi.github.io/CommonDataModel/sqlScripts.html.

ablack3 avatar May 25 '22 21:05 ablack3

the two axioms (everything that happened has a record, if there is no record it didn't happen)

I think the second axiom is equivalent to the first. In logic (A implies B) is equivalent to (not B implies not A) where the latter is called the contrapositive of the former.

So let A = "it happened" B = "there is a record"

(If it happened then there is a record) is logically equivalent to (if there is no record then it did not happen)

I don't mean to be pedantic. Just pointing out we only need one axiom and get the second statement for free as an implication. This is the first time I've heard these axioms.

What about this for axiom 2? "If there it didn't happen there is no record" Then observation periods give us: "There a record if and only if it happened."

ablack3 avatar May 30 '22 21:05 ablack3

Linking related issue to add era scripts to the DDL https://github.com/OHDSI/CommonDataModel/issues/551

ablack3 avatar May 01 '23 19:05 ablack3