Find

Article
· Feb 18 8m read

OMOP Odyssey - InterSystems OMOP, The Cloud Service (Troy)



InterSystems OMOP, The Cloud Service (Troy)

An Implementer's approach into the OHDSI ( pronounced "Odyssey" ) Community through an Expiring Trial of  InterSystems OMOP Cloud Service.

What is it? 

The InterSystems OMOP, available as a HealthShare service through the InterSystems Cloud Services Portal, transforms HL7® FHIR® data into the Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM). The InterSystems OMOP looks at FHIR data stored in an S3 bucket and automatically transforms and sends the data to the cloud-hosted repository in the OMOP CDMO format. You can then use external Observational Health Data Sciences and Informatics (OHDSI) tools, such as ATLAS or HADES, in conjunction with a database driverOpens in a new tab, such as JDBC, to perform analytical tasks on your data.

Abridged: It transforms S3 Hosted FHIR Bulk Export Data to the OMOP CDM to a Cloud Hosted IRIS or a postgres flavored database of your choice.

Going to take the above for a spin here from "soup to nuts" as they say and go end to end with an implementation surrounded by modern powerful tools and the incredible ecosystem of applications from the OHDSI Community.  Will try not to re-hash the docs, neither here or there, and surface some foot guns 👣 🔫 along the way.

Everything Good Starts with a Bucket

When you first provision the service, you may feel immediately that you are in a chicken and egg situation when you get to the creation dialog and prompted for S3 information right out of the gate.   You can fake this best you can and, and update it later or take an approach that is less hurried where you understand how you are provisioning an Amazon S3 Bucket for transformation use.  Its a modern approach implemented in most Cloud based data solutions to share data, where you provision the source location yourself, then grant the service access to interact with it.

  • Provision Bucket and Initial Policy Stack
  • Create the Deployment for the Service
  • Update the Bucket Policy constrained to the Deployment

We can click the console to death , or do this with an example stack.

 
s3-omop-fhir-stack.yaml

Create the stack anyway you want to, one way is to use the aws cli.

aws cloudformation create-stack --stack-name omopfhir --template-body s3-omop-fhir-bucket.yaml --parameters ParameterKey=BucketName,ParameterValue=omop-fhir

Create some initial keys in the bucket to use for provisioning and the source folder for FHIR ingestion.

aws s3api put-object --bucket omop-fhir --key Transactions/in --profile pidtoo
aws s3api put-object --bucket omop-fhir --key termz --profile pidtoo

You should now be setup to provision the service with the following, pay attention to the field asking for the arn, is actually asking for the arn of the bucket despite the description asking for the name... small 👣🔫 here.



After the deployment is created, head over to the "Configurations" navigation item inside the "FHIR to OMOP Pipeline" deployment and grab the policy by Copying it to your clipboard.  You can just follow the directions supplied there, and wedge this into your your current policy or just snag the value of the role and update your stack.

aws cloudformation update-stack --stack-name omopfhir --template-body s3-omop-fhir-bucket.yaml --parameters ParameterKey=PolicyfromOMOPConfiguration,ParameterValue="arn:aws:iam::1234567890:role/skipper-deployment-4a358965ec38ba179ebeeeeeeeeeee-Role"

Either way, you should end up with a policy that looks like this on your source bucket under permissions... (account number, role fuzzed)

 
 Recommended Policy

I used a more open policy that allowed for the opening the root account, but constraining on the buckets.  This way I could support multiple deployments with a single bucket (or multiple buckets).   Not advised I guess, but a second example for reference to support multiple environments in a single policy for IAC purposes.

 
Root Account

That's our source for the transformation, now lets move on to the target, the OMOP Database.


Meet OMOP

Lets take a quick look over to the other deployment "OMOP on IRIS" and meet the Common Data Model.

The OMOP (Observational Medical Outcomes Partnership) database is a monument on how you boil ridiculous complexity to support  multiple sources into a common data model, referred to as the CDM.  Any further explanation outside of the community would be an exercise in cut and paste (or even worse generative content), and the documentation in this community is really, really well done.

Navigating to the "SQL Query Tools" navigation and you can see the InterSystems implementation of the Common Data Model, shown here next to the infamous diagram of OMOP Schema from the OHDSI community.

That's as far as we go with this work of art, let's investigate another option for using the service for transformation purposes only.

BYODB (Bring Your Own Database)

We got a database for free when we provisioned last time, but if we want to target another database, we can surely do that as the service at this time of writing supports transforming to flavors of Postgres as well.  For this we will outline how to wrangle an external database, via Amazon RDS, and connect it to the service.


Compute


I'll throw a flag here and call another 👣🔫 I refer to as "Biggie Smalls" in regards to sizing your database for the service if you bring your own.  InterSystems does a pretty good job of sizing the transform side to the database side, so you will have to follow suit and consider the fact that the speed of your transform performance is dependent on the sql instance you procure to write to, so do so accordingly.   This may be obvious to some, but witnessed it and thought Id call it out, as I went cheap with RDS, Google Cloud SQL et al, and the persistence times of the FHIR Bundles to the OMOP database were impacted.

Having said all that, I do exactly the opposite and give Jeff Bezos the least amount of money possible for the task regardless, with a db.t4g.micro postgres RDS Instance.

We expose it publicly and head over to download the certificate bundle for the corresponding region your database is in... make sure its in .pem format.

Next, however you interact with databases these days, connect to your db instance and create a DATABASE and SCHEMA:




Load OMOP CDM 5.4

Now we get a little help from our friends in the OHDSI Community to provision the supported schema at version 5.4 in RStudio with OMOP Common Data Model schema using OHDSI Tools. 

install.packages("devtools")
devtools::install_github("OHDSI/CommonDataModel")
install.packages("DatabaseConnector")
install.packages("SqlRender")
Sys.setenv("DATABASECONNECTOR_JAR_FOLDER" = "/home/sween/Desktop/OMOP/iris-omop-extdb/jars")
library(DatabaseConnector)
downloadJdbcDrivers("postgresql")

We now have what we need and can connect to our postgres instance and created the tables in the OMOPCDM54 we provisioned above.

Connect

cd <- DatabaseConnector::createConnectionDetails(dbms = "postgresql",
                                                 server = "extrdp-ops.biggie-smalls.us-east-2.rds.amazonaws.com/OMOPCDM54",
                                                 user = "postgres",
                                                 password = "REDACTED",
                                                 pathToDriver = "./jars"
                                                 )


Create

CommonDataModel::executeDdl(connectionDetails = cd,
                            cdmVersion = "5.4",
                            cdmDatabaseSchema = "omopcdm54"
                            )

Barring a "sea of red", it should have executed successfully.



Now lets check out work, we should have an external postgres OMOP database suitable for using with the service.


Configure OMOP Cloud Service

We have the sources, we have the targets, lets configure the service to glue them together to complete the transformation pipeline from FHIR to the external database.


InterSystems OMOP Cloud Service Should be all set!

The OMOP Journey continues...

1 Comment
Discussion (1)2
Log in or sign up to continue
Question
· Feb 18

Using a SQL Server stored procedure in a CSP page

Hi Community, 

I have a problem I am hoping someone can help with - I have created a front-end with HTML/CSS/JS in a CSP page in Iris Studio. I am trying to use objectscript on the back end to connect to a SQL Server Database (with valid credentials), and execute a stored procedure.

I have a fileList variable that is a stored as a comma separated string through a user input textBoxContainer. This is to be used as a parameter in the stored procedure called @Docs

When I run the stored procedure from SSMS and enter the fileList manually on executing, it runs as expected, however when I run from the CSP Page, it doesn't execute. I have put the code snippet below in hopes someone has done this before and can provide an example. For an example fileList, you can assume - fileList = "111,222,333"

 set gc=##class(%SQLGatewayConnection).%New()

set CredentialObj=##Class(Ens.Config.Credentials).%OpenId("DatabaseCred")

 Set pDSN="DB-DSN"

set sc=gc.Connect(Assume DSN and User&Pass Credentials Here,0)

  If $$$ISERR(sc) {
  &js< alert(#(..QuoteJS("DB connection Failed: ", $system.Status.GetErrorText(sc)))#);>
  Quit
  else {
  &js< alert(#(..QuoteJS("Connected To DB"))#);>
  }

 If sc '= 1 {
       &js< alert(#(..QuoteJS("Error executing stored procedure: ", gc.%SQLCODE))#);>
       
    ElseIf scriptName = "procedure1" {
        Set sc = gc.Execute("EXEC ExternalDB.DB.StoredProcName @Docs = ?", fileList)

}

 

Thank in advance. Also, just in case this is relevant, the stored procedure is in one DB and updates the data on a different DB, however, I don't think it would be an issue as it connects to DB as expected from the CSP page, it is just the SP that doesn't work.

Kind Regards,

Dan

1 Comment
Discussion (1)2
Log in or sign up to continue
Announcement
· Feb 18

[Vídeo] FHIR Repository e FHIR SQL Builder

Olá Comunidade, 

Aproveite o novo vídeo do InterSystems Developers YouTube:

⏯ FHIR Repository and FHIR SQL Builder @ Global Summit 2024

Descubra os desafios que o Ministério da Saúde de Israel enfrentou ao implantar o InterSystems FHIR Server e o FHIR SQL Builder para diversas iniciativas nacionais importantes.
 

🗣 Apresentador: @Keren Skubach, Senior Sales Engineer, InterSystems

Expanda seus horizontes conosco — assista, aprenda e assine para mais! 👍

Discussion (0)1
Log in or sign up to continue
Question
· Feb 18

Apache server .../temp/ does not exist, limiting Gateway functionality

I am using an Apache webserver on RH8, which is working fine. However, I get the following message:

Directory /opt/webgateway/conf/temp/ does not exist or has incorrect permissions. This will limit the Web Gateway's functionality.

The folder is indeed missing, but in what way is it limiting functionality?

3 Comments
Discussion (3)2
Log in or sign up to continue
Article
· Feb 18 4m read

How to shoot a good video for the article contest bonus - Part 2 How to film yourself

Hello Community:

Do you want to know how to record yourself without looking like you're speaking from a cave? Are you one of those who say you ‘don't come off well on camera’? 

Today I'm going to share with you some specific tips that I learned after several years of filming interviews for television and networks. I remind you that these are tips in case you are thinking of taking advantage of the Article Contest video bonus. However, they are tips that I'm sure you can use for presenting webinars, video calls and filming yourself in general.

WHY ADD YOUR CAMERA TO THE TUTORIAL

It doesn't have to be during the whole video, but people like to see faces. It humanises us. There are numerous studies that talk about the positive impact of smiles, eyes and how much they influence the communication of a message. When a face tells us something, we pay more attention, we remember better and we understand better what we are being told.

As this is a tutorial, it is not necessary for it to appear at all times, perhaps at the beginning and at the end; but we will deal with that in the next article. 

LIGHT IS YOUR FRIEND

Whether you have a thousand euro camera, or a webcam that you got with the cereal, they will always work better with natural light. Try to rely on natural light. Even more so if you have a blind that filters the light. Light can be hard (direct sunlight) or soft (when filtered by clouds). Soft light gives a cleaner feel, creates fewer shadows and will evenly illuminate your face.

The first time I went to shoot an interview on my own, I was very lucky. The day was a bit cloudy, we were indoors and we were right next to the window. The make-up of the person to be filmed shone brilliantly and it was a very clean image. Try to take advantage of natural light when filming... but be careful not to get hard light directly in your eyes. It will make you wink your eyes like a beach patrolman looking for sharks.

Tip for the pros: if you're filming at night and you have a powerful spotlight shining in your face like the influencers do, try to create a scene with several points of light. Look for a corner (you will now read the next point) and put a small lamp in the background. That is to say: you have your face well lit and then in the background a small point of light coming from a lamp. This is called backlighting. It serves to separate the subject from the background. This is for the pros, for those who want to do it basic, just try to light your face with a main light that is not too hard, and if it is natural, the better. 

HOW TO FIND A GOOD FRAME

Here we could talk about different concepts that you may be familiar with. Tilt of the camera, air (empty space around the subject in a video), depth...

I recommend you to keep it simple.

Use a tripod/stand. Put the camera at eye level. Don't go super crazy at this point. Try to be centred, so that there is a more or less balanced air on the sides (not too far to the right or left, although obviously you will be moving as you speak). 

But above all, try to keep it clean. There should not be too much noise or distractions (for example, a bookshelf at the back full of cables or unplaced books). A background is fine, it doesn't have to be a white background. Here's what my ‘instructor’ used to tell me when I was filming interviews:

We used to shoot every day in a spot, so he always told me: "look for a natural light source and then try to place the subject with a corner in the background." The corner gives depth, but be careful that whatever is behind is discreet. It's in the background (we even used to blur it). This way we found the best set within a room.  

A good framing should be clean, balanced. This gives a sense of professionalism. Please, horizons must be straight! The first thing I see in a professional photo is to have a non-straight horizon. Of course photographers use diagonal framing on occasion, but it is very noticeable when it is an intended resource and when the camera is simply crooked because we have used the first thing we have found to hold it. 

TAKE CARE OF THE SHOT

A piece of advice: try not to let extraneous elements appear. Don't let things get in the background, don't let the desk be cluttered, etc. I'm sure you had this tip in mind.

SOUND

It's hard to believe, but this is important. You don't need to have a studio recording mastered by a professional. Just keep it in mind and don't put the washing machine on at the same time. Yes, I have had problems with sound pick-up on recordings, and it is very annoying. It has been my responsibility and I say to you: it is better to re-record at the moment than to hope that it will not be noticed in the editing. 

THE LOOK

In a tutorial we look at the camera, but not in an interview. Obviously if you record yourself doing the process live, you will be directing your gaze at the screen, but at some point (especially at the beginning and at the end) look at the camera.

Funfact: in interviews you don't look at the camera. Normally you look at the editor, sitting just to one side of the camera. 

One last piece of advice: practice scripting. Have a mental outline. You don't need to repeat or read word for word, it doesn't come naturally. Just an outline of what you are going to say. 

These are just tips. I'm sure your creativity or needs will make you adapt to your situation. That's wonderful. I hope you find them useful and soon you will have the (I think) last tutorial: short tips for good editing. 

THANK YOU! For reading me. I love reading you (and a special greeting to the English community, good luck in your contest).

Discussion (0)1
Log in or sign up to continue