Encontrar

Artículo
· 21 hr atrás Lectura de 4 min

Connecting C# to InterSystems IRIS via ODBC

For developers building external applications, especially those using familiar technologies like C#ODBC (Open Database Connectivity) is a crucial, standardized bridge to any relational database, including InterSystems IRIS. While InterSystems offers its own native ADO.NET provider, the ODBC driver is often the most straightforward path for integration with generic database tools and frameworks.

Here is a step-by-step guide to getting your C# application connected to an IRIS instance using the ODBC driver, focusing on DSN-less connection string.

Step 1: Install the InterSystems IRIS ODBC Driver

The InterSystems ODBC driver is installed by default when you install InterSystems IRIS on a Windows machine.

  • If IRIS is on the same machine: The driver is already present.
  • If IRIS is on a remote server: You must download and install the standalone ODBC client driver package for your client operating system (Windows, Linux, or macOS) and bitness (32-bit or 64-bit) from WRC website if you're a client or by installing Client components and copying ODBC driver.

Once installed, you can verify its presence in the ODBC Data Source Administrator tool on Windows (look for the InterSystems IRIS ODBC35 driver).

Step 2: Define the DSN-less Connection String

Instead of creating a pre-configured Data Source Name (DSN) in the Windows administrator tool, we’ll use a DSN-less connection string. This is cleaner for deployment because your application carries all necessary connection details.

The format specifies the driver name and the server parameters:

Driver={InterSystems IRIS ODBC35};
server=127.0.0.1;
port=1972;
database=USER;
uid=_System

Note:

  • The Driver Name (InterSystems IRIS ODBC35 or sometimes InterSystems ODBC) must exactly match the name registered in your local ODBC Data Source Administrator.
  • Port is the IRIS Superserver port (often 1972).
  • Database is the target Namespace in InterSystems IRIS (e.g., USER or your custom application namespace).
  • The default UID is _System with the password SYS. Always change these defaults in a production environment.

Step 3: Implement the Connection in C#

In your C# project, you will need to reference the System.Data.Odbc namespace to work with the generic .NET ODBC provider.

Here is a minimal C# example that establishes a connection, executes a simple query against a default table, and displays the result.

using System.Data;
using System.Data.Odbc;

public class IrisOdbcExample
{
    public static void Main()
    {
        // 1. Define the DSN-less connection string
        string connectionString =
            "DRIVER={InterSystems IRIS ODBC35};" +
            "Server=127.0.0.1;Port=1972;Database=USER;" +
            "UID=_System;PWD=SYS;";

        // 2. Define the SQL Query (Example: querying the default Sample.Person table)
        string sql = "SELECT ID, Name FROM Sample.Person WHERE ID < 5";

        using (OdbcConnection connection = new OdbcConnection(connectionString))
        {
            try
            {
                connection.Open();
                Console.WriteLine("Connection successful!");

                using (OdbcCommand command = new OdbcCommand(sql, connection))
                using (OdbcDataReader reader = command.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        Console.WriteLine($"ID: {reader["ID"]}, Name: {reader["Name"]}");
                    }
                }
            }
            catch (OdbcException ex)
            {
                // 3. Handle specific ODBC errors (e.g., wrong password, port blocked)
                Console.WriteLine($"ODBC Error: {ex.Message}");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"General Error: {ex.Message}");
            }
            // The connection is automatically closed at
            // the end of the Using block.
        }
    }
}
 
Setting up DSN

Next Steps

This DSN-less approach provides flexibility and avoids client-side configuration bloat. For high-performance C# applications, you may consider the native InterSystems ADO.NET Provider. But for quick integrations and tool compatibility, an ODBC connection is a reliable choice.

❗Always remember to use parameterized queries in production code to prevent SQL injection vulnerabilities.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 23 hr atrás Lectura de 5 min

OMOP Odyssey - Vibing Synthea Modules for OMOP

Vibe the Module, Not the Data


While working with the FHIR to OMOP Service, I've seen good FHIR synthetic data being created using commercial LLM's etc, custom tailored for ConditionOnset with the typical amazement on return, but witnessed some questionable trust first hand on a call.  This approach also falls short generating gigantic payloads so I can go back to my interests on the backend and ensure smooth data transition.

So imposters syndrome quickly surfaced after a couple day hiatus at the 2025 OHDSI Collaborator Showcase out in New Brunswick last October, so a new approach to generating data was in order for any possibility to being invited to cocktail parties with these folks, so I leaned into the work of the pros over at Mitre Corporation that brought us Synthea.

I Immediately noticed a module for the complex Sickle Cell Disease did not exist in the modules folder in the Synthea Repo, but have always known I was afforded the opportunity to write one, but this task would be definitely need da ifferent brain that the OHDSI community seems to have in abundance, but I do not.

The Vibe

Not a huge fan of this term, but it fits the distraction for sure with lack of another term... so given that Synthea Modules generate data based on a "ConditionOnset" lets create a Sickle Cell Disease module and generate a 1m population FHIR Bulk Export from it.

{
  "type": "ConditionOnset",
  "target_condition": "sickle cell disease"
}

Prompt #1 - Do My Job for Me

 
Quick Disease Profile for a first-pass SCD module
 
Synthea Module Design

Prompt #2 - Sure

 
Things that May be Weak, Race Incidence and Chronic Complications

The SCD Module

LGTM! The module that was created cited sources from the CDC almost exclusively, but here it is if you want to take a look at it, also visualized with the synthea visualization utility.

🔗 https://github.com/sween/synthea/blob/43325b191185301a668062ed0bb75a2cf1... 


Run

Lets grab the generator, some associated cheat codes, load up our module, and rip the Synthetic Bulk FHIR Export to a zip file.

git clone https://github.com/synthetichealth/synthea
cd synthea

Now, lets steal @Dmitry Zasypkin 's ndjson fixer utility from his repo.  This patches the generated ndjson references for processing.

https://raw.githubusercontent.com/dmitry-zasypkin/synthea-ndjson/refs/heads/main/patch-synthea-ndjsons.sh

Enable bulk fhir in the synthea.properties file.

Also helpful to only care about FHIR Resources relevant to the OMOP CDM

Then drop the generated SCD module in the modules folder.


Now run a -p 1m population synthetic generation for the State of Michigan for SCD

Somewhere in all the terminal noise and cpu fans, you should see that your module was loaded and then off to generate the ndjsons

In just under an hour, we are now run the patch-synthea-ndjsons.sh across the generated data...

And zip it all up to bulk fhir export format...

And here is what it looks like on disk if curious on the sizes

Load

Upload the bulk fhir payload to the S3 bucket

Let the OMOP service do its thing...

Attestation

Although this is generally hand waving to validate the data, lets just see if after transformation if SCD concepts are present in the data.

Now lets see if anybody has Sickle Cell Diseases in the synthetic data.

FAQ

Did you use AI for any of this?

I used my computer.

 Is the data accurate?

Its synthetic.

 Will you get invited to any cocktail parties at the next OHDSI Symposium?

Probably not, this is an oversimplification of complicated observational dataset, but not meant to be offensive.

 Any closing statements?

Just vibing this module, even with the 3 prompts, I gained even further appreciation for the complex challenges the OHDSI community solves with this observational data.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 20 nov, 2025

We Want to Hear Your Feedback on the Latest InterSystems IRIS Release!

Hi Community,

With the General Availability of the 2025.3 release of InterSystems IRIS® data platform, InterSystems IRIS® for Health™, and HealthShare® Health Connect, we are now collecting your ideas for improvement. 

If the new release inspired you or highlighted opportunities to enhance the developer experience, please share your suggestions on the InterSystems Ideas Portal - every idea is reviewed by our product teams and can influence future releases.

💡 Have an idea for improvement?

Submit it to the Ideas Portal - we’d love to hear your thoughts.

🐞 Think you’ve found a bug?

If what you discovered looks more like a defect than an idea, please report them via our standard bug-reporting channels so our teams can investigate it promptly:


Thank you for helping us make our products better with every release. Your feedback truly drives innovation!

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 20 nov, 2025

[Video] Documentation Templates and Rules

Hi, Community!

If you need to help providers meet a payer's documentation requirements, see how the Documentation Templates and Rules (DTR) module of the InterSystems Payer Services ePrior Authorization solution can help:

Documentation Templates and Rules

https://www.youtube.com/embed/SKZ_pz6GkUY?utm_source=youtube&utm_medium=social&utm_campaign=SKZ_pz6GkUY
[Este es un enlace integrado, pero no puede ver el contenido integrado directamente en el sitio porque rechazó las cookies que se necesitan para acceder a él. Para ver el contenido integrado, debe aceptar todas las cookies desde la Configuración de cookies]

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 20 nov, 2025

¡Una semana para el webinar! Smart Supply Chain 360: Ver, Decidir, Actuar

¡TAN SOLO UNA SEMANA PARA EL ÚLTIMO WEBINAR DEL AÑO! 🥂

 

Un webinar donde Pierre nos enseñará cómo InterSystems Supply Chain Orchestrator actúa como conector entre sistemas ERP, WMS y TMS sin necesidad de "Rip and Replace". Todo acompañado de un ejemplo práctico en el que un chatbot tiene acceso a todos los datos de supply chain y actúa como asistente a la hora de tomar decisiones. 

Recordamos el link de registro para los despistados.

¡Nos vemos allí!

Comentarios (0)1
Inicie sesión o regístrese para continuar