検索

質問
· 2025年12月5日

Yet Another Quest To Prevent Orphaned Messages

Hey everyone.

As part of an ongoing mission to track down orphaned HL7 Messages in our integration engine, I have been digging into our environment to track down the causes.

Having looked at various posts here (including one of my own) there are a few scenarios that can create orphaned messages resulting in excessive disk space usage. These scenarios are generally:

  1. Purging an environment with the option "Bodies Too" deselected
  2. Code creating/saving a Message but then not sending it
  3. BPL errors similar to 2, or a scenario where the response to a Call component is not set.

These are certainly big contributors, however there are other situations that can occur based on what I have been finding.

Quick History

A message is considered orphaned if the message exists but is missing from Ens.MessageHeader or if it is an ACK and is not referenced within Ens_Util.IOLogObj. The standard purge jobs will delete message bodies based on the Header for standard messages as well as the ACKs when clearing the IOLog.

Therefore, we can list these fairly easily with the following query:

SELECT HL7.ID,HL7.DocType,HL7.Envelope,HL7.Identifier,HL7.MessageTypeCategory,HL7.Name,HL7.OriginalDocId,HL7.ParentId, HL7.TimeCreated
FROM EnsLib_HL7.Message HL7
LEFT JOIN Ens.MessageHeader hdr
ON HL7.Id=hdr.MessageBodyId
LEFT JOIN Ens_Util.IOLogObj ack
ON HL7.Id = ack.InObjectId
WHERE hdr.MessageBodyId IS NULL AND ack.InObjectId IS NULL

Now, having run the above today, I began seeing results for messages created today, which tells me that orphaned messages are being actively generated. Not good!

Taking a look at a few examples, there are additional scenarios to those listed above that are creating these orphaned messages (specifically ACKs).

  1. If an Operation receives an Negative ACK but the Operations Reply Action Codes are configured to process as Completed, this stores the ACK but does not create a Message Header or entry in the IOLog.
  2. If the ACK received from an external system does not match to a schema, then this stores the ACK but does not create a Message Header or entry in the IOLog

The solution to 2 is to correct the schema for the ACK, however the solution to 1 does not seem so straight forward.

Has anyone else come across the scenario of 1 that could offer some insight?

2 Comments
ディスカッション (2)2
続けるにはログインするか新規登録を行ってください
InterSystems公式
· 2025年12月5日

Notes de version : InterSystems Cloud Services – Notes de version 25.24.2 (novembre 2025)

Présentation

Cette version apporte des améliorations majeures en matière d'évolutivité et de performances du stockage, une mise à niveau importante du système d'exploitation pour toutes les offres, et une nouvelle version par défaut du serveur FHIR. Ensemble, ces mises à jour renforcent la fiabilité, la flexibilité et la sécurité du système, tout en garantissant la prise en charge à long terme de la plateforme.


Nouvelles fonctionnalités et améliorations

Catégorie

Fonctionnalité / Amélioration

Détails

Stockage

Prise en charge améliorée de LVM (striped ou linéaire)

Prise en charge des configurations LVM ajoutée, permettant des déploiements avec des volumes agrégés ou linéaires pour des performances et une flexibilité accrues.

Configuration LVM optionnelle

Les clients peuvent désormais choisir d'utiliser un stockage LVM lors du provisionnement, ce qui leur offre un meilleur contrôle sur la gestion des volumes et l'organisation des données.

Limite de stockage maximale étendue

La capacité de stockage maximale prise en charge par déploiement a été portée à 8 Po, permettant ainsi de gérer les charges de travail de données à grande échelle et d'assurer une croissance à long terme.

Système opérateur

Mise à niveau vers Red Hat Enterprise Linux 9.6

Toutes les offres InterSystems Cloud ont été mises à niveau de RHEL 9.0 vers RHEL 9.6, offrant de meilleures performances du noyau, une sécurité renforcée et une prise en charge étendue du cycle de vie.

Serveur FHIR

Version par défaut : 2025.11.0

FHIR Server 2025.11.0 est désormais la version par défaut pour tous les nouveaux déploiements, offrant des améliorations en matière d'évolutivité, d'interopérabilité et de gestion des données.

🔗 Pour plus de détails, veuillez consulter les notes de version de FHIR Server 2025.11.0.
 

 


Actions recommandées

  • Rien

Soutien

Pour plus d'informations ou pour obtenir de l'aide concernant cette version, veuillez contacter le support des services cloud d'InterSystems via iService ou via le portail des services cloud.

ディスカッション (0)0
続けるにはログインするか新規登録を行ってください
記事
· 2025年12月5日 1m read

Cargad datos en servidores (locales o remotos) directamente desde VS Code.

Me complace anunciar la publicación de gj :: dataLoader, una nueva extensión de VS Code que simplifica la tarea de cargar datos desde archivos CSV locales en tablas SQL de vuestros servidores InterSystems IRIS.

Aquí tenéis un vídeo introductorio:

gj :: dataLoader ya está disponible en Marketplace para su instalación directa en VS Code. Es mi propuesta para el concurso “Bringing Ideas to Reality” 2025 y lleva a la práctica esta idea: https://ideas.intersystems.com/ideas/DPI-I-667

Se agradecen vuestros comentarios.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年12月4日

InterSystems 开发者社区中文版:每月摘要(2025年11月)

您好,欢迎了解InterSystems 开发者社区中文版2025年11月摘要信息。
统计信息
✓ 十一月共发布了 17 篇新帖子:
 10篇新文章
 7个新公告
✓ 十一月有 14 位新成员加入
✓ 截至目前共发布了 2,441 篇帖子
✓ 截至目前共有 2,305 位成员加入
热点文章
文章
#InterSystems IRIS
 
#InterSystems IRIS for Health
 
公告
十一月, 2025Month at a GlanceInterSystems Developer Community
ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
記事
· 2025年12月4日 4m read

使用IRIS互操作生产环境创建FHIR响应

当我们在 IRIS 中创建 FHIR 资源库时,我们有一个端点来访问信息、创建新资源等。但 FHIR 中有些资源可能不会出现在我们的资源库中,例如二进制资源(该资源返回文档,如 PDF)。

我创建了一个例子,当请求二进制资源时,FHIR 端点会返回一个响应,就像它存在于资源库中一样。

首先,我们需要一个命名空间和一个 FHIR 端点。然后,我们需要配置一个将连接到 FHIR 端点的互操作生产环境。该生产环境必须包含以下项目:

  • 业务操作:
    • HS.Util.Trace.Operations(事实上这是可选项,但非常有用)
    • HS.FHIRServer.Interop. OperationTraceOperations属性设置为 *FULL*
  • 业务服务:
    • HS.FHIRServer.Interop.ServiceTraceOperations属性设置为 *FULL*,目标配置名称设置为 HS.FHIRServer.Interop.Operation名称

生产环境如下所示:

创建此生产环境后,我们需要将其与FHIR端点连接。因此,编辑FHIR端点并将Service Config Name参数设置为业务服务(Business Process的名称:

现在,如果我们开始向 FHIR 资源库发送请求,就会在消息查看器(Message Viewer中看到所有跟踪信息:

现在,我们可以通过业务流程来控制如何处理特定路径。

在这个例子中,我们有一个业务流程来接收每个请求(现在业务服务连接到了这个业务流程,而不是业务操作),还有 2 个新的业务操作来执行稍后将解释的其他操作:

让我们来看看名为FHIRRouter 的业务流程:

如果我们查看一下,就会发现如果RequestPath包含 "Binary/",我们就会对该请求进行处理:生成我们自定义的二进制响应。否则,我们将直接把请求发送到 FHIR 资源库。

让我们来看看名为 "生成二进制 "的序列:

首先,我们创建一个HS.FHIRServer.Interop.Response 的新实例。然后从请求路径中获取文档 ID。如何获取?每次有人需要二进制资源时,都必须在 URL 路径中请求文档的 ID,比如:..../fhir/r4/Binary/XXXXX。因此,我们使用以下表达式从请求路径中提取文档 ID:

$Replace(request.Request.RequestPath,"Binary/","")

(虽然不是很优雅,但还是可以用的)。

如果有了文档 ID,我们就会调用名为 "查找(Find)" 的业务操作来查找与该文档 ID 相关的文件名:

事实上,"查找(Find)"业务操作总是返回相同的文件名:

这是我们能做什么的一个例子。

如果我们有一个文件名,那么就可以调用另一个名为File业务操作来获取以 base64 编码的文件内容:

最后,我们可以返回两种响应:

  • 如果没有文件内容(因为没有文件 ID 或找不到相关的文件名或内容),我们会返回404 响应,并给出自定义响应:
 set json = {
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "not-found",
            "diagnostics": "<HSFHIRErr>ResourceNotFound",
            "details": {
                "text": "No resource with type 'Binary'"
            }
        }
    ]
 }
 set json.issue.%Get(0).details.text = json.issue.%Get(0).details.text_" and id '"_context.docId_"'"
 set qs = ##class(HS.SDA3.QuickStream).%New()
 do qs.Write(json.%ToJSON())
 set response.QuickStreamId = qs.%Id()
 set response.ContentType = "application/fhir+json"
 set response.CharSet = "UTF-8"
  • 如果有文件内容,则返回200 响应,并附带以下自定义响应:
 set json = {
  "resourceType": "Binary",
  "id": "",
  "contentType": "application/pdf",
  "securityContext": {
    "reference": "DocumentReference/"
  },
  "data": ""
 }
 set json.id = context.docId
 set json.securityContext.reference = json.securityContext.reference_json.id
 set json.data = context.content.Read(context.content.Size)
 
 set qs = ##class(HS.SDA3.QuickStream).%New()
 do qs.Write(json.%ToJSON())
 set response.QuickStreamId = qs.%Id()
 set response.ContentType = "application/fhir+json"
 set response.CharSet = "UTF-8"

这里的关键是创建一个包含 JSON 对象的HS.SDA3.QuickStream。并将此 QuickStream 添加到响应中。

现在,如果我们测试我们的端点,如果我们请求二进制文档,我们将看到响应:

如果我们请求一个不存在的二进制文档(可以通过不输入文档 ID 进行测试),我们将看到 404 响应:

总之,将我们的 FHIR 端点与互操作性连接起来,我们就可以利用 InterSystems IRIS 的所有功能做任何我们想做的事情。

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください