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

#204 Add code translations #206

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

prenc
Copy link
Collaborator

@prenc prenc commented Oct 17, 2024

No description provided.

@prenc prenc marked this pull request as draft October 17, 2024 01:24
@prenc prenc self-assigned this Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
98 1 97 0
View the top 1 failed tests by shortest run time
src.MEDS_transforms.transforms.apply_code_translation MEDS_transforms.transforms.apply_code_translation.apply_code_translation
Stack Traces | 0.002s run time
063         └────────────┴────────────┘
064         >>> metadata = pl.DataFrame(
065         ...     {
066         ...         "code": ["static", "DOB", "ICD//9//A", "ICD//9//B", "ICD//9//C", "ICD//10//A"],
067         ...         "code/vocab_index": [1, 2, 3, 4, 5, 6],
068         ...         "translated": [None, None, "ICD//10//A", "ICD//10//B", "ICD//10//C", None],
069         ...     },
070         ...     schema={"code": pl.Utf8, "code/vocab_index": pl.UInt32, "translated": pl.Utf8},
071         ... )
072         >>> apply_code_translation(df, metadata)
Differences (unified diff with -expected +actual):
    @@ -7,9 +7,9 @@
     │ 1          ┆ static     │
     │ 1          ┆ DOB        │
    -│ 1          ┆ ICD//10//A │
    +│ 1          ┆ ICD//9//A  │
     │ 1          ┆ ICD//10//A │
     │ 2          ┆ DOB        │
    -│ 2          ┆ ICD//10//A │
    -│ 3          ┆ ICD//10//B │
    -│ 3          ┆ ICD//10//C │
    +│ 2          ┆ ICD//9//A  │
    +│ 3          ┆ ICD//9//B  │
    +│ 3          ┆ ICD//9//C  │
     └────────────┴────────────┘

.../MEDS_transforms/transforms/apply_code_translation.py:72: DocTestFailure

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

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.

We should be able to convert between different ontological code vocabularies.
1 participant