Question Oliver Wilms · May 29

My use case is I want AI to extract six pieces of key information from medical visit notes.

It works okay with notes from Epic patient portals. I am struggling with one of my own visit Summaries. So far I have not been able to instruct ollama to give me a JSON response where it gave me what I am asking for.

My original medical_progress_notes_prompt was:

Medical progress note:
---
(document)
---

You are an expert in analyzing medical progress notes. Please carefully read the provided progress note above and extract the following key information:

0
0 0
Question Oliver Wilms · Apr 27

I combined @Rodolfo Pscheidt https://github.com/RodolfoPscheidtJr/ollama-ai-iris with some files from @Guillaume Rongier https://openexchange.intersystems.com/package/iris-rag-demo.

My own project is https://github.com/oliverwilms/ollama-ai-iris

I can run load_data.py and it connects to IRIS (same container).

When I try to run query_data.py https://github.com/oliverwilms/ollama-ai-iris/blob/main/query_data.py , it cannot connect to ollama:

ConnectionError: Failed to connect to Ollama. Please check that Ollama is downloaded, running and accessible.

0
0 0
Question Oliver Wilms · Apr 21

I am brand new to using AI. I downloaded some medical visit progress notes from my Patient Portal. I extracted text from PDF files. I found a YouTube video that showed how to extract metadata using an OpenAI query / prompt such as this one:

ollama-ai-iris/data/prompts/medical_progress_notes_prompt.txt at main · oliverwilms/ollama-ai-iris
 

I combined @Rodolfo Pscheidt Jr https://github.com/RodolfoPscheidtJr/ollama-ai-iris with some files from @Guillaume Rongier https://openexchange.intersystems.com/package/iris-rag-demo.

I attempted to run

0
0 0
Question Oliver Wilms · Apr 20

I read the article by @Rodolfo Pscheidt Jr:

https://community.intersystems.com/post/ollama-ai-iris

I forked his app and copied selected files from @Guillaume Rongier iris-rag-demo to make it containerized:

ollama-ai-iris/test_conn.py at 3da62770a90e34eff92241abbfc4f2c2a7027898 · oliverwilms/ollama-ai-iris
 

I struggle to understand what each element is or I do not understand why the code does not work:

url = f"iris://teste:teste@localhost:51774/TESTE"
 

Is teste:teste refer to username / password? I tried _SYSTEM:SYS

Is 51774 webserver port? Is TESTE namespace?

0
0 0
Question Oliver Wilms · Apr 19

I cloned iris-rag-demo from Open Exchange and issued docker-compose up -d. I went to the front end and type in the chat message:

Who was the 46th President of United States of America?

I got a run time error:

RuntimeError: ERROR <Ens>ErrBPTerminated: Terminating BP ChatProcess # due to error: ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'RuntimeError'>: <PYTHON EXCEPTION> <class 'ValueError' > ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'RuntimeError'

Traceback:

0
0 0
Question Oliver Wilms · Apr 4

I deployed an IRIS REST application using Installer class. I think I created the namespace FEEDER database with %DB_Default resource and I used the same resource in Web Application roles. I allowed Unauthenticated Authentication method. I used ^%ISCLOG and reviewed ^ISCLOG. I do not understand why I get 403 Forbidden response.

0
0 0
Question Oliver Wilms · Jan 19

I inherited some legacy MUMPS / ObjectScript code. A code review identified an exclusive NEW and that is not allowed per our coding standards.

The original code contains:

RUN(CALL,DRVNAME)
 S $EC=""
 S ^TMP($J,"RMPV","DRVNAME")=DRVNAME
 N TMPFILE,OLDIO
 S OLDIO=$IO
 I $G(^TMP("RMPV","SILENT"),1) S IOP="NULL",%ZIS=0 D ^%ZIS I '$G(POP,1) U IO
 D INIT^@DRVNAME
 D  ; scope variables
 .N (DUZ,CALL) ; Protect %response
 .S IOF="""""",IOM=80,U="^"
 .D @CALL
 U OLDIO
 Q

I attempted to replace Exclusive NEW with a ClassMethod in a procedure block as follows:

0
0 0
Article Oliver Wilms · Dec 18, 2024 4m read

Implements Idea DPI-I-456

Idea

What The Sample Does

This sample was cloned from iris-interoperability-template. I have reconfigured the interoperability Production with an Inbound HTTP Adapter which is used by a HTTP Business Service. The configuration details for the business service are specified in System Default Settings. I configured Call Interval setting to call HTTPServer once every hour. You can change both the URL and frequency in the service's settings. Screenshot

0
0 0
Question Oliver Wilms · Dec 15, 2024

I am trying to work with Epic on FHIR. Epic's documentation stated, your application makes a HTTP POST request to the authorization server's OAuth 2.0 token endpoint to obtain access token.

Set tSC = ##class(%SYS.OAuth2.Authorization).GetAccessTokenClient(pClient,pScopes,.prop,.err) returns

ERROR #9761: No key in provided JWKS for alg ES512 and kid  

I check this /csp/sys/oauth2/OAuth2.JWTServer.cls?client_name=medbank and I see this:

0
0 0
Article Oliver Wilms · Dec 15, 2024 3m read

I have started working on utilizing Epic on FHIR about a month ago.

Creating a Public Private Key Pair

mkdir /home/ec2-user/path_to_key
openssl genrsa -out ./path_to_key/privatekey.pem 2048

For backend apps, you can export the public key to a base64 encoded X.509 certificate named publickey509.pem using this command...

openssl req -new -x509 -key ./path_to_key/privatekey.pem -out ./path_to_key/publickey509.pem -subj '/CN=medbank'
0
0 0
Question Oliver Wilms · Nov 22, 2024

I finally figured out how to get JWT token using set x = ##class(%SYS.OAuth2.Authorization).GetAccessTokenClient("medbank","openid fhirUser",.prop,.err).

I also found iris-fhir-client app on Open Exchange. I registered Epic sandbox server, but I cannot list resources. I suspect I need to integrate authorization / authentication. How do I do this with irisfhirclient py?

0
0 0
Question Oliver Wilms · Nov 19, 2024

I need to create a JWT to connect to EPIC FHIRserver sandbox.

https://fhir.epic.com/Documentation?docId=oauth2&section=BackendOAuth2G…

You will generate a one-time use JSON Web Token (JWT) to authenticate your app to the authorization server and obtain an access token that can be used to authenticate your app's web service calls. There are several libraries for creating JWTs. See jwt.io for some examples.

The header and payload are then base64 URL encoded, combined with a period separating them, and cryptographically signed using the private key to generate a signature.

0
0 0
Question Oliver Wilms · Oct 12, 2024

What is the reason for

RUN apt-get update && apt-get install -y \
    git \
    nano \
    python3-opencv \
    sudo && \
    /bin/echo -e ${ISC_PACKAGE_MGRUSER}\\tALL=\(ALL\)\\tNOPASSWD: ALL >> /etc/sudoers && \
    sudo -u ${ISC_PACKAGE_MGRUSER} sudo echo enabled passwordless sudo-ing for ${ISC_PACKAGE_MGRUSER}
 

I think I get error because I do not have sudo privilege in the environment where I use podman to build the image

podman build --tag oliver3 .

I cloned iris-pero-ocr repo, added two large files into misc location, and I tried to build image. I see this:

0
0 0
Question Oliver Wilms · Sep 28, 2024

I want to try out iris-DataViz app to visualize my own data. I cloned the repo and docker-compose up -d in AWS. IRIS portal works, but on port 8051 I get nothing. I checked my AWS security groups. I reversed IRIS webserver port and 8051 and I can connect to Management portal using port 8051. I don't understand what is refusing connection on port 8051 running in iris-DataViz container.

0
0 0
Question Oliver Wilms · Sep 19, 2024

Hello, I try to develop a REST interface where I need to interact with legacy MUMPS routines. How can I pass in input to a Read without modifying the legacy code?

I think in linux I can execute command < inputfile to read from file, but how does it work in ObjectScript?

0
0 0
Question Oliver Wilms · Aug 29, 2024

Hello, I want to create PDF from HTML source. I found pandoc. I installed pandoc on IRIS container image. I created Interoperability production. I have setup REST service to receive HTML file in request body. I call pandoc command pandoc -o output.pdf input.html  from a BPL process. I copy output.pdf file stream into response body. I save the response at the source. I get a file named output.pdf but it does not load in Acrobat. I suspect I am doing something wrong with headers (accept-encoding?) or maybe do I need to base64 encode the pdf file to transfer it via REST?

0
0 0
Question Oliver Wilms · Jun 23, 2024

I have JSON object which contains file references. I need to replace the file reference with base64 encoded file which is up to 10MB.

I tried the following but it did not work as expected:

do dynObj.%Set("data",pStream.ReadLineIntoStream(.tSC))

0
0 0
Question Oliver Wilms · Jun 23, 2024

I am working on JSON and want to be prepared to handle large Objects. I try this code:

ClassMethod MaxLen() As %Status

{

    set longStr=""

    for i=1:1:$SYSTEM.SYS.MaxLocalLength() { set longStr = longStr_"x" }

    write "Maximum string length = "_$LENGTH(longStr)

    ;

    set longObject = {"a":(longStr),"b":(longStr)}

    set file=##class(%File).%New("/tmp/longObjectFile.txt")

    do file.Open("WSN")

    do longObject.%ToJSON(file)

    do file.Close()

    ;

    do file.Open("RS")

    set newObject = {}.%FromJSONFile(file)

    write !,"Property newObject.a is "_$LENGTH(newObject.a)_" characters long."

0
0 0
Article Oliver Wilms · Feb 3, 2024 2m read

The architect of the JSON schema (MS) asked if IRIS could  perform schema validation. I asked on Discord objectscript channel how we could validate a Dynamic Object against a JSON schema. Dmitry Maslennikov replied that probably the easiest way would be to use python, but it would require converting ObjectScript JSON to Python dict.

I refer to this as my first real use case for Embedded Python, because previous examples I had tried I could have implemented in ObjectScript just as easily as in Python.

0
0 253
Article Oliver Wilms · Jan 31, 2024 2m read

An App that converts HL7 messages to JSON objects. About a year ago I started a GitHub repo for collecting stuff related to HL7. Recently my team added an HL7 interface to our Interoperability Production and we were asked to persist HL7 messages. We created a Kafka topic to receive HL7 messages. We use Kafka Bridges to send messages to Kafka topics. Kafka messages are sent to the Kafka Bridge in JSON format.

0
0 202
Question Oliver Wilms · Jan 11, 2024

Hello, I tried to convert HL7 message to JSON in a business process and I got errors. Has anybody converted HL7 to JSON? Are certain characters not allowed in JSON?

I just tried to set a property to quote request.RAWContent and quote. I will try to put example in GitHub and share here later.

5
0 1024