|
|
| (10 intermediate revisions by 4 users not shown) |
| Line 1: |
Line 1: |
| '''Warning: This documentation is currently being updated to reflect version 2 of the servlet.'''
| | [http://radlexwiki.rsna.org/index.php?title=RadLex_API RadLex Wiki] |
| | |
| The RadLex API acts as a webservice, which allows developers to query the RadLex terminology and retrieve an XML response.
| |
| | |
| __TOC__
| |
| == Methods ==
| |
| === search ===
| |
| URL: [http://radlex.org/search 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 ([http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html MySQL Documentation]).
| |
| | |
| | |
| | |
| === getTermByID ===
| |
| URL: [http://radlex.org/getTermByID 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 [[#Errors | error messages]], see below.
| |
| <pre><nowiki>
| |
| <program>
| |
| <error id="$errorid">$errormessage</error>
| |
| </program>
| |
| </nowiki></pre>
| |
| | |
| == Errors ==
| |
| | |
| == Examples ==
| |
| | |
| | |
| [[Category:RadLex]]
| |