-
Notifications
You must be signed in to change notification settings - Fork 557
ICD 9 V Code Prediction Task and Example #790
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
base: master
Are you sure you want to change the base?
Conversation
jhnwu3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Sharim! Thanks for the help! Can we implement some unit tests sorta like how paul does it here?
https://github.com/sunlabuiuc/PyHealth/blob/master/tests/core/test_sdoh.py
Basically, it helps to just test that the class itself works.
Other things would be adding to the docs/ (Cursor does a pretty good job here given some examples).
pyhealth/models/sdoh_icd9_llm.py
Outdated
|
|
||
|
|
||
| class SDOHICD9LLM: | ||
| """Admission-level SDOH ICD-9 V-code detector using an LLM.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add more doc strings on how a user might use this model here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see some examples: https://github.com/sunlabuiuc/PyHealth/blob/master/pyhealth/models/stagenet.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added more doc strings, let me know what you think @jhnwu3
300427b to
b351521
Compare
jhnwu3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Sharim,
I would recommend checking out the pyhealth.datasets and pyhealth.tasks tutorials here: https://pyhealth.readthedocs.io/en/latest/tutorials.html to better understand how to extend PyHealth with your own dataset.
I think if you have separate labels in your dataset that's stored somewhere else on top of MIMIC3, then we'd probably need to create a new Dataset(BaseDataset) class here, but otherwise if its just a MIMIC3 showcase, I would recommend using the existing APIs here.
| def __init__( | ||
| self, | ||
| csv_path: str, | ||
| dataset_name: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this your own dataset or did you use MIMIC-III? Or do you have to download it from somewhere?
| return df | ||
|
|
||
|
|
||
| class MIMIC3NoteDataset: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe MIMIC3Dataset already supports the loading of notes iirc, so this feels a bit redundant.
|
|
||
| class SDOHICD9AdmissionTask(BaseTask): | ||
| """Builds admission-level samples for SDOH ICD-9 V-code detection. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get docstrings on how to use this task. For reference, the .set_task() feature here that you shouldn't overwrite unless you really need to in each of the BaseDataset classes require you pass a task through a dataset.set_task(TaskClass) here as it will get parallelized and used by our backend here.
No description provided.