ValueSet Code Validation

Overview

Value set code validation provides the ability to validate that a coded value is in the set of codes allowed by a value set. For more details, see the official documentation FHIR Terminology Value Set based Validation.

API

GET/POST URL: [base]/ValueSet/$validate-code
GET/POST URL: [base]/ValueSet/[id]/$validate-code

Example: for validation that female code allowed by a default AdministrativeGender ValueSet.

GET [base]/ValueSet/administrative-gender/$validate-code?code=female

Parameters

ParameterTypeStatusExample

url

supported

context

not supported

valueSet

supported

code

supported

system

supported

version

supported

display

supported

coding

supported

codeableConcept

supported

date

not supported

abstract

not supported

displayLanguage

not supported

url code system version display

One of the concept property

GET [base]/ValueSet/$validate-code?url=http://hl7.org/fhir/ValueSet/administrative-gender&code=male&display=Male

Or

POST [base]/ValueSet/$validate-code
content-type: text/yaml

resourceType: Parameters
parameter:
- {name: url, valueUri: 'http://hl7.org/fhir/ValueSet/administrative-gender'}
- {name: code, valueCode: male}
- {name: system, valueUri: 'http://hl7.org/fhir/administrative-gender'}
- {name: display, valueString: Male}

valueSet

The value set is provided directly as a part of the request.

POST [base]/ValueSet/$validate-code
content-type: text/yaml

resourceType: Parameters
parameter:
- {name: code, valueCode: male}
- {name: system, valueUri: 'http://hl7.org/fhir/administrative-gender'}
- name: valueSet
  resource:
    resourceType: ValueSet
    url: http://custom/administrative-gender
    compose:
      include:
      - valueSet: ['http://hl7.org/fhir/ValueSet/administrative-gender']

coding

A coding to validate

url parameter is required for $validate-code

POST [base]/ValueSet/$validate-code
content-type: text/yaml

resourceType: Parameters
parameter:
- name: coding
  valueCoding: {system: 'http://hl7.org/fhir/administrative-gender', code: male}
- {name: url, valueUri: 'http://hl7.org/fhir/ValueSet/administrative-gender'}

codeableConcept

A full codeableConcept to validate.

POST [base]/ValueSet/$validate-code
content-type: text/yaml

resourceType: Parameters
parameter:
- name: codeableConcept
  valueCodeableConcept:
    coding:
    - {system: 'http://hl7.org/fhir/administrative-gender', code: male_wrong}
    - {system: 'http://hl7.org/fhir/administrative-gender', code: male}
- {name: url, valueUri: 'http://hl7.org/fhir/ValueSet/administrative-gender'}

Last updated