查找

Question
· Feb 28

Estimate IRIS Health Connect database size based on HL7 message volumes

I'm looking for some simple heuristics to estimate the size on disk of a database based on average size of messages, number of messages per day and purge frequency. The purpose is for estimation of disk space requirements.

Clearly this is a how long is a piece of string question but for example, if you have a simple HL7 routing production that does nothing but process HL7. It receives 10,000 HL7v2 messages per day (all approx 1kb on the wire) in a single service, passes them to a single router and outputs to a single operation. What factor should you multiply the size of each message on the wire to get an approximation for the size on disk?

The inbound message will generate a message header object and a message body object held in globals. Both of those will have an index global. The message content is held in a stream which would be roughly the same size in bytes plus a small overhead.  There will be new header for each message shunted between business hosts within the production. There's also event logs  Then there's database block size and packing to consider before thinking about filesystems!

Depending on how I do back-of-envelope maths, I come up with something between a factor of 2x and 5x on-the-wire bytes. I'm inclined to think it's closer to the 2x as I suspect it's more efficient than the 5x, but better to over-estimate than under.

3 Comments
Discussion (3)2
Log in or sign up to continue
Article
· Feb 28 7m read

High-Performance Message Searching in Health Connect

High-Performance Message Searching in Health Connect

The Problem

Have you ever tried to do a search in Message Viewer on a busy interface and had the query time out? This can become quite a problem as the amount of data increases. For context, the instance of Health Connect I am working with does roughly 155 million Message Headers per day with 21 day message retention. To try and help with search performance, we extended the built-in SearchTable with commonly used fields in hopes that indexing these fields would result in faster query times. Despite this, we still couldn't get some of these queries to finish at all.

Discussion (0)1
Log in or sign up to continue
Discussion (9)5
Log in or sign up to continue
Question
· Feb 28

Net Gateway How to instantiate a Class with a Constructor with a parameter

I have been trying to get to grips with the new dot Net Gateway used in IRIS as the import of the DLL to construct proxy classes is no longer supported in IRIS I have a third party DLL that when I try to instantiate throws an error complaining about the class not instantiated as it does not support parameterless constructor .I am using this new 

set gateway = $system.external.getDotNetGateway()
do gateway.addToPath(myPath_"\DotNetGatewaySamples.dll")

 

I would like then to instantiate my class which has a constructor that requires a parameter, how am I suppose to achieve that and if there is a documentation that explains this in depth that I missed please direct me to it thank you. This is what I have tried and it compiles with errors

set remoteObj=gateway.new("parametisedClass(theparameter)")
5 Comments
Discussion (5)2
Log in or sign up to continue
Article
· Feb 28 3m read

Configuración y aplicación de IntegratedML en InterSystems IRIS

Resumen

Con la ayuda de SQL, podéis crear, entrenar y gestionar modelos de aprendizaje automático directamente en la base de datos con la potente herramienta IntegratedML de InterSystems IRIS. Usando ejemplos de SQL que representan vuestros datos, en este artículo repasaremos la configuración de IntegratedML y su aplicación en situaciones prácticas.

 

Configuración de IntegratedML

Una configuración de ML (“ML Configuration”) define el proveedor de aprendizaje automático que realizará el entrenamiento, además de otra información necesaria. IntegratedML tiene una configuración predeterminada llamada %AutoML, que se activa automáticamente tras instalar InterSystems IRIS.  

 

Creación de ML Configuration  

Para crear una nueva configuración de ML, podéis usar el System Management Portal o comandos SQL.  

 

Creación de ML Configuration mediante SQL:  

CREATE ML CONFIGURATION MeuMLConfig PROVIDER AutoML USING {'verbosity': 1};  

 

Para establecer esta configuración como predeterminada:  

SET ML CONFIGURATION MeuMLConfig;  

 

Para ver los ajustes de entrenamiento:  

SELECT * FROM INFORMATION_SCHEMA.ML_TRAINING_RUNS;

 

Aplicación de IntegratedML  

Creación de un modelo predictivo para estimar la cantidad de energía generada por una unidad consumidora:  

CREATE MODEL PredicaoEnergia PREDICTING (quantidade_generada) FROM UnidadeConsumidora; 

 

Entrenamiento del modelo:  

TRAIN MODEL PredicaoEnergia;  

 

Realización de predicciones:  

SELECT quantidade_generada, PREDICT(PredicaoEnergia) AS predicao FROM UnidadeConsumidora WHERE id = 1001;

 

Ejemplo de Implementación: Aprendizaje automático en energía solar

Veamos un ejemplo sobre cómo aplicar los conceptos anteriores intentando realizar aprendizaje automático en el campo de la energía solar.

 

1. Integración de datos con IRIS  

Extraemos datos esenciales de múltiples tablas para construir el conjunto de datos:  

SELECT PSID, CHNNLID, TYPENAME, DEVICESN, DEVICETYPE, FACTORYNAME, STATUS FROM datafabric_solar_bd.EQUIPAMENTS; 

 

2. Entrenamiento del modelo de mantenimiento predictivo  

Uso de Python integrado en IRIS para entrenar un modelo de mantenimiento predictivo:  

from sklearn.ensemble import RandomForestClassifier  

from iris import irispy



# Cargar los datos
sql_query = "SELECT PSID, DEVSTATUS, ALARMCOUNT FROM datafabric_solar_bd.USINAS;" data = irispy.sql(sql_query)



# Entrenar el modelo
model = RandomForestClassifier()

model.fit(data[['DEVSTATUS', 'ALARMCOUNT']], data['PSID'])

 

 

3. Predicción de la producción de energía  

Uso del análisis de series temporales para predecir la producción diaria de energía:  

from fbprophet import Prophet  

# Preparar el conjunto de datos  
df = irispy.sql("SELECT STARTTIMESTAMP, PRODDAYPLANT FROM datafabric_solar_bd.POINTMINUTEDATA;")  

df.rename(columns={'STARTTIMESTAMP': 'ds', 'PRODDAYPLANT': 'y'}, inplace=True)  

# Entrenar el modelo de predicción  
model = Prophet()  

model.fit(df)  

future = model.make_future_dataframe(periods=30)  

forecast = model.predict(future)  

 

4. Identificación de áreas con alta irradiación solar  

El análisis de datos geoespaciales permite identificar las áreas con mayor potencial para la generación de energía solar, optimizando la asignación de recursos.  

 

Conclusión  

IntegratedML facilita la implementación de aprendizaje automático en InterSystems IRIS al permitir que los modelos se entrenen y apliquen directamente mediante SQL. Además, el uso de técnicas de aprendizaje automático para mantenimiento predictivo y pronóstico de generación de energía puede ayudar a que las plantas solares operen de manera más eficiente.

Discussion (0)1
Log in or sign up to continue