NHSDigital / integration-adaptor-111

National Integration Adaptors - Adaptor for NHS 111 Post Event Message
Apache License 2.0
3 stars 9 forks source link

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

Open emileaxelrad opened 2 years ago

emileaxelrad commented 2 years ago

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.

dawidskainos commented 2 years ago

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