Forum Discussion

swapnils's avatar
swapnils
Occasional Contributor
4 years ago
Solved

HL7 message validatiion and virtualization

Hi Team,

 

We would like to know about how this Test Complete help Tester to HL7 message validation or other way how to validate HL7 message using any SmartBear tool.  There are many type of message :

Most commonly used HL7 message types include:

ACK – General acknowledgement
ADT – Admit, Discharge, Transfer
BAR – Add/change billing account
DFT – Detailed financial transaction
MDM – Medical document management
MFN – Master files notification
ORM – Order (Pharmacy/treatment)
ORU – Observation result (unsolicited)
QRY – Query, original mode
RAS – Pharmacy/treatment administration
RDE – Pharmacy/treatment encoded order
RGV – Pharmacy/treatment give
SIU – Scheduling information unsolicited

 

It would be grateful, if I get the response at the earliest; So that I can take the next steps accordingly.

 

Thanks,

Swapnil

  • Hi swapnils,

     

    I see that you asked this question in the TestComplete community also. As far as I understand, your initial task is to compare HL7 messages. I'm not sure of any of SmartBear tools allow doing it out of the box. However, all of them provide rich scripting features that you can use. In ReadyAPI, you can treat HL7 message as a file and write a groovy script to compare the inbound and outbound files. You can prepare a similar script in TestComplete as well.

    I suppose you will need to work with regular expressions.

     

    If this isn't what you are looking for, could you please describe your task in detail?

     

9 Replies

    • swapnils's avatar
      swapnils
      Occasional Contributor

      Hi Team,

       

      Thanks for you quick reply.

       

      Could you please explain in more detail how can we apply validations on HL7 messages  and is this tool support all expected validation on this HL7 messages as like APIs validation.

       

      Thanks,

      Swapnil

      • richie's avatar
        richie
        Community Hero
        Hey swapnils,

        I had to do a bit of reading because id never heard of HL7 messages before, but after a bit of reading and then i saw an example and realised despite not knowing what an HL7 message was, i actually had a project on a contract for the british NHS about 3 years ago which passed these | delimited flat file HL7 messages (although the documentation didnt call them HL7) from one existing legacy system which was then transformed to json to be consumed by MS Dynamics CRM and then back again to the legacy system (that generates and consumes the HL7 messages).
        The way i set this up in ReadyAPI! was to create csv's (1 for each test case) using Excel, which i then after creation opened the csv's in notepad++ and replaced each comma with a vertical bar delimiter then resaved the file as .dat.

        I used the directory type datasource to provide the files for my payloads to my REST requests.

        I need to highlight that the messaging used message queues so was asynchronous so in regards to validation we used a novel approach for the validation of my .dat files as the live system didnt provide responses to enable assertions.

        We got the developers to create additional apis that hooked into the existing apis that provided responses after submitting either valid or invalid HL7 messages. I can explain further if you provide the technical architecture for your project. I.e. message flow (generation and consumption), how are the HL7 messages being consumed? Any transformation? Etc.?

        Anyway. The short answer was that due to the lack of validators (like .json or .xml schema) and the asynchronicity, we needed the developers to create additional apis that provided responses against which we could assert against.

        Hope this helps,

        Rich