SMART Container


(Zoran Polic) #1

I am trying to add SMART Container to OpenMRS. No dependencies are shown at https://addons.openmrs.org/show/org.openmrs.module.smartcontainer. However, my previously running OpenMRS fails to start with addition of this module. I tried adding additional modules fhir-1.13.0.omod andoauth2-0.8.omod but it’s still failing with the same warning message: WARN - Module.expandExtensionNames(575) |2018-11-26 12:22:29,522| smartcontainer: Unable to find class definition for extension: org.openmrs.patientDashboardTab

Here is what I have in .OpenMRS/modules: addresshierarchy-2.11.0.omod adminui-1.2.3.omod allergyui-1.8.1.omod appframework-2.11.0.omod appointmentscheduling-1.9.0.omod appointmentschedulingui-1.7.0.omod appui-1.8.0.omod atlas-2.2.omod calculation-1.2.omod chartsearch-2.1.0.omod coreapps-1.19.0.omod dataexchange-1.3.2.omod emrapi-1.24.4.omod event-2.6.0.omod fhir-1.13.0.omod formentryapp-1.4.2.omod htmlformentry-3.7.0.omod htmlformentryui-1.7.0.omod htmlwidgets-1.9.0.omod idgen-4.5.0.omod legacyui-1.4.0.omod metadatadeploy-1.10.0.omod metadatamapping-1.3.4.omod metadatasharing-1.5.0.omod oauth2-0.8.omod owa-1.9.0.omod providermanagement-2.10.0.omod referenceapplication-2.8.0.omod referencedemodata-1.4.4.omod referencemetadata-2.8.0.omod registrationapp-1.12.0.omod registrationcore-1.8.0.omod reporting-1.16.0.omod reportingcompatibility-2.0.5.omod reportingrest-1.10.0.omod reportingui-1.6.0.omod serialization.xstream-0.2.14.omod smartcontainer-1.0.0.omod uicommons-2.6.0.omod uiframework-3.13.0.omod uilibrary-2.0.6.omod webservices.rest-2.22.0.omod


(Daniel Kayiwa) #2

Can you share the server log at pastebin.com?


(Zoran Polic) #3

Here is the server log with added fhir-1.13.0.omod andoauth2-0.8.omod https://github.com/zoranpolic/server-log/blob/master/w2omods.txt


(Zoran Polic) #4

I read through https://issues.openmrs.org/browse/SMART-48 and I saw your and @wyclif comments. Optum wants its app(s) to be integrated using iFrame of OpenMRS using SMART on FHIR. As you might remember I asked you about this earlier, then we were just looking into demo, now we are looking into real SMART on FHIR integration. @wyclif says that Smart Container is no longer needed for SMART on FHIR if the app is not hosted in OpenMRS. If done like that, would it show on Patient Dashboard in iFrame?


(Wyclif Luyima) #5

I don’t think I said that, what I said is that the module was written based on an old SMART specification, they changed to SMART on FHIR which should be supported and it would require major changes to adopt it.


(Zoran Polic) #6

Thanks @wyclif. So, @dkayiwa and @wyclif, for integrating our SMART on FHIR app with OpenMRS in such way that our app button shows at right upper section when a patient is selected by a clinician and if clicked, our app shows in iframe on right side - is SMART container the way to go? Is there another way?


(Daniel Kayiwa) #7

What is your app doing? Is it something you can directly do in an OpenMRS module such that you take advantage of extension points?


(Zoran Polic) #8

@dkayiwa My app is a hypothetical one as there are many ideas floating around from data aggregation, analysis tools, etc. I should rephrase my question - Is OpenMRS supporting integration with SMART on FHIR web apps which would appear in its iframe when a patient is selected? If so, what modules are necessary for that?


(Daniel Kayiwa) #9

@zpolic oh i see! We do not have complete support for SMART on FHIR. Though we already have some of the building blocks in place, we need to do some more work to provide the complete functionality that a SMART on FHIR app would need. Is this something that you would be interested in contributing to OpenMRS?


(Zoran Polic) #10

Thank you for your straight answer. To answer your question - I don’t know yet. Our team lead had suggested contributing to OpenMRS in this way the other day. Let me talk to him tomorrow and I will get back to you on that.r


(Daniel Kayiwa) #11

Anxiously looking forward to the response! :slight_smile:


(Brian Foxx) #12

I’m a tech lead working with Zoran. I’m confused about the smart on fhir support in OpenMRS. I looked at this video https://www.youtube.com/watch?v=WYz5ykLTOos from this page on GSOC 2017 - OAuth Module and FHIR SMART Apps integration - Final Presentation. It looks like someone has implemented this already. Do you know anything about this? Thanks a lot.


(Sanatt Abrol) #13

Hi @bfoxx28 The OAuth2 module is what you are looking for.

We can run SMART on FHIR apps using this. Head over to https://wiki.openmrs.org/display/projects/OpenMRS+-+OAuth2+Module to know more about the module.

We have tested these SMART apps already with the module, see https://github.com/PKatGITHUB/SMART-with-OpenMRS

To see GSoC 2018’s work on SOF see GSoC 2018 - OAuth module enhancements and SMART apps support - Final Presentation

If you face any issues feel free to contact me (@mavrk) or @pkatopenmrs


(Brian Foxx) #14

Thanks a lot !!!


(Sanatt Abrol) #15

Also, I’d recommend running the module in a bare bones setup (legacy, fhir, webservices-rest modules) and add the modules you need along the way. While we have tested OAuth2 on the latest versions of RefApp, it’s incompatible with some other modules and you’ll get a ton of Bean creation errors.

OAuth 2 works fine with these modules.


(Brian Foxx) #16

Thanks for that tip. We’ve been trying to get OpenMRS to work with a lot of different modules and we’ve run into this issue multiple times. I don’t know enough about the underlying mechanism for how the modules work but it would be great to have some sort of dependency management system that could mitigate some of these issues.


(Brian Foxx) #17

Also do you know if there is a repo somewhere that has all of the dependencies from pastebin already loaded. If not I’m going to have to find them one by one based on the version. Thanks so much.


(Sanatt Abrol) #18

Unfortunately, there wasn’t one. I’ve uploaded these libraries from my own test bench https://github.com/mavrk/oauth2-testbench-modules :slight_smile:


(Brian Foxx) #19

Thanks a lot. Really appreciate that.


(Brian Foxx) #20

One other question. What version of openers are you using to run it?