Electronic Medical Record Interchange (EMRi)
Home About Links Model Project Page

The Model

The EMRi system model is currently composed of a central authentication and indexing service, which can (and should be) distributed among several unrelated servers, coupled with a peer-to-peer information request scheme and the ability to concurrently version EMR information.
A host initially connecting to the EMRi service would follow the following procedure:
  1. Check their username/password pair with the un-authenticated server routines. All EMRi methods besides this initial method are authenticated by HTTP basic authentication, with the username and the MD5 hash of the password being sent as part of this authentication method. (During the testing phases, standard HTTP may be used, but for permanent/production use purposes, only strong SSL HTTP (HTTPS) will be used.)
  2. Flag that the username/password pair works (with a true response), or doesn't work (with an error code), then force the system administrator to re-specify a username/password pair if it failed.
  3. Call the EMRi.host.register method to let the EMRi index know that this host is currently online and what their IP address and EMRi URL are.
  4. Versioning/indexing updates should be sent via the EMRi method, as a large array. All offline updates (which have been made to the system while it was not connected to the EMRi system) should be sent at this time. This does not cover all changes; only changes in the versioning information should be reported at this time.
A URL scheme like emri://object=facility/fqdn=myhospital.co.us?full would allow access to portions of the objects, and would allow them to be stored in databases for easy retrieval from other systems. (For example, if you needed to keep a record of a referring physician/provider, you wouldn't want to keep their information local on your machine, so EMRi would make any portion of the information accessable through a URL which could be stored anywhere in the world.)

The topology model is still in progress. Please be patient.

API

This is *VERY* incomplete, and is in the process of being updated, so bear with us for the next short while.
	EMRi.authentication methods
	(EMRi authentication services only)

	integer EMRi.authentication.user ( user, password )
		parameters: user name (user@FQDN), password hash (MD5)
		returns: 0 if access is denied, or else flags determining privileges.

	EMRi.host methods
	(for indexing of hosts by the EMRi server)
	
	integer EMRi.host.register ( fqdn, ip, url )
		parameters: (string) fqdn, (string) ip address, (string) url of EMRi service provider
		returns: 0 if successful or an EMRi error code if it fails

	EMRi.request methods
	(for peer-to-peer communication between EMRi machines)

	string EMRi.request.emr ( pid, emr_type )
		parameters: patient id (pid), emr request type (see EMR type table)
		returns: NULL if request denied, or else XML representation of the electronic medical record

	EMRi.information methods

	string EMRi.information.hostname ( )
		parameters: NONE
		returns: fully qualified domain name that this installation uses

	string EMRi.information.version ( )
		parameters: NONE
		returns: the version of the EMRi protocol being used
	

Authentication Flags
Flag Macro Value Description
EMRI_AUTH_ADMIN This EMRi user is a site administrator, and therefore has access to the site administration API.
EMRI_AUTH_BASIC 1 Basic access to the system for non-medical data retrieval.
EMRI_AUTH_RX 2 Access is granted to check prescription functions only. This should be used by pharmacies.
EMRI_AUTH_NONE 0 Indicates that access to the EMRi system is denied for no specific reason. Should be used for access denials. Username nonexistant and password incorrect are handled by other responses.
EMRI_AUTH_ERROR_USER -1 Indicates that access to the EMRi system is denied due to a nonexistant user.
EMRI_AUTH_ERROR_PASSWORD -2 Indicates that access to the EMRi system is denied due to an incorrect password.
EMRI_AUTH_ERROR_SERVICE -3 Indicates that access to the EMRi system is denied due to a service outage.

Please pardon our appearance, as this page is currently under construction.

© 2001 under the GNU Lesser Public License (LGPL) Pages by Jeff