查找

Artículo
· 1 hr atrás Lectura de 1 min

Usando o IRIS como um banco de dados vetorial

As capacidades integradas de busca vetorial do InterSystems IRIS nos permitem pesquisar dados não estruturados e semiestruturados. Os dados são convertidos em vetores (também chamados de ‘embeddings’) e, em seguida, armazenados e indexados no InterSystems IRIS para busca semântica, geração aumentada de recuperação (RAG), análise de texto, motores de recomendação e outros casos de uso.

Esta é uma demonstração simples do IRIS sendo usado como um banco de dados vetorial e de busca por similaridade no IRIS.

Pré-requisitos:

  • Python
  • InterSystems IRIS for Health – que será utilizado como o banco de dados vetorial

Repositório: https://github.com/piyushisc/vectorsearchusingiris

Passos a seguir:

  1. Clone o repositório.
  2. Abra o VS Code, conecte-se à instância e ao namespace desejados do IRIS e compile as classes.
  3. Abra o Terminal do IRIS e execute o comando do ##class(vectors.vectorstore).InsertEmbeddings(), que lê o texto do arquivo text.txt, gera os embeddings e os armazena no IRIS.
  4. Execute o comando do ##class(vectors.vectorstore).VectorSearch("termos_de_busca") com as palavras desejadas para realizar a busca por similaridade. O IRIS retornará as três correspondências mais próximas.
  1. alt text
Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 1 hr atrás

Warning on Message Body

I am trying to centralize our FHIR queries into a single BP object that would send the FHIR query to the EMR, interpret the response into a %Persistent structure that could be sent back to the requestor. In theory it seemed like it would work but I am running into an issue..

"Warning on Message body 5@osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record'
/ 229 because Status 'ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>Transform+3 ^osuwmc.Scott.FHIR.DemoOutboundHL7Message.1 *DocType,osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record -- logged as '-'
number - @' Set:""=source.DocType tBlankSrc=1, source.DocType="ORMORUPDF:MDM_T02"''
matched ReplyCodeAction 1 : 'E=W'
resulting in Action code W"

When I interpret the FHIR Response into a %Persistent structure, I get the error above. Am I missing something? I do not reference the DocType anywhere in my Transformation...

Class osuwmc.Epic.FHIR.DTL.FHIRResponseToPatient Extends Ens.DataTransform
{

ClassMethod Transform(source As HS.FHIRServer.Interop.Response, target As osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record) As %Status
{
  Set tSC=$$$OK
  set tQuickStream = ##Class(HS.SDA3.QuickStream).%OpenId(source.QuickStreamId)
  set tRawJSON = ##Class(%Library.DynamicObject).%FromJSON(tQuickStream)
  $$$TRACE(tRawJSON.%ToJSON())
  set tResource = tRawJSON.entry.%Get(0).resource
  $$$LOGINFO("Resource Type: "_tResource.resourceType)
  if tResource.resourceType '= "Patient" {
    set tSC = $$$ERROR($$$GeneralError, "FHIRResponseToPatient: Resource type is not Patient")
    return tSC
  }
  else{
    set target = ##class(osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record).%New()
    set mrnIter = tResource.identifier.%GetIterator()
    while mrnIter.%GetNext(,.identifier) {
      if identifier.system = "urn:oid:1.2.840.114350.1.13.172.2.7.5.737384.100" {
        set target.MRN = identifier.value
      }
    }
    set NameIter = tResource.name.%GetIterator()
    while NameIter.%GetNext(,.humanName) {
      if humanName.use = "official" {
        set target.lastname = humanName.family
        set target.firstname = humanName.given.%Get(0)
      }
    set target.birthdate = tResource.birthDate
    set target.gender = tResource.gender
    }
    set addrIter = tResource.address.%GetIterator()
    while addrIter.%GetNext(,.address) {
      if address.use = "home" {
        set target.address = address.line.%Get(0)
        set target.city = address.city
        set target.state = address.state
        set target.postalcode = address.postalCode
      }
    }
  }
  $$$LOGINFO(target.MRN_" "_target.lastname_" "_target.firstname_" "_target.birthdate_" "_target.gender_" "_target.address_" "_target.city_" "_target.state_" "_target.postalcode)
  return tSC
}

}

Maybe it's because I use osuwmc.Epic.FHIR.DataStructures.PatientSearch.Record for the request to get generated, and for me to send the response back to the requestor? Should I be using a different %Persistent class, so the system does not get confused?

Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 3 hr atrás

Is there an analogy of Log() function for Embedded Python to Log errors?

Hi developers!
Happy holidays!

In ObjectScript there is neat option to log errors - call Log() method of an exception intance, e.g.:

ClassMethod MyMethod() {

Try {

w 1/0

}

Catch e {

do e.Log() // logging error in the app log

write "the error happened: "_e.DisplayString()

}

}

Is there anything like that for Embedded Python? e.g:

ClassMethod MyMethod() [Language = python] {

 try:

   print(1/0)

 except ZeroDivisionError as e:

   // how can I log e into IRIS App Error Log here?

   print("Caught exception: " + str(e))

}

Any ideas?

1 nuevo comentario
Comentarios (1)1
Inicie sesión o regístrese para continuar
Anuncio
· 4 hr atrás

Avis de maintenance du 26 décembre 2025

Salut la Communauté,

Nous effectuons actuellement des travaux techniques. Durant cette période, vous pourriez rencontrer des problèmes avec le portail de la communauté des développeurs, l'IA de la communauté des développeurs et la fonction de recherche :

🔹 "Demandez à DC AI" est temporairement indisponible.

🔹 La recherche peut être plus longue que d'habitude ou ne pas renvoyer de résultats.

Nous mettons tout en œuvre pour rétablir le fonctionnement normal au plus vite. Merci de votre patience et de votre compréhension.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 4 hr atrás

Maintenance Notice Dec 26, 2025

Dear Community members,

We are currently performing technical work, and during this time, you may experience issues with the Developer Community portal, Developer Community AI, and search functionality:

🔹 Ask DC AI is temporarily unavailable
🔹 Search may take longer than usual or may not return results

We’re working to restore full functionality as quickly as possible. Thank you for your patience and understanding.

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