RadLex API

From MircWiki
Revision as of 22:39, 25 February 2007 by Johnpaulett (talk | contribs) (midstream of major revision for API v2)
Jump to navigation Jump to search

Warning: This documentation is currently being updated to reflect version 2 of the servlet.

The RadLex API acts as a webservice, which allows developers to query the RadLex terminology and retrieve an XML response.

Methods

search

URL: http://radlex.org/search

Parameters:

  • query - string to search for in the database

Return: See notes below. <terms> structure.

Notes: Performs a search on the database for the query' term or phrase.

  • If the query matches "^RID([0-9]+)$", a search for that radlexID is performed, which should yield 0 or 1 results. If 1 result is found, the search exits and returns that one value.
  • If the query has fewer than 4 characters, the database is queried via several LIKE statements. The 4 character minimum is a result of MySQL's Fulltext Search default limit. The query will return all, if any, matches and exit the search.
  • If the search has not already been exited, a MySQL Fulltext Search will be initiated on the database. This is the preferred method, as it uses MySQL's native natural language search (MySQL Documentation).


getTermByID

URL: http://radlex.org/getTermByID

Parameters:

  • radlexID - the RadLex ID to obtain in the form "^RID([0-9]+)$"

Return: #<term> structure.

Notes: Obtains all information pertaining to the radlexID in the terminology.

Return Structures

As a convention for this API, elements preceeded by a dollar sign ($) are variable content.

<term>

<terms>

<children>

<relationTypes>

<error>

For a more detailed discussion of error messages, see below.

<program>
   <error id="$errorid">$errormessage</error>
</program>

Errors

Examples