opensafely-core / opensafely-core/opencodelists
Consider custom ordering of dm+d codes in builder
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
Why are we doing this?
The default ordering of items in the builder tree view is an alphabetical sort on the term.
It may be more helpful to order items by other properties.
One such example is for dm+d codelists, where Route (e.g. injectibles vs orals) and Strength (e.g. "high-dose statins") are dimensions by which many existing medication codelists are defined. Adding these into the main hierarchy for the dm+d codelist is nontrivial.
Using sort order as a means of grouping together products by route and strength may facilitate selection of codes by these dimensions (especially if multi-select is implemented).
How will we know when it's done?
dm+d codes in the tree view of the builder are sorted by keys other than the term
What are we doing?
- Considering an optimal ordering of codes in the builder. Early user research shows that ordering such that ordering
VMPs byRoutethenStrengthmay facilitate code selection by these dimensions. - Establish how custom ordering may be implemented (likely candidates are
codes_by_type()in the dm+d coding system and in thetree_tablesof the builder view)
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 codes_by_type() in the dm+d coding system and the tree_tables in builder/views.py, then review the stated user-research rationale for ordering VMPs by Route and Strength. Establish the ordering approach and implement it so dm+d codes in the builder tree view are sorted by keys other than the term.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100