CTS2-LE SVS API: Update: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K
K
 
Zeile 41: Zeile 41:
 
Note that the pair <<b>versionOf, versionId</b>> as well as the <code>resourceId</code> uniquely identify a resource within CTS2-LE.
 
Note that the pair <<b>versionOf, versionId</b>> as well as the <code>resourceId</code> uniquely identify a resource within CTS2-LE.
  
== Example Request ==
+
== Example Request: creating/updating a code system ==
 
<b>POST</b> /WebCts2LE/service/crud/svs/update?groupName=EXA&defaultLanguage=en<br>
 
<b>POST</b> /WebCts2LE/service/crud/svs/update?groupName=EXA&defaultLanguage=en<br>
 
<b>with body:</b>
 
<b>with body:</b>
 
<syntaxhighlight lang="xml" line="GESHI_NORMAL_LINE_NUMBERS">
 
<syntaxhighlight lang="xml" line="GESHI_NORMAL_LINE_NUMBERS">
<?xml version="1.0" encoding="UTF-8"?>
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<valueSet id="http://test/stu3/cs" version="2017-07" verantw_Org="fhg ehealth" description="... descr ..." name="code-system-stu3-88">
 
<valueSet id="http://test/stu3/cs" version="2017-07" verantw_Org="fhg ehealth" description="... descr ..." name="code-system-stu3-88">

Aktuelle Version vom 5. April 2018, 09:54 Uhr

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
resourceId (type: string, occurence: optional) uniquely identifies a resource; if not defined, the XML input attribute /valueSet/@name will be used
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
exportValueSetDesignations (type: boolean, occurence: optional, default is false) determines which designations are used when exporting a value set. If set to true, the designations defined for the value set entries will be used. If set to false, the designations defined for the referenced concept will be used.
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 whereas the versionId is given by the item /valueSet/@version in both cases.
Note that the pair <versionOf, versionId> as well as the resourceId uniquely identify a resource within CTS2-LE.

Example Request: creating/updating a code system

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

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