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

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K (Input Specification by Example)
K
Zeile 28: Zeile 28:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Using SVS to represent Codesystems and Value Sets ===
+
== 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).  
 
The XML input can be a code system (case A) or a value set definition (case B).  
 
Case A applies if each <code>//concept/@codeSystem</code> value is equal to <code>/valueSet/@id</code>.
 
Case A applies if each <code>//concept/@codeSystem</code> value is equal to <code>/valueSet/@id</code>.
Zeile 35: Zeile 35:
 
The XML input is transformed to an CTS2 resource R. The versionOf of R within CTS2-LE is the XML input item <code>/valueSet/@id</code> in both cases. <br>
 
The XML input is transformed to an CTS2 resource R. The versionOf of R within CTS2-LE is the XML input item <code>/valueSet/@id</code> in both cases. <br>
 
Note that the pair <<b>versionOf, versionId</b>> uniquely defines a value set within CTS2-LE. The versionId is given by the item <code>/valueSet/@version</code> in both cases.<br>
 
Note that the pair <<b>versionOf, versionId</b>> uniquely defines a value set within CTS2-LE. The versionId is given by the item <code>/valueSet/@version</code> in both cases.<br>
=== Example Request ===
+
 
 +
== Example Request ==
 +
<b>POST</b> /WebCts2LE/service/crud/svs/update?groupName=EXA&defaultLanguage=en<br>
 +
<b>with body:</b>
 +
<syntaxhighlight lang="xml" line="GESHI_NORMAL_LINE_NUMBERS">
 +
<?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">
 +
    <conceptList>
 +
        <concept codeSystem="http://test/stu3/cs" code="1" displayName="designation-1" level="0" type="S" />
 +
        <concept codeSystem="http://test/stu3/cs" code="1.1" displayName="designation-11" level="1" type="S" />
 +
        <concept codeSystem="http://test/stu3/cs" code="1.1.1" displayName="1.1.1" level="2" type="L" />
 +
        <concept codeSystem="http://test/stu3/cs" code="2" displayName="designation-2" level="0" type="L" />
 +
        <concept codeSystem="http://test/stu3/cs" code="3" displayName="3" level="0" type="L" prop="val2; val1" />
 +
    </conceptList>
 +
</valueSet>
 +
</syntaxhighlight>

Version vom 27. Juli 2017, 14:04 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
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

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>