Search

Clear filter
Announcement
Robert Leff · Mar 3, 2022

March 1, 2022 – Multiple InterSystems IRIS for Health and HealthShare Advisories

This message links to 14 recent advisories that were posted on the InterSystems Product Alerts and Advisories page. All of the items affect HealthShare products, and the first three items affect InterSystems IRIS for Health as well. FHIR Search with an Assigning Authority but no Identifier Omits Results Some FHIR Queries that use _include and _revinclude Fail Silently FHIR Queries May Omit Results FHIR Queries that Specify a Quantity but no Units of Measure Return Incorrect Results Time Zone Offsets not Applied to FHIR Resources FHIR Searches that Specify a Time Range may Improperly Include or Exclude some Data Clinical Viewer may lose “Standard Types” on Upgrade Cross-site Scripting Issue in the Clinical Viewer MPI Demographics May Contain Unconsented Data When No Consent Group is Specified, Clinical Consent Rules May Fail HS.Stream Global in Edge Gateways Not Cleared After Errors HealthShare Care Community Tasks can be Assigned to Members of a Care Team who do not have Permission to View or Take Action on them Cross-site Scripting Vulnerability in HealthShare Patient Index Medications with a Blank “Start Date” may not Display in the Clinical Viewer
Announcement
John Murray · May 22, 2023

InterSystems Testing Manager - a new VS Code extension for the %UnitTest framework

If you have already built unit tests using the %UnitTest framework, or are thinking about doing so, please take a look at InterSystems Testing Manager. Without leaving VS Code you can now browse your unit tests, run or debug them, and view previous run results. InterSystems Testing Manager works with both of the source code location paradigms supported by the ObjectScript extension. Your unit test classes can either be mastered in VS Code's local filesystem (the 'client-side editing' paradigm) or in a server namespace ('server-side editing'). In both cases the actual test runs occur in a server namespace. Feedback welcome. Don't see it in Open Exchange :) Could you please publish? @Evgeny.Shvarov It's available on the VS Code Marketplace, which is where people would expect to find it. Right, I'm not suggesting to remove it from there. But if you publish on Open Exchange it will let developers from InterSystems ecosystem it will help some developers to notice it. E.g. here on Open Exchange InterSystems can find dev tools and libs that could form their development environment. This is awesome! I've really missed this from working in other programming languages. According to the ReadMe (v0.2.0), this extension is currently considered a "Preview". Is there a product roadmap/timeline of what needs to be done to promote it out of "preview" status? Thanks for the positive response. IMO the main thing needed before the Preview tag gets dropped is feedback from %UnitTest users. One motivation for publishing the Preview is the upcoming Global Summit, which I hope will be a good opportunity for in-person discussion about this extension and others. Find me at the George James Software booth in the Partner Pavilion. Now at https://openexchange.intersystems.com/package/InterSystems-Testing-Manager-for-VS-Code Also welcome are reviews, which can be posted on Marketplace and on Open Exchange. Tried with the project where I have ObjectScript Unittests. I call them manually with IPM and automatically with github workflow. Testing manager is installed, I'm on a class with unit test. Not sure though how it works? @Evgeny.Shvarov I believe the Market place link @John.Murray provided has details of how to run the test (including some GIFs etc.) https://marketplace.visualstudio.com/items?itemName=intersystems-community.testingmanager Since you are working client-side I think you need to set a intersystems.testingManager.client.relativeTestRoot setting to contain the workspace-relative path to the tests folder that's showing at the beginning of the breadcrumb in your screenshot. Please see point 2 of https://github.com/intersystems-community/intersystems-testingmanager#workspace-preparations @Evgeny.Shvarov Did my suggestion help you get started with this extension? Thank you! Hi @John.Murray ! Not sure if I put it in a right place: Says it shouldn't be here Move it outside the `objectscript.conn` object please. Did it: Now it likes it, but still the testing tool doesn't see any tests. Should it be absolute path or relative to the root of repo? Do you mind to send a PR with a working setting to the repo? Please change this to a relative path (no leading slash). Also, there was a bug in how it handled a "docker-compose" type of configuration. Please try this dev build by downloading the zip, extracting the VSIX and dropping it into VS Code's Extensions view. If it works for you I will publish a new version to Marketplace. Now it sees them: But they ask for ^UnitTest to be setup, instructions, etc. Could it work similar as it works in IPM as @Timothy.Leavitt demonstrated? Because with IPM I can run tests all and standalone without any settings at all - it just works. Could the IPM be leveraged if it is presented in the repo/namespace? BTW, this setting worked: "intersystems.testingManager.client.relativeTestRoot": "/tests", Thanks for confirming the fix. I'm publishing 0.2.1 now. Please post enhancement ideas on the repo, for better tracking. An extension described in this announcement implements the idea Unit testing in VSCode | InterSystems Ideasfrom the InterSystems Ideas Portal. Thank you @John.Murray for implementing this idea! 👏 People interested in a better testing experience in VS Code may like to support this idea I posted recently: https://ideas.intersystems.com/ideas/DPI-I-437 @John.Murray Thank you, great news, I just voted for your idea.
Announcement
Anastasia Dyubaylo · Nov 18, 2022

[Video] How InterSystems Supports the CMS & ONC Regulations as well as Prior Authorization

Hey Developers, Watch this video to learn how InterSystems has been building out capabilities to support current and future regulations in the US market that can have a significant impact on payers and providers: ⏯ How InterSystems Supports the CMS & ONC Regulations as well as Prior Authorization @ Global Summit 2022 🗣 Presenter: Lynda Rowe, Senior Advisor, Value-Based Markets, InterSystems Visit our InterSystems Developers YouTube channel and subscribe to receive updates!
Announcement
Fabiano Sanches · May 10, 2023

Starting developer preview #1 for InterSystems IRIS, & IRIS for Health 2023.2

InterSystems announces its first preview, as part of the developer preview program for the 2023.2 release. This release will include InterSystems IRIS and InterSystems IRIS for Health. Highlights Many updates and enhancements have been added in 2023.2 and there are also brand-new capabilities, such as Time-Aware Modeling, enhancements of Foreign Tables, and the ability to use Ready-Only Federated Tables. Some of these features or improvements may not be available in this current developer preview. Another important topic is the removal of the Private Web Server (PWS) from the installers. This feature has been announced since last year and will be removed from InterSystems installers, but they are still in this first preview. See this note in the documentation. --> If you are interested to try the installers without the PWS, please enroll in its EAP using this form, selecting the option "NoPWS". Additional information related to this EAP can be found here. Future preview releases are expected to be updated biweekly and we will add features as they are ready. Please share your feedback through the Developer Community so we can build a better product together. Initial documentation can be found at these links below. They will be updated over the next few weeks until launch is officially announced (General Availability - GA): InterSystems IRIS InterSystems IRIS for Health Availability and Package Information As usual, Continuous Delivery (CD) releases come with classic installation packages for all supported platforms, as well as container images in Docker container format. For a complete list, refer to the Supported Platforms document. Installation packages and preview keys are available from the WRC's preview download site or through the evaluation services website (use the flag "Show Preview Software" to get access to the 2023.2). Container images for both Enterprise and Community Editions of InterSystems IRIS and IRIS for Health and all corresponding components are available from the new InterSystems Container Registry web interface. For additional information about docker commands, please see this post: Announcing the InterSystems Container Registry web user interface. The build number for this developer preview for InterSystems IRIS is 2023.2.0.198.0. For InterSystems IRIS for Health build number is 2023.2.0.200.0. For a full list of the available images, please refer to the ICR documentation. Alternatively, tarball versions of all container images are available via the WRC's preview download site. InterSystems IRIS for Health kits are published and the build number is 2023.2.0.200.0. They are available from the WRC's preview download site and from the InterSystems Container Registry. Time-Aware Modeling, enhancements of Foreign Tables, Ready-Only Federated Tables. Is there any documentation on these features? Hi Herman - Documentation will be released as features become available. As usual, we're adding things every two weeks to these previews. So, stay tuned!
Announcement
Evgeny Shvarov · Sep 15, 2022

Technical Bonuses Results for InterSystems Interoperability Contest: Building Sustainable Solutions 2022

Hi developers! Here is the score of technical bonuses for participants' applications in the InterSystems Interoperability Contest: Building Sustainable Solutions 2022! Project Sustainability Sustainability Dataset Interoperability Production Custom Interoperability Adapter PEX Embedded Python Docker ZPM Online Demo Code Quality First Article on DC Second Article on DC Video on YouTube Total Bonus Nominal 5 3 3 2 3 3 2 2 2 1 2 1 3 32 appmsw-banks-ru 3 2 2 2 9 n8n-nodes-iris 2 2 3 7 iris-energy-isodata 5 3 3 3 2 2 1 2 3 24 interoperability-soap 3 3 2 2 2 12 samba-iris-adapter 3 2 3 2 2 1 2 3 18 interoperability-test 3 2 2 2 1 2 1 3 16 iris-megazord 5 3 2 - - - - 2 3 15 production-monitor 3 2 - 2 1 - 8 Sustainable Machine Learning 5 3 3 3 2 2 2 20 Recycler 5 2 2 9 Bonuses are subject to change upon the update. Please claim here in the comments below or in the Discord chat. I claim YouTube Video bonus for interoperability-test. I have added the link in GitHub ReadMe. Does that automatically update on Open Exchange or do I need to make a new release? https://youtu.be/LqyRVxpmxGY I wonder how some apps have a link on Open Exchange to vote in the contest? I claim python embedded bonus, sambaservice class uses python: https://raw.githubusercontent.com/yurimarx/samba-iris-adapter/master/src/dc/samba/SambaService.cls Hi @Evgeny.Shvarov Thanks for sharing the Technical Bonuses.Please note that iris-energy-isodata app has online demo.Thanks Hi @Muhammad.Waseem! Could you please add the link of online demo in the OEX app here https://openexchange.intersystems.com/package/iris-energy-isodata Hi @Evgeny.Shvarov! Link is already there Hi @Evgeny Shvarov Please note that iris-energy-isodata app has youtube video as well.Thanks I just published an article about interoperability-soap here: https://community.intersystems.com/post/background-story-around-interoperability-soap I was not able to edit the app on Open Exchange to put the Article link there :-(
Announcement
Larry Finlayson · Oct 5, 2022

Managing InterSystems Servers October 24-28, 2022 - Registration space available

Managing InterSystems Servers October 24-28, 2022 9:00am-5:00 US-Eastern Time (EDT) This five-day virtual course teaches system and database administrators how to install, configure and secure InterSystems server software, configure for high availability and disaster recovery, and monitor the system. Students also learn troubleshooting techniques. This course is applicable to both InterSystems IRIS and Caché. Although the course is mostly platform independent, students can complete the exercises using either Windows or Ubuntu. Self Register Here
Announcement
Anastasia Dyubaylo · Feb 22, 2023

[Video] Real-Life Experiences Migrating a Caché Application Portfolio to InterSystems IRIS

Hey Developers, Enjoy watching the new video on InterSystems Developers YouTube: ⏯ Real-Life Experiences Migrating a Caché Application Portfolio to InterSystems IRIS @ Global Summit 2022 Learn about AppServices' experiences migrating our collection of applications to InterSystems IRIS. We'll cover migration-related topics at the OS, platform, and application levels. Presenters: 🗣 @Matthew.Giesmann, Developer, Application Services, InterSystems🗣 @Wangyi.Huang, Technical Specialist, Application Services, InterSystems Enjoy and stay tuned! 👍
Announcement
Anastasia Dyubaylo · Mar 29, 2023

[Kick-off Webinar] InterSystems IRIS Cloud SQL and IntegratedML Contest

Hey Community, We are glad to invite you to the upcoming kick-off webinar for the InterSystems IRIS Cloud SQL and IntegratedML Contest. In this webinar, we'll present you the arena for the next contest: our new cloud offerings InterSystems IRIS Cloud SQL and InterSystems IRIS Cloud IntegratedML. We'll describe what these SaaS offers are all about and walk you through setting up your account and log on to the web portal, which includes an intuitive user interface to load data, create and train machine learning models, and then evaluate those models on test data. For the contest environment, we have included sample datasets so you can go from account signup to your first SQL query and IntegratedML model in a matter of seconds. Date & Time: Monday, April 3 – 11 am EDT | 5 pm CEST Speakers: 🗣 @Steven.LeBlanc, InterSystems Product Specialist, Cloud Operations🗣 @Thomas.Dyar, InterSystems Product Specialist, Machine Learning🗣 @Benjamin.DeBoe, InterSystems Product Manager🗣 @Dean.Andrews2971, InterSystems Head of Developer Relations 🗣 @Evgeny.Shvarov, InterSystems Developer Ecosystem Manager >> Register here << Hi Devs!Please join the "[Kick-off Webinar] InterSystems IRIS Cloud SQL and IntegratedML Contest" in 20 minutes!➡️ Follow this link - https://us02web.zoom.us/j/9822194974?pwd=bnZBdFhCckZ6c0xOcW5GT1lLdnAvUT09Or join our➡️ YouTube stream: https://youtube.com/live/ZzlK9vc_jO0?feature=share
Announcement
Anastasia Dyubaylo · Apr 25, 2023

Online Meetup with the winners of InterSystems IRIS Cloud SQL and IntegratedML Contest

Hi Community, Let's meet together at the online meetup with the winners of the InterSystems IRIS Cloud SQL and IntegratedML Contest – a great opportunity to have a discussion with the InterSystems Experts team as well as our contestants. Winners' demo included! Date & Time: Thursday, April 27, 12 pm EDT | 6 pm CEST Join us to learn more about winners' applications and to have a talk with our experts. ➡️ REGISTER TODAY See you all at our virtual meetup!
Announcement
Anastasia Dyubaylo · Sep 13, 2022

data2day and InterSystems look forward to welcoming you in Karlsruhe, Germany

Hi Developers, We have another great opportunity for you to join us in Germany for a Conference for Data Scientists, Data Engineers and Data Teams that will be held in Karlsruhe! ⏱ Date: 20 – 21 September 2022 📍Venue: IHK Karlsruhe, Lammstr. 13-17, 76133 Karlsruhe, Germany Our speaker Markus Mechnich will be talking about (Smart) Data Fabrics during the session titled “Putting an end to data silos: making better decisions, pain-free”. He will discuss the challenge of accessing and merging different systems that store data that is rarely homogeneous and/or synchronous enough for a comprehensive evaluation and using it to make sound business decisions. ✅ REGISTER HERE We look forward to welcoming you to Karlsruhe!
Article
Kate Lau · Mar 15, 2023

Walk through of deploying InterSystems API Manager (IAM) on AWS EC2

In this article, I am trying to walk through my deploying step of IAM on my EC2(ubuntu). What is IAM? IAM is InterSystems API Manageryou may reference to the link below to get more idea about IAM https://docs.intersystems.com/components/csp/docbook/Doc.View.cls?KEY=PAGE_apimgr Before deploying IAM Check the license of your API host Enable the User IAM Deploy IAM Reference https://community.intersystems.com/post/introducing-intersystems-api-manager Download the image from the following link https://wrc.intersystems.com/wrc/coDistGen.csp I downloaded the following version to my pc Upload the image to my EC2 I use the command scp to upload the image to my cloud Make sure docker and docker compose are installed If not, please reference to the following link https://docs.docker.com/engine/install/ubuntu/ Untar the image file tar zpxvf IAM-3.0.2.0-4.tar.gz Load the image into docker sudo docker load -i iam_image.tar Run the iam-setup.sh source ./iam-setup.sh Edit the file : docker-compose.yml In order to let us visit the IAM UI from the environment outside the EC2, replace the localhost by the EC2 public address in the parameter KONG_PORTAL_GUI_HOST and KONG_ADMIN_GUI_URL vi docker-compose.yml Start the container sudo docker compose up -d Check the IAM UI You can access the UI of the IAM by the following link http://yourEC2publicAddress:8002/overview In fact I encountered the error of unable to pass the variable to "ISC_IRIS_URL", "ISC_IAM_IAMGE","ISC_CA_CERT" I suspect that the iam-setup.sh now working very well As a work around, I hard code the variables in the docker-compose.yml and run the sudo docker compose up -d again Great article,Kate! Could you also help put this on CN DC? Thx a lot! Michael
Announcement
Larry Finlayson · Nov 16, 2022

Managing InterSystems Servers December 5-9, 2022 - Registration space available

Managing InterSystems Servers December 5-9, 2022 9:00am-5:00pm US-Eastern Time (EST) This five-day course teaches system and database administrators how to install, configure and secure InterSystems server software, configure for high availability and disaster recovery, and monitor the system. Students also learn troubleshooting techniques. This course is applicable to both InterSystems IRIS and Caché. Although the course is mostly platform independent, students can complete the exercises using either Windows or Ubuntu. Self Register Here
Discussion
Mathew Lambert · Sep 22, 2021

InterSystems IRIS Java projections compiler doesn't listen to the -d flag

We found out recently that when compiling an objectscript class that has a java projection, using the -d flag, it ignores it for the projection part: After talking with intersystems luckily the've provided a solution that will be included in the next release:
Announcement
Georgina Finneran · Aug 12, 2020

Job Opportunity : Remote Software Engineer (MUST Have InterSystems or IRIS Experience)

All Interested Applicants Please Apply Here : https://www.indeed.com/job/remote-software-engineer-must-have-intersystems-or-iris-experience-cb27a40d004e96ec RxMx is a fast-growing company at the intersection of technology and healthcare. Founded by four specialist physicians, our driving philosophy is developing medical systems that ensure the safe delivery of complex and sophisticated medicines, with minimal burden on both physicians and patients. We supply innovative technology solutions to our pharmaceutical clients that improve patient safety, reduce the complexity in drug launch and provide a platform for real world data. We are looking for a Software Engineer to enhance, maintain and support new and existing software products and solutions. This role will work closely with clinical staff and product managers to product requirement specifications and work closely with other developers and QA Engineers to product high quality working software. Essential Functions: Participate in SDLC that leverages best practice and supports the design and delivery of sophisticated clinical applications. Support the conversion of business systems and functional requirements into working software in established timelines and using best practices. Work with clinical staff and product managers to produce requirement specifications and establish timelines for delivery. Proactive and create thinking to problem solving to develop out of the box products. As well as Enhancing, maintaining, and supporting existing solutions. Create and maintain appropriate documentation for software produced. Correct errors by making appropriate changes and then rechecking the program to ensure that the desired results are produced. Conduct trial runs of programs and software applications to be sure they will produce the desired information and that the instructions are correct. Compile and write documentation of program development and subsequent revisions, inserting comments in the coded instructions so others can understand the program. Clearly communicate and consult with managerial, engineering, and technical personnel to clarify program intent, identify problems, and suggest changes. Conduct code reviews, and approve or reject pull requests. Participate in capacity planning, assignment of work, team meetings and stand ups. Qualifications: Degree in Computer Science or related technical field and/or 5+ years of related practical work experience. Experience with source control. BitBucket experience beneficial. Experience with Atlassian tools such as JIRA and Confluence. Experience with Agile methodologies. Must be independent yet a team player with great communication skills. Must be a go-getter, that can make things happen in a high paced environment. Experience in Healthcare IT working with HL7 and other EMR and Lab integrations. Experience with full stack development, with Angular experience preferred. Experience with Intersystems technology is required. To be successful in this role, you must have/be: Ability to effectively identify what is important and prioritize competing projects. Ability to problem solve in a resourceful and data-driven manner while working in a fast-paced, demanding environment. A self-driven, results-oriented problem solver with a positive outlook. We are proud of our collaborative culture and our dedicated team driven to improve treatment options for patients. Our company offers great benefits including flexible hours, remote work, and fun perks such as an extra vacation day on your birthday. While our offices are in Sydney, New York, and Berlin, we maintain the atmosphere of a small, close-knit company with employees who enjoy being social. Further information on our company background and mission can be found at: https://rxmxcorp.com/ RxMx, Inc. provides equal employment opportunity to all individuals regardless of their race, color, creed, religion, gender, age, sexual orientation, national origin, disability, veteran status, or any other characteristic protected by federal, state or local law. All Interested Applicants Please Apply Here : https://www.indeed.com/job/remote-software-engineer-must-have-intersystems-or-iris-experience-cb27a40d004e96ec
Article
Guillaume Rongier · Dec 14, 2021

InterSystems IRIS 2021.2+ Python Examples (Embedded, Native APIs and Notebooks)

# Iris-python-template Template project with various Python code to be used with InterSystems IRIS Community Edition with container. Featuring : * Notebooks * Embedded Python Kernel * ObjectScript Kernel * Vanilla Python Kernel * Embedded Python * Code example * Flask demo * IRIS Python Native APIs * Code example ![Diagram](https://user-images.githubusercontent.com/47849411/145866257-cc88109b-db0b-4fed-8886-fddb4c31947d.png) # 2. Table of Contents - [1. iris-python-template](#1-iris-python-template) - [2. Table of Contents](#2-table-of-contents) - [3. Installation](#3-installation) - [3.1. Docker](#31-docker) - [4. How to start coding](#4-how-to-start-coding) - [4.1. Prerequisites](#41-prerequisites) - [4.1.1. Start coding in ObjectScript](#411-start-coding-in-objectscript) - [4.1.2. Start coding with Embedded Python](#412-start-coding-with-embedded-python) - [4.1.3. Start coding with Notebooks](#413-start-coding-with-notebooks) - [5. What's inside the repository](#5-whats-inside-the-repository) - [5.1. Dockerfile](#51-dockerfile) - [5.2. .vscode/settings.json](#52-vscodesettingsjson) - [5.3. .vscode/launch.json](#53-vscodelaunchjson) - [5.4. .vscode/extensions.json](#54-vscodeextensionsjson) - [5.5. src folder](#55-src-folder) - [5.5.1. src/ObjectScript](#551-srcobjectscript) - [5.5.1.1. src/ObjectScript/Embedded/Python.cls](#5511-srcobjectscriptembeddedpythoncls) - [5.5.1.2. src/ObjectScript/Gateway/Python.cls](#5512-srcobjectscriptgatewaypythoncls) - [5.5.2. src/Python](#552-srcpython) - [5.5.2.1. src/Python/embedded/demo.cls](#5521-srcpythonembeddeddemocls) - [5.5.2.2. src/Python/native/demo.cls](#5522-srcpythonnativedemocls) - [5.5.2.3. src/Python/flask](#5523-srcpythonflask) - [5.5.2.3.1. How it works](#55231-how-it-works) - [5.5.2.3.2. Launching the flask server](#55232-launching-the-flask-server) - [5.5.3. src/Notebooks](#553-srcnotebooks) - [5.5.3.1. src/Notebooks/HelloWorldEmbedded.ipynb](#5531-srcnotebookshelloworldembeddedipynb) - [5.5.3.2. src/Notebooks/IrisNative.ipynb](#5532-srcnotebooksirisnativeipynb) - [5.5.3.3. src/Notebooks/ObjectScript.ipynb](#5533-srcnotebooksobjectscriptipynb) # 3. Installation ## 3.1. Docker The repo is dockerised so you can clone/git pull the repo into any local directory ``` git clone https://github.com/grongierisc/iris-python-template.git ``` Open the terminal in this directory and run: ``` docker-compose up -d ``` and open then http://localhost:8888/tree for Notebooks Or, open the cloned folder in VSCode, start docker-compose and open the URL via VSCode menu: # 4. How to start coding ## 4.1. Prerequisites Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker desktop](https://www.docker.com/products/docker-desktop) installed. This repository is ready to code in VSCode with ObjectScript plugin. Install [VSCode](https://code.visualstudio.com/), [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) and [ObjectScript](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript) plugin and open the folder in VSCode. ### 4.1.1. Start coding in ObjectScript Open /src/ObjectScript/Embedded/Python.cls class and try to make changes - it will be compiled in running IRIS docker container. ### 4.1.2. Start coding with Embedded Python The easiest way is to run VsCode in the container. To attach to a Docker container, either select **Remote-Containers: Attach to Running Container...** from the Command Palette (`kbstyle(F1)`) or use the **Remote Explorer** in the Activity Bar and from the **Containers** view, select the **Attach to Container** inline action on the container you want to connect to. ![Containers Explorer screenshot](https://github.com/microsoft/vscode-docs/raw/main/docs/remote/images/containers/containers-attach.png) Then configure your python interpreter to /usr/irissys/bin/irispython ### 4.1.3. Start coding with Notebooks Open this url : http://localhost:8888/tree Then you have access to three different notebooks with three different kernels. * Embedded Python kernel * ObjectScript kernel * Vanilla python3 kernel # 5. What's inside the repository ## 5.1. Dockerfile A dockerfile which install some python dependancies (pip, venv) and sudo in the container for conviencies. Then it create the dev directory and copy in it this git repository. It starts IRIS and imports Titanics csv files, then it activates **%Service_CallIn** for **Python Shell**. Use the related docker-compose.yml to easily setup additional parametes like port number and where you map keys and host folders. This dockerfile ends with the installation of requirements for python modules. The last part is about installing jupyter notebook and it's kernels. Use .env/ file to adjust the dockerfile being used in docker-compose. ## 5.2. .vscode/settings.json Settings file to let you immedietly code in VSCode with [VSCode ObjectScript plugin](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript) ## 5.3. .vscode/launch.json Config file if you want to debug with VSCode ObjectScript [Read about all the files in this article](https://community.intersystems.com/post/dockerfile-and-friends-or-how-run-and-collaborate-objectscript-projects-intersystems-iris) ## 5.4. .vscode/extensions.json Recommendation file to add extensions if you want to run with VSCode in the container. [More information here](https://code.visualstudio.com/docs/remote/containers) ![Archiecture](https://code.visualstudio.com/assets/docs/remote/containers/architecture-containers.png) This is very useful to work with embedded python. ## 5.5. src folder This folder is devied in two parts, one for ObjectScript example and one for Python code. ### 5.5.1. src/ObjectScript Different piece of code that shows how to use python in IRIS. #### 5.5.1.1. src/ObjectScript/Embedded/Python.cls All comments are in french to let you impove your French skills too. ```objectscript /// Embedded python example Class ObjectScript.Embbeded.Python Extends %SwizzleObject { /// HelloWorld with a parameter ClassMethod HelloWorld(name As %String = "toto") As %Boolean [ Language = python ] { print("Hello",name) return True } /// Description Method compare(modèle, chaine) As %Status [ Language = python ] { import re # compare la chaîne [chaîne] au modèle [modèle] # affichage résultats print(f"\nRésultats({chaine},{modèle})") match = re.match(modèle, chaine) if match: print(match.groups()) else: print(f"La chaîne [{chaine}] ne correspond pas au modèle [{modèle}]") } /// Description Method compareObjectScript(modèle, chaine) As %Status { w !,"Résultats("_chaine_","_modèle_")",! set matcher=##class(%Regex.Matcher).%New(modèle) set matcher.Text=chaine if matcher.Locate() { write matcher.GroupGet(1) } else { w "La chaîne ["_chaine_"] ne correspond pas au modèle ["_modèle_"]" } } /// Description Method DemoPyhtonToPython() As %Status [ Language = python ] { # expression régulières en python # récupérer les différents champs d'une chaîne # le modèle : une suite de chiffres entourée de caractères quelconques # on ne veut récupérer que la suite de chiffres modèle = r"^.*?(\d+).*?$" # on confronte la chaîne au modèle self.compare(modèle, "xyz1234abcd") self.compare(modèle, "12 34") self.compare(modèle, "abcd") } Method DemoPyhtonToObjectScript() As %Status [ Language = python ] { # expression régulières en python # récupérer les différents champs d'une chaîne # le modèle : une suite de chiffres entourée de caractères quelconques # on ne veut récupérer que la suite de chiffres modèle = r"^.*?(\d+).*?$" # on confronte la chaîne au modèle self.compareObjectScript(modèle, "xyz1234abcd") self.compareObjectScript(modèle, "12 34") self.compareObjectScript(modèle, "abcd") } /// Description Method DemoObjectScriptToPython() As %Status { // le modèle - une date au format jj/mm/aa set modèle = "^\s*(\d\d)\/(\d\d)\/(\d\d)\s*$" do ..compare(modèle, "10/05/97") do ..compare(modèle, " 04/04/01 ") do ..compare(modèle, "5/1/01") } } ``` * HelloWorld * Simple function to say Hello in python * It uses the OjectScript wrapper with the tag [ Language = python ] * compare * An python function that compare a string with a regx, if their is a match then print it, if not print that no match has been found * compareObjectScript * Same function as the python one but in ObjectScript * DemoPyhtonToPython * Show how to use a python function with python code wrapped in ObjectScript ```objectscript set demo = ##class(ObjectScript.Embbeded.Python).%New() zw demo.DemoPyhtonToPython() ``` * DemoPyhtonToObjectScript * An python function who show how to call an ObjecScript function * DemoObjectScriptToPython * An ObjectScript function who show how to call an python function #### 5.5.1.2. src/ObjectScript/Gateway/Python.cls An ObjectScript class who show how to call an external phyton code with the gateway functionnality. In this example python code is **not executed** in the same process of IRIS. ```objectscript /// Description Class Gateway.Python { /// Demo of a python gateway to execute python code outside of an iris process. ClassMethod Demo() As %Status { Set sc = $$$OK set pyGate = $system.external.getPythonGateway() d pyGate.addToPath("/irisdev/app/src/Python/gateway/Address.py") set objectBase = ##class(%Net.Remote.Object).%New(pyGate,"Address") set street = objectBase.street zw street Return sc } } ``` ### 5.5.2. src/Python Different piece of python code that shows how to use embedded python in IRIS. #### 5.5.2.1. src/Python/embedded/demo.cls All comments are in french to let you impove your French skills too. ```python import iris person = iris.cls('Titanic.Table.Passenger')._OpenId(1) print(person.__dict__) ``` First import iris module that enable embedded python capabilities. Open an persistent class with cls function from iris module. Note that all `%` function are replaced with `_`. To run this example you have to use iris python shell : ```shell /usr/irissys/bin/irispython /opt/irisapp/src/Python/embedded/demo.py ``` #### 5.5.2.2. src/Python/native/demo.cls Show how to use native api in python code. ```python import irisnative # create database connection and IRIS instance connection = irisnative.createConnection("localhost", 1972, "USER", "superuser", "SYS", sharedmemory = False) myIris = irisnative.createIris(connection) # classMethod passenger = myIris.classMethodObject("Titanic.Table.Passenger","%OpenId",1) print(passenger.get("name")) # global myIris.set("hello","myGlobal") print(myIris.get("myGlobal")) ``` To import irisnative, you have to install the native api wheels in your python env. ```shell pip3 install /usr/irissys/dev/python/intersystems_irispython-3.2.0-py3-none-any.whl ``` Then you can run this python code ```shell /usr/bin/python3 /opt/irisapp/src/Python/native/demo.py ``` Note that in this case a connection is made to iris database, this mean, **this code is executed in a different thread than the IRIS one**. #### 5.5.2.3. src/Python/flask A full demo of the combiantion between embedded python and the micro framework flask. You can test this end point : ``` GET http://localhost:4040/api/passengers?currPage=1&pageSize=1 ``` ##### 5.5.2.3.1. How it works In order to use embedded Python, we use `irispython` as a python interepreter, and do: ```python import iris ``` Right at the beginning of the file. We will then be able to run methods such as: ![flaskExample](https://raw.githubusercontent.com/thewophile-beep/integrated-ml-demo/main/misc/img/flaskExample.png) As you can see, in order to GET a passenger with an ID, we just execute a query and use its result set. We can also directly use the IRIS objects: ![flaskObjectExample](https://raw.githubusercontent.com/thewophile-beep/integrated-ml-demo/main/misc/img/flaskObjectExample.png) Here, we use an SQL query to get all the IDs in the table, and we then retreive each passenger from the table with the `%OpenId()` method from the `Titanic.Table.Passenger` class (note that since `%` is an illegal character in Python, we use `_` instead). Thanks to Flask, we implement all of our routes and methods that way. ##### 5.5.2.3.2. Launching the flask server To launch the server, we use `gunicorn` with `irispython`. In the docker-compose file, we add the following line: ````yaml iris: command: -a "sh /opt/irisapp/server_start.sh" ```` That will launch, after the container is started (thanks to the `-a` flag), the following script: ````bash #!/bin/bash cd ${SRC_PATH}/src/Python/flask ${PYTHON_PATH} -m gunicorn --bind "0.0.0.0:8080" wsgi:app & exit 1 ```` With the environment variables defined in the Dockerfile as follows: ````dockerfile ENV PYTHON_PATH=/usr/irissys/bin/irispython ENV SRC_PATH=/opt/irisapp/ ```` ### 5.5.3. src/Notebooks Three notebooks with three different kernels : * One Python3 kernel to run native APIs * One Embedded Python kernel * One ObjectScript kernel Notebooks can be access here http://localhost:8888/tree #### 5.5.3.1. src/Notebooks/HelloWorldEmbedded.ipynb This notebook uses IRIS embedded python kernel. It shows example to open and save persistent classes and how to run sql queries. #### 5.5.3.2. src/Notebooks/IrisNative.ipynb This notebook uses vanilla python kernel. It shows example run iris native apis. #### 5.5.3.3. src/Notebooks/ObjectScript.ipynb This notebook uses ObjectScript kernel. It shows example to run ObjectSCript code and how to use embedded pythoon in ObjectScript. Hi @Guillaume.Rongier7183 ! I tried to use pip3 in the app and failed. I see it is being installed during the image build, but cannot run it later. What I'm doing wrong? Hi Evgeny, I confirm that `irispip` is not working, if you want to install python package you shall use `pip3` or `/usr/irissys/bin/irispython -m pip` Great article, @Guillaume.Rongier7183 Thank you very much! In UNIX, irispython -m pip install <package> will give the <package> files group ownership that's appropriate for your IRIS instance.