ValidateValueSetCode

Validate ValueSet Code

Summary

A REST operation implemented by the Terminology service that validates a code against a value set or code system using terminology artifacts loaded in memory to support high performance.

The validation code operation complies with the FHIR Operation $validate-code on ValueSet specification.

Example Requests

Using query parameters with the ValueSet identified in the URL path

Note: The "system" query parameter often has special characters in it that need to be URL encoded, as in this example.

POST {{terminology-api-base}}/api/terminology/fhir/ValueSet/address-type/$validate-code?code=physical&system=http%3A%2F%2Fhl7.org%2Ffhir%2Faddress-type

Using query parameters

Note: The "system" and "url" query parameters often have special characters that must be URL-encoded, as in this example.

POST {{terminology-api-base}}/api/terminology/fhir/ValueSet/$validate-code?url=http%3A%2F%2Fhl7.org%2Ffhir%2FValueSet%2Faddress-type&code=physical&system=http%3A%2F%2Fhl7.org%2Ffhir%2Faddress-type

Example Response

Good/valid response

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "result",
            "valueBoolean": true
        }
    ]
}

Bad/invalid response

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "result",
            "valueBoolean": false
        },
        {
            "name": "message",
            "valueString": "Code not found in ValueSet"
        }
    ]
}
flowchart LR
nValidateValueSetCode_2E2BA8B0["Command: Validate ValueSet Code"]
  nValidationService_20F4F748["Service: ValidationService"] -->|sends| nValidateValueSetCode_2E2BA8B0
  nValidateValueSetCode_2E2BA8B0 -->|handled by| nTerminologyService_621D88E6["Service: TerminologyService"]
  subgraph nCompliance_DBAE25D_domain["Domain: Compliance"]
    nValidateValueSetCode_2E2BA8B0
    nValidationService_20F4F748
  end
  subgraph nKnowledgeArtifactManagement_308AC1BE_domain["Domain: Knowledge Artifact Management"]
    nTerminologyService_621D88E6
  end

Relationships

flowchart LR
nValidateValueSetCode_2E2BA8B0["Command: Validate ValueSet Code"]
  nValidationService_20F4F748["Service: ValidationService"] -->|sends| nValidateValueSetCode_2E2BA8B0
  nValidateValueSetCode_2E2BA8B0 -->|handled by| nTerminologyService_621D88E6["Service: TerminologyService"]
  subgraph nCompliance_DBAE25D_domain["Domain: Compliance"]
    nValidateValueSetCode_2E2BA8B0
    nValidationService_20F4F748
  end
  subgraph nKnowledgeArtifactManagement_308AC1BE_domain["Domain: Knowledge Artifact Management"]
    nTerminologyService_621D88E6
  end