Skip navigation

This Question is Answered (go to answer)

5,252 Views 12 Replies Last post: Nov 30, 2009 5:51 PM by ehrchitect RSS
ehrchitect Contributor 7 posts since
Jun 2, 2009
Currently Being Moderated

Nov 27, 2009 5:46 PM

How to properly create a Mono AddIn? (Need working example)

Hi, I'm looking for some help in getting the example in Extending OpenVista CIS working, as in the link below, as it doesn't load as an IApplicationTab in my version of OpenVista-CIS. Does anybody have any idea on how to make this work? https://medsphere.org/community/project/ovid/blog/2009/11/25/announcing-openvista-rest I'm also looking for examples of using the RPC Broker in C# or calling OVID/Contineo API in C#. I'm willing to work on this, but need a starting example. Thanks, Brian Armstrong Victoria, BC CANADA

Andy Pardue Medspherian 159 posts since
Sep 11, 2008
Currently Being Moderated
1. Nov 30, 2009 7:13 AM in response to: ehrchitect
Re: How to properly create a Mono AddIn? (Need working example)

Hello Brian,

 

I don't have much help for your mono-addin problem (but I'm sure someone will chime in soon) but I can speak to accessing OpenVista with C#.  First, since you've been looking at the CIS code, you've probably already seen that CIS has a fairly robust method of wrappign and calling RPCs via RPCBroker in native C#.  That might meet your needs.  Also, we find ourselves using web services backed by OVID to access OpenVista data with C# clients.  OVID is a java layer that can be used to build a domain interface for an application and we've had success wrapping the domain layer with web services (e.g. wsdl), which makes them very easy to consume with non-Java clients, like C#.  You can find a document about this at https://medsphere.org/docs/DOC-1513.  Once the web service is coded and deployed, tools like Visual Studio make it really easy to access these services.  This web service structure is different than OpenVista REST in that it is a SOAP based interface and OpenVIsta REST is, of course, RESTful.  If you want to use OVRest, then you'd need to write your own HTTP interface for communication, marshalling the XML requests and responses into usable structures.  Its a matter of taste.

 

Hope this helps,

 

Andy

César Natarén Medspherian 45 posts since
Aug 19, 2008
Currently Being Moderated
2. Nov 30, 2009 9:10 AM in response to: ehrchitect
Re: How to properly create a Mono AddIn? (Need working example)

Hi ehrchitect:

 

What's the problem you're having with the example on how to extend CIS in the article https://medsphere.org/community/project/openvista-cis/blog/2009/05/05/extending-openvista-cis ? It seems like you're going beyond what that article explains, so that you can use Ovid. Could you please post stack traces or any other info that gives me a better understanding of what you're trying to do and how you're trying to do it so we can figure out a way to resolve your problem.

César Natarén Medspherian 45 posts since
Aug 19, 2008
Currently Being Moderated
5. Nov 30, 2009 11:16 AM in response to: ehrchitect
Re: How to properly create a Mono AddIn? (Need working example)

Hi ehrchitec:

 

I ran the sample code from the zip file in the https://medsphere.org/community/project/openvista-cis/blog/2009/05/05/extending-openvista-cis article and it worked just fine (I did everything on Linux, it should be no different if you're on Windows except for step 5 and 6). Here's what I did:

 

1) Download openvista-cis-plugin-example.zip file from the article.

2) Unzip it. It should create a folder named openvista-cis-plugin-example, and it should contain the files AssemblyInfo.cs and HelloWorldSheet.cs

3) Download the OpenVistaCIS Binaries zip file from https://medsphere.org/download/project/openvista-cis

4) Unzip it inside the openvista-cis-plugin-example folder.

5) If you have gmcs installed, the following command line should work: gmcs -r:Mono.Addins.dll -r:Medsphere.OpenVista.Core.UI.dll -pkg:gtk-sharp-2.0  -t:library -out:Medsphere.OpenVista.CIS.Demo.dll HelloWorldSheet.cs AssemblyInfo.cs

6) Run CIS with: mono OpenVistaCIS.exe

7) The Login dialog should appear, enter the credentials for the public openvista server, and once you're logged in you should see the new tab in there.

 

Let me know if something does not work.

Andy Pardue Medspherian 159 posts since
Sep 11, 2008
Currently Being Moderated
7. Nov 30, 2009 2:06 PM in response to: ehrchitect
Re: How to properly create a Mono AddIn? (Need working example)

Right now, our domain model doesn't have everything in it that you are talking about (e.g. adding a patient) but can be extended to do that.  Once the ovid-domain model has the functionality, its pretty easy to expose that in a REST or SOAP-based web service (as you saw in the demo-service).  So, once either ovid-domain or related project like OV Rest gets some valuable functionality, we'd collect that into the mainline of the ovid-domain model so that it is easily available to everyone.  Further, we're working on making the ovid-domain model more extensible (thanks to suggestions from Mike Hunnycutt)  so that you can more easily create you own Patient object that extends the ovid-domain Patient object.  Anyway, in short, we're building up our domain model as we go along so feel free to suggest functionality that is needed or contribute missing functionality.  The best way to document needed functionality in ovid would be to use the bug tracker in launchpad:  https://bugs.launchpad.net/ovid

César Natarén Medspherian 45 posts since
Aug 19, 2008
Currently Being Moderated
8. Nov 30, 2009 2:45 PM in response to: ehrchitect
Re: How to properly create a Mono AddIn? (Need working example)

Oh, on Windows7, we have not tested OpenVistaCIS in that OS. Just to double check, Does OpenVistaCIS that is unmodified but built on VS.NET 2k8 run and work fine?

César Natarén Medspherian 45 posts since
Aug 19, 2008
Currently Being Moderated
11. Nov 30, 2009 5:13 PM in response to: ehrchitect
Re: How to properly create a Mono AddIn? (Need working example)

Hi ehrchitec:

 

The solution files are generated automatically from our Makefiles using XSLT, so setting the 'output' directory is one of those things that scapped us from doing (probably because all of us develop on Linux or is not possible to set that value in the XML but in a binary blob that we can not generate) it the right way for the VS.NET solution files. If you know how to do it from VS.NET, please do it and let us know what part of the solution file gets generated, or if you just post the full updated solution file probably we can work on integrate it on our Makefiles so that it gets generated automatically that way. On Linux we dump everything to the folders build/output/cis, build/output/vitals, and build/output/tests.

 

> Are there examples on how to extend the menus and context/right-click menus?

 

Yeah, all the tabs do it, check:

 

 

src/OpenVistaCIS/src/gui/orders/OrderSheet.cs for example. Basically any class that implements IApplicationTab in the OpenVistaCIS source code.

 

 

Run the application, log-in, select a patient, and inspect how primarily the Actions and Options (the other menus also change but less so) menus's content change  as you switch between tab. Of particular interest for you is the 'public ActionGroup[] Actions' property.

 

The general idea on how to use the UIManager is explained here:

 

http://www.mono-project.com/GtkSharpNewInVersion2x#Actions_and_UIManager

 

and a full example from the Gtk# source code here: http://anonsvn.mono-project.com/viewvc/trunk/gtk-sharp/sample/Actions.cs?revision=97023&view=markup

More Like This

  • Retrieving data ...

Bookmarked By (0)