CTS2-LE SVS API: Update

Aus CTS2-LE
Version vom 27. Juli 2017, 13:16 Uhr von Krebs (Diskussion | Beiträge) (Input Specification by Example)
Zur Navigation springen Zur Suche springen

CTS2-LE provides an interface for importing terminological resources that are stucturally aligned to the IHE Sharing Value Sets format.

Operation Syntax

POST /WebCts2LE/service/crud/svs/update

Updates a code system or value set. If the resource does not exist, it is created.
Request Body
application/xml
XML input stream as outlined in the following section
Parameters
groupName (type: string, occurence: mandatory) determines the group to which the resource will belong; this is essential for displaying the resource in the navigator
defaultLanguage (type: string, occurence: mandatory) the default language of the resource (mandatory)
isDefaultVersion (type: boolean, occurence: optional, default is true) label the resource as the default version
Responses
application/xml
200 no errors
409 errors specified in XML

Input Specification by Example

1 <?xml version="1.0" encoding="UTF-8"?>
2 <valueSet name='Test-Codesystem' displayName='Test-Codesystem'  effectiveDate='2017-01-01' id='1.2.40.0.34.99.1212' statusCode='final' website='website CS test'  version='Test CS 1' beschreibung='Das ist ein Test-Codesystem!'  description='This is a test code system!'>
3 
4     <conceptList>
5         <concept code='1' codeSystem='1.2.40.0.34.99.1212' displayName='display name for first concept' level='0' type='L' concept_beschreibung='a description' deutsch='a german designation' hinweise='concept notes' relationships='some associations'/>
6         <concept code='2' codeSystem='1.2.40.0.34.99.1212' displayName='display name for second concept' level='0' type='L' concept_beschreibung='another description' deutsch='a german designation' hinweise='notes for second concept' relationships='association for second concept'/>
7     </conceptList>
8 </valueSet>

Using SVS to represent Codesystems and Value Sets

The XML input can be a code system (case A) or a value set definition (case B). Case A applies if each //concept/@codeSystem value is equal to /valueSet/@id. Case B applies if each //concept/@codeSystem value is different from /valueSet/@id.

The XML input is transformed to an CTS2 resource R. The versionOf of R within CTS2-LE is the XML input item /valueSet/@id in both cases.
Note that the pair <versionOf, versionId> uniquely defines a value set within CTS2-LE. The versionId is given by the item /valueSet/@version in both cases.

Example Request