Closed mbarton closed 2 weeks ago
Fixing https://github.com/rcpch/national-paediatric-diabetes-audit/issues/163 first would at least reduce it down to a validation error.
I'm not sure there's a sensible way we can add a space to the postcode automatically but we can at least prompt the user to do it in the error message.
If we go back to postcodes io which is maybe a good idea, we could fix the postcode using that: [here] (https://api.postcodes.io/) for example you get data back against a postcode which would buy validate it and give a cleaned version
Moving back to postcodes.io would help with https://github.com/rcpch/national-paediatric-diabetes-audit/issues/147 too.
According to their docs at least they are up to date with the May 2024 ONS data so hopefully the issues we had in E12 with missing postcodes are fixed?
I'd also be keen to explore running it ourselves which is easy given they publish docker containers. That way we don't send postcodes outside of our own systems.
I've managed to set up a self hosted instance of postcodes.io this morning, they've made it so easy!
https://postcodes-io.greenrock-df7c746b.uksouth.azurecontainerapps.io
Response time of around 50ms
Amazing! Thank you Michael feel much happier about that When new postcodes are published, how does it update”? S
We'd have to keep it up to date as they publish new versions of the Docker images. Being open source though perhaps there's a way to collaborate with updates or at worst do a full new build ourselves
The NHS spine API is fussy and requires the postcode to have a space in it otherwise the lookup fails and you get a full screen error