My usecase is sorting and removing duplicates and getting count from a file that has json messages as a individual rows.

I am currently planning to use pandas for this purpose as its really fast. Below are the steps i am following

1) call a python function (called function) from IRIS classmethod(calling function)

2) the call python function will read the json file in a dataframe

3) perform sorting, dup removal, count in the dataframe

4) convert the dataframe into iris stream

5) return back the stream to iris calling function class method

0 6
0 70
InterSystems Developer Community is a community of 21,637 amazing developers
We're a place where InterSystems IRIS programmers learn and share, stay up-to-date, grow together and have fun!
Contestant
Article
· Feb 7 4m read
IRIS %Status and Exceptions

You may encounter errors during any point of program execution, and there are several ways to raise and handle these exceptions. In this article, we'll explore how exceptions are handled efficiently in IRIS.

One of the most commonly used return types is %Status, which is used by methods to indicate success or failure. Let's begin by discussing %Status values.

Working with %Status

2 0
0 48

I have an MDM interface with a DTL that takes OBX:5 and replaces "{\E\rtf" with "{\rtf" and "\X0A\" with nothing. Most rtf's this works without a problem, some others, it corrupts the document.

Code:

<assign value='..ReplaceStr(..ReplaceStr(source.{OBXgrp(k1).OBX:ObservationValue(1)},"{\E\rtf","{\rtf"),"\X0A\","")' property='target.{OBXgrp(k1).OBX:ObservationValue(1)}' disabled = '0' action='set' />

My question is - anyone know of any other "gotchas" that could possibly need to be replaced or something?

0 1
0 23

At the moment we're creating multiple BPLs are using a router (or another BPL) to direct to these based on a unique key modulo the amount of BPLs available, e.g. if we have 3 BPLs created.

Message key = 1 mod 3 + 1 -> BPL02
Message key = 2 mod 3 + 1 -> BPL03
Message key = 3 mod 3 + 1 -> BPL01

FIFO only matters in that each messages for each key is processed in order.

1 7
0 69
Contestant

Hello,

When setting up a new web app in iris (iris is in a container) iris complains that a WSGI framework is not installed. I have installed python into the container as well as both flask and django via the python virtual environment (see second screenshot) and the python language server is running

Is this the wrong way to install flask? How do I get the container version to recoginize that flask is installed?

0 2
0 32
Article
· Feb 17, 2023 2m read
Returning values with python

Why am I writting this?

Last year I made an article for starters on using embedded python. Later, it started a little discussion on how to return values with python and I found some interesting observations that are worth writing a little article. Also, hopefully I can reach more people by writing this.

Possible situations

There are two things you'll need to care about when returning a value with python. The first is the type you're trying to return and the second is where you're returning it.

3 1
0 502

Hi Community!

We're happy to share the next video in the series dedicated to Gen AI on our InterSystems Developers YouTube:

Open Source and Proprietary LLMs

https://www.youtube.com/embed/-LAzjc5MCac
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

1 1
0 48

Hello, I have a problem with a call and I would need some help.

When I call an API with the SendFormDataArray method of the EnsLib.HTTP.OutboundAdapter adapter, I pass it a %Net.HttpRequest object and I receive the following error:

ERROR #5002: ObjectScript error: <SUBSCRIPT>MatchSuffix+1^%Net.HttpRequest.1 ^%qPublicSuffix("")

I have correctly entered the url in my business operation and I pass it in the last parameter of the SendFormDataArray method. Do you have any idea, please?

0 1
0 37

Interoperability of systems ensures smooth workflow and management of data in today's connected digital world. InterSystems IRIS extends interoperability a notch higher with its Embedded Python feature, which lets developers seamlessly integrate Python scripts into the IRIS components, like services, operations, and custom functions.

2 4
0 145
Contestant

From the previous article, we identified some issues when working with JSON in SQL.

IRIS offers a dedicated feature for handling JSON documents, called DocDB.

InterSystems IRIS® data platform DocDB is a facility for storing and retrieving database data. It is compatible with, but separate from, traditional SQL table and field (class and property) data storage and retrieval. It is based on JSON (JavaScript Object Notation) which provides support for web-based data exchange. InterSystems IRIS provides support for developing DocDB databases and applications in REST and in ObjectScript, as well as providing SQL support for creating or querying DocDB data.

By its nature, InterSystems IRIS Document Database is a schema-less data structure. That means that each document has its own structure, which may differ from other documents in the same database. This has several benefits when compared with SQL, which requires a pre-defined data structure.

The word “document” is used here as a specific industry-wide technical term, as a dynamic data storage structure. “Document”, as used in DocDB, should not be confused with a text document, or with documentation.

Let's explore how DocDB can help store JSON in the database and integrate it into projects that rely solely on xDBC protocols.

16 1
0 66
Question
· Feb 5
How to delete account

Help!

I want to get rid of this account but there seems to be no way to do this by myself. Whom can I write to, to have my account deleted? Thank you in advance...

0 0
0 28

Hi,

I found an issue while fetching records from FHIR DB, I am getting below error thou FHIR repository have the records with the corresponding id

{

"resourceType": "OperationOutcome",

"issue": [

{

"severity": "error",

"code": "not-found",

"diagnostics": "<HSFHIRErr>ResourceNotFound",

"details": {

"text": "No resource with type 'Appointment' and id '21'"

}

}

]

}

0 5
0 150

Hi, Community!

In the previous article, we introduced the Streamlit web framework, a powerful tool that enables data scientists and machine learning engineers to build interactive web applications with minimal effort. First, we explored how to install Streamlit and run a basic Streamlit app. Then, we incorporated some of Streamlit's basic commands, e.g., adding titles, headers, markdown, and displaying such multimedia as images, audio, and videos.

Later, we covered Streamlit widgets, which allow users to interact with the app through buttons, sliders, checkboxes, and more. Additionally, we examined how to display progress bars and status messages and organize the app with sidebars and containers. We also highlighted data visualization, using charts and Matplotlib figures to present data interactively.

In this article, we will cover the following topics:

2 1
0 132



Hi, Community!

In this article, I will introduce Python Streamlit Web Framework.

Below, you can find the topics we will cover:

  • 1-Introduction to Streamlit Web Framework
  • 2-Installation of Streamlit module
  • 3-Running Streamlit Application
  • 4-Streamlit Basic commands
  • 5-Display multimedia
  • 6-Input widgets
  • 7-Display progress and status
  • 8-Sidebar and container
  • 9-Data Visualization
  • 10-Display a DataFrame

So, let's start with the first topic.

3 1
1 450

On Encounter container we want to map some data from Z segments is that possible? Presently the mapping from HL7to SDA3 is taking place from HL7 defines segments . is there a way to push the data from Z segment.

0 2
0 35