Value Set FHIR resource API supports the
$expand
and
$validate-code
operations for both Explicit and Implicit value sets.
Expand
A ValueSet resource can be expanded by using a GET request URL such as:
https://valentiatech.snochillies.com/fhir/ValueSet/[id]/$expand (instance level)
Example:
https://valentiatech.snochillies.com/fhir/ValueSet/activity-reason/$expand?count=10
https://valentiatech.snochillies.com/fhir/ValueSet/$expand (type-level)
Example:
https://valentiatech.snochillies.com/fhir/ValueSet/$expand?identifier=http://snomed.info/sct?fhir_vs&filter=malaria&count=100
The value set to be expanded in a type-level request by using the identifier parameter, potential values for this parameter are explained in detail below.
A value set expansion can also be controlled using the following parameters:
Parameter |
Type |
Description |
Filter |
String |
A text filter that is applied to restrict the codes that are returned (this is useful in a UI context).
If filter request is a number it exactly return matching result. Example:
https://valentiatech.snochillies.com/fhir/ValueSet/$expand?identifier=http://snomed.info/sct?fhir_vs&filter=61462000
If filter request as a text string then it return records where string matches by using full text search.
Example:
https://valentiatech.snochillies.com/fhir/ValueSet/$expand?identifier=http://snomed.info/sct?fhir_vs&filter=malaria
|
Count |
Integer |
Paging support - how many results should be provided in a partial view as potentially result count could be in thousands.
Example:
https://valentiatech.snochillies.com/fhir/ValueSet/$expand?identifier=http://snomed.info/sct?fhir_vs&filter=malaria&count=100
|
Offset |
Integer |
offset = 2 means that the second matching record will be returned, not the second page
Example:
https://valentiatech.snochillies.com/fhir/ValueSet/$expand?identifier=http://snomed.info/sct?fhir_vs&filter=malaria&offset=2
|
Code System FHIR resource API supports the
$lookup
operations for both Explicit and Implicit value sets.
A lookup on a code within a given code system can be done using a GET request such as:
https://valentiatech.snochillies.com/fhir/CodeSystem/$lookup
Where the code and system to lookup must be provided in the parameters of a GET request.
The
$lookup
operation is supported according to its definition in the FHIR® Specification , and supports the code, and system. The version, date, coding and property parameters are not currently supported.
Successful lookups on SNOMED codes will include designations for fully specified names and synonyms, as well as properties for any parents or children.
In Progress..
{
"resourceType" : "ValueSet",
"url" : "
", // Logical URI to reference this value set (globally unique)
"identifier" : [{ Identifier }], // Additional identifier for the value set
"version" : "
", // Business version of the value set
"name" : "
", // Name for this value set (computer friendly)
"title" : "
", // Name for this value set (human friendly)
"status" : "
", // R! draft | active | retired | unknown
"experimental" :
, // For testing purposes, not real usage
"date" : "
", // Date this was last changed
"publisher" : "
", // Name of the publisher (organization or individual)
"contact" : [{ ContactDetail }], // Contact details for the publisher
"description" : "
", // Natural language description of the value set
"useContext" : [{ UsageContext }], // Context the content is intended to support
"jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for value set (if applicable)
"immutable" :
, // Indicates whether or not any change to the content logical definition may occur
"purpose" : "
", // Why this value set is defined
"copyright" : "
", // Use and/or publishing restrictions
"extensible" :
, // Whether this is intended to be used with an extensible binding
"compose" : { // C? Definition of the content of the value set (CLD)
"lockedDate" : "
", // Fixed date for version-less references (transitive)
"inactive" :
, // Whether inactive codes are in the value set
"include" : [{ // R! Include one or more codes from a code system or other value set(s)
"system" : "
", // C? The system the codes come from
"version" : "
", // Specific version of the code system referred to
"concept" : [{ // C? A concept defined in the system
"code" : "
", // R! Code or expression from system
"display" : "
", // Text to display for this code for this value set in this valueset
"designation" : [{ // Additional representations for this concept
"language" : "
", // Human language of the designation
"use" : { Coding }, // Details how this designation would be used
"value" : "
" // R! The text value for this designation
}]
}],
"filter" : [{ // C? Select codes/concepts by their properties (including relationships)
"property" : "
", // R! A property defined by the code system
"op" : "
", // R! = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists
"value" : "
" // R! Code from the system, or regex criteria, or boolean value for exists
}],
"valueSet" : ["
"] // C? Select only contents included in this value set
}],
"exclude" : [{ Content as for ValueSet.compose.include }] // C? Explicitly exclude codes from a code system or other value sets
},
"expansion" : { // C? Used when the value set is "expanded"
"identifier" : "
", // R! Uniquely identifies this expansion
"timestamp" : "
", // R! Time ValueSet expansion happened
"total" :
, // Total number of codes in the expansion
"offset" :
, // Offset at which this resource starts
"parameter" : [{ // Parameter that controlled the expansion process
"name" : "
", // R! Name as assigned by the server
// value[x]: Value of the named parameter. One of these 6:
"valueString" : "
"
"valueBoolean" :
"valueInteger" :
"valueDecimal" :
"valueUri" : "
"
"valueCode" : "
"
}],
"contains" : [{ // Codes in the value set
"system" : "
", // System value for the code
"abstract" :
, // If user cannot select this entry
"inactive" :
, // If concept is inactive in the code system
"version" : "
", // Version in which this code/display is defined
"code" : "
", // C? Code - if blank, this is not a selectable code
"display" : "
", // C? User display for the concept
"designation" : [{ Content as for ValueSet.compose.include.concept.designation }], // Additional representations for this item
"contains" : [{ Content as for ValueSet.expansion.contains }] // Codes contained under this entry
}]
}
}
{
"resourceType" : "CodeSystem",
"url" : "
", // Logical URI to reference this code system (globally unique) (Coding.system)
"identifier" : { Identifier }, // Additional identifier for the code system
"version" : "
", // Business version of the code system (Coding.version)
"name" : "
", // Name for this code system (computer friendly)
"title" : "
", // Name for this code system (human friendly)
"status" : "
", // R! draft | active | retired | unknown
"experimental" :
, // For testing purposes, not real usage
"date" : "
", // Date this was last changed
"publisher" : "
", // Name of the publisher (organization or individual)
"contact" : [{ ContactDetail }], // Contact details for the publisher
"description" : "
", // Natural language description of the code system
"useContext" : [{ UsageContext }], // Context the content is intended to support
"jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for code system (if applicable)
"purpose" : "
", // Why this code system is defined
"copyright" : "
", // Use and/or publishing restrictions
"caseSensitive" :
, // If code comparison is case sensitive
"valueSet" : "
", // Canonical URL for value set with entire code system
"hierarchyMeaning" : "
", // grouped-by | is-a | part-of | classified-with
"compositional" :
, // If code system defines a post-composition grammar
"versionNeeded" :
, // If definitions are not stable
"content" : "
", // R! not-present | example | fragment | complete
"count" : "
", // Total concepts in the code system
"filter" : [{ // Filter that can be used in a value set
"code" : "
", // R! Code that identifies the filter
"description" : "
", // How or why the filter is used
"operator" : ["
"], // R! Operators that can be used with filter
"value" : "
" // R! What to use for the value
}],
"property" : [{ // Additional information supplied about each concept
"code" : "
", // R! Identifies the property on the concepts, and when referred to in operations
"uri" : "
", // Formal identifier for the property
"description" : "
", // Why the property is defined, and/or what it conveys
"type" : "
" // R! code | Coding | string | integer | boolean | dateTime
}],
"concept" : [{ // Concepts in the code system
"code" : "
", // R! Code that identifies concept
"display" : "
", // Text to display to the user
"definition" : "
", // Formal definition
"designation" : [{ // Additional representations for the concept
"language" : "
", // Human language of the designation
"use" : { Coding }, // Details how this designation would be used
"value" : "
" // R! The text value for this designation
}],
"property" : [{ // Property value for the concept
"code" : "
", // R! Reference to CodeSystem.property.code
// value[x]: Value of the property for this concept. One of these 6:
"valueCode" : "
"
"valueCoding" : { Coding }
"valueString" : "
"
"valueInteger" :
"valueBoolean" :
"valueDateTime" : "
"
}],
"concept" : [{ Content as for CodeSystem.concept }] // Child Concepts (is-a/contains/categorizes)
}]
}
{
"resourceType" : "ConceptMap",
// from Resource: id, meta, implicitRules, and language
// from DomainResource: text, contained, extension, and modifierExtension
"url" : "
", // Logical URI to reference this concept map (globally unique)
"identifier" : { Identifier }, // Additional identifier for the concept map
"version" : "
", // Business version of the concept map
"name" : "
", // Name for this concept map (computer friendly)
"title" : "
", // Name for this concept map (human friendly)
"status" : "
", // R! draft | active | retired | unknown
"experimental" :
, // For testing purposes, not real usage
"date" : "
", // Date this was last changed
"publisher" : "
", // Name of the publisher (organization or individual)
"contact" : [{ ContactDetail }], // Contact details for the publisher
"description" : "
", // Natural language description of the concept map
"useContext" : [{ UsageContext }], // Context the content is intended to support
"jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for concept map (if applicable)
"purpose" : "
", // Why this concept map is defined
"copyright" : "
", // Use and/or publishing restrictions
// source[x]: Identifies the source of the concepts which are being mapped. One of these 2:
"sourceUri" : "
",
"sourceReference" : { Reference(ValueSet) },
// target[x]: Provides context to the mappings. One of these 2:
"targetUri" : "
",
"targetReference" : { Reference(ValueSet) },
"group" : [{ // Same source and target systems
"source" : "
", // Code System (if value set crosses code systems)
"sourceVersion" : "
", // Specific version of the code system
"target" : "
", // System of the target (if necessary)
"targetVersion" : "
", // Specific version of the code system
"element" : [{ // R! Mappings for a concept from the source set
"code" : "
", // Identifies element being mapped
"display" : "
", // Display for the code
"target" : [{ // Concept in target system for element
"code" : "
", // Code that identifies the target element
"display" : "
", // Display for the code
"equivalence" : "
", // relatedto | equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint
"comment" : "
", // C? Description of status/issues in mapping
"dependsOn" : [{ // Other elements required for this mapping (from context)
"property" : "
", // R! Reference to property mapping depends on
"system" : "
", // Code System (if necessary)
"code" : "
", // R! Value of the referenced element
"display" : "
" // Display for the code
}],
"product" : [{ Content as for ConceptMap.group.element.target.dependsOn }] // Other concepts that this mapping also produces
}]
}],
"unmapped" : { // When no match in the mappings
"mode" : "
", // R! provided | fixed | other-map
"code" : "
", // Fixed code when mode = fixed
"display" : "
", // Display for the code
"url" : "
" // Canonical URL for other concept map
}
}]
}