Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 761c4f285d3afa353219933c4b5717e0 > files > 102

gnumed-doc-1.2.9-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
	<title> GmManualXmlRpcApi &lt; Gnumed &lt; Foswiki</title>
		  
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRss.html" />
	<link rel="icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" />
	<link rel="alternate" href="http://wiki.gnumed.de/bin/edit/Gnumed/GmManualXmlRpcApi?t=1362919420" type="application/x-wiki" title="edit GmManualXmlRpcApi" />
	<meta name="description" content="GmManualXmlRpcApi" />
	 <!--[if IE]></base><![endif]-->
	
	<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/base.css');
</style>
<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/default.css');
</style>
<!--[if IE]><style type="text/css" media="screen">
pre {
	overflow-x:auto;
	padding-bottom:expression(this.scrollWidth > this.offsetWidth ? 16 : 0);
}
</style>
<![endif]-->

<meta name="foswiki.PUBURL" content="http://wiki.gnumed.de/pub" /> <!-- PUBURL -->
<meta name="foswiki.PUBURLPATH" content="/pub" /> <!-- PUBURLPATH -->
<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
<meta name="foswiki.SCRIPTURL" content="http://wiki.gnumed.de/bin" /> <!-- SCRIPTURL -->
<meta name="foswiki.SCRIPTURLPATH" content="/bin" /> <!-- SCRIPTURLPATH -->
<meta name="foswiki.SERVERTIME" content="10%20Mar%202013%20-%2013:43" /> <!-- SERVERTIME -->
<meta name="foswiki.SKIN" content="twikinet%2c%20pattern" /> <!-- SKIN -->
<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
<meta name="foswiki.TOPIC" content="GmManualXmlRpcApi" /> <!-- TOPIC -->
<meta name="foswiki.USERNAME" content="KarstenHilbert" /> <!-- USERNAME -->
<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
<meta name="foswiki.WEB" content="Gnumed" /> <!-- WEB -->
<meta name="foswiki.WIKINAME" content="KarstenHilbert" /> <!-- WIKINAME -->
<meta name="foswiki.WIKIUSERNAME" content="Main.KarstenHilbert" /> <!-- WIKIUSERNAME -->
<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/livequery/jquery.livequery.js'></script><!--JQUERYPLUGIN::LIVEQUERY-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js'></script><!--JQUERYPLUGIN::FOSWIKI-->
<script type='text/javascript' src='../rsrc/System/JSTreeContrib/jquery.jstree.js'></script><!--JQUERYPLUGIN::JSTREE-->
</head>
<body class=""><div class="foswikiPage">
<a name="PageTop"></a> 
<p></p>
<p></p>
<h1><a name="Remote_control_of_a_GNUmed_client_aka_slave_mode"></a>  Remote control of a GNUmed client aka <em>slave mode</em> </h1>
<p></p>
The GNUmed client features an XML-RPC API which allows other software to connect to a running client and telling it to perform certain tasks. This is called <em>slave mode</em>. One advantage over starting a GNUmed client on demand is that startup time and authentication need only be done once.
<p></p>
Many 3rd party legacy applications will be unavailable in source code and thus will not be able to acquire the ability to directly use the XML-RPC API. For such cases there is also the <code>gm_ctl_client.py</code> helper which maps the XML-RPC API to a combination of command line options and configuration file settings. As it is written in Python, too, it is easily extendable. Thus, any application which can call other applications can sort of remote-control GNUmed.
<p></p>
In slave mode each remotely controlled client needs to assume a distinct "personality" so that connecting controllers can differentiate between clients suitable and unsuitable for them.
<p></p>
<h2><a name="GNUmed_configuration"></a>  GNUmed configuration </h2>
<p></p>
<h3><a name="The_client"></a>  The client </h3>
<p></p>
<h4><a name="Configuration"></a>  Configuration </h4>
<p></p>
Let's assume we want GNUmed to display the document list for any given patient. So we give this client the personality <em>doc-viewer</em>.
<p></p>
In the configuration file (either of <code>--conf-file</code>, <code>~/.gnumed/gnumed.conf</code>, or <code>./gnumed.conf</code>) the following parameters must be set:
<p></p> <ul>
<li> <em>slave personality = doc-viewer</em>
</li> <li> <em>xml-rpc port = 9999</em> <ul>
<li> this is the default even if this option is not set
</li> <li> any other free port can be used, adivsably above 1024
</li></ul> 
</li></ul> 
<p></p>
<h4><a name="Startup"></a>  Startup </h4>
<p></p>
In the login dialog it is possible to activate/deactivate slave mode via a checkbox. For regular use it is advisable to setup a shell skript or batch file which invokes <code>gnumed.py</code> along with the parameter <code>--slave</code> which pre-sets the appropriate checkbox.
<p></p>
The user will have to login as always. Observe the <em>slave mode</em> moniker in the title bar of the GNUmed window. GNUmed is then listening for incoming requests. Note that it will be impossible to switch to another patient from within the GNUmed client under control.
<p></p>
If GNUmed should be unable to free the port it is listening on (such as because of a crash) the port will stay open (blocked) for a certain short amount of time (dependant upon a timeout setting in the TCP/IP socket subsystem of your operating system kernel). Either retry connecting after a short while or configure GNUmed to listen on another port.
<p></p>
<h3><a name="The_controller"></a>  The controller </h3>
<p></p>
The helper script <code>gm_ctl_client.py</code> exposes a command line interface combined with some configuration file settings to allow controlling a GNUmed client instance.
<p></p>
The configuration file is passed via the command line parameter <code>--conf-file</code> which is further described <a href="GmManualConfigFiles.html">here</a>. It must be set up like this:
<pre>
&#91;GNUmed instance]

# same port as in gnumed.conf (see above)
port &#61; 9999

# see gnumed.conf
personality &#61; doc-viewer

# the following command is used to start a GNUmed client if none is found
# to be running, you might want to write a shell script or batch
# file to simplify this option,
# on Debian GNU/Linux it may boil down to simply &#34;gnumed --slave&#34;,
# in other cases you might start with the very command you normally
# start GNUmed with but append &#34;--slave&#34;
startup command &#61; &#60;put self contained one liner for gnumed client startup here&#62;

&#91;script]
# show the documents plugin
target plugin &#61; gmShowMedDocs
</pre>
<p></p>
If you want to extend <code>gm_ctl_client.py</code> take a look <a href="http://cvs.savannah.gnu.org/viewvc/gnumed/gnumed/client/wxpython/gmMacro.py?root=gnumed&amp;view=markup" target="_top">here</a> to find out what's possible to do on the XML-RPC connection.
<p></p>
<h2><a name="A_3rd_party_application_configuration"></a>  3rd party application configuration </h2>
<p></p>
The application (such as your legacy practice management system) you want to to control GNUmed from will need some configuration as well. For that please refer to the <a href="LegacyAppConfiguration.html">appropriate section</a> for your software.
<p></p>
In essence, your application needs to:
<p></p> <ul>
<li> export the current patient in xDT format <ul>
<li> only needed if you want GNUmed to <a href="GmManualExternalPatientImport.html">import that patient</a>
</li></ul> 
</li> <li> call <code>gm_ctl_client.py --conf-file=control-gnumed.conf</code>
</li></ul> 
<p></p>
That should be it !
<p></p>
<a name="TopicEnd"></a>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body></html>