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

Module cleanup #1399

Merged
merged 11 commits into from
Dec 20, 2023
Merged

Module cleanup #1399

merged 11 commits into from
Dec 20, 2023

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Nov 28, 2023

This PR cleans up a few items that pop up pretty often in generated records and look odd:

  1. There are several ConditionOnsets that do not have a corresponding ConditionEnd and are left open forever, even though they are acute conditions which are addressed in the module:
    • Appendicitis & rupture of appendix
    • Opioid addiction: Drug overdose (note there are a few other conditions in this module which don't get ended, like "Impacted molars", "Chronic pain", and migraine, which are not really treated so I'm ok leaving them open)
    • Miscarriage (added a "history of miscarriage" condition)
    • Covid19 outcomes: Hypoxemia (seems like this was just missed in the long list of conditions, I don't see anything in the old notes for why this one specifically should stay open)
  2. Prediabetes can be diagnosed after diabetes, and based on medication impacts it happens often, so that's no longer possible
  3. A couple modules include "patient transfer" as a condition where it really doesn't fit. There's already a Procedure for the transfer so I just removed the Condition.

Copy link

codecov bot commented Nov 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e8a047a) 76% compared to head (275fa44) 77%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #1399    +/-   ##
=========================================
  Coverage        76%     77%            
- Complexity     3843    3875    +32     
=========================================
  Files           178     178            
  Lines         24997   24997            
  Branches       3535    3535            
=========================================
+ Hits          19150   19273   +123     
+ Misses         4713    4608   -105     
+ Partials       1134    1116    -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jawalonoski jawalonoski left a comment

Choose a reason for hiding this comment

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

Mostly these changes look fine, except for the home health and snf changes.

Not sure why you removed the reason -- we sort of need that for the claims exporting that we're doing. It would be better to end the condition at discharge than to delete the reason.

@dehall
Copy link
Contributor Author

dehall commented Dec 5, 2023

I don't really want to get rid of the reasons on anything, but "Transition from acute care to home-health care (finding)" and "Patient transfer to skilled nursing facility (procedure)" really don't feel like they should be Conditions, and we don't have anything else that can be set as a reason.
Ideally whichever module put the patient into SNF/home health would also set a specific attribute they set which these could use as a reason, but I don't think that's possible in the module builder today. If there's no better option I can revert those two modules

@jawalonoski
Copy link
Member

I don't really want to get rid of the reasons on anything, but "Transition from acute care to home-health care (finding)" and "Patient transfer to skilled nursing facility (procedure)" really don't feel like they should be Conditions, and we don't have anything else that can be set as a reason. Ideally whichever module put the patient into SNF/home health would also set a specific attribute they set which these could use as a reason, but I don't think that's possible in the module builder today. If there's no better option I can revert those two modules

SetAttribute can be set as a Code, so we could try that. It is hardwired in the module builder to be LOINC, but if you manually edit the JSON to be SNOMED the engine will respect that. Maybe that will suffice, especially if we only set the attribute if it is nil.

Then later, we could modify the modules put the patient into SNF/home care to set that attribute.... which would be a better long term solution, and setting the attribute only-if-nil would be a backup.

@dehall
Copy link
Contributor Author

dehall commented Dec 5, 2023

Just pushed some updates to bring back the reason in the SNF and home health modules. The ConditionOnset that was originally there has been replaced by a SetAttribute, called only if the attribute isn't already nil, and the attribute is cleared out at the end of the module.

Home health was only invoked by 2 other modules, Total Joint Replacement and Home Hospice. TJR was easy to add the appropriate codes to for the "reason", but in the Home Hospice module, there are ~40 different possible conditions the patient might have so I skipped that. For SNF, there are a bunch of instances in the Injuries module and that same group of 40 conditions from the Home Hospice module, so I didn't add any more specific reasons. If you think it's worthwhile I can add the codes for the respective Injuries module branches that call the SNF submodule.

@eedrummer eedrummer merged commit 336e3d8 into master Dec 20, 2023
6 checks passed
@eedrummer eedrummer deleted the module_cleanup branch December 20, 2023 21:18
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.

3 participants