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 on behalf of INTEROPen and is intended to provide all the technical resources you need to successfully develop the Care Connect APIs. This project is being developed using an agile methodology so iterative updates to content will be added on a regular basis.
0. References
HL7 FHIR 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
Reference Implementation: Examples coming soon....
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'
2.2 Response Body
<ValueSet xmlns="http://hl7.org/fhir">
<id value="CareConnect-AdministrativeGender-1"/>
<extension url="http://hl7.org/fhir/StructureDefinition/valueset-map">
<valueReference>
<reference value="https://fhir.hl7.org.uk/STU3/ConceptMap/AdministrativeGender-1"/>
</valueReference>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/valueset-sourceReference">
<valueUri value="http://hl7.org/fhir/ValueSet/administrative-gender"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="pc"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
<valueInteger value="5"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-ballot-status">
<valueString value="Informative"/>
</extension>
<url value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-AdministrativeGender-1"/>
<identifier>
<system value="urn:ietf:rfc:3986"/>
<value value="urn:oid:2.16.840.1.113883.4.642.3.1"/>
</identifier>
<version value="3.0.1"/>
<name value="Administrative Gender"/>
<status value="active"/>
<date value="2017-04-19T07:46:00+10:00"/>
<publisher value="HL7 (FHIR Project)"/>
<contact>
<telecom>
<system value="url"/>
<value value="http://hl7.org/fhir"/>
</telecom>
<telecom>
<system value="email"/>
<value value="fhir@lists.hl7.org"/>
</telecom>
</contact>
<description value="The gender of a person used for administrative purposes."/>
<copyright value="Copyright © HL7.org 2011+"/>
<compose>
<include>
<system value="http://hl7.org/fhir/administrative-gender"/>
<concept>
<code value="male"/>
<display value="Male"/>
</concept>
<concept>
<code value="female"/>
<display value="Female"/>
</concept>
<concept>
<code value="other"/>
<display value="Other"/>
</concept>
<concept>
<code value="unknown"/>
<display value="Unknown"/>
</concept>
</include>
</compose>
</ValueSet>