CTS2-LE SVS API: Update

Aus CTS2-LE
Version vom 27. Juli 2017, 16:01 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
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' 
 3 statusCode='final' website='website CS test'  version='Test CS 1' beschreibung='Das ist ein Test-Codesystem!'  description='This is a test code system!'>
 4 
 5     <conceptList>
 6         <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' 
 7 deutsch='a german designation' hinweise='concept notes' relationships='some associations'/>
 8         <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' 
 9 deutsch='a german designation' hinweise='notes for second concept' relationships='association for second concept'/>
10     </conceptList>
11 </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

POST /WebCts2LE/service/crud/svs/update?groupName=EXA&defaultLanguage=en
with body:

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <?xml version="1.0" encoding="UTF-8"?>
 3 <valueSet id="http://test/stu3/cs" version="2017-07" verantw_Org="fhg ehealth" description="... descr ..." name="code-system-stu3-88">
 4     <conceptList>
 5         <concept codeSystem="http://test/stu3/cs" code="1" displayName="designation-1" level="0" type="S" />
 6         <concept codeSystem="http://test/stu3/cs" code="1.1" displayName="designation-11" level="1" type="S" />
 7         <concept codeSystem="http://test/stu3/cs" code="1.1.1" displayName="1.1.1" level="2" type="L" />
 8         <concept codeSystem="http://test/stu3/cs" code="2" displayName="designation-2" level="0" type="L" />
 9         <concept codeSystem="http://test/stu3/cs" code="3" displayName="3" level="0" type="L" prop="val2; val1" />
10     </conceptList>
11 </valueSet>