Allow "create new version" (in builder) for bnf-dmd codelists - #3157
Open
Jongmassey wants to merge 1 commit into
Open
Allow "create new version" (in builder) for bnf-dmd codelists#3157Jongmassey wants to merge 1 commit into
Jongmassey wants to merge 1 commit into
Conversation
Jongmassey
force-pushed
the
Jongmassey/allow-create-new-version-bnfdmd-converted
branch
from
July 17, 2026 15:24
68469d9 to
e529365
Compare
Jongmassey
force-pushed
the
Jongmassey/allow-create-new-version-bnfdmd-converted
branch
from
July 27, 2026 19:38
6165c72 to
93c0a86
Compare
Jongmassey
marked this pull request as ready for review
July 27, 2026 19:38
Jongmassey
commented
Jul 27, 2026
| else: | ||
| coding_system_release_outdated = False | ||
|
|
||
| is_converted_from_bnf = ( |
Contributor
Author
There was a problem hiding this comment.
This arguably could be implemented as a model property, but would only be used here
Contributor
Author
There was a problem hiding this comment.
Also, "is this codelist a BNF to dm+d converted one?" is something I've had to derive multiple times when doing bits of analysis, it'd be nice if it were a property.
Nonetheless, this is still flaky (can be broken if a user updates the metadata to remove the elements we rely on),and we should consider adding an actual flag to the model so we're not reliant on this in future.
This commit allows a user to both upload a new version of a converted codelist (as was previously available), and to create a new version in the builder. Currently, additional columns beyond "code" and "term" are permitted only in uploaded codelists - i.e. they are not supported in the builder. The Psuedo-BNF to dm+d conversion process adds one such column, the souce BNF code for the conversion. Thus, preserving the ability to retain this column is important, and is done so by continuing support for update by upload. By adding the ability to edit in the builder, this allows users to work around any deficiencies in the converted codelist (e.g. the known lag in publishing the mapping data) or to use a converted codelist as a starting point for future amendments.
Jongmassey
force-pushed
the
Jongmassey/allow-create-new-version-bnfdmd-converted
branch
from
July 27, 2026 19:45
93c0a86 to
d24bc6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #3031
This adds the "Create New Version" button alongside the existing "Upload New Version" button for BNF to dmd converted codelists.
I chose to leave the Upload New Version button in place because users have previously uploaded new versions of converted codelists. We do not know if they do this only because they could not edit them in the builder. Nonetheless, because of the lack of support for additional columns (in this case the source BNF code), I believe we should retain this functionality in case of a user needing to update the codelist with this column intact. In time we may wish to review this decision.
Original converted version (old-style) with the BNF column

New draft new-style version in the builder, where the user is redirected to after clicking the "create new version" button
