How to check/amend date format (all outbound fields) to an Operation?

Our PAS system supplies date in a particular date format (ISO 8601 compliant) that includes seconds and milliseconds.  Because many downstream systems cannot handle milliseconds (and some don't even want seconds) many transformations are required to truncate the data.

What immediately sprang to my mind was to look for a setting on the operation to modify outbound datetime fields - obviously there isn't one, thus the need for this question.  I guess I cold write code to check the schemas for outbound messages and check/replace all the values where the field has a TS type, but my object script skills are basic and I am unsure if I could achieve this (it also seems like I could be adding a big workload to my TIE - especially if my code is not fully optimised).

(I should say this is using Healthshare as  a HL7 based Integration Engine in a UK based NHS hospital)

Has anyone ever had a similar issue, and if so has a simple workaround ever been developed or could some other ideas be offered please?

Thank you in advance (all ideas are welcome).

  • 0
  • 0
  • 56
  • 1
  • 1


Hi Andrew.

I don't think the operation to a downstream system would be the appropriate place for adjusting the HL7 content.

Using Transforms within a router will be the best approach for this, and while it might seem a little cumbersome creating a transform per message type you should be able to remove some of the leg work by using sub-transforms.

For example; if you were looking to adjust the datestamp used in an admission date within a PV1, rather than complete the desired transform work in every message transform that contains a PV1, you create a sub-transform for the PV1 segment once and then reference this in your transform for each message type. If you then have additional changes required to the PV1 which is message specific (say, a change for an A01 but not an A02) you can then make this change in the message specific transformation.

As far as transforming datetime in HL7, I have faced my share of faff when it comes to this with suppliers. The best approach from within the transforms is to use the built in ensemble utility function "ConvertDateTime" listed here

Hi Julian,

I appreciate the response. We do indeed use transforms/subtransforms exactly for this purpose (and it occurs quite often) - but we have a system which requires no changes to the HL7 except for the date formats.  It occurred to me that since "Separators" and "Default Char Encoding" occurred on the Operation then there could be a similar setting for "Default DateTime Format" (if enough developers required it - or the problem was a very common one)!  This was mainly a question to see if I had missed a trick somewhere (and to see how common this was).

Many thanks for answering.