A value set specifies a set of codes drawn from one or more code systems.
Important: This site is under active development by NHS Digital and is intended to provide all the technical resources you need to successfully develop the APIs. This project is being developed using an agile methodology so iterative updates to content will be added on a regular basis.
Warning: This site is provided for information only and is intended for those engaged with NHS Digital on the development of the APIs. It is advised not to develop against these specifications until a formal announcement has been made.
0. References
Profile: - |
HL7 FHIR DSTU2 Resource: ValueSet |
User Stories: - |
1. Read
GET [baseUrl]/ValueSet/[id]
Return a single ValueSet
for the specified id.
All requests SHALL contain a valid ‘Authorization’ header and SHALL contain an ‘Accept’ header. The `Accept` header indicates the format of the response the client is able to understand, this will be one of the following application/json+fhir
or application/xml+fhir
.
1.1. Response
A full set of response codes can be found here API Response Codes. FHIR Servers SHALL support the following response codes:
200 | successful operation |
404 | resource not found |
410 | resource deleted |
2. Example
2.1 Request Query
Return the ValueSet for Care Connect Administrative Gender. Replace ‘baseUrl’ with the actual base Url of the FHIR Server.
2.1.1. cURL
curl -H 'Accept: application/xml+fhir' -H 'Authorization: BEARER [token]' -X GET '[baseUrl]/ValueSet/CareConnect-AdministrativeGender-1'
3.2 Query Response
3.2.1 Http Headers
2.3 Response Body
<ValueSet xmlns="http://hl7.org/fhir">
<id value="CareConnect-AdministrativeGender-1"/>
<meta>
<lastUpdated value="2016-08-03T00:00:00+01:00"/>
</meta>
<text>
<status value="generated"/>
</text>
<contained>
<ConceptMap xmlns="http://hl7.org/fhir">
<id value="map"/>
<name value="NHS Data Model and Dictionary Mapping"/>
<status value="active"/>
<sourceReference>
<reference value="https://fhir-test.hl7.org.uk/ValueSet/CareConnect-AdministrativeGender-1"/>
</sourceReference>
<targetReference>
<reference value="https://fhir-test.hl7.org.uk/ValueSet/CareConnect-PersonStatedGender-DDMAP-1"/>
</targetReference>
<element>
<code value="male"/>
<target>
<code value="1"/>
<equivalence value="equivalent"/>
</target>
</element>
<element>
<code value="female"/>
<target>
<code value="2"/>
<equivalence value="equivalent"/>
</target>
</element>
<element>
<code value="other"/>
<target>
<code value="9"/>
<equivalence value="equivalent"/>
</target>
</element>
<element>
<code value="unknown"/>
<target>
<code value="X"/>
<equivalence value="equivalent"/>
</target>
</element>
</ConceptMap>
</contained>
<extension url="http://hl7.org/fhir/StructureDefinition/valueset-map">
<valueReference>
<reference value="#map"/>
</valueReference>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/valueset-oid">
<valueUri value="urn:oid:2.16.840.1.113883.4.642.2.1"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="1"/>
</extension>
<url value="https://fhir-test.hl7.org.uk/ValueSet/CareConnect-AdministrativeGender-1"/>
<version value="1.0.0"/>
<name value="Care Connect Administrative Gender"/>
<status value="active"/>
<publisher value="HL7 UK"/>
<description value="The gender of a person used for administrative purposes."/>
<requirements value="The codes listed in this FHIR ValueSet have a 'Required' binding; for conformance the Administrative Gender element SHALL include a code listed below."/>
<copyright value="Copyright � 2016 HL7 UK
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
HL7� FHIR� standard Copyright � 2011+ HL7
The HL7� FHIR� standard is used under the FHIR license. You may obtain a copy of the FHIR license at
https://www.hl7.org/fhir/license.html"/>
<codeSystem>
<system value="http://hl7.org/fhir/administrative-gender"/>
<concept>
<code value="male"/>
<display value="Male"/>
<definition value="Male"/>
</concept>
<concept>
<code value="female"/>
<display value="Female"/>
<definition value="Female"/>
</concept>
<concept>
<code value="other"/>
<display value="Other"/>
<definition value="Other"/>
</concept>
<concept>
<code value="unknown"/>
<display value="Unknown"/>
<definition value="Unknown"/>
</concept>
</codeSystem>
</ValueSet>