検索

質問
· 2023年10月16日

How to install Python in IRIS

Could you please help anyone how to import Python package in %SYSTEM package and to use python methods to write in object script class?

I used the following link to install the Python but I can't see the Python package in %SYSTEM package and my program throwing the Class Does not exist error?

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

Please help on this..

5 Comments
ディスカッション (5)2
続けるにはログインするか新規登録を行ってください
質問
· 2023年10月16日

Problem encoding pdf content stream to base 64 using the StoreFieldStreamBase64 method

Hello,

I have a problem attempting to store a base 64 encode stream into the OBX:5 field of a HL7 message, by using the StoreFieldStreamBase64 method.

I'm using a transformer to input the contents of a pdf within a stream container (Ens.StreamContainer). The output is a HL7 message (EnsLib.HL7.Message 2.5:ORU_R01).

The transformer is being used in a business process.

This is the code used in the transformer to encode the stream to base 64:

Try {
     Set pdfStreamObj = source.StreamGet()
   } Catch {
      Quit
   }

 //Set PDF stream object into OBX:5
   Set status = target.StoreFieldStreamBase64(pdfStreamObj,"PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(1)")

This is the next transformer step to include a prefix to OBX:5:

set
target.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(1)}
to value
"DOC^Application^PDF^Base64^" _ target.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(1)}

Occasionally, the transformer process does not do the encoding to base 64, therefore no base 64 content is saved to OBX:5 field, even though the pdf content is present in the stream input that is passed into the transformer.

No error is generated when this situation occurs.

I'm interested to know why this problem is occurring and what could fix it?

The input service component is using EnsLib.File.PassThroughService and the output operation component is using EnsLib.HL7.Operation.TCPOperation.

I have tested an affected pdf file in our test environment. The pdf content has successfully been encoded to base 64 and passed to the HL7 message. So I don't think there is a problem with the affected pdf file.

Adrian.

2 Comments
ディスカッション (2)2
続けるにはログインするか新規登録を行ってください
質問
· 2023年10月13日

Python Integration Issues on Remote IRIS Server

Hi everyone, 

I'm attempting to compile a basic Python code on a remote server, but it appears that the compiler doesn't recognize the language.

The remote server is running a virtual machine with Oracle Linux Server 7.9 (64-bit), and it has IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2021.1 (Build 215U) [HealthConnect:3.3.0] installed.

When I try to compile a script that includes a Python ClassMethod, such as this "testpy.cls":

ClassMethod python() As %Status [ Language = python ]
{
    # prova python
    print("hello world")
}

This error returns (Error #5486: Invalid method language / Error #5030 An error occurred while compiling class '<className>'): 

Compilation started on 10/13/2023 17:01:41 with qualifiers 'cuk'
Compiling class <className>
ERROR #5486: Invalid method language: <className>:MethodName:python
  > ERROR #5030: An error occurred while compiling class '<className>'
Detected 1 errors during compilation in 0.090s.

I've attempted to follow the instructions provided on this page: Python Prerequisites, but I couldn't resolve this problem. The problem persisted, even after executing "sudo su -" command to obtain root privileges before trying to install python3 or a python package, like numpy, through the command "yum install python3".

I also attempted to write some ObjectScript code, recalling ##class(%SYS.Python).Builtins() or ##calls(%SYS.Python).Shell(), such as: 

ClassMethod HelloWorld() As %Status
{
    set pythonBuiltins = ##class(%SYS.Python).Builtins()
    do pythonBuiltins.print("hello world")
}

However, I encountered an error indicating that these methods do not exist.

The same Python codes work fine on my local instance of IRIS and I can't figure out why they doesn't work on the remote server instance.

I've identified the path of the Python packages folder on my computer (C:\InterSystems\IRISHealth\mgr\python) and noticed the only big difference between the local and remote instances. While the local folder includes several subfolders (such as numpy, pandas, etc.), the corresponding folder on the remote server (u01/<instanceName>/mgr/python) is empty, despite multiple attempts to install python3 and packages like numpy or pandas, even if executed directly from the mgr/python folder. 

It is like Python and its packages are installed but invisible. In fact, if I try to run the command yum install python3 again, it returns this message, even if the folder is still empty:

Loaded plugins: langpacks, ulninfo
Package python3-3.6.8-19.0.1.el7_9.x86_64 already installed and latest version
Nothing to do

I've tried to clean some space on the remote server and re-tried the installation with 2.5 Gb of free space available, but nothing changed. 

Does anybody know how to handle this?

4 Comments
ディスカッション (4)1
続けるにはログインするか新規登録を行ってください
記事
· 2023年10月10日 6m read

IRISのライセンス使用量の推移を調査する方法

弊社FAQサイトや開発者コミュニティには、ライセンスに関する記事を数多く掲載しています。

こちらの記事では、上記記事でご紹介している様々な機能をTipsとして使い、実際にライセンス使用量の推移を調査する方法をご紹介します。

1.ライセンス使用状況をスポットで確認する方法(今現在の使用状況)

2.ある一定期間のライセンス使用状況を継続して監視する方法
 

1.ライセンス使用状況をスポットで確認する方法(今現在の使用状況)

現在のライセンス使用量は管理ポータルで確認できます。
[システムオペレーション] > [ライセンス使用量] 

 

※各項目の意味は以下の記事を参照してください。
管理ポータルのライセンス使用量のページに表示される値の意味
 

具体的にどのようなユーザがライセンスを消費しているのかは、「ユーザ毎の使用」で見られますが、こちらはローカルのサーバのインスタンスのみの情報となります。
リモート接続しているインスタンスへのユーザ毎の使用情報は、リモートのサーバ上のインスタンスで確認する必要があります。

また、現在のライセンス使用状況は ライセンスユーティリティ(%SYSTEM.License クラスのメソッド)を使用してコマンドでファイル出力することも可能です。

以下の記事の添付ファイルに、使用例を掲載しております。
使用中のライセンス情報を取得する方法
 

2.ある一定期間のライセンス使用状況を継続して監視する方法

ある一定期間ライセンスの使用状況を監視する方法として、履歴モニタを使用する方法があります。
こちらは、どの時間帯に最もライセンスが消費されるのかを調べる際に使用できます。
履歴モニタの使用方法は、ドキュメント と、パフォーマンス調査ガイド(P.14~)をご覧ください。

こちらの記事では、履歴モニタを使用して実際にライセンス情報を監視する方法とその計測結果(サンプル)をご案内します。

ライセンス使用状況(現在使用中のライセンス数:ローカル/リモート)は、アプリケーションモニタで提供されている %Monitor.System.HistorySys クラスを有効化することで情報収集できます。

こちらの設定をすると、既定で5分(900秒)ごとにライセンス使用状況を含むシステム使用情報を収集します。
データは永続クラスとして保存されるため、標準 SQL または永続オブジェクトアクセスを使用して利用できます。

SQLを使用する場合は、以下のようにして情報を確認することができます。
※Sys_LicUsedLocal:ローカルのライセンス使用量、Sys_LicUsedDist:リモートのライセンス使用量

select ID,DateTime,Sys_LicUsedLocal,Sys_LicUsedDist from SYS_History.SysData


出力結果は、以下のように 5分ごとのライセンスの使用状況が確認できます。
 
 

設定手順は以下のようになります。
%Monitor.System.HistorySys クラスを有効化したあと、システムモニタの再起動が必要となります。

 
^%SYSMONMGRユーティリティを使用した履歴モニタの設定方法


既定のインターバルは 5分(900秒)になりますが、こちらを変更することも可能です。
変更の方法は以下になります。
※変更後、システムモニタの再起動を行うようにしてください。

 
履歴モニタのインターバル設定方法


enlightened【ご参考】
使用中のライセンス情報の取得方法を教えてください。
管理ポータルのライセンス使用量のページに表示される値の意味
ライセンスサーバでライセンスを一元管理する方法
 

ディスカッション (0)0
続けるにはログインするか新規登録を行ってください
質問
· 2023年10月10日

Connection Refused ao utilizar o IRIS Community no java com JDBC

Estou utilizando JDBC para conexão da aplicação JAVA com o IRIS versão Community, porém está ocorrendo o seguinte erro:

Caused by: java.sql.SQLException: [InterSystems IRIS JDBC] Communication link failure: Acesso Negado
    at com.intersystems.jdbc.IRISConnection.connect(IRISConnection.java:751)
    at com.intersystems.jdbc.IRISConnection.<init>(IRISConnection.java:165)
    at com.intersystems.jdbc.IRISDriver.connect(IRISDriver.java:58)
    ... 46 more

Ao verificar o relatório de auditoria do banco IRIS verifiquei o seguinte log de erro:

Mensagem de erro: ERRO #5915: Não foi possível alocar uma licença
Nome do serviço: %Service_Bindings
$I: |TCP|1972|37861
$P: |TCP|1972|37861

3 Comments
ディスカッション (3)3
続けるにはログインするか新規登録を行ってください