Skip to main content

ODS ORD API synchroniser demonstrator

Find out about the ODS ORD API synchroniser demonstrator.

ODS recommends that consumers of ORD data baseline local Organisation Reference Data by downloading and parsing the monthly XML files available from TRUD and then connecting to the ORD interface of the ODS API Suite to retrieve updates using the sync endpoint. The demonstrator provides an example for developers to use as a starting point or reference (currently available as Python and .NET Core code).  

The scope of demonstrators will be widened over time to include all current endpoints and any which are introduced in the future.

This software allows those customers who have interfaced with ODS XML to retrieve records from the ODS API Suite and an XML file which conforms to the ORD schema.

The demonstrator calls the sync endpoint of the ORD Interface of the ODS API Suite and passes in <LastChangeDate> and “_format=xml” in order to retrieve individual XML records. See an example. It then generates a schema compliant XML file which can be passed to the XSLT tools provided by ODS for further processing (such as XML to CSV or Primary Role Transform).

The header, manifest and CodeSystems content is held in a static file called HeaderCodeSystems.txt. The text from the file is written to the output file and the manifest is updated with Date/DateTime values based on sysdate; the RecordCount is populated to match the volumes returned.

The CodeSystems specified in the template file (HeaderCodeSystems.txt) will need to be updated periodically from the full XML file in order to pick up changes to Roles, Relationships and RecordClass definitions to ensure that the output can be rendered correctly via the XSLT tools.

All records returned from the method getSyncData() are written to the output file via the method writeToFile(), topped and tailed with the headers and CodeSystems content from the template file plus the closing XML elements </Organisations> and </HSCOrgRefData:OrgRefData>.

The demonstrators are provided under the Apache 2.0 open source license. ODS welcomes any feedback or improvements to the code that has been provided.

Only XML content is returned by this software.

ODS ORD API XML synchroniser demonstrator details

Item Details
Title ORD API XML Synchroniser Demonstrator
ORD XML Schema version    v2-0-0
Status Draft
Author NHS Digital
Release date 2018-11-20
Project ORD changes (HSCOrgRefData)
Copyright Health and Social Care Information Centre (c) 2018
License Apache 2.0
Download Python (requires Python 3.6.6 or later)

Download .Net Core self-contained deployment (for Win 64)
Includes compiled package for windows 64 bit (with required libraries) plus the C# source code
Last edited: 30 April 2019 10:23 am