-
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
jersey-joins-epilepsy12 #1105
base: live
Are you sure you want to change the base?
jersey-joins-epilepsy12 #1105
Conversation
…untry model fields, new migration to add boundaries, then another for the trust and the organisation. Note need extra migration to allow longer ods_code in Trust and empty fields in Country boundaries model
…d of jersey to 27700 from 4326 file source. Replace trust addition of Jersey with name rather than country object
…r organisation_id in CaseForm for validation of NHS number vs URN
…ell, the only way to do this is to pay for it as there are no open source datasets. Fix form to actually save the new URN (d'oh)
A number of additional changes included. Main change is to add a |
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.
I've run this up locally, seeded some data and added patients in both Jersey and Kings. All seems to be fine, nice work!
Fixes #1100
Fixes #1101
Overview
Jersey is in the Channel Islands and part of the UK but does not participate in the NHS. There are reciprocal agreements about some hospital treatment, but inpatient care is free only to people who have been resident for 6 months and have a Health Card.
Adding Jersey General Hospital to Epilepsy12 has implications for 7 parts of the audit
shape_files
folder. The boundaries do not map evenly to the Country model, so the Country model has been refactored to allow some fields to accept blank values. There are 3 migrations that have been created for this - the first to refactor the boundary/Country model and Trust model (to accept longer ODS codes), the second to map the Jersey shape file layers to the Country model and import the data, the third to add Jersey organisation and Trust to the database if does not exist.findmypostcode.co.uk
as a postcode validation and lookup service but RCPCH have more recently moved over to its own instance ofpostcodes.io
. Neither of these support Jersey so a new function is included to validate Jersey postcodes (all of which begin JE) with regex. This won't validate the postcode if it does not exist, but will ensure it is at least more or less in the right format. As part of this the seed functions and E12CaseFactory have been updated to generate Jersey postcodes from a random list.try..except
so that no value is stored.Case
modelunique_reference_number
which is (unique, obviously) but conditionally used in the forms, list views and so on if Jersey General Hospital and its patients are involved. TheCaseForm
now accepts anorganisation_id
parameter to check for this and has ais_jersey
flag to decide whether to allow users to store URNs or NHS Numbers for a given patient. Cleaning methods have been updated for this. I have not yet added any tests for this but it appears to work in the UI at least. The templates have been updated conditionally to reference URN vs NHS Numbers, as well as the filters.Other bits
The admin has been updated to allow search fields for Trust and Organisation models
Documentation changes (done or required as a result of this PR)
Documentation has been added on how to add .shp files and laymapping as this process is convoluted and easy to get wrong. I will add some of the detail above in separate commits.
Tests
There are no tests specifically for Jersey. I will do this in separate commits. Existing tests are all passing.
Related Issues
This closes #1100
New issues will be created for: