Prescription extraction fixes and improvements #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Turns out that the first
ncfdc_1998_prescriptions_clean.csv
was pretty draft and there were lots of things to fix.https://github.com/NewGraphEnvironment/restoration_wedzin_kwa_2024/blob/main/scripts/extract-tables-ncfdc-1998.R was the script used to make that csv, I'm pretty sure I wrote the prescription part and I remember it being pretty rough. Anyhow, cleaned it up big time.
I made a new script called
extract-prescriptions-ncfdc-1998.R
and copied over the old code fromextract-tables-ncfdc-1998.R
. Nowextract-prescriptions-ncfdc-1998.R
contains all the code to extract the prescriptions. I removed the old code fromextract-tables-ncfdc-1998.R
which now only contains code to extract tables (makes sense to me with the name).A couple changes to the new
extract-prescriptions-ncfdc-1998.R
:I did run through https://github.com/NewGraphEnvironment/restoration_wedzin_kwa_2024/blob/main/scripts/extract-tables-ncfdc-prescription-elements.R which was helpful but https://github.com/NewGraphEnvironment/restoration_wedzin_kwa_2024/blob/main/scripts/extract-tables-ncfdc-1998.R had more of what we needed
Can close #48 once this is merged.
Need to go reopen #45 once this is merged because I accidentally put the wrong issue number in the commit, see #45 (comment)