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

Support the data-metrics study having a per-study build option #308

Open
mikix opened this issue Oct 22, 2024 · 2 comments
Open

Support the data-metrics study having a per-study build option #308

mikix opened this issue Oct 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mikix
Copy link
Contributor

mikix commented Oct 22, 2024

Problem Statement
The data-metrics study (which is a special case in a lot of ways) wants a new special status of having per-study builds.

What I mean is, we want a user to be able to ask "what are the data metrics of the cohort selected by the covid study?". This would help determine if your study cohort data is well formed / has good data quality.

Since this will require special Library support in a few places, I wanted to file a tracking issue for the various pieces of this. Maybe these should be separate issues - but I wanted to leave open the option to discuss the whole approach here too.

Manifests/Inventories

We'll probably want the Library to start writing out inventory tables (a list of resource IDs in the study cohort) somewhere so that data-metrics could read it and scope down its investigation to a set of IDs rather than the whole database.

Maybe just patient & encounter IDs? Or could do it for all resources.

I don't know what table naming approach makes sense. Maybe study_name__lib_manifest_patients?

Cleaning (solved by #309)

Another concern is that the Library likes to auto-clean a study prefix during build. If the data-metrics study is making per-study little mini-builds in a custom prefix (maybe data_metrics_study_name__*), we'll need to tell the Library to only clean that custom prefix.

Library code has the option for custom prefix cleaning. We just need to tell it which prefix.

Since that would be dynamic (likely based on some runtime option like --option study:study_name), we'd need the Library to call some study-based Python code for the prefix.

Maybe that could be more generic and have a manifest hook for some early Python that would allow editing the manifest definition (of which, study prefix is but one option).

@mikix mikix added the enhancement New feature or request label Oct 22, 2024
@mikix
Copy link
Contributor Author

mikix commented Oct 23, 2024

After talking, I believe Matt and I are thinking that for the cleaning part - we'll add something to the manifest.toml like:

prefix_generator = 'gen-my-prefix.py'

And this would allow the study to return a string (which Library would require to be [a-zA-Z_] or similar) to use as a prefix. Very custom but scoped-down approach.

@mikix
Copy link
Contributor Author

mikix commented Oct 29, 2024

The cleaning portion has been solved by #309

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

No branches or pull requests

1 participant