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 new stats endpoint #124

Merged
merged 10 commits into from
Dec 18, 2024
Merged

Add new stats endpoint #124

merged 10 commits into from
Dec 18, 2024

Conversation

tianj7
Copy link
Contributor

@tianj7 tianj7 commented Dec 10, 2024

https://ctds-planx.atlassian.net/browse/VADC-1576

New Features

Add new stats endpoint for cohort and concepts

Copy link

filepath $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{tests/test\_homepage.py}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$

Please find the detailed integration test report here

Please find the ci env pod logs here

Copy link

Please find the ci env pod logs here

Copy link

Please find the ci env pod logs here

Copy link
Contributor

@pieterlukasse pieterlukasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @tianj7 . I added some minor improvement suggestions

utils/parsing.go Outdated
Comment on lines 289 to 290
conceptIdsAndValues, cohortPairs := GetConceptIdsAndCohortPairsAsSeparateLists(conceptIdsAndCohortPairs)
conceptIds := ExtractConceptIdsFromCustomConceptVariablesDef(conceptIdsAndValues)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move ExtractConceptIdsFromCustomConceptVariablesDef into GetConceptIdsAndCohortPairsAsSeparateLists ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helper function is used elsewhere which is why I extracted it out.

conceptIds := utils.ExtractConceptIdsFromCustomConceptVariablesDef(conceptIdsAndValues)

conceptIds := utils.ExtractConceptIdsFromCustomConceptVariablesDef(conceptIdsAndValues)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you can still use it inside GetConceptIdsAndCohortPairsAsSeparateLists, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExtractConceptIdsFromCustomConceptVariablesDef is created to give a convenient way to plug things into existing functions which only support concept ids to limit the scope of this PR.

GetConceptIdsAndCohortPairsAsSeparateLists is used in ParseConceptIdsAndDichotomousDefs which in turn is used in the new stat endpoint, so we need them to pass back both ids and values. If we use 'ExtractConceptIdsFromCustomConceptVariablesDef inside GetConceptIdsAndCohortPairsAsSeparateLists then we will loss the value part.

Copy link

Please find the ci env pod logs here

Copy link

filepath $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{tests/test\_homepage.py}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$

Please find the detailed integration test report here

Please find the ci env pod logs here

Copy link

filepath $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{tests/test\_homepage.py}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$

Please find the detailed integration test report here

Please find the ci env pod logs here

@tianj7 tianj7 merged commit d027039 into master Dec 18, 2024
11 checks passed
@tianj7 tianj7 deleted the feat/vadc-1576 branch December 18, 2024 22:01
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

Successfully merging this pull request may close these issues.

2 participants