Pesquisar

Pergunta
· Out. 30

Pulling/pushing HL7 from/to a API

Hello,
I am currently facing the task of retrieving or sending HL7 messages from a web API. Since we only send HL7 messages via internal sockets, web APIs are relatively new to me.
The following is my plan for the new interface:
I have created a new custom business service that periodically sends requests to a business process. In this business process, the HTTP request (HTTP.GenericMessage) is then created from scratch. The special feature is the "Authorisation" header field, where a signature is inserted, which consists of a base64-encoded hash value. The request is then sent to the API via a business operation (EnsLib.HTTP.GenericOperation). The whole thing is also secured via TLS.
If you remove the TLS encryption, I even get a response from the API (a negative one). As soon as I add a SSL/TLS configuration, I get the following error message:

Have I made any major mistakes? What could I improve and what does this error message mean?

Regards

Robert

4 novos comentários
Discussão (4)3
Entre ou crie uma conta para continuar
Artigo
· Out. 30 4min de leitura

Testando Inconsistências de Metadados no InterSystems IRIS Usando o Banco de Dados DATATYPE_SAMPLE

Ao usar SQL padrão ou a camada de objetos no InterSystems IRIS, a consistência dos metadados é geralmente mantida por meio de validação integrada e imposição de tipo. No entanto, sistemas legados que ignoram essas camadas—acessando globals diretamente—podem introduzir inconsistências sutis e graves.

Compreender como os drivers se comportam nesses casos extremos é crucial para diagnosticar problemas de dados legados e garantir a confiabilidade da aplicação.

O banco de dados DATATYPE_SAMPLE foi projetado para ajudar a analisar cenários de erro onde os valores das colunas não estão em conformidade com os tipos de dados ou restrições definidas nos metadados. O objetivo é avaliar como o InterSystems IRIS e seus drivers (JDBC, ODBC, .NET) e diferentes ferramentas se comportam quando tais inconsistências ocorrem. Nesta publicação, focarei no driver JDBC.


Qual é o Problema?

Algumas aplicações legadas escrevem diretamente em globals. Se um modelo relacional (criado via CREATE TABLEou definido manualmente usando um mapeamento de global) for usado para expor esses dados, o mapeamento define que os valores subjacentes estão em conformidade com os metadados declarados para cada coluna.

Quando essa suposição é quebrada, diferentes tipos de problemas podem ocorrer:

  1. Falha de Acesso (Access Failure): Um valor não pode ser lido de forma alguma, e uma exceção é lançada quando o driver tenta acessá-lo.
  2. Corrupção Silenciosa (Silent Corruption): O valor é lido com sucesso, mas não corresponde aos metadados esperados.
  3. Mutação Não Detectada (Undetected Mutation): O valor é lido e parece válido, mas foi silenciosamente alterado pelo driver para se ajustar aos metadados, tornando a inconsistência difícil de detectar.

Simulando o Comportamento

Para demonstrar esses cenários, criei o banco de dados DATATYPE_SAMPLEdisponível no InterSystems Open Exchange:
🔗 Package page
🔗 GitHub repo

A tabela usada para a demonstração:

CREATE TABLE SQLUser.Employee (
   ID              BIGINT          NOT NULL AUTO_INCREMENT,
   Age             INTEGER,
   Company         BIGINT,
   DOB             DATE,
   FavoriteColors  VARCHAR(4096),
   Name            VARCHAR(50)     NOT NULL,
   Notes           LONGVARCHAR,
   Picture         LONGVARBINARY,
   SSN             VARCHAR(50)     NOT NULL,
   Salary          INTEGER,
   Spouse          BIGINT,
   Title           VARCHAR(50),
   Home_City       VARCHAR(80),
   Home_State      VARCHAR(2),
   Home_Street     VARCHAR(80),
   Home_Zip        VARCHAR(5),
   Office_City     VARCHAR(80),
   Office_State    VARCHAR(2),
   Office_Street   VARCHAR(80),
   Office_Zip      VARCHAR(5)
);

Exemplo 1: Falha de Acesso

Para simular uma inconsistência, injetei valores inválidos na coluna DOB(Date of Birth / Tipo de Dado DATE) usando acesso direto ao global. Especificamente, as linhas com chaves primárias 101, 180, 181, 182, 183, 184 e 185 foram preenchidas com valores que não representam datas válidas.

Os valores agora se parecem com isto:
 
Como você pode ver, uma string foi anexada ao final de um valor $H (Horolog). De acordo com os metadados da tabela, esta coluna deveria conter uma data—mas o valor armazenado claramente não é uma.

Então, o que acontece quando você tenta ler esses dados? Bem, isso depende da ferramenta que você está usando. Testei algumas ferramentas diferentes para comparar como elas lidam com esse tipo de inconsistência.

1) SquirrelSQL (SQuirreL SQL Client Home Page)


Quando o SquirrelSQL tenta acessar os dados, ocorre um erro. Ele tenta ler todas as linhas e colunas, e qualquer célula que contenha dados inválidos é simplesmente marcada como "ERROR". Infelizmente, não consegui encontrar quaisquer detalhes ou mensagens de erro adicionais explicando a causa.

  

2) SQLWorkbench/J (SQL Workbench/J -  Home)

O SQL Workbench/J para de processar o conjunto de resultados assim que encontra a primeira célula inválida. Ele exibe uma mensagem de erro como "Invalid date" (Data inválida), mas infelizmente, não fornece nenhuma informação sobre qual linha causou o problema.

 
3) DBVisualizer (dbvis) &  DBeaver (dbeaver)

O DBVisualizer e o DBeaver se comportam de forma semelhante. Ambas as ferramentas continuam lendo o conjunto de resultados e fornecem mensagens de erro detalhadas para cada célula afetada. Isso torna fácil identificar a linha correspondente que causou o problema.

   

4) SQL DATA LENS (SQL Data Lens - a powerful tool for InterSystems IRIS and Caché)

Com o lançamento mais recente do SQL DATA LENS, você obtém informações detalhadas sobre o erro, a linha afetada e o valor real do banco de dados. Conforme mostrado na captura de tela, o valor interno para a primeira linha na coluna DOB é "39146<Ruined>", que não pode ser convertido em um DATE válido.

O SQL DATA LENS também permite configurar se o processamento do resultado deve parar na primeira célula errônea ou continuar a leitura para recuperar todos os dados disponíveis.
 

A próxima parte deste artigo mostrará detalhes sobre:

Corrupção Silenciosa: O valor é lido com sucesso, mas não corresponde aos metadados esperados.

Mutação Não Detectada: O valor é lido e parece válido, mas foi silenciosamente alterado pelo driver para se ajustar aos metadados, tornando a inconsistência difícil de detectar.



Andreas

1 novo comentário
Discussão (1)1
Entre ou crie uma conta para continuar
Resumo
· Out. 30

Shape the Future of the InterSystems Developer Experience and Win a Gift!

Hello Community Member,

We would like your help with making the journey smoother for every new developer joining our ecosystem!

💡 We’re collecting ideas to improve the Initial Developer Experience, and we want to hear from you!

Tell us what would have made your start easier:

  • A clearer installation guide or tutorial?
  • A ready-to-run sample project?
  • A video walkthrough or quick-start template?
  • UI improvements?
  • Or maybe something totally outside the box?

Every idea counts, whether big or small!

🎁 Your rewards:

Let’s work together to create the kind of onboarding experience you wish you had when you first started with IRIS.

👉 Share your ideas now in the Aha! Ideas Portal

We can’t wait to hear your thoughts and shape a better start for every future InterSystems developer!

Discussão
· Out. 30

Tell us how you've boosted your career -- and confidence!

Hi Community,

Confidence and career advancement often go hand-in-hand, and certification is one way to create new pathways forward.

🤔How have you opened up new opportunities in your own career—training? certification? networking?

💭What's made you feel more confident in your role?

Members of our InterSystems certified community recently reflected on how certification has shaped their careers and outlook. Share your own story in the comments!

quotes from four InterSystems certified professionals  

Many thanks to members of the InterSystems certified community for sharing their stories! @DJ Pavucsko, @Michael Clayton, @Craig Regester, and @Pierre-Yves Duquesnoy

Reach out if you have any questions about InterSystems Certification!

Having certification has built my confidence. It allows me to support my team members when they have questions because I have a broader knowledge base.

-DJ Pavucsko, Integration Engineer, J2 Interactive

Certification has certainly given me confidence that my skills are in a better place now. I will be at the forefront of our team's upgrade to InterSystems IRIS.

-Mike Clayton, Lead Consultant, HCLTech

Career-wise, the biggest impact of certification is that it really showed that I knew what I was doing, or at least had the right knowledge set. It gives confidence to future employers that I would have enough knowledge coming in.

-Craig C. Regester, Enterprise Architect, Ready Computing

Certification demonstrates on your resume that you're willing to learn and stay up to date with new technologies.

-Pierre-Yves Duquesnoy, Senior Sales Engineer, InterSystems

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Out. 30 2min de leitura

EnsLib.SQL.Snapshot not cleaned during purge messages when used in Response Message

Hi All,

First I want give a Shout Out to @Theo Stolker  and @Rupert Young. Because they helped me with the solution.

 When you're using the EnsLib.SQL.Snapshot as a Property in the Response Message to return Snapshot data (,e.g.: from Business Operation to Business Process,) the Snapshot data won't be cleaned with the Purge messages task/service.

Class ResponseMessage Extends Ens.Response

{

    Property SnapshotProp As EnsLib.SQL.Snapshot;

}

The data will be stuck in the global: ^Ens.AppData. You can find it with this query in System>Globals:  ^Ens.AppData("EnsLib.SQL.Snapshot",

The reference is recored in the class:  EnsLib.SQL.Snapshot you can query it with SQL: SELECT * FROM EnsLib_SQL.Snapshot ORDER BY ID asc

These data won't be deleted during the Purging task. So the Data will be growing over time. When you have this issue, you can clean all the data manually with the following method:

  • Clean Global: ^Ens.AppData:
    • Stop Production
    • Run on terminal: do ##class(Ens.Adapter).ClearStaticAppData("EnsLib.SQL.Snapshot")
    • Start Production
  • Clean EnsLib_SQL.Snapshot :
    • Delete with SQL: TRUNCATE TABLE EnsLib_SQL.Snapshot

But this is not ideal, especially in PRD evironment.

Solution:

This issue only happens when you're returning data from BO to BP, or maybe from BP to BS. Because the idea is the same. 

One solution is not to use EnsLib_SQL.Snapshot as a property in the return message. But to map the data to another objectType (e.g.: JSON as String, other classTypes).

Another solution is to make the Purging task purge the Snapshot data with  %OnDelete method:

https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GO...

So:

Class ResponseMessage Extends Ens.Response
{

    Property SnapshotProp As EnsLib.SQL.Snapshot;

   ClassMethod %OnDelete(oid As %ObjectIdentity) As %Status [ Private, ServerOnly = 1 ]
   {
   
      set id = $$$oidPrimary(oid)
      set obj = ..%OpenId(id)
    
      return ##class(EnsLib.SQL.Snapshot).%DeleteId(obj.SnapshotProp.%Id())
   }

}

Hope it wil help you as it's helped me!


 

Discussão (0)1
Entre ou crie uma conta para continuar