Difference between revisions of "RadLex API"

From MircWiki
Jump to navigation Jump to search
m
m
Line 58: Line 58:
 
     <td valign="top">&nbsp; </td>
 
     <td valign="top">&nbsp; </td>
 
     <td valign="top">No</td>
 
     <td valign="top">No</td>
     <td valign="top">&nbsp; </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>
 
     <td valign="top">&lt;relationTypes&gt;</td>
 
   </tr>
 
   </tr>

Revision as of 00:08, 30 September 2006

1 XML API

File get* Parameters Currently Implemented Details Return Format
getTermById radlexID Yes Return a single term with its ID = radlexID <term>
getChildren

radlexID<br> [relationType]

Yes 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. <children>
getTree

baseID<br> relationType<br> [radlexID]

Yes 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—this is “filled” 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’s children will be given, followed by all of a’s children.
The baseID is also linked to its parent—the true root term for the ontology will be have an id=“ROOT”.
<links>
search

query<br> [returnType]

No Performs a search based upon the query parameter. returnType can equal “reduced” or “full”. If “reduced”, only matching radlexID’s and term name’s will be returned. If “full”, the full term structure will be returned for each match <terms>
getRelationTypes   No Returns a list of all the currently supported relationTypes. (See Relation Types below) <relationTypes>
  • HTTP post is redirected to get

2 Relation Types

  • preferred
  • isa
  • partof
  • branchof
  • segmentof
  • tributaryof
  • continuouswith
  • containedin
  • memberof


3 Error Codes

id meaning
1 Radlex ID is not valid
2 Radlex ID could not be found
3 Relationship type is not valid
4 Database connection error
5 Insufficient http get parameters.
6 No search results matching query


4 XML Documents Structure

4.1 <error> Format

<program>
  <error id="2">Radlex ID could not be found</error>
</program>


4.2 <term> Format

<term id="RID2">
  <name>Thorax</name>
  <definition>A definition</definition>
  <comment>A comment</comment>
  <source>Chest Committee</source>
  <acr id="A44445">Chest</acr>
  <snomed id="SN44545">Chest</snomed>
  <umls id="CUI4545848">Thorax</umls>
  <parents>
    <parent id="RID1" relationType="partof" preferred="1">Anatomical Terms</parent>
  </parents>
  <children>
    <child id="RID3" relationType="partof" preferred="1">Lungs</child>
  </children>
</term>

4.3 <terms> Reduced Format

<terms>
  <term id="RID2">
    <name>Thorax</name>
  </term>
  …
</terms>

4.4 <terms> Full Format

<terms>
  <term id="RID2">
  <name>Thorax</name>
  <definition>A definition</definition>
  <comment>A comment</comment>
  <source>Chest Committee</source>
  <acr id="A44445">Chest</acr>
  <snomed id="SN44545">SNChest</snomed>
  <umls id="CUI4545848">Thorax</umls>
    <parents><parent id="RID1" relationType="partof" preferred="1">Anatomical Terms</parent>
  </parents>
  <children>
    <child id="RID3" relationType="partof" preferred="1">Lungs</child>
  </children>
  </term>
  …
</terms>

4.5 <links> Format

<links>
  <link parent="RID0" id="RID1" relationType="partof" preferred="1">Anatomical Terms</link>
  <link parent="RID1" id="RID5" relationType="isa" preferred="1">Legs</link>
  <link parent="RID1" id="RID4" relationType="partof" preferred="1">Abdomen</link>
  <link parent="RID1" id="RID2" relationType="partof" preferred="1">Thorax</link>
  …
</links>

4.6 <children> Format

<children parent="RID2">
  <child id="RID3" relationType="partof" preferred="1">Lungs</child>
  …
</children>

4.7 <relationTypes> Format

<relationTypes>
  <relationType>preferred</relationType>
  <relationType>isa</relationType>
  <relationType>partof</relationType>
  <relationType>tributaryof</relationType>
  <relationType>branchof</relationType>
  <relationType>segmentof</relationType>
  <relationType>continuouswith</relationType>
  <relationType>containedin</relationType>
  <relationType>memberof</relationType>
</relationTypes>