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

Add typeConceptIds as attributes to all domain criteria #93

Closed
alondhe opened this issue May 16, 2024 · 3 comments
Closed

Add typeConceptIds as attributes to all domain criteria #93

alondhe opened this issue May 16, 2024 · 3 comments

Comments

@alondhe
Copy link

alondhe commented May 16, 2024

Add typeConceptIds as attributes to all domain criteria. We often need to delineate between claims, EHR, NLP in CDMs with multiple data provenances.

Can we add typeConceptId support?

@mdlavallee92
Copy link
Collaborator

add drug, condtion, measurement, observation, procedure and visit type concept as an attribute. You will use it this way:

t2d <- cs(descendants(201826), name = "T2D")

claim_type <- conditionType(
  ids = c(32810), # claim type concept
  connection = connection,
  vocabularyDatabaseSchema = "vocab"
)

cd <- cohort(
  entry = entry(
    conditionOccurrence(conceptSet = t2d, claim_type),
    observationWindow = continuousObservation(priorDays = 365L),
    primaryCriteriaLimit = "First"
  ),
  attrition = attrition(
    expressionLimit = "All"
  ),
  exit = exit(
    endStrategy = observationExit()
  ),
  era = era(eraDays = 7L)
)


ll <- compile(cd, pretty = TRUE)
cat(ll)

@alondhe
Copy link
Author

alondhe commented May 17, 2024

Just curious if the connection is truly needed; if we bring the full list of type concept ids, does Circe truly require the rest of the metadata to be there? And each has a different class (ConditionType, DrugType) -- are there differences inherent between these?

It is working though, so many thanks for the quick add!

@mdlavallee92
Copy link
Collaborator

this is tricky....no the connection is not totally needed if you have the concept id. That is more for completion sake. May need to add helpers for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants