-
Notifications
You must be signed in to change notification settings - Fork 17
Support bulk uploading of UKHSA surgical site infection codelists #2954
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
Conversation
2c95ab1 to
493c39f
Compare
493c39f to
dbf2804
Compare
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 something we will load/update in the future? If so we should probably add something to one of the docs explaining where the data came from and the exact command that we executed - especially as it's looking for multiple csvs instead of one.
rw251
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.
Looks good. Minor comment on docs.
Coding systems that extend the DummyCodingSystem class (OPCS4 & Readv2) don't have databases. The bulk upload script erroneously checked for presence of a database file for the requested coding system in all cases. This commit omits the check for coding systems without databases.
As part of the checking for existence of coding system database files, the bulk upload script made false assumptions regarding their path. There exists an env var - DATABASE_DIR - which controls the database file path which should be checked before assuming the default location. Ideally the coding system database paths would be pulled directly out of django.conf.settings, but this would require the full Django machinery to be instantiated for this script to run. This could be achieved by changing this ad-hoc script into a django script to be run via `runscript` but would require significant and unergonomic changes to how command-line arguments are handled.
CodelistVersions created from csv can contain additional columns beyond the default `code` and `description`. This commit supports loading of such additional columns via the bulk upload script.
Previous bulk-uploaded codelist files contained many codelists concatenated into a single file. This change allows for iteration over a set of files indicated by a glob pattern.
Fixes bug of assumed presence of optional "tag" config value.
replicate update behaviour of codelist description for methodology add tests for both
Configure column alias to allow UKHSA surgical site infection codelists to have codelist methodology set.
bf72db7 to
851ed31
Compare
For a request from @LFISHER7 routed to @opensafely-core/team-rsi
This request required some new features:
Includes a couple of drive-by bug fixes encountered in development of supporting features for this request.