nhsuk / connecting-to-services

Find a pharmacy
https://www.nhs.uk/service-search/find-a-pharmacy/
MIT License
2 stars 9 forks source link

Guard against data inconsistency #587

Closed neilbmclaughlin closed 5 years ago

neilbmclaughlin commented 5 years ago

Additional opening times for phamacies (and possibly other org types) can have a type of either Additional or General. This is an error in the source data which seems to have been introduced in 2013 and never corrected. We have extended the guard rather than remove it (since 'additionalness' can be infered by a non-zero AdditionalOpeningDate) to filter out any future opening times for different types (e.g. reception)

neilbmclaughlin commented 5 years ago

I've added a suite of tests for the queryBuilder to ensure that token substitution works and different queryTypes are handled correctly. I think the tests do add value.

neilbmclaughlin commented 5 years ago

More timezone fun and games. Marked this as WIP until I've resolved it.

neilbmclaughlin commented 5 years ago

Resolved the timezone issue and also added a guard for the scenario where a pharmacy has no contact details which was causing null ref exceptions during testing.

An example of a pharmacy without contact details is Armley Moor Pharmacy which can be found at LS12 3HD