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
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
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.
Hi César,
I'm not trying to integrate OVID with the AddIn. I should have started another thread for the OVID discussion. My problem is with the AddIn, as compiled it doesn't show the new tab in the interface. There are no errors displayed, somehow I think it is no seeing/loading my AddIn DLL.
Thanks,
Brian
Hi Andy,
Thanks for your reply. I did see this post and had previously downloaded the demo-service code, and it helped understand what was happening. What I am trying to do is use the interface to add patients and other data to a patient's chart. In the demo-service the querying of the data is helpful but it doesn't give me the ability to add data.
The RESTful interface provided by Contineo has the promise of being able to add patients and other data, but I was kind of hoping to do this all in C#, whereas the Contineo solution is in Java.
Cheers,
Brian
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.
The method you explained does work, thank you.
I guess the problem then remains is why does it break when I recompile the source code of CIS? I am using Visual Studio 2008 and so am using the project OpenVista2k8 to compile from. I then do a Rebuild All to recompile all projects in this Solution. It compiles without error. I also built my original HelloWorld IApplicationTab in VS2008 and no errors there either.
I then copy the OpenVistaCIS.exe and all DLLs to a folder, including GTK, and try to run the application, I get a couple of errors regarding the Widgets, and then a login box, the login box processes the login and the application never loads, but shows as hanging in Task Manager.
The OS is Windows 7 32-bit. If I copy it to Windows Server 2008 R2, and also to Windows Server 2003 (the available OSs I have) the same problem arises. Perhaps it would be good to have the OpenVista2k8 solution redirect its output path for all projects and dependencies to a runtime directory which would assist the testing and developing stages. I think it is here where my problem is surfacing.
Thanks again,
Brian
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
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?
Hi César,
Yes it compiles cleanly. I just dumped the build I was testing with, then unzipped the source again, opened it cleanly from VS2008 and recompiled the solution and ran it without error. I then tried copying the AddIn DLL to the directory where the OpenVistaCIS.exe resides and tried running from there, but the AddIn didn't load. I just tried staticly loading the Hello World AddIn DLL into the References of OpenVista2k8a and the AddIn loaded.
I just now figured out the issue. The build path for the OpenVistaCIS is the root directory of the project. At least I now know where the actual EXE and DLLs are going. I will remap this to another folder. Is the reason for this because it is easier when compiling with Mono?
At least I now know what I can do. Thanks.
Are there examples on how to extend the menus and context/right-click menus?
Thanks again,
Brian
Hi Andy,
Thanks for the info. I will head over to Launchpad and contribute my thoughts/suggestions on functionality.
I appreciate the quick thoughts from you and Cesar, as it helps me to be a bit more productive in this space. Once I feel my way around the OpenVista model my questions/suggestions/assistance will take on a more fruitful angle.
Cheers,
Brian
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
Great information, thanks!
I found this interesting blog entry about how to change Visual Studio's default output directories by modifying VS templates, http://geekswithblogs.net/jolson/archive/2003/11/20/660.aspx.
I will look into the sections you mention.
Brian