Question
· Oct 30

Pulling/pushing HL7 from/to a API

Hello,
I am currently facing the task of retrieving or sending HL7 messages from a web API. Since we only send HL7 messages via internal sockets, web APIs are relatively new to me.
The following is my plan for the new interface:
I have created a new custom business service that periodically sends requests to a business process. In this business process, the HTTP request (HTTP.GenericMessage) is then created from scratch. The special feature is the "Authorisation" header field, where a signature is inserted, which consists of a base64-encoded hash value. The request is then sent to the API via a business operation (EnsLib.HTTP.GenericOperation). The whole thing is also secured via TLS.
If you remove the TLS encryption, I even get a response from the API (a negative one). As soon as I add a SSL/TLS configuration, I get the following error message:

Have I made any major mistakes? What could I improve and what does this error message mean?

Regards

Robert

Product version: HealthShare 2024.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 9 for x86-64) 2024.1.1 (Build 347_0_23677U) Tue Oct 1 2024 12:58:37 EDT
Discussion (4)3
Log in or sign up to continue

To retrieve or send HL7 messages via web APIs, you can create a production that utilizes various InterSystems IRIS components. Here are the relevant steps and considerations:

  1. Create a Custom Business Service:
    To periodically send requests to a business process, you can implement a business service using EnsLib.HTTP.GenericOperation. This business service interacts with APIs by sending HTTP requests. The following can be used as a foundation:

    • Configure SSL/TLS settings for secure communication by creating a new SSL configuration if the API requires encrypted communication [1][2][3].
    • Set up headers in your HTTP request, such as the "Authorization" field for specific API requirements. You may use EnsLib.HTTP.OutboundAdapter or %Net.HttpRequest for detailed control over request construction [4][1].
  2. Secure TLS Communication:
    To overcome SSL/TLS errors, verify the correct configuration and communication:

    • Create the required SSL/TLS configuration settings, including specifying cipher suites, certificate files, and other attributes. Make sure the chosen configuration matches the API's requirements for compatibility [5][6][4].
    • Test SSL/TLS connectivity via InterSystems tools, such as %Net.HttpRequest. Review the return headers and debugging logs for errors related to SSL errors [3][1].
  3. Handling Large and HL7-Specific Messages:

    • Ensure your configuration and object handling supports large HTTP payloads by configuring settings like message content preview limits [2][7].
    • If you need specialized handling for HL7 messages, consider converting them from ER7 to XML or JSON using specific tools that InterSystems provides [8][2][9].
  4. Integration with REST APIs:
    Setting up operations for pushing or pulling HL7 messages via REST:

    • Use EnsLib.REST.Operation or %Net.HttpRequest for outgoing REST API calls.
    • Include the relevant authentication, configuration headers, and body formats (e.g., JSON) to meet API specifications.
    • Debug requests using tools like Fiddler or logging configurations [2][1].
  5. Common Challenges:

    • Issues with SSL/TLS configurations, improper headers setup, unauthorized HTTP requests, or incorrect payload formatting often lead to errors like TLS protocol mismatches or bad request messages from APIs [3][6].

If you encounter specific error messages or behaviors that remain unresolved, such as "SSL configuration issues with EnsLib.HTTP.GenericOperation," analyze returned debug logs thoroughly and adjust configurations accordingly [7][3][6]. For further reference examples on creating productions or detailed implementations, visit resources provided in InterSystems documentation and GitHub repos [1][2][10][11][5].

Sources: