Skip to content

Move SSI codelists to OxHPRU#3076

Open
Jongmassey wants to merge 1 commit into
mainfrom
Jongmassey/bulk-move-ssi-codelists
Open

Move SSI codelists to OxHPRU#3076
Jongmassey wants to merge 1 commit into
mainfrom
Jongmassey/bulk-move-ssi-codelists

Conversation

@Jongmassey
Copy link
Copy Markdown
Contributor

The surgical site OPCS4 codelists previously bulk uploaded to the ukhsa org were requested to be moved to the OxHPRU org and to be published.

This data migration performs both these actions with provision for it to be reversed if necessary

Fixes #3066

@Jongmassey Jongmassey force-pushed the Jongmassey/bulk-move-ssi-codelists branch from d95f591 to 92af60d Compare May 20, 2026 14:56

def unpublish_codelist_versions(codelists):
for codelist in codelists:
for version in codelist.versions.filter(status=Status.UNDER_REVIEW):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that be filtering to PUBLISHED codelists?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, correct

codelists = [
codelist
for codelist in from_org.codelists.filter(coding_system_id="opcs4")
if not reverse
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this mean when reverse==True that codelists is empty?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, need to switch the and for an or there

@rw251
Copy link
Copy Markdown
Contributor

rw251 commented May 20, 2026

A couple of comments inline. Also, just to confirm, the set of UNDER_REVIEW opcs4 codelists under ukhsa is exactly the set of codelists to move?

The surgical site OPCS4 codelists previously bulk uploaded to the
`ukhsa` org were requested to be moved to the `OxHPRU` org and to
be published.

This data migration performs both these actions with provision for it
to be reversed if necessary
@Jongmassey Jongmassey force-pushed the Jongmassey/bulk-move-ssi-codelists branch from 92af60d to 53d8edf Compare May 20, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Surgical Site Infection Codelists

2 participants