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

Common SQL Gen updates to support all studies #107

Closed
comorbidity opened this issue Aug 16, 2023 · 1 comment
Closed

Common SQL Gen updates to support all studies #107

comorbidity opened this issue Aug 16, 2023 · 1 comment
Assignees

Comments

@comorbidity
Copy link
Contributor

SQL gen count_encounter count_patient should have analogs for FHIR core table refs #100
#100

Import “study_prefix” into general ability to run counts generator
smart-on-fhir/cumulus-library-template#2

def get_study_prefix(self) -> Optional[str]:

This is the most DRY violating thing currently in each study, because

  • min_subjects is sometimes OK for studies that are small like Opioid but
  • min_subjects is sometimes NEEDED for studies that are large like COVID

def write_view_sql(view_list_sql: List[str], filename="count.sql") -> None:

Typical naming scheme

STUDY_PREFIX + “count” + name of the source table + duration (optional)

Where duration is ONLY: {Month, Week, or None}

Should we ALWAYS default to creating TABLES rather than views? = YES 100%

@dogversioning
Copy link
Contributor

Resolved via #109

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