Rechercher

記事
· 2025年2月13日 2m read

第二十三章 R 开头的术语

第二十三章 R 开头的术语

恢复 (recovery)

系统

在系统故障后恢复数据完整性的方法。

重定向 (redirection)

系统

使全局的位置对应用程序不可见的一种方式。IRIS 支持两种类型的重定向:命名空间定义和复制。

引用 (reference)

对象(Objects)

引用指向另一个对象或表,创建属性或字段与引用对象或表之间的单向关系。

注册类 (registered class)

对象(Objects)

注册类源自 %RegisteredObject 类。IRIS 自动管理注册类的对象引用,并支持多态性。

关系型数据库 (relational database)

通用

根据关系模型组织的相关数据集合。

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年2月13日

How to append to a list in a for loop using ObjectScript

I want to append items to the list inside a for loop

Example:

set mylist = $ListBuild()
for i = 1:1:5 {
    set item = "item"_i
    set mylist = $ListBuild(mylist,item)
}

zw mylist

The output should be:

mylist = $lb("item1", "item2", "item3", "itme4", "item5")

The code snippet written above is not working, looking for correct way to do it.

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

Code Golf: Clockwise Spiral

It's been a while (and everyone is well-rested after Advent Of Code!) so let's run another round of Code Golf.

Your task is navigating in a grid-like labyrinth in a clockwise spiral pattern. As it traverses the matrix, it collects characters, revealing a secret message.
Your challenge: find the shortest, most elegant code to decode this spiral cipher.
Input:
1. A multidimensional string array with comma separated characters (n x n)
2. Starting coordinates X and Y

Output:
The decoded message as a single string

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

Debugando a mensagem “Server Availability Error” ao carregar a Aplicação Web

No WRC, frequentemente vemos clientes entrarem em contato conosco porque seus Web Gateways são incapazes de servir páginas web. Este artigo explicará um motivo frequente para a ocorrência desses erros e descreverá algumas ferramentas que podem ser usadas para depurar o problema. Esta explicação está focada no Web Gateway servindo instâncias do InterSystems IRIS, mas a mesma explicação deve se aplicar ao CSP Gateway servindo instâncias do Caché também.

O Problema:

A tentativa de carregar uma Aplicação Web (seja uma aplicação personalizada ou o Portal de Gerenciamento do Sistema) resulta em um dos seguintes erros (dependendo do seu navegador):

Adicionalmente, o arquivo CSP.log mostra:

Por que isso acontece

Para entender por que isso ocorre, precisamos analisar a arquitetura em que o Web Gateway opera:

Quando você tenta carregar sua aplicação em um navegador, o navegador envia uma requisição para o seu Servidor Web. O Servidor Web passa essa requisição para o Web Gateway. O Web Gateway então precisa se comunicar com o InterSystems IRIS para entender o que fazer com a requisição. Mas, como o Web Gateway reside fora do InterSystems IRIS (e pode estar em outra máquina), exigimos que o processo do Web Gateway se autentique no IRIS. Isso é o mesmo que exigimos para quaisquer outros novos processos que se conectam ao IRIS, como conexões ODBC remotas ou uma sessão de Terminal IRIS local simples.

A razão para os erros acima ocorrerem durante o carregamento da aplicação é porque a autenticação do Web Gateway para o IRIS está falhando. A configuração do Web Gateway armazena, dentro do seu arquivo CSP.ini, um conjunto de credenciais para cada servidor InterSystems IRIS ao qual ele se conecta. Normalmente, essas credenciais são para o usuário “CSPSystem”, que é uma conta criada por padrão quando o IRIS é instalado. Essas credenciais são então usadas para tentar autenticar usando as configurações definidas para o Serviço %Service_WebGateway no IRIS.

Para obter mais informações sobre por que essa autenticação está falhando, você pode usar os recursos de Auditoria oferecidos pelo InterSystems IRIS. Dado que você provavelmente não pode usar o Portal de Gerenciamento neste momento, você pode usar a rotina ^SECURITY em uma Sessão de Terminal IRIS para configurar a Auditoria e visualizar o Log de Auditoria.

Primeiramente, você precisará Habilitar a Auditoria, caso ela ainda não tenha sido habilitada:

Em seguida, certifique-se de que a Auditoria para o Evento %System/%Login/LoginFailure esteja habilitada:

Uma vez feito isso, você pode reproduzir o problema “Server Availability Error”. Isso deve resultar em um Evento de Auditoria LoginFailure sendo registrado, e você pode examinar os detalhes deste evento para descobrir mais:

A seção “Error message”deve fornecer mais informações sobre por que estamos vendo o LoginFailure. Problemas comuns incluem“User CSPSystem is disabled” ou “Service %Service_WebGateway is not enabled for Password authentication”, que sugerem alterações que devem ser feitas nas Configurações de Segurança do IRIS.

O problema mais comum que vemos no WRC é que a autenticação está falhando devido a "Senha Inválida". Isso significa que a senha do CSPSystem armazenada no Web Gateway não corresponde à senha do CSPSystem armazenada no IRIS.

 Como corrigir o problema

Agora que a entrada do Log de Auditoria fornece uma indicação clara de qual é a incompatibilidade entre o Web Gateway e o InterSystems IRIS, você precisa corrigir essa incompatibilidade. As credenciais do CSPSystem no IRIS podem ser modificadas através do menu ^SECURITY em uma sessão de Terminal.

Existem algumas maneiras de modificar as credenciais do CSPSystem armazenadas no Web Gateway. A maneira mais fácil é acessar o Portal de Gerenciamento do Web Gateway, que está documentado aqui: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GCGI_oper_config . Uma vez que você tenha carregado a Página de Gerenciamento do Web Gateway, você pode editar as credenciais usadas para autenticar no IRIS clicando no link Acesso ao Servidor e editando as configurações de Segurança de Conexão para o Servidor relevante.

Se você não conseguir acessar a Página de Gerenciamento do Web Gateway, então você terá que editar o arquivo CSP.ini. O arquivo CSP.ini deve ter seções para cada Definição de Servidor configurada no Web Gateway. Você deverá ser capaz de editar as seções “Username” e “Password” na seção relevante para corresponder ao que está armazenado no InterSystems IRIS. Observe que a seção [SYSTEM] controla o acesso ao Portal de Gerenciamento do Web Gateway, não uma instância do InterSystems IRIS chamada [SYSTEM].

Por exemplo, se você tiver uma definição para o servidor “Test” onde a senha do CSPSystem estiver incorreta:

You can edit the CSP.ini file to have the correct plaintext password:

Da próxima vez que você tentar autenticar do Web Gateway para o InterSystems IRIS, a senha será criptografada:

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

Bulk FHIR Step by Step

FHIR repositories, applications and servers typically serve clinical data in small quantities, whether to return data about a patient, their medications, vaccines, allergies, among other information. However, it is common for a large amount of data in FHIR/JSON format to be requested to be used to load into Data Lakes, identifying study cohorts, population health, or transferring data from one EHR to another. To meet these business scenarios that require large extractions and loads of data, it is recommended to use the FHIR Bulk Data Access feature provided by HL7 institution.

The InterSystems IRIS for Health implements the FHIR Bulk Data Access with the feature BFC - Bulk FHIR Coordinator (https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...). According InterSystems documentation, BFC "simplify the FHIR bulk data interaction for clients and to not overwhelm a FHIR server with bulk data requests, the InterSystems Bulk FHIR Coordinator(BFC) mediates the interaction between a bulk data client and a FHIR resource server endpoint for bulk data requests. The Bulk FHIR Coordinator can facilitate bulk FHIR export for FHIR resource servers that do not natively support the bulk data interaction." The diagram into the documentation illustrates how the Bulk FHIR Coordinator mediates the interaction between a client and FHIR endpoints:

The Bulk FHIR Coordinator mediates the interaction between a client and a FHIR endpoint

So if you want to migrate from any FHIR server to IRIS for Health, you can use BFC to connect on a target FHIR server to get all data you need as json files (ndjson resources), and import into your InterSystems FHIR server.

In this article you will learn step by step how to configure and use BFC to obtain all patient data from an FHIR repository into JSON files for later use.

Step 1 - Get/Configure an IRIS for Health Instance to use BFC

If you don't have an IRIS for Health in use, you can get one here: https://openexchange.intersystems.com/package/iris-fhir-template. Follow these installations procedures:

1.1 Docker setup:

Clone/git pull the repo into any local directory

git clone https://github.com/intersystems-community/iris-fhir-template.git

Open the terminal in this directory and run:

docker-compose up -d


1.2 Or IPM setup (required an IRIS for Health running):

Open IRIS for Health installation with IPM client installed. Call in any namespace:

USER>zpm "install fhir-server"

This will install FHIR server in FHIRSERVER namespace.

Or call the following for installing programmatically:

set sc=$zpm("install fhir-server")

Step 2 - Create a new security credential

1. Access the Management Portal for the namespace FHIRSERVER (http://localhost:32783/csp/sys/%25CSP.Portal.Home.zen?$NAMESPACE=FHIRSERVER).

2. Go to Interoperability > Configure > Credentials:

3. Set the BulkCreds values and save:

  • ID: BulkCreds
  • User Name: _SYSTEM
  • Password: SYS

Step 3 - Configure the BFC - Bulk Data Coordinator

1. Go to BFC UI (http://localhost:32783/csp/healthshare/fhirserver/bulkfhir/index.html):

2. Click the button + New Configuration > Create New:

3. Set the configuration settings:

  • Name: BFC_Patients
  • BFC Endpoint (any relative path): /bulkfhir/patients
  • Keep all other settings as they are

4. Click Next button.

5. Select HS.BulkFHIR.Auth.BasicAuth.Adapter and click the Next button

6. Select the HS.BulkFHIR.Fetch.PureFHIR.Adapter for Fetch Adapter field and set the following values:

  • Endpoint URL: http://fhir-template:52773/fhir/r4
  •  
  • SSL Configuration: BFC_SSL
  • Authorization Type: HTTP
  • HTTP Credential ID: BulkCreds
  • Accept the default values for all other fields

7. Click the button Next.

8. Select the value HS.BulkFHIR.Storage.File.Adapter for Storage Adapter field and set the following values:

  • Storage Adapter: HS.BulkFHIR.Storage.File.Adapter
  • File URL: /bulkfhir/file
  • Directory: /usr/irissys/mgr/Temp/BulkFHIR/FHIRSERVER/

9. Click the button Next.

10. Review the configuration and click the button Configure in the bottom of the page:

11. You will see the success message: 

Step 4 (Final Step) - Get your bulk data

1. Go to Exports:

2. Click the button + New Export Request:

3. Select the Configuration field BFC_Patients value and click the button Next

4. Select the Patient option and click the button Export Now:

5. You get a sucess message:

6. Click the button Refresh on the Top of the page:

7. See the session of the configuration BFC_Patients completed:

8. Click the last button Download ():

9. See the the exported json files list:

10. Download any file and see its content:

11. To initiate a bulk FHIR export from a REST client, send a GET request to your BFC endpoint indicating the desired operation, for example:

12. More details how to use with API: https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI...

13. More details how to use BFC:

Enjoy!!

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