-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eatyourpeas/issue538 #726
Eatyourpeas/issue538 #726
Conversation
breaks transfers
Forgive me for piggybacking these changes on the back of this PR. It is related and equally urgent, so thought it might acceptable to couple the two issues. In addition to the items/fixes listed in the PR above, subsequent commits have:
These items are in The main fix is a bigger issue though: The problemCurrently if a child is transferred between centres, if the transfer is rejected (or sometimes accepted), the relationships it has with other centres in the Assessment tab which track general paediatric, neurology and surgical care are lost. BackgroundThe Site model, as the middle table in the M2M relationship between Case and Organisation, stores information about the relationship a child has with an organisation. For each organisation involved in a child's care, either current or historic, a record is stored in the Site model. Flags document if a Site is actively involved in care, and the nature of the relationship (lead site, general paediatric/neuro or surgical site). To build a chronology of sites that have historically led the care of a child's epilepsy, it is possible to have multiple records for different organisations where lead site status is true, but active involvement status is false. These appear in the registration form as historical lead sites if they exist. By contrast, any other relationships the site may have (not lead status, but provide general paediatric, neurology or epilepsy surgery care) are stored only once - no chronology for these exist. If a child moves its surgical care, a new record is created reflecting the change and the old one deleted. It becomes more complicated if:
Having spent some time looking at these edge cases I am fairly sure this now works the way it was intended but really we need some tests. I have not had time so far to add these, and in the interests of urgency, am submitting this fix , with a view to adding some tests later on. I am really happy to help with the review of this PR as it is larger and more complicated than I would like. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed with @dc2007git and @eatyourpeas - tested the changes to lead site transfer logic with success.
Closes #538
Overview
This fixes 4 things to do with the workflow for transferring children between centres.
Code changes
Changes are made in 3 files
case_views.py - this deletes the new site object created if the transfer is rejected, and reanimates the previous record.
registration_views: removes members of the RCPCH audit team from the cc in tranfer requests email. removes current organisation from transfer organisation list
case_table: change the wording in the modal button
Documentation changes (done or required as a result of this PR)
Bug fix, so no implications for documentation
Related Issues
#538
Mentions
@mentions of the person or team responsible for reviewing proposed changes.
@anchit_chandran @pacharanero