Nova postagem

Rechercher

Pergunta
· Mar. 13, 2024

How to send PUT using HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process?

Dear,

I'm trying to configure a new interface that reads HL7, transform them into FHIR messages and then send POST or PUT or DELETE depending on HL7 doc type.

1-I added an HL7 TCP service that reads ADTs messages

2a-Send ADTs to a process to transform them into SDA  (using the following command:  do ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(request,.con))

2b-Extract the patient MRN and add it to the AdditionalInfo property  (using the following request message class: HS.Message.XMLMessage)

3-Send the SDA message to the built in process: HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process.

4-Send FHIR request to HS.FHIRServer.Interop.Operation

My only problem is that every ADT message is being transformed to a POST FHIR message.

Can you help me to control the method that is being used (POST)? and t change it to a PUT or DELETE when needed? 

5 Comments
Discussão (5)2
Entre ou crie uma conta para continuar
Discussão
· Mar. 12, 2024

[Water Cooler Talk] Is ChatGPT effective in providing ObjectScript guide?

Hi Community!

As an AI language model, ChatGPT is capable of performing a variety of tasks like language translation, writing songs, answering research questions, and even generating computer code. With its impressive abilities, ChatGPT has quickly become a popular tool for various applications, from chatbots to content creation.
But despite its advanced capabilities, ChatGPT is not able to access your personal data. So we need to build a custom ChatGPT AI by using LangChain Framework:

Below are the steps to build a custom ChatGPT:

  • Step 1: Load the document 

  • Step 2: Splitting the document into chunks

  • Step 3: Use Embedding against Chunks Data and convert to vectors

  • Step 4: Save data to the Vector database

  • Step 5: Take data (question) from the user and get the embedding

  • Step 6: Connect to VectorDB and do a semantic search

  • Step 7: Retrieve relevant responses based on user queries and send them to LLM(ChatGPT)

  • Step 8: Get an answer from LLM and send it back to the user

 

  For more details, please Read this article


My personal conclusion
 

In my personal opinion, ChatGPT is effective in providing ObjectScript code and examples, especially for simpler tasks or basic programming concepts. It can generate code snippets, explain programming concepts, and even provide examples or solutions to specific coding problems. However, the effectiveness may vary depending on the complexity of the task and the specific programming language involved. ChatGPT can be quite helpful in providing code examples and explanations.

6 Comments
Discussão (6)5
Entre ou crie uma conta para continuar
Artigo
· Mar. 12, 2024 5min de leitura

Orchestrating Secure Management Access in InterSystems IRIS with AWS EKS and ALB

As an IT and cloud team manager with 18 years of experience with InterSystems technologies, I recently led our team in the transformation of our traditional on-premises ERP system to a cloud-based solution. We embarked on deploying InterSystems IRIS within a Kubernetes environment on AWS EKS, aiming to achieve a scalable, performant, and secure system. Central to this endeavor was the utilization of the AWS Application Load Balancer (ALB) as our ingress controller. 

However, our challenge extended beyond the initial cluster and application deployment; we needed to establish an efficient and secure method to manage the various IRIS instances, particularly when employing mirroring for high availability.

This post will focus on the centralized management solution we implemented to address this challenge. By leveraging the capabilities of AWS EKS and ALB, we developed a robust architecture that allowed us to effectively manage and monitor the IRIS cluster, ensuring seamless accessibility and maintaining the highest levels of security. 

In the following sections, we will delve into the technical details of our implementation, sharing the strategies and best practices we employed to overcome the complexities of managing a distributed IRIS environment on AWS EKS. Through this post, we aim to provide valuable insights and guidance to assist others facing similar challenges in their cloud migration journeys with InterSystems technologies.

Configuration Summary Our configuration capitalized on the scalability of AWS EKS, the automation of the InterSystems Kubernetes Operator (IKO) 3.6, and the routing proficiency of AWS ALB. This combination provided a robust and agile environment for our ERP system's web services.

Mirroring Configuration and Management Access We deployed mirrored IRIS data servers to ensure high availability. These servers, alongside a single application server, were each equipped with a Web Gateway sidecar pod. Establishing secure access to these management portals was paramount, achieved by meticulous network and service configuration.

Detailed Configuration Steps

Initial Deployment with IKO:

  • We leveraged IKO 3.6, we deployed the IRIS instances, ensuring they adhered to our high-availability requirements.

Web Gateway Management Configuration:

  • We create server access profiles within the Web Gateway Management interface. These profiles, named data00 and data01, were crucial in establishing direct and secure connectivity to the respective Web Gateway sidecar pods associated with each IRIS data server.
  • To achieve precise routing of incoming traffic to the appropriate Web Gateway, we utilized the DNS pod names of the IRIS data servers. By configuring the server access profiles with the fully qualified DNS pod names, such as iris-svc.app.data-0.svc.cluster.local and iris-svc.app.data-1.svc.cluster.local, we ensured that requests were accurately directed to the designated Web Gateway sidecar pods.

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

 

IRIS Terminal Commands:

  • To align the CSP settings with the newly created server profiles, we executed the following commands in the IRIS terminal:
    • d $System.CSP.SetConfig("CSPConfigName","data00") # on data00
    • d $System.CSP.SetConfig("CSPConfigName","data01") # on data01

https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI...

NGINX Configuration:

  • The NGINX configuration was updated to respond to /data00 and /data01 paths, followed by creating Kubernetes services and ingress resources that interfaced with the AWS ALB, completing our secure and unified access solution.

Creating Kubernetes Services:

  • I initiated the setup by creating Kubernetes services for the IRIS data servers and the SAM:

 

Ingress Resource Definition:

  • Next, I defined the ingress resources, which route traffic to the appropriate paths using annotations to secure and manage access.

Explanations for the Annotations in the Ingress YAML Configuration:

  • alb.ingress.kubernetes.io/scheme: internal
    • Specifies that the Application Load Balancer should be internal, not accessible from the internet.
    • This ensures that the ALB is only reachable within the private network and not exposed publicly.
  • alb.ingress.kubernetes.io/subnets: subnet-internal, subnet-internal
    • Specifies the subnets where the Application Load Balancer should be provisioned.
    • In this case, the ALB will be deployed in the specified internal subnets, ensuring it is not accessible from the public internet.
  • alb.ingress.kubernetes.io/target-type: ip
    • Specifies that the target type for the Application Load Balancer should be IP-based.
    • This means that the ALB will route traffic directly to the IP addresses of the pods, rather than using instance IDs or other target types.
  • alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true
    • Enables sticky sessions (session affinity) for the target group.
    • When enabled, the ALB will ensure that requests from the same client are consistently routed to the same target pod, maintaining session persistence.
  • alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 443}]'
    • Specifies the ports and protocols that the Application Load Balancer should listen on.
    • In this case, the ALB is configured to listen for HTTPS traffic on port 443.
  • alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:il-
    • Specifies the Amazon Resource Name (ARN) of the SSL/TLS certificate to use for HTTPS traffic.
    • The ARN points to a certificate stored in AWS Certificate Manager (ACM), which will be used to terminate SSL/TLS connections at the ALB.

These annotations provide fine-grained control over the behavior and configuration of the AWS Application Load Balancer when used as an ingress controller in a Kubernetes cluster. They allow you to customize the ALB's networking, security, and routing settings to suit your specific requirements.

After configuring the NGINX with location settings to respond to the paths for our data servers, the final step was to extend this setup to include the SAM by defining its service and adding the route in the ingress file.

Security Considerations: We meticulously aligned our approach with cloud security best practices, particularly the principle of least privilege, ensuring that only necessary access rights are granted to perform a task.

DATA00:

 

DATA01:

SAM:

Conclusion: 

This article shared our journey of migrating our application to the cloud using InterSystems IRIS on AWS EKS, focusing on creating a centralized, accessible, and secure management solution for the IRIS cluster. By leveraging security best practices and innovative approaches, we achieved a scalable and highly available architecture.

We hope that the insights and techniques shared in this article prove valuable to those embarking on their own cloud migration projects with InterSystems IRIS. If you apply these concepts to your work, we'd be interested to learn about your experiences and any lessons you discover throughout the process

3 Comments
Discussão (3)1
Entre ou crie uma conta para continuar
Pergunta
· Mar. 12, 2024

Best way to translate a XML String to an Ens.Response derived class?

Hello,
First of all thanks for your time and help with this question.

We wonder how could we convert a String which represents an XML, to a class which extends from Ens.Response

Our context is a REST Operation, where we currently split the String with $PIECE and set each propertie as follows:

        set codigo = $PIECE($PIECE(httpResponse,"<error><codigo>",2),"</codigo><descripcion>",1)
        set descripcion = $PIECE($PIECE(httpResponse,"<descripcion>",2),"</descripcion>",1)
        set codigoSERAM = $PIECE($PIECE(httpResponse,"</error><codigo>",2),"</codigo></resultado>",1)
        
        set pResponse = ##class(Mensajes.Response.Radiologia.NumeroOrdenAcodigoSERAMResponse).%New()
        set pResponse.resultado =  ##class(EsquemasDatos.Radiologia.Resultado).%New()
        set pResponse.resultado.error =  ##class(EsquemasDatos.Seguridad.Error).%New()
        set pResponse.resultado.error.codigo = codigo
        set pResponse.resultado.error.descripcion = descripcion
        set pResponse.resultado.codigo = codigoSERAM


Is there any recommended way to convert the XML String which has the following look:

    <resultado>
        <error>
            <codigo>0</codigo>
            <descripcion>Proceso realizado correctamente</descripcion>
        </error>
        <codigo>06050301</codigo>
    </resultado>


    
To the Ens.Response derived class which structure is:

Class Mensajes.Response.Radiologia.NumeroOrdenAcodigoSERAMResponse Extends Ens.Response
{

Property resultado As EsquemasDatos.Radiologia.Resultado;
Class EsquemasDatos.Radiologia.Resultado Extends (%SerialObject, %XML.Adaptor) [ ProcedureBlock ]
{

Property error As EsquemasDatos.Seguridad.Error;
Property codigo As %String(MAXLEN = "");
Class EsquemasDatos.Seguridad.Error Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor) [ ClassType = persistent, ProcedureBlock ]
{

Property codigo As %Numeric;
Property descripcion As %String(MAXLEN = "");

I

 

f the String written in the response would be a JSON we could do:

        set tSC= claseAux.%ConvertJSONToObject(httpRequest.HttpResponse.Data,"Mensajes.Response.Radiologia.NumeroOrdenAcodigoSERAMResponse",.pResponse,1)    


Or we could use something like:

    ##class(%JSON.Adaptor).%JSONImport(input, %mappingName As %String = "")


    

But what is the recommended way to parse XML String to Ens.Response?

Thanks for your time, help and support.

Thank you.

5 Comments
Discussão (5)3
Entre ou crie uma conta para continuar
Pergunta
· Mar. 12, 2024

Get JWT Token

Hi Guys,

I'm trying both of these methods to get a JWT token but none is working for some reason and not sure what I'm missing?

it works when I tested it from Postman 

Thanks

12 Comments
Discussão (12)3
Entre ou crie uma conta para continuar