opensafely-core / opensafely-core/opencodelists
CSV download unavailable for a previously downloadable ICD-10 codelist
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
A user reported that a previously downloadable codelist now errors when using the opensafely cli.
Slack thread
On the codelist page, the Download button is disabled, and the hover tooltip says it can't be downloaded, probably because it doesn't contain a "code" column.
Note: the codelist does contain one of the "old-style" code columns identified previously, which allows it to be displayed in the tree view:
https://github.com/opensafely-core/opencodelists/blob/main/codelists/models.py#L520
However, it doesn't contain one of the coding-system-specific allowed CSV headers which define what counts as "downloadable"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the downloadability logic in codelists/models.py around the linked lines, then inspect the allowed CSV headers in coding_systems/icd10/coding_system.py. Reproduce the disabled Download button for the linked ICD-10 codelist and check the opensafely CLI behavior. Done means this previously downloadable codelist can be downloaded again while remaining available in the tree view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100