CTS2-LE REST API: Concept Search

Aus CTS2-LE
Version vom 28. April 2017, 15:03 Uhr von Krebs (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „CTS2-LE offers different search functionalities for retrieving concepts. === Operation === * '''Path:''' /WebCts2LE/service/crud/cts2/search * '''Method:'''…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

CTS2-LE offers different search functionalities for retrieving concepts.

Operation

  • Path: /WebCts2LE/service/crud/cts2/search
  • Method: POST
  • Path Parameters: -
  • Query Parameters:
    • withCSUriAndVersionId: boolean value to indicate whether results shall include versionOf- and versionId-attributes
  • returns: search results in JSON format

POST Body

{
	"searchExpression":[string],
	"grouped":[boolean],			
	"positiveRestriction":[boolean],	
	"groups":[
			{"groupName":[string]}
	],	
	"csvs":[
			{"resourceID":[string]}	
	]		
}

Meaning of the comprised attributes:

  • searchExpression: search term
is the only mandatory attribute. When the JSON object contained in the POST body only has this attribute, a basic search (non-grouped) across all terminologies is performed.
  • grouped: whether results shall be grouped by codesystem or not (optional, default: false)
  • positiveRestriction: whether results shall be restricted to the codesystem versions referenced in groups and csvs (true) or whether only results that do not belong to the referenced codesystems shall be retrieved (optional, default: false)
  • groups: group name of the restricted codesystem versions further referenced in "csvs" (optional)
  • csvs: resourceIDs of restricted codesystem versions (optional)
Response Structure
{
	"complete": [boolean], 		
	"numberOfHits": [number], 			
	"circaHits": [number],			
	"elapsedTime": [number],			
	"results": [
				{
	 				"preferredTerm":[string],	
	 				"name":[string],		
	 				"displayedCode:[string],	
	 				"resourceID":[string],	
	 				"hasParent":[boolean],	
	 				"hasChildren":[boolean],
	 				"versionOf":[string],	
      				        "versionId":[string]
	 			}
	 		]
}

Meaning of the comprised attributes:

  • complete: true if all results are contained in response, false if not
  • numberOfHits: number of results contained in response
  • circaHits: number of all results
  • elapsedTime: the time it took to perform the search operation
  • results.preferredTerm: the preferred term of the concept
  • results.name: the name/code of the concept
  • results.displayedCode: the name/code that shall be presented
  • results.resourceID: the resourceID of the codesystem version the concept belongs to
  • results.hasParent: indicates whether the concept has parents
  • results.hasChildren: indicates whether the concept has children
  • results.versionOf: the versionOf of the codesystem version the concept belongs to - only present if query parameter 'withCSUriAndVersionId' is true (optional)
  • results.versionId: the versionId of the codesystem version the concept belongs to - only present if query parameter 'withCSUriAndVersionId' is true (optional)