NHS Wales MPI / developer example

Patient demographic query

PUBLIC SANDBOX FIXTURE

Find patient records by identifier or demographic details using SOAP and HL7 v2.5 XML.

Local learning app, not a clinical system. Use synthetic data only. Results are possible matches, not verified patient identities. Every valid search is sent to the NHS Wales public sandbox. API authentication is disabled: no API credentials are sent. The audit identity is supplied manually for this example; API authentication does not sign you in.

Search criteria

The identifier system's authority, not your application's sending authority. MPI uses authority 100 and type PE; hospital PAS uses type PI.
Use the provider-assigned code for the identifier, rather than guessing a Radis type.

Minimum: surname + postcode, unless the surname contains a generic label such as 'Twin' or 'Infant'; or surname + given name + DOB.

Enter at least 3 distinct address tokens, excluding 'road'.

Encoded as UTF-8 Base64 in the X-Authenticated-User header by the server.
Clear

Published sandbox examples

From the supplied NHS Wales PDQ specification. Enter these synthetic values in the search form; all valid searches use the public sandbox.

Eight synthetic search scenarios from the supplied specification.
Search typeValuesDocumented scenario
NHS number8888834516Existing patient
NHS number5555599226Existing patient
NHS number1111111111No match
PAS numberHDD613567
Authority: 204
Hospital identifier search
PAS numberE123679
Authority: 204
Hospital identifier search
DemographicsSurname: EDWARDS
Postcode: SA71 4AE
DOB: 1985-09-14
Demographic search
Name + DOBSurname: HOLMES
Given name: Sherlock
DOB: 1938-11-08
Name/date search
Name + DOBSurname: HUDSON
Given name: Martha
DOB: 1939-03-21
Multiple matches, including deceased patient

The HOLMES and HUDSON examples use surname + given name + DOB; postcode is optional for this pattern.

The sandbox currently returns HTTP 400 SOAP faults for NHS number 1111111111, PAS number E123679, and the published HOLMES and HUDSON requests, rather than their documented outcomes.

Search validation follows the detailed Valid minimum search criteria section, which permits alternatives to the overview's surname/postcode/DOB rule. Surname case sensitivity is not documented; use the published casing to reproduce examples. Some published response examples contain malformed XML, which the app rejects explicitly.