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 (https://directory.spineservices.nhs.uk/ORD/2-0-0/ODSAPISuite) and passes in <LastChangeDate> and “_format=xml” in order to retrieve individual XML records (Example call – https://directory.spineservices.nhs.uk/ORD/2-0-0/sync?LastChangeDate=2018-11-30&_format=xml). It then generates a schema compliant XML file which can be passed to the XSLT tools provided by ODS for further processing (e.g. 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.
Note that 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
|Title||ORD API XML Synchroniser Demonstrator|
|ORD XML Schema version||v2-0-0|
|Project||ORD Changes (HSCOrgRefData)|
|Copyright||Health and Social Care Information Centre (c) 2018|
|Download Python (Requires Python 3.6.6 or later)||ord-api-xml-sync-python.zip|
|Download .Net Core Self-Contained Deployment (for Win 64)||ord-api-xml-sync-csharp.zip
Includes compiled package for windows 64 bit (with required libraries) plus the C# source code
Was this article useful?0