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 countries to epiv1 datapivot export #1107

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion hawc/apps/epi/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ def build_modules(self) -> list[ModelExport]:
include=("id", "short_citation", "study_identifier", "published"),
),
StudyPopulationExport(
"sp", "study_population", include=("id", "name", "age_profile", "source", "design")
"sp",
"study_population",
include=("id", "name", "age_profile", "source", "design", "countries"),
),
OutcomeExport(
"outcome",
Expand Down Expand Up @@ -593,6 +595,7 @@ def build_df(self) -> pd.DataFrame:
"sp-age_profile": "study population age profile",
"sp-source": "study population source",
"sp-design": "design",
"sp-countries": "countries",
"outcome-id": "outcome id",
"outcome-name": "outcome name",
"outcome-system": "outcome system",
Expand Down
3 changes: 3 additions & 0 deletions tests/data/api/api-dp-data-epi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"age of outcome measurement": "",
"comparison set id": 1,
"comparison set name": "Tokyo subway victims (different groups)",
"countries": "Japan",
"design": "Case series",
"diagnostic": "other",
"dose response": "not-applicable",
Expand Down Expand Up @@ -85,6 +86,7 @@
"age of outcome measurement": "",
"comparison set id": 1,
"comparison set name": "Tokyo subway victims (different groups)",
"countries": "Japan",
"design": "Case series",
"diagnostic": "other",
"dose response": "not-applicable",
Expand Down Expand Up @@ -160,6 +162,7 @@
"age of outcome measurement": "",
"comparison set id": 1,
"comparison set name": "Tokyo subway victims (different groups)",
"countries": "Japan",
"design": "Case series",
"diagnostic": "other",
"dose response": "not-applicable",
Expand Down