CTS2-LE REST API: Concept Suggestion: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Krebs (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „CTS2-LE offers functionality for retrieving concept suggestions. === Operation === * '''Path:''' /WebCts2LE/rest/lucene/suggest * '''Method:''' POST * '''Path…“) |
Krebs (Diskussion | Beiträge) K |
||
| Zeile 20: | Zeile 20: | ||
* '''positiveRestriction''': whether results shall be restricted to the codesystem versions referenced in terminologyRestriction (true) or whether only results that do not belong to the referenced codesystems shall be retrieved (false) (optional, default: false) | * '''positiveRestriction''': whether results shall be restricted to the codesystem versions referenced in terminologyRestriction (true) or whether only results that do not belong to the referenced codesystems shall be retrieved (false) (optional, default: false) | ||
* '''csvs''': resourceIDs of restricted codesystem version (optional) | * '''csvs''': resourceIDs of restricted codesystem version (optional) | ||
| + | |||
| + | |||
| + | === Response Structure === | ||
| + | <pre> | ||
| + | [ | ||
| + | { | ||
| + | "label": [string], | ||
| + | "value": [string] | ||
| + | } | ||
| + | ] | ||
| + | </pre> | ||
| + | Meaning of the comprised attributes: | ||
| + | * '''label''': suggested concept with HTML markup to highlight matching phrases from input; the label will have the following components: <nowiki><preferred term>\n\t(<resourceID of the codesystem version the concept belongs to>, <code name of the concept>)</nowiki> | ||
| + | * '''value''': label without HTML markup | ||
| + | |||
| + | |||
| + | === Example === | ||
| + | ==== POST Body ==== | ||
| + | <pre> | ||
| + | { | ||
| + | "term":"a", | ||
| + | "positiveRestriction":true, | ||
| + | "csvs": ["ExampleCS2013"] | ||
| + | } | ||
| + | </pre> | ||
| + | The above structure will lead to suggested concepts that | ||
| + | * carry the letter "a" in one of their designations or in the resource ID of the codesystem version they belong to | ||
| + | * belong to the codesystem version referenced by means of the resource ID "ExampleCS2013" | ||
| + | |||
| + | ==== Response ==== | ||
| + | <pre> | ||
| + | [ | ||
| + | { | ||
| + | "label": "<b>a</b>PrefTerm\n\t(ExampleCS2013, <b>a</b>01)", | ||
| + | "value": "aPrefTerm\n\t(ExampleCS2013, a01)" | ||
| + | }, | ||
| + | { | ||
| + | "label": "<b>a</b>Synonym2\n\t(ExampleCS2013, <b>a</b>01)", | ||
| + | "value": "aSynonym2\n\t(ExampleCS2013, a01)" | ||
| + | }, | ||
| + | { | ||
| + | "label": "<b>a</b>VorzugsTerm\n\t(ExampleCS2013, <b>a</b>01)", | ||
| + | "value": "aVorzugsTerm\n\t(ExampleCS2013, a01)" | ||
| + | } | ||
| + | ] | ||
| + | </pre> | ||
Aktuelle Version vom 3. Mai 2017, 15:29 Uhr
CTS2-LE offers functionality for retrieving concept suggestions.
Inhaltsverzeichnis
Operation
- Path: /WebCts2LE/rest/lucene/suggest
- Method: POST
- Path Parameters: -
- Query Parameters:
- returns: suggested concepts in JSON format
POST Body
{
"term": [string],
"positiveRestriction": [boolean],
"csvs": [ [string] ]
}
Meaning of the comprised attributes:
- term: a term or some letters that serve as input for the suggestion
- positiveRestriction: whether results shall be restricted to the codesystem versions referenced in terminologyRestriction (true) or whether only results that do not belong to the referenced codesystems shall be retrieved (false) (optional, default: false)
- csvs: resourceIDs of restricted codesystem version (optional)
Response Structure
[
{
"label": [string],
"value": [string]
}
]
Meaning of the comprised attributes:
- label: suggested concept with HTML markup to highlight matching phrases from input; the label will have the following components: <preferred term>\n\t(<resourceID of the codesystem version the concept belongs to>, <code name of the concept>)
- value: label without HTML markup
Example
POST Body
{
"term":"a",
"positiveRestriction":true,
"csvs": ["ExampleCS2013"]
}
The above structure will lead to suggested concepts that
- carry the letter "a" in one of their designations or in the resource ID of the codesystem version they belong to
- belong to the codesystem version referenced by means of the resource ID "ExampleCS2013"
Response
[
{
"label": "<b>a</b>PrefTerm\n\t(ExampleCS2013, <b>a</b>01)",
"value": "aPrefTerm\n\t(ExampleCS2013, a01)"
},
{
"label": "<b>a</b>Synonym2\n\t(ExampleCS2013, <b>a</b>01)",
"value": "aSynonym2\n\t(ExampleCS2013, a01)"
},
{
"label": "<b>a</b>VorzugsTerm\n\t(ExampleCS2013, <b>a</b>01)",
"value": "aVorzugsTerm\n\t(ExampleCS2013, a01)"
}
]