Many factors affect a person's quality of life, and one of the most important is sleep. The quality of our sleep determines our ability to function during the day and affects our mental and physical health. Good quality sleep is critical to our overall health and well-being. Therefore, by analyzing indicators preceding sleep, we can determine the quality of our sleep. This is precisely the functionality of the Sheep's Galaxy application.

9 5
0 207

We have a rule to disable a user account if they have not logged in for a certain number of days. IRIS Audit database logs many events such as login failures for example. It can be configured to log successful logins as well. We have IRIS clusters with many IRIS instances. I like to run queries against audit data from ALL IRIS instances and identify user accounts which have not logged into ANY IRIS instance.

1 1
0 139
Article
· Apr 16, 2023 4m read
Tuples ahead

Overview

Cross-Skilling from IRIS objectScript to Python it becomes clear there are some fascinating differences in syntax.

One of these areas was how Python returns Tuples from a method with automatic unpacking.

Effectively this presents as a method that returns multiple values. What an awesome invention :)

out1, out2 = some_function(in1, in2)

ObjectScript has an alternative approach with ByRef and Output parameters.

Do ##class(some_class).SomeMethod(.inAndOut1, in2, .out2)

Where:

3 0
0 250
Article
· Mar 29, 2023 1m read
Named Parameter In SQL with Python

Quick Tips: Total Productive Maintenance

Named parameters can be achieved with SQLAlchemy :

from sqlalchemy import create_engine, text,types,engine

_engine = create_engine('iris+emb:///')

with _engine.connect() as conn:
    rs = conn.execute(text("select :some_private_name"), {"some_private_name": 1})
    print(rs.all())

or with native api

from sqlalchemy import create_engine, text,types,engine

# set URL for SQLAlchemy
url = engine.url.URL.create('iris', username='SuperUser', password='SYS', host='localhost', port=33782, database='FHIRSERVER')

_engine = create_engine(url)

with _engine.connect() as conn:
    rs = conn.execute(text("select :some_private_name"), {"some_private_name": 1})
    print(rs.all())

6 0
0 346

If you are using Python, you can use the built-in venv module to create a virtual environment. This module is the recommended way to create and manage virtual environments.

A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.

So if like me you work a lot with Python, you can use the venv module to create a virtual environment for your project. This will allow you to install packages without affecting the global Python installation.

You will find here two neat alias to create and activate a virtual environment.

Python aliases

alias venv="python3 -m venv .venv; source .venv/bin/activate"
alias irisvenv="python3 -m venv .venv; source .venv/bin/activate; pip install https://github.com/grongierisc/iris-embedded-python-wrapper/releases/download/v0.0.3/iris-0.0.3-py3-none-any.whl"

9 3
2 1.2K
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 0
0 301

Hi Community,

This article is a continuation of my article about Getting to know Python Flask Web Framework

In this article, we will cover the basics of topics listed below:

1. Routing in Flask Framework
2. Folder structure for a Flask app (Static and Template)
3. Getting and displaying data in the Flask application from IRIS.

So, let's begin.

2 0
0 858

Schematron is a rule-based validation language for making assertions about the presence or absence of certain patterns in XML documents. A schematron refers to a collection of one or more rules containing tests. Schematrons are written in a form of XML, making them relatively easy for everyone, even non-programmers, to inspect, understand, and write

1 0
0 748

Python has become the most used programming language in the world (source: https://www.tiobe.com/tiobe-index/) and SQL continues to lead the way as a database language. Wouldn't it be great for Python and SQL to work together to deliver new functionality that SQL alone cannot? After all, Python has more than 380,000 published libraries (source: https://pypi.org/) with very interesting capabilities to extend your SQL queries within Python.

17 3
0 958
Article
· Dec 6, 2022 3m read
OCR DEMO

OCR DEMO

This is a demo of the OCR functionality of the pero-ocr library.

It used in the iris application server in python.

Demo

This is an example of input data :

input

This is the result of the OCR :

In this example you have the following information:

10 6
2 451

Hello everyone, this is with great pleasure that I announce the V2 of my application 'Contest-FHIR'.

In this new version, I used new tools and techniques I discovered at the EUROPEAN HEALTHCARE HACKATHON in which I was invited by InterSystems as a guest and as a mentor to display the multiple projects I did in my intership back in April 2022.

Today I present to you the V2 of my application, it can now transform CSV to FHIR to SQL to JUPYTER notebook.

4 0
0 405
Article
· Nov 27, 2022 9m read
Easy CSV TO FHIR - InterSystems Contest

Hello everyone, I’m a French student in academical exchange for my fifth year of engineering school and here is my participation in the FHIR for Women's Health contest.

This project is supposed to be seen as the backend of a bigger application. It can be plugged into a Front End app and help you gather information from your patients. It will read your data in local and use a Data Transformation to make it into a FHIR object before sending it to the included local FHIR server.

4 1
1 794
Article
· Nov 18, 2022 1m read
Jupyter and IRIS - The Simple Version

There are several great articles in the community showing how to use Jupyter and InterSystems IRIS together, and I encourage you to check them out in the link at the end of this article for more in depth understanding.

This is just another one, the difference is on the simplicity. Do you want to just start a container where Jupyter is already connected to an IRIS instance? Then this is for you!

2 2
0 615

I am demonstrating a use case of how we can create an IRIS Interoperability Production for special use in an external language. InterSystems IRIS, within Interoperability has a framework called Production Extension (PEX), using which we can create productions and program them as per their purpose using external languages like Java, Python etc, and also develop custom inbound and outbound adapters to communicate with other applications.

6 5
0 305

Hi Community,


In this article, I will introduce Python Flask Web Framework. Together we will create a minimal web application to connect to IRIS and get data from it.

Below you can find the steps we will need to follow:

  • Step 1 : Introduction to Python Flask Web Framework
  • Step 2 : Installation of Flask module
  • Step 3 : Creation of web application using Flask
  • Step 4 : Use of HTML Templates
  • Step 5 : Installation of IRIS Python Native module
  • Step 6 : Establishment of a connection with IRIS
  • Step 7 : Transferring data from IRIS to Flask and displaying it

So Let's start with step 1

Step1-Introduction to Python Flask Web Framework

Flask is a small and lightweight Python web framework that provides useful tools and features that make creating web applications in Python easier. It gives developers flexibility and is a more accessible framework for new developers since it allows to build a web application quickly using only a single Python file. Flask is also extensible and doesn’t requires a particular directory structure or complicated boilerplate code before getting started.


For more details please view Flask Documentations

2 2
1 531