Clear filter
Announcement
Anastasia Dyubaylo · Jul 24, 2024
Hey Community,
Play the new video on InterSystems Developers YouTube:
⏯ Optimizing Supply Chains with InterSystems Supply Chain Orchestrator @ Global Summit 2023
Learn how InterSystems Supply Chain Orchestrator addresses business challenges horizontally across vertical segments to enable accelerated time-to-value for supply chain digital transformation. We'll show you how one of our partners is using it in use cases across several industry sectors.
Presenters: 🗣 @Ming.Zhou, Head of Supply Chain Strategy, InterSystems 🗣 Mark Holmes, Senior Supply Chain Advisor, InterSystems
Enjoy watching and look out for more video content! 👍
Announcement
Laurel James (GJS) · Mar 27, 2024
I'm excited to let you know that we at George James Software have released some new VS Code training courses. Following the success of our Basics course we have expanded our offering to help InterSystems users looking to move to VS Code improve their knowledge. Here's what's on offer...Studio to VS Code Migration - The Basics (2.5 hours)An interactive training webinar for those who have never used VS Code before and want hands-on help in getting set up and explaining the basics of how it works.Upcoming dates: Wed, April 17th + Wed, May 15thPrice: $450 / £450 / €450 per personVS Code for ObjectScript Advanced Features (2.5 hours)Tailored for ObjectScript developers, in this interactive training webinar you'll learn how to take your server-side VS Code setup to the next level. Upcoming dates: Wed, April 24th + Wed, May 22ndPrice: $450 / £450 / €450 per personBespoke Training for VS Code (5 hours)Recommended for 4+ attendees, we can cover everything in the public webinars with the added advantage of being able to focus on the areas you need/want to cover.Price: $1,950 / £1,950 / €1,950 per sessionFull-Service MigrationFor organizations seeking comprehensive support, we provide end-to-end guidance through the entire migration process. Visit our website to find out more, or drop any questions you have below. Thanks for providing this service to our community. As mentioned in the 2024.1 release notes, Studio will no longer be installed by default in 2024.2 and later, so now is a great time to fully migrate your staff and processes to VS Code. Thanks for the support, Raj!
Announcement
Eduard Lebedyuk · Mar 28, 2024
Hello Community,
I'd like to share with you our article with @Regilo.Souza on AWS Amazon blog Automating application-consistent Amazon EBS Snapshots for InterSystems IRIS databases. Our team has created this step-by-step instruction to create application-consistent snapshots for InterSystems IRIS databases. In this article, we outline how to automate pre-scripts to pause I/O and flush buffer to disk and post-scripts to thaw I/O, as shown in the following figure:
Previously, we outlined how to create application-consistent snapshots using Amazon Data Lifecycle Manager and custom scripts, including the necessary steps to create Amazon Data Lifecycle Manager policies that use AWS Systems Manager Agent to run custom scripts on your EC2 instances before and after EBS Snapshots are initialized. And now in this new post we build on those instructions to automate this process. Feel free to follow them and share your thoughts in the comments!
Announcement
Sergio Farago · May 8, 2024
Hello Community!
A new challenge has arrived for you: The Third InterSystems Technical Article writing contest in Spanish is here!
🏆 3rd Technical Articles Contest in Spanish 🏆
Description of the contest: Write an article in Spanish in the Developer Community, on any topic related to InterSystems technology.
Duration: from May 6 to June 2, 2024.
Prizes for all participants: Everyone who publishes an article in Spanish (In the Spanish Community) during the contest period will receive a prize.
Main prize: LEGO Ferrari Daytona SP3 / Magic Gringotts™ Bank - Collector's Edition.
Participate in the contest and reach hundreds of users! It's one of the best opportunities to publish those tips you've discovered.
Prizes
1. All participants win in the InterSystems technical article competition -> Any member of the Community who participates in the competition will receive a gift from InterSystems for participating.
2. Expert Awards – the winning articles in this category will be chosen by InterSystems experts and will be able to choose in each case:
🥇 1st place: LEGO Ferrari Daytona SP3 or Gringotts™ Magic Bank - Collector's Edition.
🥈 2nd place: LEGO NASA Artemis Space Launch System or Patagonia Nano Puff® Hoody men's jacket.
🥉 3rd place: JBL Flip 6 Speaker, Amazon Kindle 8G Paperwhite (Eleventh Generation) or Samsonite SPECTROLITE 3.0 15.6" Backpack
Or alternatively, any winner can choose a prize from a category lower than their own.
Note: Prizes are subject to change if availability in the country does not allow delivery.
3. Developer Community Award – article with the highest number of "Likes". The person who wins will be able to choose one of these prizes:
🎁 JBL Flip 6 Speaker, Amazon Kindle 8G Paperwhite (Eleventh Generation) or Samsonite SPECTROLITE 3.0 15.6" Backpack
Note: Each author can only win one prize from each category (in total, an author can win two prizes: one in the Expert category and one in the Community category)
Who can participate?
Anyone registered in the Developer Community, except InterSystems employees. Register here in the Community if you don't already have an account.
Contest Duration
📝 From May 6 to June 2: Article publication phase.
📝 From June 3 to June 9: Voting phase
Publish your article(s) during that period. Members of the Developer Community can vote for articles they like by clicking "Like" below each article.
Tip: The sooner you publish your article(s), the more time you will have to get more votes from the Experts and the Community
🎉 June 10: Winners announced
Requirements
❗️ Any article written during the contest period that meets the following requirements will automatically enter the competition:
The article must be directly or indirectly related to InterSystems technology (characteristics of InterSystems products or, also, complementary tools, architectural solutions, best development practices,...).
The article must be written in Spanish.
The article must be 100% new (it can be a continuation of an already published article).
The article cannot be a copy or translation of another published in the Developer Community in Spanish or in another Community.
Article size: >1,000 characters (links do not count in character calculation).
Participation mode: individual (one participant is allowed to publish several articles).
What can you write about?
You can choose any technical topic related directly or indirectly to InterSystems technology.
🎯 BONUS:
The Experts give 3 votes to the article they consider the best, 2 votes to the 2nd one they consider best and 1 vote to the 3rd one they consider best. Additionally, articles can receive more points based on the following bonuses:
Note: the judges' decision does not accept appeals
1. Bonus for new author: If it is the first time you participate in the Technical Article Contest in Spanish, your article will receive 1 extra vote from the Experts.
2. Theme bonus: If your article falls within the following themes, you will receive 2 extra points.
Use of AI/ML/GenAI
How to take advantage of the possibilities of Vector Search
Taking advantage of the column storage feature
️️Use of integrated Python
Use of Cloud SQL
Use of VSCode
Exploitation of IRIS FHIR capabilities (SMART in FHIR 2.0, FHIR object model, FHIR SQL Builder, Bulk FHIR,...)
3. Bonus per video: if, in addition to the article, it is accompanied by an explanatory video, the candidate will receive 4 points.
4. Tutorial Bonus: You will receive 3 points if the article has tutorial features, with step-by-step instructions that a developer can follow to complete one or more specific tasks.
So... Let's go!
We are looking forward to your articles!
Community! May the force be with you! ✨🤝 Last call!
This Sunday the contest closes, for those of you who had doubts, now is the time!
We have amazing prizes waiting for you. I know that some of the best articles are published in the English community, it's time to prove it in this contest :)
Announcement
Sarah Henkel · Aug 5, 2024
Hi Community!
Calling all InterSystems IRIS for Health users! We’re looking to gather reviews on G2 about your experience with the platform.
The first reviewers will receive a $25* gift card, so get your review in now!
To write a review, please follow the link.
G2 is an independent review site where over a million professionals share opinions on software. The gift card is from G2, so your eligibility to receive it is not affected by the content of your review.
*25 USD or equivalent
Article
sween · Mar 4, 2024
If you are a customer of the new InterSystems IRIS® Cloud SQL and InterSystems IRIS® Cloud IntegratedML® cloud offerings and want access to the metrics of your deployments and send them to your own Observability platform, here is a quick and dirty way to get it done by sending the metrics to Google Cloud Platform Monitoring (formerly StackDriver).
The Cloud portal does contain a representation of some top level metrics for at-a-glance heads up metrics, which is powered by a metrics endpoint that is exposed to you, but without some inspection you would not know it was there.
🚩 This approach is most likely taking advantage of a "to be named feature", so with that being said, it is not future-proof and definitely not supported by InterSystems.
So what if you wanted a more comprehensive set exported? This technical article/example shows a technique to scrape and forward metrics to observability, it can be modified to suit your needs, to scrape ANY metrics target and send to ANY observability platform using the Open Telemetry Collector.
The mechanics leading up to the above result can be accomplished in many ways, but for here we are standing up a Kubernetes pod to run a python script in one container, and Otel in another to pull and push the metrics... definitely a choose your own adventure, but for this example and article k8s is the actor pulling this off with Python.
Steps:
Prereqs
Python
Container
Kubernetes
Google Cloud Monitoring
Prerequisites:
An active subscription to IRIS® Cloud SQL
One Deployment, running, optionally with Integrated ML
Secrets to supply to your environment
Environment Variables
Obtain Secrets
I dropped this in a teaser as it is a bit involved and somewhat off target of the point, but these are the values you will need to generate the secrets.
ENV IRIS_CLOUDSQL_USER 'user'
ENV IRIS_CLOUDSQL_PASS 'pass'
☝ These are your credentials for https://portal.live.isccloud.io
ENV IRIS_CLOUDSQL_USERPOOLID 'userpoolid'
ENV IRIS_CLOUDSQL_CLIENTID 'clientid'
ENV IRIS_CLOUDSQL_API 'api'
☝ These you have to dig out of development tools for your browser.
`aud` = clientid
`userpoolid`= iss
`api` = request utl
ENV IRIS_CLOUDSQL_DEPLOYMENTID 'deploymentid'
☝ This can be derived from the Cloud Service Portal
Python:
Here is the python hackery to pull the metrics from the Cloud Portal and export them locally as metrics for the otel collector to scrape:
iris_cloudsql_exporter.py
import time
import os
import requests
import json
from warrant import Cognito
from prometheus_client.core import GaugeMetricFamily, REGISTRY, CounterMetricFamily
from prometheus_client import start_http_server
from prometheus_client.parser import text_string_to_metric_families
class IRISCloudSQLExporter(object):
def __init__(self):
self.access_token = self.get_access_token()
self.portal_api = os.environ['IRIS_CLOUDSQL_API']
self.portal_deploymentid = os.environ['IRIS_CLOUDSQL_DEPLOYMENTID']
def collect(self):
# Requests fodder
url = self.portal_api
deploymentid = self.portal_deploymentid
print(url)
print(deploymentid)
headers = {
'Authorization': self.access_token, # needs to be refresh_token, eventually
'Content-Type': 'application/json'
}
metrics_response = requests.request("GET", url + '/metrics/' + deploymentid, headers=headers)
metrics = metrics_response.content.decode("utf-8")
for iris_metrics in text_string_to_metric_families(metrics):
for sample in iris_metrics.samples:
labels_string = "{1}".format(*sample).replace('\'',"\"")
labels_dict = json.loads(labels_string)
labels = []
for d in labels_dict:
labels.extend(labels_dict)
if len(labels) > 0:
g = GaugeMetricFamily("{0}".format(*sample), 'Help text', labels=labels)
g.add_metric(list(labels_dict.values()), "{2}".format(*sample))
else:
g = GaugeMetricFamily("{0}".format(*sample), 'Help text', labels=labels)
g.add_metric([""], "{2}".format(*sample))
yield g
def get_access_token(self):
try:
user_pool_id = os.environ['IRIS_CLOUDSQL_USERPOOLID'] # isc iss
username = os.environ['IRIS_CLOUDSQL_USER']
password = os.environ['IRIS_CLOUDSQL_PASS']
clientid = os.environ['IRIS_CLOUDSQL_CLIENTID'] # isc aud
print(user_pool_id)
print(username)
print(password)
print(clientid)
try:
u = Cognito(
user_pool_id=user_pool_id,
client_id=clientid,
user_pool_region="us-east-2", # needed by warrant, should be derived from poolid doh
username=username
)
u.authenticate(password=password)
except Exception as p:
print(p)
except Exception as e:
print(e)
return u.id_token
if __name__ == '__main__':
start_http_server(8000)
REGISTRY.register(IRISCloudSQLExporter())
while True:
REGISTRY.collect()
print("Polling IRIS CloudSQL API for metrics data....")
#looped e loop
time.sleep(120)
Docker:
Dockerfile
FROM python:3.8
ADD src /src
RUN pip install prometheus_client
RUN pip install requests
WORKDIR /src
ENV PYTHONPATH '/src/'
ENV PYTHONUNBUFFERED=1
ENV IRIS_CLOUDSQL_USERPOOLID 'userpoolid'
ENV IRIS_CLOUDSQL_CLIENTID 'clientid'
ENV IRIS_CLOUDSQL_USER 'user'
ENV IRIS_CLOUDSQL_PASS 'pass'
ENV IRIS_CLOUDSQL_API 'api'
ENV IRIS_CLOUDSQL_DEPLOYMENTID 'deploymentid'
RUN pip install -r requirements.txt
CMD ["python" , "/src/iris_cloudsql_exporter.py"]
docker build -t iris-cloudsql-exporter .
docker image tag iris-cloudsql-exporter sween/iris-cloudsql-exporter:latest
docker push sween/iris-cloudsql-exporter:latest
Deployment:
k8s; Create us a namespace:
kubectl create ns iris
k8s; Add the secret:
kubectl create secret generic iris-cloudsql -n iris \
--from-literal=user=$IRIS_CLOUDSQL_USER \
--from-literal=pass=$IRIS_CLOUDSQL_PASS \
--from-literal=clientid=$IRIS_CLOUDSQL_CLIENTID \
--from-literal=api=$IRIS_CLOUDSQL_API \
--from-literal=deploymentid=$IRIS_CLOUDSQL_DEPLOYMENTID \
--from-literal=userpoolid=$IRIS_CLOUDSQL_USERPOOLID
otel, Create Config:
apiVersion: v1
data:
config.yaml: |
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'IRIS CloudSQL'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 30s
scrape_timeout: 30s
static_configs:
- targets: ['192.168.1.96:5000']
metrics_path: /
exporters:
googlemanagedprometheus:
project: "pidtoo-fhir"
service:
pipelines:
metrics:
receivers: [prometheus]
exporters: [googlemanagedprometheus]
kind: ConfigMap
metadata:
name: otel-config
namespace: iris
k8s; Load the otel config as a configmap:
kubectl -n iris create configmap otel-config --from-file config.yaml
k8s; deploy load balancer (definitely optional), MetalLB. I do this to scrape and inspect from outside of the cluster.
cat <<EOF | kubectl apply -f -n iris -
apiVersion: v1
kind: Service
metadata:
name: iris-cloudsql-exporter-service
spec:
selector:
app: iris-cloudsql-exporter
type: LoadBalancer
ports:
- protocol: TCP
port: 5000
targetPort: 8000
EOF
gcp; need the keys to google cloud, the service account needs to be scoped
roles/monitoring.metricWriter
kubectl -n iris create secret generic gmp-test-sa --from-file=key.json=key.json
k8s; the deployment/pod itself, two containers:
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: iris-cloudsql-exporter
labels:
app: iris-cloudsql-exporter
spec:
replicas: 1
selector:
matchLabels:
app: iris-cloudsql-exporter
template:
metadata:
labels:
app: iris-cloudsql-exporter
spec:
containers:
- name: iris-cloudsql-exporter
image: sween/iris-cloudsql-exporter:latest
ports:
- containerPort: 5000
env:
- name: "GOOGLE_APPLICATION_CREDENTIALS"
value: "/gmp/key.json"
- name: IRIS_CLOUDSQL_USERPOOLID
valueFrom:
secretKeyRef:
name: iris-cloudsql
key: userpoolid
- name: IRIS_CLOUDSQL_CLIENTID
valueFrom:
secretKeyRef:
name: iris-cloudsql
key: clientid
- name: IRIS_CLOUDSQL_USER
valueFrom:
secretKeyRef:
name: iris-cloudsql
key: user
- name: IRIS_CLOUDSQL_PASS
valueFrom:
secretKeyRef:
name: iris-cloudsql
key: pass
- name: IRIS_CLOUDSQL_API
valueFrom:
secretKeyRef:
name: iris-cloudsql
key: api
- name: IRIS_CLOUDSQL_DEPLOYMENTID
valueFrom:
secretKeyRef:
name: iris-cloudsql
key: deploymentid
- name: otel-collector
image: otel/opentelemetry-collector-contrib:0.92.0
args:
- --config
- /etc/otel/config.yaml
volumeMounts:
- mountPath: /etc/otel/
name: otel-config
- name: gmp-sa
mountPath: /gmp
readOnly: true
env:
- name: "GOOGLE_APPLICATION_CREDENTIALS"
value: "/gmp/key.json"
volumes:
- name: gmp-sa
secret:
secretName: gmp-test-sa
- name: otel-config
configMap:
name: otel-config
kubectl -n iris apply -f deployment.yaml
Running
Assuming nothing is amiss, lets peruse the namespace and see how we are doing.
✔ 2 config maps, one for GCP, one for otel
✔ 1 load balancer
✔ 1 pod, 2 containers successful scrapes
Google Cloud Monitoring
Inspect observability to see if the metrics are arriving ok and be awesome in observability!
💡 This article is considered InterSystems Data Platform Best Practice.
Announcement
Olga Zavrazhnova · May 30, 2024
In the summer of 1993 for the first time was held InterSystems Global Summit. Many warm memories are associated with this event!
We hope you had the opportunity to visit one or more of Global Summits!
Let's share photos of the best moments you had at any InterSystems Global Summit in the comments below.
InterSystems Global Summit 2024 this year will take place on June 9-12, 2024 National Harbor, Maryland. Learn more about this event and register here. Hi @Olga.Zavrazhnova2637 Thank you for taking the initiative.I had the pleasure of attending last 2 year's InterSystems Global Summits, and it was a fantastic experience! The sessions were insightful, and I had the chance to connect with many industry experts. Here’s few of my best moments from the event.
Thanks See you in Maryland! Can't wait to see everyone again this year!!!🤩
Article
Hiroshi Sato · Jun 6, 2024
InterSystems FAQ rubric
If you want to run an OS executable file, command, or a program created within an InterSystems product when the InterSystems product starts, write the processing in the SYSTEM^%ZSTART routine. (The %ZSTART routine is created in the %SYS namespace).
Before you write any code in SYSTEM^%ZSTART, make sure that it works properly under all conditions.
If the ^%ZSTART routine is written incorrectly, or if it is written correctly but the command does not return a response or an error occurs during processing, InterSystems products may not be able to start.
For more information, please refer to the following document.
About writing %ZSTART and %ZSTOP routines [IRIS]About writing %ZSTART and %ZSTOP routines
One other thing to note is that you should not put any long running processes in %ZSTART as they will hold up the Start process.
If you have to, then consider JOBbing it off to a separate process, so it can run in the background and allow the rest of the startup steps to run in parallel.
Announcement
Anastasia Dyubaylo · Sep 17, 2024
Hey Developers,
Play the new video on InterSystems Developers YouTube:
⏯ Chatbots are all the RAGe: Generative AI with InterSystems IRIS @ Global Summit 2024
Discover the capabilities of InterSystems IRIS Vector Search, including integrating dense vector storage and search with InterSystems IRIS SQL for advanced semantic search and other GenAI application patterns. This video will illustrate how Vector Search powers Retrieval-Augmented Generation (RAG) for chatbots, presenting practical use cases that transform your data and applications with AI innovations.
Presenters:🗣 @tomd, Product Manager, Machine Learning, InterSystems🗣 @Alvin.Ryanputra, Systems Developer, InterSystems
Enjoy watching, and get ready for more videos! 👍
Article
Muhammad Waseem · May 22, 2024
Hi Community,In this series of articles, we will explore the following InterSystems SQL usage options:
Embedded SQL
Dynamic SQL
Class Queries
SQL Overview
InterSystems SQL provides a full set of standard relational features, including the ability to define table schema, execute queries, and define and execute stored procedures. You can execute InterSystems SQL interactively from the Management Portal or programmatically from using a SQL shell interface. Embedded SQL enables you to embed SQL statements in your ObjectScript code, while Dynamic SQL enables you to execute dynamic SQL statements from ObjectScript at runtime.
1. Embedded SQL
Within ObjectScript, InterSystems SQL supports Embedded SQL: the ability to place an SQL statement within the body of a method (or other code). Using Embedded SQL, you can query a single record, or define a cursor and use that to query multiple records. Embedded SQL is compiled. By default, it is compiled the first time it is executed (runtime), not when the routine that contains it is compiled. Embedded SQL is quite powerful when used in conjunction with the object access capability of InterSystems IRIS.
2. Dynamic SQL
Dynamic SQL refers to SQL statements that are prepared and executed at runtime. In Dynamic SQL preparing and executing an SQL command are separate operations. Dynamic SQL lets you program within InterSystems IRIS in a manner similar to an ODBC or JDBC application (except that you are executing the SQL statement within the same process context as the database engine). Dynamic SQL is invoked from an ObjectScript program. Dynamic SQL queries are prepared at program execution time, not compilation time.
3. Class Queries
A class query is a tool, contained in a class and meant for use with dynamic SQL, to look up records that meet specified criteria. With class queries, you can create predefined lookups for your application. For example, you can look up records by name, or provide a list of records that meet a particular set of conditions, such as all the flights from Paris to Madrid.
Before moving to the first option, let us create a persistent class Demo.Person, that also extends the %Populate class to populate some data.
Class Demo.Person Extends (%Persistent, %Populate)
{
/// Person's name.
Property Name As %String(POPSPEC = "Name()") [ Required ];
/// Person's Social Security number. This is validated using pattern match.
Property SSN As %String(PATTERN = "3N1""-""2N1""-""4N") [ Required ];
/// Person's Date of Birth.
Property DOB As %Date(POPSPEC = "Date()");
/// Person's City
Property CITY As %String;
}
Run the following command to check the table data after compiling the above class:
SELECT
ID, CITY, DOB, Name, SSN
FROM Demo.Person
Now run the following command to populate 20 records:
do ##class(Demo.Person).Populate(20)
Run the select query again
We have created the table and populated it with some data. In the upcoming article, we will review Embedded SQL.Thanks
Announcement
Anastasia Dyubaylo · Jun 2
Hi Community,
It's time to announce the winners of the InterSystems FHIR and Digital Health Interoperability Contest!
Thanks to all our amazing participants who submitted 11 applications 🔥
Now it's time to announce the winners!
Experts Nomination
🥇 1st place and $5,000 go to the FHIRInsight app by @José.Pereira, @henry, @Henrique
🥈 2nd place and $2,500 go to the iris-fhir-bridge app by @Muhammad.Waseem
🥉 3rd place and $1,000 go to the health-gforms app by @Yuri.Gomes
🏅 4th place and $500 go to the fhir-craft app by @Laura.BlázquezGarcía
🏅 5th place and $300 go to the CCD Data Profiler app by @Landon.Minor
🌟 $100 go to the IRIS Interop DevTools app by @Chi.Nguyen-Rettig
🌟 $100 go to the hc-export-editor app by @Eric.Fortenberry
🌟 $100 go to the iris-medbot-guide app by @shan.yue
🌟 $100 go to the Langchain4jFhir app by @ErickKamii
🌟 $100 go to the ollama-ai-iris app by @Oliver.Wilms
Community Nomination
🥇 1st place and $1,000 go to the iris-medbot-guide app by @shan.yue
🥈 2nd place and $600 go to the FHIRInsight app by @José.Pereira, @henry, @Henrique
🥉 3rd place and $300 go to the FhirReportGeneration app by @XININGMA
🏅 4th place and $200 go to the iris-fhir-bridge app by @Muhammad.Waseem
🏅 5th place and $100 go to the fhir-craft app by @Laura.BlázquezGarcía
Our sincerest congratulations to all the winners!
Join the fun next time ;) Thanks for experts nomination award That's amazing!!!!

Congratulations to AAAALLLLL!! 👏👏👏👏👏 Congratulations to all the winners! 👏 Kudos to all the winners! 👏 Congratulations to all participants! It's been a very tough competition!
Question
Rick Rowbotham · Feb 20
I need read only access using a JDBC query to the tables that contain the rules data for a particular interface. I'm having difficulty locating the tables that house the rule data and I'm wondering if someone could help me with that information and any sample queries if possible.
Thanks in advance! Just to clarify a bit:
Are you talking about, for example, HL7 routing rules that are used with the standard business process EnsLib.HL7.MsgRouter.RoutingEngine?
What information do you want to retrieve for the rules? Yes, I would like to query the rule structure. Would you mind specify what kind of rule?
Edit to add: note that rules are defined as XML, there is no table available to directly query a rule I would like to query all rules. Rules of any kind. As Enrico mentioned, the rule logic is stored as XML in a rule class, so you can't query the logic directly via SQL.
You can find the names of all rule classes using SQL:SELECT ID FROM %Dictionary.ClassDefinition where Super='Ens.Rule.Definition'
To then view the rule logic you would need to open a class and view the "RuleDefinition" XData block:
Class ORU.RouterRoutingRule Extends Ens.Rule.Definition
{
Parameter RuleAssistClass = "EnsLib.HL7.MsgRouter.RuleAssist";
XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule" ]
{
<ruleDefinition alias="" context="EnsLib.HL7.MsgRouter.RoutingEngine" production="ADTPKG.FoundationProduction">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<rule name="">
<when condition="1" comment="">
<send transform="Demo.ORUTransformation" target="ORU.Out"></send>
<send transform="Demo.ORUTransformation" target="ORU.Two"></send>
</when>
</rule>
</ruleSet>
</ruleDefinition>
}
} To get the XML rule definition from SQL you can write/define a stored procedure that returns the XML rule definition, then....parse the XML. Something like:
Class Community.Rule.XDATA
{
ClassMethod GetXML(RuleName As %String) As %String(MAXLEN="") [ SqlProc ]
{
Set xdataOBJ = ##class(%Dictionary.XDataDefinition).IDKEYOpen(RuleName,"RuleDefinition")
Quit xdataOBJ.Data.Read($$$MaxLocalLength)
}
}
Then from SQL:
select Community_Rule.XDATA_GetXML('Your.Rule.Name')
Question
Sebastian Thiele · Feb 27
Hi guys,
I am looking for a way to search for FHIR Encounter resources from an InterSystems FHIR server where there period.start is before or after a certain time. I can´t get my head around which would be a correct way to do this since docs and FHIR spec is not clear to me which fields can be used for searching with wich prefixes.
In my local InterSystems FHIR server I have a set of Encounter ressources, each set with a period.start and (possibly) a period.end. I´d like to retrieve all Encounters with a start date time prior to a given datetime. I did a little testing with URL parameters.// retrieve encounters with a start prior to 2024-10-25T15:30:00Zhttp://localhost:54107/csp/healthshare/ukerhirservernew/fhir/r4/Encounter?&date=lt2024-10-25T15:30:00Zhttp://localhost:54107/csp/healthshare/ukerhirservernew/fhir/r4/Encounter?period.start=lt2024-10-25T15:30:00Z
But none of the calls returned the correct set of encounters I expected. I´am not sure If I get the whole idea of searching for periods wrong or if it has something to do with the way period (datatype) information are stored and indexed within the InterSystems FHIR server.
Any idea or hint would be hihgly apreciated.
Best regards,sebastian Hello @Sebastian.Thiele As per the documentation, date is fully supported search parameter. so, This should work prefix lt dates
I've 2 encounter resource in my FHIR server and I've tested with different dates ex: &date=lt2024-10-27T15:29:00Z period and it works to me
Hi Ashok,
thank you for the response. This url is the exact same syntax that I used above (possibly my links contracted by the UI and therefore not fully visible). Anyway in my case there is no filtering applied at all and simply all encounters are returned regardless of the date. Could you post your encounter resources he used for testing so I can test if it is a FHIR server version specific issue?
best regards,Sebastian Hi @Sebastian.Thiele
Here is the Encounter resource. I'm using IRIS for Windows (x86-64) 2024.1.1
url : http://localhost:52773/csp/healthshare/learning/fhir/r4/Encounter?&date=lt2024-10-27T15:29:00Z
Spoiler
{"resourceType":"Encounter","id":"example-01","meta":{"lastUpdated":"2024-10-27T15:30:00Z","profile":["https://nrces.in/ndhm/fhir/r4/StructureDefinition/Encounter"]},"text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"> Admitted to Cardiac Unit,UVW Hospital between June 28 and July 9 2020</div>"},"identifier":[{"system":"https://ndhm.in","value":"S100"}],"status":"finished","class":{"system":"http://terminology.hl7.org/CodeSystem/v3-ActCode","code":"IMP","display":"inpatient encounter"},"subject":{"reference":"Patient/example-01"},"period":{"start":"2024-10-29T15:30:00Z","end":"2024-10-29T19:30:00Z"},"hospitalization":{"dischargeDisposition":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/discharge-disposition","code":"home","display":"Home"}],"text":"Discharged to Home Care"}}}
Hi Ashok,
seems there is no Encounter resource in your post. Did you missed that?
best regards,Sebastian Can you click the Spoiler to view the message. Hi Ashok,
sorry for the late response. That get me a little further. The approach of ordering by date seem to work only as long as all of the resources have a period.start and period.end provided. In my scenario the most acutal encounter doesn´t have an period.end set since it has not yet ended. The field period.start of one encounter is the the period.end of it´s predecessor. Can you confirm that behaviour of the FHIR server if no period.end is set? If so what would be your approach?
best regards,sebastian I think what you are looking for is... (I have not tried this on the InterSystems FHIR server as I use the Microsoft Azure FHIR server)
Search where start date is after a time... /Encounter?date=sa2022-08-15T09:00:00
Search where a start date is before a time /Encounter?date=lt2022-08-15T09:00:00
For me the times I search by are UTC so that might be catching you out?
Announcement
AYUSH Shetty · May 18
I am writing to express my interest in the "IRIS Ensemble Integration . I have 2 years of experience as an Ensemble IRIS Developer, working with Ensemble and IRIS for integration, server management, and application development. Looking for more opportunites to work under Iris Cache Objectscript Changed to an annoucement and added Job Wanted tag. Also take a look at Job Opportunity tag offerings. Thankyou @Evgeny.Shvarov Much appreciated
Announcement
Irène Mykhailova · Jun 23
Hi Community!
We have great news for those of you who are interested in what's happening at the InterSystems Ready 2025 but couldn't attend in person. All the keynotes are being streamed! Moreover, you can watch them afterwards if they happen at an inopportune time.
Keynotes from Day 1 are already ready 😉
And don't forget to check out the rest of the keynotes:
Keynotes from day 2
Keynotes from day 3
It promises to be epic!