Tuesday 28 February 2023

Use HL7 Soup Integration Host as an endpoint for transformations

HL7 Soup Integration Host can be used as an endpoint to perform quick transformations of HL7, JSON, FHIR, CSV & XML messages by simply configuring a few settings in your Integration Host client.

1. Configure an HTTP receiver to be your endpoint. Set up your bindings if you'd like to use variables in your transformations and configure a dummy JSON response like: {"response": "success"} in the message template.

2. Add a run code activity. We won't actually run any code in this activity but it allows us to run our transformations.

3. Empty the code window and add your transformed message to the message template. If you're not sure about transformations, the HL7 Soup team have a library of great tutorials to get you started.

4. Go back to your receiver activity. Click the transformers tab and drag the response variable from the Destination (right hand side) box into the Transformers (middle) box. Select your new transformer and right click in the Source Path down the bottom. Select Insert Activity Message and then Run Code Sent Message.

And you're done! Now when you send a request to that HTTP receiver it will perform your transformation on the posted data and return the transformed data in the HTTP response!

Saturday 25 February 2023

Chat GPT jokes about HL7

 Once upon a time, there was a hospital that decided to introduce a new soup on its menu. It was called "HL7 soup" and it promised to be a game-changer for hospital nutrition. But as it turned out, the soup was a lot more complicated than anyone had anticipated.

The first person to try the soup was Dr. Smith, who was on call that evening. He sat down at the cafeteria table and took a sip of the soup. Suddenly, he was hit with a barrage of information - patient records, lab results, medication lists - it was all flooding into his brain.

Dr. Smith's eyes widened in surprise. "What the heck is in this soup?" he exclaimed.

"It's HL7 soup!" replied the cafeteria worker with a smile.

Dr. Smith shook his head in disbelief. "I don't think I can handle this much data right now. Can I just have a regular chicken noodle soup, please?"

But the cafeteria worker insisted that HL7 soup was the way to go. "Trust me, Dr. Smith, this soup will change your life," she said.

So, Dr. Smith took another sip of the soup. And sure enough, he started to feel a strange sensation in his stomach. It was like his body was trying to parse and process all of the information that was coming in. He began to sweat, and his heart rate started to increase.

Suddenly, Dr. Smith keeled over, unconscious. The cafeteria worker rushed to his side, calling for help.

The hospital staff quickly discovered that the soup had been created using an HL7 data model, which was designed to help hospitals exchange information between systems. But somehow, the soup had gone awry, and it was causing patients to experience a deluge of data overload.

From that day forward, the hospital decided to stick with more traditional soup recipes. And Dr. Smith recovered just fine, but he still couldn't look at a bowl of soup without feeling a little bit queasy.

The moral of the story? When it comes to hospital nutrition, sometimes it's best to keep it simple. And if you're going to experiment with new recipes, maybe leave the HL7 data models out of the kitchen.

Tuesday 14 February 2023

HL7 Soup XML attributes

HL7 Soup supports attributes in the expressions, however, the binding tree doesn’t show them as bindable entities.  This means you have to manually type in the path that includes the attribute address.  You can do that with an @ followed by the attribute name.

For example:

<Patient>
    <ID ext=”test”>1000</ID>

 

The path for the extension attribute would be

Patient/ID/@ext

 

Note you still need to have a binding and not just text.  So the easiest way is to bind to the field, then manually edit the path. You can do this in the transformers.