CTS2-LE REST API: Concept Suggestion

Aus CTS2-LE
Zur Navigation springen Zur Suche springen

CTS2-LE offers functionality for retrieving concept suggestions.

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)"
  }
]