NHSDigital/integration-adaptor-111

Incorrect conversion of date/times from 111 PEM XML to JSON

Opened this issue · 1 comments

The 111 PEM adaptor translate incorrect dates from the XML to the JSON message.

Example:

Source XML:
https://github.com/nhsconnect/integration-adaptor-111/blob/master/doc/xml/adastra-itk-ooh-referral-dx06-itk-request.xml

Output JSON:
https://github.com/nhsconnect/integration-adaptor-111/blob/master/doc/json/adastra-itk-ooh-referral-dx06-fhir-result.json

The source XML only contains the date 2021-04-06. (In 4 places).

The output JSON does contain this date. However, several resources also contains a second date "2021-10-11" in Composition.date, List.date, ReferralRequest.occurencePeriod.start/end, ProcedureRequest.occurrencePeriod.start/end.

This date does not exist in the original XML therefore it must be being inserted incorrectly by the adaptor.

@emileaxelrad adaptor populates above dates with the 'current timestamp' - the moment when it received ITK XML.