Difference between revisions of "RadLex API"

From MircWiki
Jump to navigation Jump to search
m
(Replacing page with '[http://radlexwiki.rsna.org/index.php?title=RadLex_API RadLex Wiki]')
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<h1>XML API</h1>
+
[http://radlexwiki.rsna.org/index.php?title=RadLex_API RadLex Wiki]
 
 
<table border="1">
 
  <tr>
 
    <th>File</th>
 
    <th>get* Parameters</th>
 
    <th>Currently Implemented</th>
 
    <th>Details</th>
 
    <th>Return Format</th>
 
  </tr>
 
  <tr>
 
    <td valign="top">getTermById</td>
 
    <td valign="top">radlexID</td>
 
    <td valign="top">Yes</td>
 
    <td valign="top">Return a single term with its ID = radlexID</td>
 
    <td valign="top">&lt;term&gt;</td>
 
  </tr>
 
  <tr>
 
    <td valign="top">getChildren</td>
 
    <td valign="top">
 
<nowiki>
 
radlexID<br>
 
        [relationType]
 
</nowiki>
 
</td>
 
    <td valign="top">Yes</td>
 
    <td valign="top">Returns all terms that have that radlexID as a parent and are related to the parent via the relationType. If no e relationtype is present, all children of that radlexID will be returned.</td>
 
    <td valign="top">&lt;children&gt;</td>
 
  </tr>
 
  <tr>
 
    <td valign="top">getTree</td>
 
    <td valign="top">
 
<nowiki>
 
baseID<br>
 
relationType<br>
 
[radlexID]
 
</nowiki>
 
</td>
 
    <td valign="top">Yes</td>
 
    <td valign="top">Returns all links starting with the baseID as the root term related via the relationType. If no radlexID is present only a single layer of children below the baseID term will be returned. If radlexID is present, all nodes that will create the structure from the baseID term to the radlexID term are given&mdash;this is &ldquo;filled&rdquo; out with all the children of the nodes. That is, if baseID = A and radlexID = a1, and A has children a, b, c, d, and a has children a1, a2, a3. The links of all of A&rsquo;s children will be given, followed by all of a&rsquo;s children. <br>
 
        The baseID is also linked to its parent&mdash;the true root term for the ontology will be have an id=&ldquo;ROOT&rdquo;.</td>
 
    <td valign="top">&lt;links&gt;</td>
 
  </tr>
 
  <tr>
 
    <td valign="top">search</td>
 
    <td valign="top">
 
<nowiki>
 
query<br>
 
        [returnType]
 
</nowiki>
 
</td>
 
    <td valign="top">No</td>
 
    <td valign="top">Performs a search based upon the query parameter. returnType can equal &ldquo;reduced&rdquo; or &ldquo;full&rdquo;. If &ldquo;reduced&rdquo;, only matching radlexID&rsquo;s and term name&rsquo;s will be returned. If &ldquo;full&rdquo;, the full term structure will be returned for each match</td>
 
    <td valign="top">&lt;terms&gt;</td>
 
  </tr>
 
  <tr>
 
    <td valign="top">getRelationTypes</td>
 
    <td valign="top">&nbsp; </td>
 
    <td valign="top">No</td>
 
    <td valign="top">Returns a list of all the currently supported relationTypes. (See Relation Types below)</td>
 
    <td valign="top">&lt;relationTypes&gt;</td>
 
  </tr>
 
</table>
 
*HTTP post is redirected to get<br>
 
 
 
<h1>Relation Types</h1>
 
<ul>
 
<li>preferred</li>
 
<li>isa</li>
 
<li>partof</li>
 
<li>branchof</li>
 
<li>segmentof</li>
 
<li>tributaryof</li>
 
<li>continuouswith</li>
 
<li>containedin</li>
 
<li>memberof</li>
 
</ul>
 
<br>
 
 
 
<h1>Error Codes</h1>
 
<table border="1">
 
  <tr>
 
    <th>id</th>
 
    <th>meaning</th>
 
  </tr>
 
  <tr>
 
    <td>1</td>
 
    <td>Radlex ID is not valid</td>
 
  </tr>
 
  <tr>
 
    <td>2</td>
 
    <td>Radlex ID could not be found</td>
 
  </tr>
 
  <tr>
 
    <td>3</td>
 
    <td>Relationship type is not valid</td>
 
  </tr>
 
  <tr>
 
    <td>4</td>
 
    <td>Database connection error</td>
 
  </tr>
 
  <tr>
 
    <td>5</td>
 
    <td>Insufficient http get parameters.</td>
 
  </tr>
 
  <tr>
 
    <td>6</td>
 
    <td>No search results matching query</td>
 
  </tr>
 
</table>
 
<br>
 
 
 
<h1>XML Documents Structure </h1>
 
<h2>&lt;error&gt; Format</h2>
 
<code>
 
&lt;program&gt;<br>
 
&nbsp;&nbsp;&lt;error id=&quot;2&quot;&gt;Radlex ID could not be found&lt;/error&gt;<br>
 
&lt;/program&gt;
 
</code>
 
 
 
<br>
 
<h2>&lt;term&gt; Format</h2>
 
<code>
 
&lt;term id=&quot;RID2&quot;&gt;<br>
 
&nbsp;&nbsp;&lt;name&gt;Thorax&lt;/name&gt;<br>
 
&nbsp;&nbsp;&lt;definition&gt;A definition&lt;/definition&gt;<br>
 
&nbsp;&nbsp;&lt;comment&gt;A comment&lt;/comment&gt;<br>
 
&nbsp;&nbsp;&lt;source&gt;Chest Committee&lt;/source&gt;<br>
 
&nbsp;&nbsp;&lt;acr id=&quot;A44445&quot;&gt;Chest&lt;/acr&gt;<br>
 
&nbsp;&nbsp;&lt;snomed id=&quot;SN44545&quot;&gt;Chest&lt;/snomed&gt;<br>
 
&nbsp;&nbsp;&lt;umls id=&quot;CUI4545848&quot;&gt;Thorax&lt;/umls&gt;<br>
 
&nbsp;&nbsp;&lt;parents&gt;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&lt;parent id=&quot;RID1&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Anatomical Terms&lt;/parent&gt;<br>
 
&nbsp;&nbsp;&lt;/parents&gt;<br>
 
&nbsp;&nbsp;&lt;children&gt;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&lt;child id=&quot;RID3&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Lungs&lt;/child&gt;<br>
 
&nbsp;&nbsp;&lt;/children&gt;<br>
 
&lt;/term&gt;<br>
 
</code>
 
<br>
 
<h2>&lt;terms&gt; Reduced Format</h2>
 
<code>
 
&lt;terms&gt; <br>
 
&nbsp;&nbsp;&lt;term id=&quot;RID2&quot;&gt;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&lt;name&gt;Thorax&lt;/name&gt;<br>
 
&nbsp;&nbsp;&lt;/term&gt;<br>
 
&nbsp;&nbsp;&hellip;<br>
 
&lt;/terms&gt;<br>
 
</code>
 
<br>
 
<h2>&lt;terms&gt; Full Format</h2>
 
<code>
 
&lt;terms&gt;<br>
 
&nbsp;&nbsp;&lt;term id=&quot;RID2&quot;&gt;<br>
 
&nbsp;&nbsp;&lt;name&gt;Thorax&lt;/name&gt;<br>
 
&nbsp;&nbsp;&lt;definition&gt;A definition&lt;/definition&gt;<br>
 
&nbsp;&nbsp;&lt;comment&gt;A comment&lt;/comment&gt;<br>
 
&nbsp;&nbsp;&lt;source&gt;Chest Committee&lt;/source&gt;<br>
 
&nbsp;&nbsp;&lt;acr id=&quot;A44445&quot;&gt;Chest&lt;/acr&gt;<br>
 
&nbsp;&nbsp;&lt;snomed id=&quot;SN44545&quot;&gt;SNChest&lt;/snomed&gt;<br>
 
&nbsp;&nbsp;&lt;umls id=&quot;CUI4545848&quot;&gt;Thorax&lt;/umls&gt;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&lt;parents&gt;&lt;parent id=&quot;RID1&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Anatomical Terms&lt;/parent&gt;<br>
 
&nbsp;&nbsp;&lt;/parents&gt;<br>
 
&nbsp;&nbsp;&lt;children&gt;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&lt;child id=&quot;RID3&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Lungs&lt;/child&gt;<br>
 
&nbsp;&nbsp;&lt;/children&gt;<br>
 
&nbsp;&nbsp;&lt;/term&gt;<br>
 
&nbsp;&nbsp;&hellip;<br>
 
&lt;/terms&gt;<br>
 
</code>
 
<br>
 
<h2>&lt;links&gt; Format</h2>
 
<code>
 
&lt;links&gt;<br>
 
&nbsp;&nbsp;&lt;link parent=&quot;RID0&quot; id=&quot;RID1&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Anatomical Terms&lt;/link&gt;<br>
 
&nbsp;&nbsp;&lt;link parent=&quot;RID1&quot; id=&quot;RID5&quot; relationType=&quot;isa&quot; preferred=&quot;1&quot;&gt;Legs&lt;/link&gt;<br>
 
&nbsp;&nbsp;&lt;link parent=&quot;RID1&quot; id=&quot;RID4&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Abdomen&lt;/link&gt;<br>
 
&nbsp;&nbsp;&lt;link parent=&quot;RID1&quot; id=&quot;RID2&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Thorax&lt;/link&gt;<br>
 
&nbsp;&nbsp;&hellip;<br>
 
&lt;/links&gt;<br>
 
</code>
 
<br>
 
<h2>&lt;children&gt; Format</h2>
 
<code>
 
&lt;children parent=&quot;RID2&quot;&gt;<br>
 
&nbsp;&nbsp;&lt;child id=&quot;RID3&quot; relationType=&quot;partof&quot; preferred=&quot;1&quot;&gt;Lungs&lt;/child&gt;<br>
 
&nbsp;&nbsp;&hellip;<br>
 
&lt;/children&gt;<br>
 
<br>
 
 
</code>
 
<h2>&lt;relationTypes&gt; Format</h2>
 
<code>
 
&lt;relationTypes&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;preferred&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;isa&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;partof&lt;/relationType&gt;<br>
 
&nbsp;&nbsp;&lt;relationType&gt;tributaryof&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;branchof&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;segmentof&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;continuouswith&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;containedin&lt;/relationType&gt; <br>
 
&nbsp;&nbsp;&lt;relationType&gt;memberof&lt;/relationType&gt;<br>
 
&lt;/relationTypes&gt;
 
</code>
 

Latest revision as of 16:11, 28 June 2007