Skip to main content

LastChangeDate guidance

Guidance for consumers who have built a dependency on LastChangeDate.

For consumers who have built a dependency on LastChangeDate, the following guidance should be followed:

  • updates to the service are synchronised overnight, so any changes made by ODS analysts on a given day appear in the ODS API Suite the following day
  • updated records should always be returned by the API service between Tuesday and Saturday after approximately 3am (normal running process - this does not usually include bank holidays - in some cases updates will appear in queries executed on Sunday or Monday morning if ODS has been implementing changes over a weekend or bank holiday for example, to support bulk change/reconfiguration of hierarchies)
  • during the normal running process the data updates are automated including the assurance of the data itself
  • if the data fails assurance for any reason, updates to the database which supports the service are delayed. Under normal operation this should be resolved on the same business day, and in this scenario clients should consider re-querying throughout the day to pick up any changes. However, there will be occasions when more complex scenarios may result in longer delays and NHS Digital recommends that users employ a defensive algorithm to ensure no updates are missed, as follows:

If no records are returned during the normal running process clients should be configured to re-query using the same date value for up to 3 working days and only revert to business as usual once data is returned. If no records are returned after 3 working days a log should be raised via

An example scenario where the data refresh is not resolved until two days later:

Date run (after 3am) LastChangeDate Result Notes
24 September 2019 2019-09-23 Data is returned BAU
25 September 2019 2019-09-24 No data returned Data has not been refreshed
25 September 2019 at 1:00pm 2019-09-24 No data returned Issue not resolved same day
26 September 2019 2019-09-24 No data returned Re-query using 2019-09-24
27 September 2019 2019-09-24 Data is returned BAU
28 September 2019 2019-09-27 Data is returned BAU

Note that the query that implements the LastChangeDate value uses greater than or equal to (>=). Therefore a query with a LastChangeDate value of 2019-09-24 that was run on 2019-09-27 would return all records that were amended or created on or after 24 September 2019. 

Consumers should check that records exist for intervening days from the point at which the query stopped returning records to the latest date that records should appear – in the example above records with a LastChangeDate of 24, 25 and 26 September would be included in the query run on 27 September.

Last edited: 6 July 2021 10:47 am