|
|
| (10 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) |
| Zeile 1: |
Zeile 1: |
| − | == Operation Signature ==
| + | This REST call fetches the full content of a defined value set or codesystem. In case a value set is requested, this call responds with the '''expanded''' content of the value set, which means that all code references are resolved from their underlying codesystems. |
| | | | |
| − | <h5><span style='font-family:"Segoe UI","sans-serif"'><span
| + | This rest call is a variant of [[CTS2-LE REST API: Resolve Value Set MM|Resolve Value Set (multi-modal)]] with the minimal required parameter set <b>_query</b>=expandResource, <b>identifier</b>. |
| − | style='color:black;text-decoration:none'>Response</span> <span
| |
| − | style='color:black;text-decoration:none'>webCts2Le</span>.<span
| |
| − | style='color:black;text-decoration:none'>rest</span>.<span
| |
| − | style='color:black;text-decoration:none'>FhirValueSets</span>.resolveValueSet(</span><span
| |
| − | style='font-family:"Segoe UI","sans-serif";font-weight:normal'>@<span
| |
| − | style='color:black;text-decoration:none'>Context</span> </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif"'><span
| |
| − | style='color:black;text-decoration:none'>HttpServletRequest</span> request,
| |
| − | </span><span style='font-family:"Segoe UI","sans-serif";
| |
| − | font-weight:normal'>@<span
| |
| − | style='color:black;text-decoration:none'>QueryParam</span>(<span
| |
| − | style='color:black;text-decoration:none'>value</span>="_query") </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif"'><span
| |
| − | style='color:black;text-decoration:none'>String</span> query, </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif";font-weight:normal'>@<span
| |
| − | style='color:black;text-decoration:none'>QueryParam</span>(<span
| |
| − | style='color:black;text-decoration:none'>value</span>="identifier")
| |
| − | </span><span style='font-family:"Segoe UI","sans-serif"'><span
| |
| − | style='color:black;text-decoration:none'>String</span> identifier, </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif";font-weight:normal'>@<span
| |
| − | style='color:black;text-decoration:none'>QueryParam</span>(<span
| |
| − | style='color:black;text-decoration:none'>value</span>="codeSystemUri")
| |
| − | </span><span style='font-family:"Segoe UI","sans-serif"'><span
| |
| − | style='color:black;text-decoration:none'>String</span> codeSystemUri, </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif";font-weight:normal'>@<span
| |
| − | style='color:black;text-decoration:none'>QueryParam</span>(<span
| |
| − | style='color:black;text-decoration:none'>value</span>="code") </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif"'><span
| |
| − | style='color:black;text-decoration:none'>String</span> code, </span><span
| |
| − | style='font-family:"Segoe UI","sans-serif";font-weight:normal'>@<span
| |
| − | style='color:black;text-decoration:none'>QueryParam</span>(<span
| |
| − | style='color:black;text-decoration:none'>value</span>="stylesheet")
| |
| − | </span><span style='font-family:"Segoe UI","sans-serif"'><span
| |
| − | style='color:black;text-decoration:none'>String</span> stylesheet)</span></h5>
| |
| − | | |
| − | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'> </span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>@GET<br>
| |
| − | @Produces(value={"application/xml"})</span></p>
| |
| − | | |
| − | <p><span style='font-family:"Segoe UI","sans-serif"'>Value set
| |
| − | resolution. This REST function is a multi-modal function to retrieve value set
| |
| − | resolutions.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>Parameters:</span></b></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><b><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>request</span></b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | HTTP request.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><b><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>query</span></b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | Query refinement. </span><code><span style='font-size:10.0pt;line-height:115%'>_query</span></code><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | must match </span><code><span style='font-size:10.0pt;line-height:115%'>'(expand|expandDefinedCodeSystem|expandResource)'</span></code><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><b><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>identifier</span></b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | Identifier of a resource.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><b><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>codeSystemUri</span></b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | Code system URI.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><b><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>code</span></b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | Code.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><b><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>stylesheet</span></b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>
| |
| − | the stylesheet that will be referenced within the XML response.</span></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt'><b><span
| |
| − | style='line-height:115%;font-family:"Segoe UI","sans-serif"'>Returns:</span></b></p>
| |
| − | | |
| − | <p class=MsoNormal style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;
| |
| − | margin-left:36.0pt;margin-bottom:.0001pt'><span style='
| |
| − | line-height:115%;font-family:"Segoe UI","sans-serif"'>FHIR expansion according
| |
| − | to <a href="http://www.hl7.org/fhir/valueset.html">FHIR</a>, or an error XML</span></p>
| |
| − | | |
| − | == Additional Info ==
| |
| − | | |
| − | (A) If <code>_query == 'expand'</code> then <code>identifier</code> 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, <code>codeSystemUri</code> and
| |
| − | <code>code</code> have to be set accordingly.<br>
| |
| − | (B) If <code>_query == 'expandDefinedCodeSystem'</code> then <code>identifier</code>
| |
| − | has no meaning and <code>codeSystemUri</code> must be set. To restrict the
| |
| − | expansion to a code, <code>code</code> has to be set accordingly.<br>
| |
| − | (C) If <code>_query == 'expandResource'</code> then <code>identifier</code> 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 <code>codeSystemUri=identifier</code>.
| |
| | | | |
| | == Example == | | == Example == |
| Zeile 123: |
Zeile 14: |
| | This identifier has to be part of the http-call | | This identifier has to be part of the http-call |
| | <pre> | | <pre> |
| − | http://<host>/WebCts2LE/rest/fhir/ValueSet?_query=expand&identifier=http://hl7.org/fhir/vs/administrative-gender | + | http://<host>/WebCts2LE/rest/fhir/ValueSet?_query=expandResource&identifier=http://hl7.org/fhir/vs/administrative-gender |
| | </pre> | | </pre> |
| | that will return the following value set expansion | | that will return the following value set expansion |
| | | | |
| − | <pre> | + | <syntaxhighlight lang="xml"> |
| | <atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://hl7.org/fhir" | | <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:at="http://purl.org/atompub/tombstones/1.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" |
| Zeile 171: |
Zeile 62: |
| | </atom:entry> | | </atom:entry> |
| | </atom:feed> | | </atom:feed> |
| | + | </syntaxhighlight> |
| | + | |
| | + | Appropriate XPATH expressions should select the code list. E.g., the XPATH expression |
| | + | <pre> |
| | + | /atom:feed/atom:entry/atom:content/ValueSet/expansion/contains |
| | </pre> | | </pre> |
| | + | retrieves all (code, code system)-pairs with their display name. |
This REST call fetches the full content of a defined value set or codesystem. In case a value set is requested, this call responds with the expanded content of the value set, which means that all code references are resolved from their underlying codesystems.
This rest call is a variant of Resolve Value Set (multi-modal) with the minimal required parameter set _query=expandResource, identifier.
Example
The main purpose of the method is to resolve value sets in order to allow for
- display value set items to the user
- 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=expandResource&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>
Appropriate XPATH expressions should select the code list. E.g., the XPATH expression
/atom:feed/atom:entry/atom:content/ValueSet/expansion/contains
retrieves all (code, code system)-pairs with their display name.