Find

Job
· Aug 31, 2024

IRIS / Healthshare Consultant Available (UK)

I am available to engage on projects as an Iris Healthcare Consultant, leveraging over 20 years of extensive experience in IT architecture with a special focus on Intersystems IRIS and Health Share solutions.

My expertise includes leading critical NHS projects in the UK as well as  building SaaS solution designed to enhance revenue cycle management and facilitate integration between hospitals and doctors in the US.

Certifications:

  • TOGAF 9 (The Open Group)
  • Certified Scrum Master (Scrum Alliance)
  • Azure Solutions Architect Expert (Microsoft)
  • Microsoft Azure Architect Technologies (AZ-300)
  • Microsoft Azure Architect Design (AZ-304)
  • Intersystems IRIS Core Solutions Developer Specialist
  • Intersystems HealthShare Health Connect HL7 Interface Specialist
  • Dell Boomi Associate Developer

Happy to discuss.

Regards
Neerav

Discussion (0)1
Log in or sign up to continue
Article
· Aug 31, 2024 4m read

Como verificar o tamanho dos seus dados

Rubrica InterSystems FAQ 

Os dados dos produtos InterSystems (linha de tabela, instância de objeto) são guardados em variáveis globais.
O tamanho de dados de cada global pode ser obtido clicando nas propriedades da global que você quer ver da página Portal de Adminitração > Sistema > Configuração > Base de dados Local > Globais, então clicando no botão Calcular Tamanho na página de atributos globais que aparece.
Para exibir os tamanhos de globais num namespace, você pode usar ^%GSIZE no terminal
A execução do método é a seguinte:

USER>do ^%GSIZE
 
Directory name: c:\intersystems\ensemble\mgr\user\ =>
All Globals? No => Yes
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Y
Include any other similar globals without asking again? Yes =>
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Yes
Include any other similar globals without asking again? Yes => Yes
^DeepSee.FeatureStats contains no data -- included
^DeepSee.Session contains no data -- included
^oddBIND     contains no data -- included
^oddMETA     contains no data -- included
^oddStudioDocument contains no data -- included
^oddStudioMenu contains no data -- included
^rINCSAVE    contains no data -- included
91 items selected from
91 available globals
Show details?? No => Yes
Device:
Right margin: 80 =>
directory: c:\intersystems\ensemble\mgr\user\                                   Page: 1                           GLOBAL SIZE                        26 Jun 2017
                                                                         6:56 PM
      Global        Blocks       Bytes Used  Packing   Contig.
      --------    --------  ---------------  -------   -------
      CacheMsg           1            3,812     47 %         0
      DeepSee.ActiveTasks
                         1               24      0 %         0
      DeepSee.AgentLog
                         1            6,008     74 %         0
      DeepSee.Agents
                         1              688      8 %         0
      DeepSee.BucketList
                         1               76      1 %         0
      DeepSee.Cache.Axis
                        25          142,616     70 %        14
      DeepSee.Cache.Listing
                        15           87,728     72 %        11
      DeepSee.Cache.Results
                        31          183,200     72 %        17
      DeepSee.Cubes
                         3           17,936     73 %         0
                                         to continue or '^' to STOP:
Discussion (0)1
Log in or sign up to continue
Article
· Aug 30, 2024 3m read

IRIS Native Python

Hello Community

I have previously experimented with embedded Python in IRIS; however, I have not yet had the opportunity to implement IRIS using native Python. In this article, I aim to outline the steps I took to begin learning and implementing IRIS within the Python source. I would also like thank to @Guillaume Rongier and @Luis Angel Pérez Ramos for their help in resolving the issues I encountered during my recent PIP installation of IRIS in Python, which ultimately enabled it to function properly.

Let's begin to write IRIS in python.

First comes First, You have to install the intersystems_irispython-3.2.0-py3-none-any.whl file from the github repo. I downloaded and installed in my windows machine.

py -m pip install intersystems_irispython-3.2.0-py3-none-any.whl

Verified the packages are installed in my machine by executing py -m pip list

intersystems-irispython 3.2.0
iris                    0.0.5

 

Now ready to start writing the python. I've created a .py file and import iris package on top of the class.

Now let's establish the connection to IRIS by using connection method and create use the connection object to instantiate the iris.IRIS object by using "createIRIS" and this is the crucial step to proceed further operations.

import iris
impor time

args = {'hostname':'127.0.0.1', 'port':1972,'namespace':'LEARNING', 'username':'_SYSTEM', 'password':'SYS'}

try:
    """
    some other ways instead of kwargs
    conn = iris.connect(hostname='127.0.0.1', port=1972, namespace='LEARNING',username='_SYSTEM',password='SYS')
    """
    conn = iris.connect(**args)
    # A new IRIS object that uses the given connection.
    irispy = iris.createIRIS(conn)

    print('connected!')
except Exception as e:
    # Handling the exception and printing the error
    print(f"An error occurred: {e}")
    

 

Now let's talk about the Methods for COS and global

Once you had successfully created an IRIS object. Now it's ready to use various operations

set : This function is used to define the global values in to the IRIS database

1. fist parameter is set value 

2. second parameter is global name

3. *args - third parameter is subscript(s)

def set_global(value=None,gbl=None,*args):
    #set method is in _IRIS from iris package
    irispy.set('set from irispy','mygbl','a',str(time.time()))
    print('global set done!')

set_global()

 

kill This function is used to delete the global from database

def kill_global():
    irispy.kill('mygbl')
    print('global kill done!')

IsDefined: equals to $data : verify it exist

def data_isDefined():
    # equal to $data
    print(irispy.isDefined('mygbl','a')) # o/p 10
    print(irispy.isDefined('mygbl','a','1724996313.480835')) # o/p 1

nextSubscript: Equals to $Order

irispy.nextSubscript(0,'mygbl','a')

tStart, tCommit and tRollback: same as TStart, TCommit, TRollback

def global_transaction_commit():
    irispy.tStart()
    print(irispy.getTLevel())
    irispy.set('set from irispy','mygbl','trans',str(time.time()))
    irispy.tCommit()

def global_transaction_rollback():
    irispy.tStart()
    print(irispy.getTLevel())
    irispy.set('set from irispy','mygbl','trans1',str(time.time()))
    irispy.tRollback() # tRollbackOne()

 

lock and unlock: by default incremental lock/exclusive lock

def global_lock():
    #default exclusive lock
    s = irispy.lock('',1,'^mygbl')
    time.sleep(10) # verify the lock in locktab
    irispy.unlock('','^mygbl')
    
def global_shared_lock():
    s = irispy.lock('S',1,'^mygbl')
    time.sleep(10)
    irispy.unlock('S','^mygbl')

node: subscript level traversal same as $Order

def node_traversal():
    # subscript level traversal like $Order
    for mrn in irispy.node('^mygbl'):
         for phone in irispy.node('^mygbl',mrn):
            print(f'patient mrn {mrn} and phone number: {phone}')
            
"""
o/p
patient mrn 912 and phone number: 3166854791
patient mrn 991 and phone number: 78050314
patient mrn 991 and phone number: 9128127353
"""

The node, value traversal and class definitions and it members are covered in the next article.

You can refer the IRIS documentation  for all the functions.

7 Comments
Discussion (7)3
Log in or sign up to continue
Question
· Aug 30, 2024

Only load part of XML/ SQL Snapshot in visual trace- portal loads too slow

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? 

I am aware this could just be in the BP but for me this is the correct integration setup- SQL service to pick up the data- process to do something with it (passed in the correct message type for it) and then sent to a file/ downstream. 

3 Comments
Discussion (3)2
Log in or sign up to continue
Question
· Aug 30, 2024

Changing a Setting value on a schedule?

I can START and STOP a business process via its Schedule setting.

Is it possible to change the value of another Setting in an analogous way?

I can imagine a SettingSchedule that could look like 

action:YYYY-MM-DDThh:mm:ss[,action:YYYY-MM-DDThh:mm:ss]

But rather than just START or STOP, action could be "SET Setting = value", overriding whatever the normal value is.

Is there an existing way of achieving this kind of functionality?

I've got a business process that triggers from a scheduled task, and sends documents to a downstream system according to business requirements. At certain times of the day there will be more documents in the queue than the downstream system can cope with - I'd like to say:

  • between time XXXX and time YYYY never send more than NN documents at a time, even if there are more in the queue
  • at other times send as many as are in the queue.

Then the code in the business process would pick up the (current value at the point of execution, according to the schedule) and send that many documents.

(We are currently planning on achieving this by adding another Property to the scheduled task, and adding that to the trigger message, but wondered whether there was another way of doing it.)

4 Comments
Discussion (4)2
Log in or sign up to continue