CTS2-LE REST API: Resolve Value Set: Unterschied zwischen den Versionen

Aus CTS2-LE
Zur Navigation springen Zur Suche springen
K
Zeile 120: Zeile 120:
 
In order to reference the value set properly, one has to use its identifier, e.g.
 
In order to reference the value set properly, one has to use its identifier, e.g.
 
<code>http://hl7.org/fhir/vs/administrative-gender</code>
 
<code>http://hl7.org/fhir/vs/administrative-gender</code>
 +
 +
This identifier has to be part of the http-call
 +
<pre>
 +
http://<host>/WebCts2LE/rest/fhir/ValueSet?_query=expand&identifier=http://hl7.org/fhir/vs/administrative-gender
 +
</pre>
 +
that will return the following value set expansion
 +
 +
<pre>
 +
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://hl7.org/fhir"
 +
  xmlns:at="http://purl.org/atompub/tombstones/1.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
 +
  xmlns:os="http://a9.com/-/spec/opensearch/1.1/" xmlns:xhtml="http://www.w3.org/1999/xhtml"
 +
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 +
  <atom:title>Value Set Expansion</atom:title>
 +
  <atom:id>urn:uuid:dc9f2f7e-6a1b-4389-9b88-7048787227c2</atom:id>
 +
  <atom:updated>2015-04-05T13:46:55</atom:updated>
 +
  <atom:entry>
 +
      <atom:title>Value Set Resolution</atom:title>
 +
      <atom:id>http://hl7.org/fhir/vs/administrative-gender</atom:id>
 +
      <atom:updated>2015-04-05T13:46:55</atom:updated>
 +
      <atom:content>
 +
        <ValueSet xmlns="http://hl7.org/fhir">
 +
            <name value="..." />
 +
            <description value="..." />
 +
            <status value="draft" />
 +
            <expansion>
 +
              <timestamp />
 +
              <contains xmlns="http://hl7.org/fhir">
 +
                  <system value="urn:oid:2.16.840.1.113883.5.1" />
 +
                  <code value="F" />
 +
                  <display value="Female" />
 +
              </contains>
 +
              <contains xmlns="http://hl7.org/fhir">
 +
                  <system value="urn:oid:2.16.840.1.113883.5.1" />
 +
                  <code value="M" />
 +
                  <display value="Male" />
 +
              </contains>
 +
              <contains xmlns="http://hl7.org/fhir">
 +
                  <system value="urn:oid:2.16.840.1.113883.5.1" />
 +
                  <code value="UN" />
 +
                  <display value="Undifferentiated" />
 +
              </contains>
 +
              <contains xmlns="http://hl7.org/fhir">
 +
                  <system value="urn:oid:2.16.840.1.113883.5.1008" />
 +
                  <code value="UNK" />
 +
                  <display value="unknown" />
 +
              </contains>
 +
            </expansion>
 +
        </ValueSet>
 +
      </atom:content>
 +
  </atom:entry>
 +
</atom:feed>
 +
</pre>

Version vom 9. Juni 2015, 15:36 Uhr

Operation Signature

Response webCts2Le.rest.FhirValueSets.resolveValueSet(@Context HttpServletRequest request, @QueryParam(value="_query") String query, @QueryParam(value="identifier") String identifier, @QueryParam(value="codeSystemUri") String codeSystemUri, @QueryParam(value="code") String code, @QueryParam(value="stylesheet") String stylesheet)

 

@GET
@Produces(value={"application/xml"})

Value set resolution. This REST function is a multi-modal function to retrieve value set resolutions.

Parameters:

request HTTP request.

query Query refinement. _query must match '(expand|expandDefinedCodeSystem|expandResource)'.

identifier Identifier of a resource.

codeSystemUri Code system URI.

code Code.

stylesheet the stylesheet that will be referenced within the XML response.

Returns:

FHIR expansion according to <a href="http://www.hl7.org/fhir/valueset.html">FHIR</a>, or an error XML

Additional Info

(A) If _query == 'expand' then identifier must be an URI of a value set and the response is the corresponding FHIR expansion. To restrict the expansion to code systems or codes, codeSystemUri and code have to be set accordingly.
(B) If _query == 'expandDefinedCodeSystem' then identifier has no meaning and codeSystemUri must be set. To restrict the expansion to a code, code has to be set accordingly.
(C) If _query == 'expandResource' then identifier must be an URI of a (1) CTS2 value set OR a (2) code system. In case of (1) processing (A) will be performed. In case of (2) processing (B) will be performed where codeSystemUri=identifier.

Example

The main purpose of the method is to resolve value sets in order to allow for

  1. display value set items to the user
  2. validation of code system/value set references of an electronic health record

In order to reference the value set properly, one has to use its identifier, e.g. http://hl7.org/fhir/vs/administrative-gender

This identifier has to be part of the http-call

http://<host>/WebCts2LE/rest/fhir/ValueSet?_query=expand&identifier=http://hl7.org/fhir/vs/administrative-gender

that will return the following value set expansion

<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://hl7.org/fhir"
   xmlns:at="http://purl.org/atompub/tombstones/1.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
   xmlns:os="http://a9.com/-/spec/opensearch/1.1/" xmlns:xhtml="http://www.w3.org/1999/xhtml"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <atom:title>Value Set Expansion</atom:title>
   <atom:id>urn:uuid:dc9f2f7e-6a1b-4389-9b88-7048787227c2</atom:id>
   <atom:updated>2015-04-05T13:46:55</atom:updated>
   <atom:entry>
      <atom:title>Value Set Resolution</atom:title>
      <atom:id>http://hl7.org/fhir/vs/administrative-gender</atom:id>
      <atom:updated>2015-04-05T13:46:55</atom:updated>
      <atom:content>
         <ValueSet xmlns="http://hl7.org/fhir">
            <name value="..." />
            <description value="..." />
            <status value="draft" />
            <expansion>
               <timestamp />
               <contains xmlns="http://hl7.org/fhir">
                  <system value="urn:oid:2.16.840.1.113883.5.1" />
                  <code value="F" />
                  <display value="Female" />
               </contains>
               <contains xmlns="http://hl7.org/fhir">
                  <system value="urn:oid:2.16.840.1.113883.5.1" />
                  <code value="M" />
                  <display value="Male" />
               </contains>
               <contains xmlns="http://hl7.org/fhir">
                  <system value="urn:oid:2.16.840.1.113883.5.1" />
                  <code value="UN" />
                  <display value="Undifferentiated" />
               </contains>
               <contains xmlns="http://hl7.org/fhir">
                  <system value="urn:oid:2.16.840.1.113883.5.1008" />
                  <code value="UNK" />
                  <display value="unknown" />
               </contains>
            </expansion>
         </ValueSet>
      </atom:content>
   </atom:entry>
</atom:feed>