NHS Login handling of superseded NHS numbers

Hi NHS Login team,

As a part of the NHS Health Check Online service we’re currently investigating scenarios where a patient’s NHS number has been superseded/changed and would like to better understand the expected behaviour from NHS Login.

Our service consumes the NHS number provided through the NHS Login /userInfo endpoint. During recent investigations we identified cases where the NHS number returned by NHS Login appears to differ from the current NHS number held within PDS. Internal discussions suggested that NHS Login may subscribe to a number of demographic and PDS-related events, but we’re unclear how superseded NHS numbers are handled.

Could you please help clarify:

  1. If a patient’s NHS number is superseded, is the NHS number returned by NHS Login expected to be updated automatically?
  2. Is there a delay between a change being made in PDS and that change becoming visible through NHS Login?
  3. Are there any known scenarios where NHS Login may continue to return a superseded NHS number?
  4. Is there any guidance for relying parties when a mismatch is detected between the NHS number returned by NHS Login and the current information available in PDS?
  5. Should services treat PDS as the source of truth and perform additional validation where NHS number continuity is important?

The reason for asking is that we’re assessing how to handle situations where an existing user’s NHS number changes and want to ensure our approach aligns with NHS Login and PDS best practice. I’m sure it’s applicable for number of other services integrated with NHS Login.

  1. If a patient’s NHS number is superseded, is the NHS number returned by NHS Login expected to be updated automatically? The NHS Number returned by PDS is returned to NHS login and updated against the NHS login record, any links to the GP record are removed to allow this to be reconnected to the new NHS Number.
  2. Is there a delay between a change being made in PDS and that change becoming visible through NHS Login? We will receive the new NHS Number when the user logs in via NHS login
  3. Are there any known scenarios where NHS Login may continue to return a superseded NHS number? We treat PDS as the source so will return the latest information from PDS at login.
  4. Is there any guidance for relying parties when a mismatch is detected between the NHS number returned by NHS Login and the current information available in PDS? This happen at login and any differences are updated against the NHS login record
  5. Should services treat PDS as the source of truth and perform additional validation where NHS number continuity is important? Yes

Hope this helps

Many thanks Stephen for the prompt response, really appreciate!

I’d heard that NHS Login might not be listening for NHS number superseded events, so it’s great to hear this is working correctly on the NHS Login side.

We’ll need to investigate the recent cases a bit further to understand the root cause, as we’ve seen a few instances where our service was unable to write data back to GP systems via IM1 because the NHS number had been superseded and we were still using the old one.

As our processing is asynchronous, the write-back to the GP system is not necessarily tied to the patient’s login session. This means we could still hit an edge case where a patient’s NHS number has been superseded, but they haven’t logged back into our service since the change. In that scenario, we’d continue using the old NHS number because we wouldn’t yet be aware of the update.