#Business Service

0 Followers · 209 Posts

A business service is part of InterSystems Ensemble interoperability production which is responsible for accepting requests from external applications.

Article Andrew Sklyarov · Nov 8 4m read

When I started my journey with InterSystems IRIS, especially in Interoperability, one of the initial and common questions I had was: how can I run something on an interval or schedule? In this topic, I want to share two simple classes that address this issue. I'm surprised that some similar classes are not located somewhere in EnsLib. Or maybe I didn't search well? Anyway, this topic is not meant to be complex work, just a couple of snippets for beginners.

0
0 0
Question Robert Hildebrand · Oct 30

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

0
0 0
Question Kurro Lopez · Oct 21

Hi community,

I have a service that uses EnsLib.RecordMap.Service.FTPService to capture files in an FTP directory.

Instead of uploading them all at once, I would need to do so one at a time.

I have a class that extends this class because it preprocesses, saves everything in the RecordMap class, and then processes all the records at once.

When I invoke the BP, it does so through the method set tStatus = ..SendRequest(message, 1).

I've set the SynchronousSend flag to 1, but it continues processing all the files at once.

0
0 0
Question Dmitrii Baranov · Oct 12

I need to build an integration solution that reads messages from a Kafka topic. The topic has 3 partitions and contains several million messages.

For certain reasons, I can only use the standard EnsLib.Kafka.Service class and cannot use either KafkaClient or Python.

To measure performance and collect statistics I created a simple key + timestamp table with no indexes (so it is unlikely to be a bottleneck). Next, I started an instance of EnsLib.Kafka.Service. In the OnProcessInput method, I receive a message, extract the key from it, get the current time, and write the row to the table.

0
0 0
Question Kurro Lopez · Sep 5

Hello community.

I have a request from a client who wants to do the following.
Currently, they have a data upload process via FTP in which they have implemented a RecordMap to store the information of the CSV files that are uploaded to the FTP directory.
Now they want to have another directory so that it is ONLY executed through an external instruction, not when the file is uploaded to the directory.

0
0 0
Article Ashok Kumar T · Sep 8 19m read

FHIR Server

A FHIR Server is a software application that implements the FHIR (Fast Healthcare Interoperability Resources) standard, enabling healthcare systems to store, access, exchange, and manage healthcare data in a standardized manner.

Intersystems IRIS can store and retrieve the following FHIR resources:

0
0 0
Question Sizwe Hlatshwayo · Jun 21

Good day 

I am trying to connect a business service to fileZilla using FTP on my local PC Win 11.

I am trying to setup my training after attending the Building HL7 interfaces course with ISC.

The connection is failing. He is the error below

ERROR <Ens>ErrOutConnectFailed: FTP Connect failed for localhost:21//SSL=' with error ERROR <Ens>ErrFTPConnectFailed: FTP: Failed to connect to server 'localhost:21//SSL='/' (msg='Missing required argument',code=501)

0
0 0
Question Thembelani Mlalazi · Apr 16

I need to connect to a SFTP server and I seem to connect and timeout have tested the connection using File-zilla and the connection was successful but the problem is when I try to connect using the FTP in bound adapter service I get the following errors.

ERROR <Ens>ErrOutConnectExpired: FTP Connect timeout period (120) expired for ***************.com:990/******/SSL='********* + ERROR <Ens>ErrFTPConnectFailed: FTP: Failed to connect to server ***************.com:990/******/SSL='********* (msg='Timeout waiting for response',code=529)

0
0 0
Question Stuart Byrne · Jun 23, 2020

Dear Community,

I need to collect a file from an FTP server over FTPS.

I have the :

  • credentials saved correctly
  • correct host and port informatoin
  • correct filepath I am trying to collect from
  • I have setup the SSL configuration in  System > Security Management > SSL/TLS Configurations and this tests sucessfully

When I run the business service to connect it connects, but soon after connecting it fails to open the directory:

4
0 486
Article Sanjib Pandey · Mar 3 5m read

Background:

This guideline provides an overview of how to design and implement a REST API interface for querying patient demographic data from an Electronic Patient Record (EPR) system using HealthConnect. The process involves sending a query request with the patient's identification number, retrieving the response from the EPR system, extracting the required patient demographic data from the HL7 message, and sending it as a JSON response to the supplier. The high-level process diagram is shown below (Screenshot 1).

0
0 0
Article Kurro Lopez · Apr 1 1m read

Hi all,

As part of the development an API to know what is the instance of IRIS is connected, I've found some methods to know information about the server that can help you.

Get the server name: $SYSTEM.INetInfo.LocalHostName()

Get the server IP: $SYSTEM.INetInfo.HostNameToAddr($SYSTEM.INetInfo.LocalHostName())

Get the instance name: $PIECE($SYSTEM,":",2)

So, I have created the following code as BS class:

0
0 0
Question Warren Oyco · Feb 21

Hi Community,

I've created a method in my File Service to do a cleanup for every file load. Currently, I've set it to delete data when LastUpdated date is greater than maxdate. However, I want to do a cleanup for every new file load. Any suggestions or advice on how to do this? Thanks!

Method Cleanup()
{

   Set tMaxDate = ""
   &SQL(SELECT Max(LastUpdated) into :tMaxDate
   FROM MC_Table_Data.Patient) 
 

   &SQL(DELETE MC_Table_Data.Patient WHERE LastUpdated<:tMaxDate)
}

0
0 0
Article Kate Lau · Jan 2 5m read

Last Chapter: Creating a REST client to get Tracks from Spotify REST API - Part4 Save the Search Result

Git link: https://github.com/ecelg/InterSystems-IRIS-as-a-Spotify-REST-client

OK.... based on what I have done.... I am able to 

1. Query Track information by making use of the Spotify API

2. Store the necessary data into my own album, artists, and track table

so.... what next?🤔 How about I set up my own REST API service on my IRIS for the other people to query my table?🤔🤨

ok... 1st... start from document Introduction to Creating REST Services

0
0 0
Article Kate Lau · Dec 29, 2024 4m read

Git link: https://github.com/ecelg/InterSystems-IRIS-as-a-Spotify-REST-client

Recently, I come up an idea in my mind that how can I put my playlist on IRIS.🧐

At the same time, I was told to pay for my Spotify subscription💸💸... ooo.. how about to get some data from the Spotify API... so I started to do study about it.

Like most of the development, let's start from Documentation of  the API https://developer.spotify.com/documentation/web-api

In order to get the data, i am required to request an access token from for the token endpoint URL.🧐

0
0 0
Article Oliver Wilms · Dec 18, 2024 4m read

Implements Idea DPI-I-456

Idea

What The Sample Does

This sample was cloned from iris-interoperability-template. I have reconfigured the interoperability Production with an Inbound HTTP Adapter which is used by a HTTP Business Service. The configuration details for the business service are specified in System Default Settings. I configured Call Interval setting to call HTTPServer once every hour. You can change both the URL and frequency in the service's settings. Screenshot

0
0 0
Question Mark OReilly · Aug 30, 2024

As part of fully decoupling code we send a snapshot from a business service (running a SQL statement). 

sql service                         Processor                                File Out

This is picked up by a processer and puts it into a file .txt. 

Issue is if you open it up via the SQL.snapshot message as this is 46,819 rows it'll take too long to respond to opening up the sql.snapshot in the message viewer when viewing the session if looking from the business service 

Is there any way to not have this xml open up in full in the portal? I.e. have a see more? 

0
0 0
Article Samuel Thomas · Sep 23, 2024 1m read

<> <> # IRIS-API-Template

This is a REST template that can send REST messages to production and control interfaces through Servicer, processes, and operations

How to use it

zpm "install iris-rest-template"

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

1.Clone/git pull the repo into any local directory

git clone https://github.com/samuelxabc/IRIS-API-Template.git

Open the terminal in this directory and run

docker-compose build

Run the IRIS container

docker-compose up -d
0
0 0
Question Scott Roth · Jun 28, 2024

Has anyone noticed weird behavior when upgrading to HealthShare Health Connect 2024.1

Wednesday I upgraded our TEST environment from IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2022.1.4 (Build 812_0_22913U) [HealthConnect:3.5.0-1.m1] [HealthConnect:3.5.0-1.m1] to IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1 (Build 267_2U) [HealthConnect:3.5.0-1.m1].

Some of our Business Processes have been throwing...

0
0 0
Question Joe Jones · Mar 13, 2023

Hi Community,

I am receiving a JSON file as input in ensemble and i need to convert the JSON message to HL7 message.

Can anyone share few points how to read a JSON file into Ensemble production by creating a Custom Business service?

I have created a custom business service as below but i am not aware which parameters i need to pass in OnProcessInput method?

Method OnProcessInput(pInput As Ens.Request, Output pOutput As %RegisteredObject) As %Status

Do i need to Ens.Request or RegisteredObject or Ens.StreamContainer?

Thanks,

Joe

13
0 1306
Question Joseph Tsang · Mar 22, 2019

From time to time we develop an Ensemble Production with simple SQL Inbound data from external databases, we need to develop a few new classes. There are at least:

  • 1 Ens.Request class with the fields captured from the SQL ResultSet
  • 1 Business Service class using SQL Inbound Adaptor, and in the OnProcessInput(), copy the relevant field data from ResultSet to the new Ens.Request, and call either ..SendRequestSync() or ..SendRequestAsync().
3
0 465
Question Colin Brough · May 9, 2024

We have a custom business service that is triggered by a scheduled task. The service queries a table, iterates over the result set and sends a message on to a business process for each result. Happy path functionality is all fine.

However, when there is an error detected in the business service code, neither throwing an exception nor returning an error %Status behaves as we'd expect.

0
0 141
Article Erin Spencer · Jan 24, 2024 9m read

The traditional use of an IRIS production is for an inbound adapter to receive input from an external source, send that input to an IRIS service, then have that service send that input through the production.

With a custom inbound adapter though, we can make an IRIS production do more. We can use an IRIS production to process data from our own database without any external trigger.

By using an IRIS production in this way your data processing tasks now get to leverage all the built in features of an IRIS production, including:

0
0 461