REMITT XML-RPC Protocol v0.2

From FreemedDeveloperWiki, the FreeMED developers' Wiki.

Jump to: navigation, search

REMITT uses XML-RPC as its primary interface with FreeMED and other practice management systems. It uses the idea of "sessions", by allowing an unauthenticated login method followed by XML-RPC calls using basic authentication.

Contents

XML-RPC Methods

Remitt.Interface.Execute

Execute Render/Translation/Transport series.

Parameters:

  • $input - Input document
  • $render - Name of rendering plugin
  • $renderoption - Name of rendering plugin option
  • $transport - Name of transport plugin

Returns:

Output from transport plugin if used from the command line interface (CLI), or a unique identifier used to get the actual output from Remitt.Interface.GetStatus.

Example:

$x = Remitt.Interface.Execute($xml, 'XSLT', '837p', 'Text');

Remitt.Interface.FileList

Get list of available files.

Parameters:

  • $category - Category of file under the current user.
  • $criteria - Criteria to narrow by (year, etc)
  • $value - Value to narrow by

Returns:

Array of files found for the current user and category criteria.

Remitt.Interface.GetFile

Retrieve the contents of a file stored in the REMITT spool. This must be executed by a logged in user.

Parameters:

  • $category - Name of the category that the file is in
  • $file - Name of the file

Returns:

Contents of the specified file, or NULL if there is an error.

Remitt.Interface.GetStatus

Get status of job identified by unique identifier, as returned by Remitt.Interface.Execute. This method is not used by the command line interface (CLI) because it does not store state files.

Parameters:

  • $unique - Unique id key to query about

Returns:

Mixed; -1 if incomplete, or the actual contents of the unique identifier status file (usually a file name), or -2 if there is a parameter error.

Remitt.Interface.GetOutputMonths

Get list of available months of output for a particular year.

Parameters:

  • $year - Target year

Returns:

Array of month stamps (YYYY-MM).

Remitt.Interface.GetOutputYears

Get list of available years of output

Returns:

Array of years.

Remitt.Interface.ListOptions

Get list of options for a particular plugin.

Parameters:

  • $type - Plugin type (Render, Translation, Transport, etc)
  • $plugin - Plugin name
  • $option - (optional) Option to pass to Config method. This is used to qualify the list of options, used primarily to qualify the XSLT stylesheets based on the format of XML they use.

Returns:

Struct of arrays containing options and information, or empty structure if there are no options.

Remitt.Interface.ListPlugins

Get list of plugins for a particular type

Parameters:

  • $type - Plugin type (Render, Translation, Transport, etc)

Returns:

Array of plugins for the specified type.

Remitt.Interface.SystemLogin

Start a Remitt session. This function requires no authentication.

Parameters:

  • $username - Username for this account
  • $password - Password for this account

Returns: Struct containing

  • sessionid - Id of session, used as username in basic authentication
  • key - Secret key, used as password in basic authentication

Remitt.Interface.SystemLogout

End a Remitt "session". This should only be used when transient data does not need to be kept on the Remitt server. This function requires authentication.

Remitt.Interface.ProtocolVersion

Get the current version of the Remitt protocol being used.

Returns: Version of the Remitt protocol.

REMITT stands for "REMITT Electronic Medical Record Translation and Transmission", and is a recursive acronym. It is build primarily in Perl, but uses XSLT for all formatting and processing logic. The engine could theoretically be coded in any language, but Perl was chosen for speed of implementation.

Links

Personal tools
Navigation