Address format of the PDS FHIR API

Hello developers.

I am currently using sandbox to retrieve some patient information and I have run into a bit of a corner when looking at the addresses. The fields on the top level of each of the address objects, the properties for City, Country, District, and State are always null, but when looking at the “Line” property it does have few entries and they contain all the information.

My query is this - Does this always come back like that where the address is in the “Line” property and the top-level fields are not populated or is this only the data that is on Sandbox that is skewing the results I am getting?


Hi Matt,

PDS FHIR does not use all of the top level fields as described in the FHIR Address object.

All included fields can be found in the schema at the bottom of Personal Demographics Service - FHIR API - NHS Digital

But in short, yes, this is expected behaviour, you will get (up to) 5 line objects and a separate postalCode.

All lines of the address except the postal code.

Systems must apply the following formatting convention when adding or replacing addresses lines: * line 1 - premises ID and/or house name, e.g. Flat 1 or The Old Schoolhouse * line 2 - house number, dependent thoroughfare name and descriptor (if present), thoroughfare name and descriptor, e.g. 23 Mill Lane * line 3 - dependent locality/village, locality (if present), e.g. Boxgrove * line 4 - post town, e.g. Leeds * line 5 - county (if present), e.g. West Yorkshire

If any of the lines are blank, they are not returned due to FHIR conformance constraints.
Max Items: 5


1 Like