查找

文章
· 九月 9, 2024 阅读大约需 2 分钟

Celebrating a Star of the Developer Community

Today, we'd like to spotlight one of the standout members of the InterSystems Developer Community: @Benjamin De Boe. Since the inception of the InterSystems Developer Community, he has shared his expertise, contributing thoughtful articles, practical demos, and answers to questions. Having worked with InterSystems products since 2010, Benjamin brought invaluable knowledge to the Developer Community. From navigating iKnow projects to simplifying complex deployments with Docker and Python, he has continually inspired fellow developers through his work and presence on the Community.

🤩 Let's take a closer look at Benjamin's journey with InterSystems technology and our Developer Community...

A particularly memorable moment in Benjamin's career was his role in advancing Predictive Modeling Markup Language (PMML). Through this project, he learned invaluable skills like code generation and collaboration with senior colleagues, proving he's not afraid to push boundaries and explore new ideas. His commitment to solving challenges—whether technical or through collaboration—stands out as a hallmark of his approach.

Over the years, he has been involved in some of the platform's most exciting moments, including judging the programming contest entries, speaking at the webinars, meetups, and Summits, and always being there to help and support the admins of the Community. His highlight is the participation in the Global Masters program: I’m still looking forward to a fresh range of socks to choose from and spend my remaining balance! 😊 To new members, he offers one key piece of advice: Never hesitate to ask questions, even in older threads—there’s always room for deeper discussion and learning. Thus, he encourages newcomers to ask questions, reminding us all that learning never stops, even in the most "solved" discussions.

As we look forward to the future of the Community, Benjamin is particularly excited about upcoming generative AI-powered features, seeing endless potential for innovation and collaboration. His enthusiasm for what lies ahead only further demonstrates his support of making the Developer Community a vibrant and positive environment.

Outside of work, Benjamin finds balance by indulging in passions like running, traveling, and cooking. Despite a busy schedule, he manages to bring the same level of energy and dedication to everything he does.

👏 Thank you, @Benjamin De Boe, for your unwavering commitment to the InterSystems Developer Community. Your contributions and passion continue to shape the future of this space, and we are incredibly grateful for everything you do!
 

8 Comments
讨论 (8)4
登录或注册以继续
问题
· 九月 9, 2024

Write to Windows Eventlog

Hello to you!


Is it possible to write to Windows Eventlog with Object Script?

Tried a bit but having trouble getting it to work. If possible, I would be grateful for a piece of sample code

Regards Michael

3 Comments
讨论 (3)1
登录或注册以继续
摘要
· 九月 9, 2024

Publicações Desenvolvedores InterSystems, Setembro 02 - 08, 2024, Resumo

Setembro 02 - 08, 2024Week at a GlanceInterSystems Developer Community
摘要
· 九月 9, 2024

InterSystems Developers Publications, Week September 02 - 08, 2024, Digest

Articles
#InterSystems IRIS
#InterSystems IRIS for Health
#Other
Announcements
#InterSystems IRIS
#IRIS contest
#Open Exchange
#HealthShare
#InterSystems Ideas Portal
#Learning Portal
#Global Masters
#InterSystems Reports (Logi)
#Developer Community Official
Questions
#InterSystems IRIS
#InterSystems IRIS for Health
#Ensemble
$ZDATETIME($h,3,1,3)
By Krishnaveni Kapu
#Health Connect
#HealthShare
September 02 - 08, 2024Week at a GlanceInterSystems Developer Community
文章
· 九月 9, 2024 阅读大约需 4 分钟

Native Python dans IRIS

Bonjour la communauté

J'ai déjà expérimenté Embedded Python dans IRIS ; cependant, je n'ai pas encore eu l'occasion d'implémenter IRIS en utilisant Native Python. Dans cet article, je souhaite décrire les étapes que j'ai suivies pour commencer à apprendre et à implémenter IRIS dans la source Python. Je tiens également à remercier @Guillaume Rongier et @Luis Angel Pérez Ramos pour leur aide dans la résolution des problèmes que j'ai rencontrés lors de ma récente installation PIP d'IRIS en Python, ce qui lui a finalement permis de fonctionner correctement.

Commençons par écrire IRIS en Python.

Tout d'abord, vous devez installer le fichier intersystems_irispython-3.2.0-py3-none-any.whl à partir du dépôt github. Je l'ai téléchargé et installé sur ma machine Windows.

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

J'ai vérifié que les packages sont installés sur ma machine en exécutant py -m pip list

intersystems-irispython 3.2.0
iris                    0.0.5

Maintenant, je suis prêt à commencer à écrire en Python. J'ai créé un fichier .py et importé le package iris au-dessus de la classe.

Établissons maintenant la connexion à IRIS en utilisant la méthode de connexion et créons l'objet de connexion pour instancier l'objet iris.IRIS en utilisant « createIRIS » et c'est l'étape cruciale pour procéder à d'autres opérations.

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}")
    

Parlons maintenant des méthodes pour COS et global

Une fois que vous avez créé avec succès un objet IRIS, il est maintenant prêt à utiliser diverses opérations

set : Cette fonction est utilisée pour définir les valeurs des globales dans la base de données IRIS

1. Le premier paramètre est la valeur définie

2. Le deuxième paramètre est le nom global

3. *args - le troisième paramètre est l'indice(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 : Cette fonction est utilisée pour supprimer le global de la base de données

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

IsDefined: équivaut à $data : vérifier qu'il existe

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: équivaut à $Order

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

tStart, tCommit and tRollback: équivaut aux 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 et unlock: par défaut verrouillage incrémentiel/verrouillage exclusif

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 équivaut à $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
"""

Le nœud, le parcours de valeur et les définitions de classe ainsi que ses membres sont abordés dans le prochain article.

Vous pouvez consulter la documentation IRIS pour toutes les fonctions.

讨论 (0)1
登录或注册以继续