REMITT Transport Redesign

From FreemedDeveloperWiki, the FreeMED developers' Wiki.

Transports are the plugins which REMITT uses to communicate with clearinghouses and perform other post-transformation processes.

Contents

Basic Transport Structure

package REMITT::Plugin::Transport::Foo;

sub Transport {
     my ( $input ) = @_;
     # Perform transport functions here
     return "file name to report generated";
}

sub Poll {
     my ( $username ) = @_;
     # Poll for results, store them if they exist, return true or false
     # depending on whether there are any results.
     return 0;
}

sub Config {
     return +{
          'InputFormat' => [ 'text', 'x12' ]
     }
}

sub test {
     # Perform regression tests here
}

1;

Creating a Transport

Setting up Config

Config is set. like all REMITT plugins, to return a hash containing the appropriate configuration information for the current plugin. The most important config value is "InputFormat", which specifies an array of acceptable formatting types which it can accept. This allows REMITT to choose the appropriate Translation layer plugin.

Creating Transport

The Transport method is the meat of a REMITT Transport plugin. It performs the operations necessary to post data to the appropriate place. It takes the output from the Translation layer as a single argument, which is then used to perform the operation, and returns the file name of a file containing the data to be returned to the calling application.

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

Navigation