CTS2-LE REST API: Requesting Concept Details: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Billig (Diskussion | Beiträge) K |
|||
| Zeile 1: | Zeile 1: | ||
Because of [[CTS2-LE_REST_API:_Resolve_Value_Set]] is a multi modal operation, the | Because of [[CTS2-LE_REST_API:_Resolve_Value_Set]] is a multi modal operation, the | ||
| − | operation can be used to retrieve single codes with its display name. This functionality requires that parameter | + | operation can be used to retrieve single codes with its display name. This functionality requires that an additional parameter |
| − | <code>code | + | <code>code</code> is set. |
| + | == Operation Signature == | ||
| + | |||
| + | ;REST Call Syntax | ||
| + | :<pre>http://<host>/WebCts2LE/rest/fhir/ValueSet?_query=expandResource&identifier=<valueset-URI>&code=<code>&stylesheet=<stylesheet-path></pre> | ||
| + | |||
| + | ;Parameters | ||
| + | :'''<code>identifier=<valueset-URI></code>''' | ||
| + | ::<code><valueset-URI></code>: URI-encoded identifier of the value set or codesystem that contains the requested code | ||
| + | ::Optionality: mandatory | ||
| + | ::Cardinality: 1..1 | ||
| + | ::Example: identifier=urn:oid:2.16.840.1.113883.5.1050 | ||
| + | ::Example: identifier=http://hl7.org/fhir/vs/administrative-gender | ||
| + | :'''<code>code=<code></code>''' | ||
| + | ::<code><code></code>: code for which all defined display names are requested | ||
| + | ::Optionality: mandatory | ||
| + | ::Cardinality: 1..* | ||
| + | ::Example: code=M | ||
| + | ::Example: code=13 | ||
| + | :'''<code>stylesheet=<stylesheet-path></code>''' | ||
| + | ::<code><stylesheet-path></code>: stylesheet that will be referenced within the XML response | ||
| + | ::Optionality: optional | ||
| + | ::Cardinality: 0..1 | ||
| + | |||
| + | ;Result | ||
| + | :In case of an successful processing of the call, the result will an FHIR Value Set resource as defined in http://www.hl7.org/fhir/valueset.html containing the the codesystem, code and all defined display names of the requested code. | ||
| + | :In case of an error an empty FHIR Value Set resource is returned. | ||
| + | |||
| + | == Example == | ||
For instance, the call | For instance, the call | ||
<pre> | <pre> | ||
http://<host>/WebCts2LE/rest/fhir/ValueSet? | http://<host>/WebCts2LE/rest/fhir/ValueSet? | ||
| − | _query= | + | _query=expandResource |
| − | & | + | &identifier=urn:oid:2.16.840.1.113883.5.1 |
&code=M | &code=M | ||
</pre> | </pre> | ||
Version vom 15. Juni 2015, 11:37 Uhr
Because of CTS2-LE_REST_API:_Resolve_Value_Set is a multi modal operation, the
operation can be used to retrieve single codes with its display name. This functionality requires that an additional parameter
code is set.
Operation Signature
- REST Call Syntax
http://<host>/WebCts2LE/rest/fhir/ValueSet?_query=expandResource&identifier=<valueset-URI>&code=<code>&stylesheet=<stylesheet-path>
- Parameters
identifier=<valueset-URI><valueset-URI>: URI-encoded identifier of the value set or codesystem that contains the requested code- Optionality: mandatory
- Cardinality: 1..1
- Example: identifier=urn:oid:2.16.840.1.113883.5.1050
- Example: identifier=http://hl7.org/fhir/vs/administrative-gender
code=<code><code>: code for which all defined display names are requested- Optionality: mandatory
- Cardinality: 1..*
- Example: code=M
- Example: code=13
stylesheet=<stylesheet-path><stylesheet-path>: stylesheet that will be referenced within the XML response- Optionality: optional
- Cardinality: 0..1
- Result
- In case of an successful processing of the call, the result will an FHIR Value Set resource as defined in http://www.hl7.org/fhir/valueset.html containing the the codesystem, code and all defined display names of the requested code.
- In case of an error an empty FHIR Value Set resource is returned.
Example
For instance, the call
http://<host>/WebCts2LE/rest/fhir/ValueSet? _query=expandResource &identifier=urn:oid:2.16.840.1.113883.5.1 &code=M
retrieves only the male code
... <expansion> <timestamp/> <contains xmlns="http://hl7.org/fhir"> <system value="urn:oid:2.16.840.1.113883.5.1"/> <code value="M"/> <display value="Male"/> </contains> </expansion> ...
The same call can be performed to check wether a (code, code system)-pair is contained in a value set. If this pair is not contained the call yields an atom response with an expansion element that does not has any contains-elements as children:
... <expansion> <timestamp /> </expansion> ...