[DTOSS-9252] Extract status into an append only table#133
Merged
Conversation
acd28b1 to
7b1b9c1
Compare
This gives us a history of the changes a clinic has gone through. It does add a bit of friction with the ORM, because we can technically create Clinic objects without a state now, but we can encapsulate this in a service object.
7b1b9c1 to
4ce940b
Compare
Comment on lines
+1
to
-4
| import uuid | ||
| from datetime import datetime | ||
| from unittest.mock import MagicMock | ||
| import uuid | ||
| import pytest |
Contributor
There was a problem hiding this comment.
Anything we can do to fix import ordering automatically?
Contributor
Author
There was a problem hiding this comment.
There is a tool called isort. Looks like we haven't enabled it yet but I can raise another PR...
colinrotherham
approved these changes
Jun 20, 2025
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.
Description
Clinic currently has a 'state' field.
The times this changes is a useful metric. To avoid relying on audit data that will be archived periodically, extract into a separate table and record the created date.
Jira link
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-9252
Review notes
This is the first part of the ticket. Once merged, I'll follow the same pattern for the appointments.