curl "https://api.haau3.com/v1/fhir/r4/ValueSet/\$validate-code?url=http://hl7.org/fhir/ValueSet/observation-vitalsignresult&code=8867-4&system=http://loinc.org" \
-H "Authorization: Bearer $HAAU3_API_KEY"import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.valueSetValidateCode({
url: "http://hl7.org/fhir/ValueSet/observation-vitalsignresult",
code: "8867-4",
system: "http://loinc.org",
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.value_set_validate_code(
url="http://hl7.org/fhir/ValueSet/observation-vitalsignresult", code="8867-4", system="http://loinc.org"
)
for parameter in parameters.get("parameter", []):
print(parameter.get("name"))
package main
import (
"context"
"fmt"
"log"
"github.com/haau3/haau3-go"
)
func main() {
ctx := context.Background()
client, err := haau3.NewClient() // reads HAAU3_API_KEY
if err != nil {
log.Fatal(err)
}
parameters, err := client.ValueSetValidateCode(ctx, haau3.ValueSetValidateCodeParams{URL: new("http://hl7.org/fhir/ValueSet/observation-vitalsignresult"), Code: "8867-4", System: new("http://loinc.org")})
if err != nil {
log.Fatal(err)
}
for _, parameter := range parameters.Parameter {
if parameter.Name != nil {
fmt.Println(*parameter.Name)
}
}
}
{
"resourceType": "Parameters",
"parameter": [
{
"name": "result",
"valueBoolean": true
},
{
"name": "copyright",
"valueString": "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at http://loinc.org/terms-of-use"
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "forbidden",
"details": {
"coding": [
{
"system": "https://haau3.com/fhir/CodeSystem/api-error",
"code": "test-key-outside-sandbox",
"display": "Test key outside the Sandbox"
}
],
"text": "This is a test key, which works only in the Sandbox (https://api.haau3.com/v1/sandbox/fhir/r4). Send this request with a live key; create one in the dashboard. See https://docs.haau3.com/authentication#test-and-live-keys"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}Validate a code against a value set
FHIR ValueSet/$validate-code. A code that is not in the set is a successful 200 with result: false, not an error. On POST, a coding or codeableConcept parameter may stand in for system + code; a codeableConcept validates if any of its codings is in the set, which helps when an element carries a vendor-local coding alongside a standard one.
curl "https://api.haau3.com/v1/fhir/r4/ValueSet/\$validate-code?url=http://hl7.org/fhir/ValueSet/observation-vitalsignresult&code=8867-4&system=http://loinc.org" \
-H "Authorization: Bearer $HAAU3_API_KEY"import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.valueSetValidateCode({
url: "http://hl7.org/fhir/ValueSet/observation-vitalsignresult",
code: "8867-4",
system: "http://loinc.org",
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.value_set_validate_code(
url="http://hl7.org/fhir/ValueSet/observation-vitalsignresult", code="8867-4", system="http://loinc.org"
)
for parameter in parameters.get("parameter", []):
print(parameter.get("name"))
package main
import (
"context"
"fmt"
"log"
"github.com/haau3/haau3-go"
)
func main() {
ctx := context.Background()
client, err := haau3.NewClient() // reads HAAU3_API_KEY
if err != nil {
log.Fatal(err)
}
parameters, err := client.ValueSetValidateCode(ctx, haau3.ValueSetValidateCodeParams{URL: new("http://hl7.org/fhir/ValueSet/observation-vitalsignresult"), Code: "8867-4", System: new("http://loinc.org")})
if err != nil {
log.Fatal(err)
}
for _, parameter := range parameters.Parameter {
if parameter.Name != nil {
fmt.Println(*parameter.Name)
}
}
}
{
"resourceType": "Parameters",
"parameter": [
{
"name": "result",
"valueBoolean": true
},
{
"name": "copyright",
"valueString": "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at http://loinc.org/terms-of-use"
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "forbidden",
"details": {
"coding": [
{
"system": "https://haau3.com/fhir/CodeSystem/api-error",
"code": "test-key-outside-sandbox",
"display": "Test key outside the Sandbox"
}
],
"text": "This is a test key, which works only in the Sandbox (https://api.haau3.com/v1/sandbox/fhir/r4). Send this request with a live key; create one in the dashboard. See https://docs.haau3.com/authentication#test-and-live-keys"
}
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}Authorizations
A live platform API key (haau3_sk_live_…), sent as Authorization: Bearer <key>. It works for every service outside the Sandbox. Create one on the API keys page at https://platform.haau3.com.
Headers
An id of your own for this request, as a UUID. It comes back in the X-Correlation-Id header and is kept with haau3's record of the request. Any value that is not a UUID is ignored. See https://docs.haau3.com/errors#request-ids.
Query Parameters
Canonical URL of the value set to validate against. Defaults to the implicit all-LOINC value set (http://loinc.org?fhir_vs), which is every LOINC code.
1The code to validate.
1Code system URI of the code. Defaults to LOINC (http://loinc.org).
1Optional display to check against the code's own display. A mismatch returns result: false with the expected display alongside, which means the code is valid and only the label differs. Do not read that as an invalid code. On RxNorm and ICD-10-CM any name the code has matches: RxNorm's other names, and an ICD-10-CM code's short title.
1Language to use when checking the display. RxNorm and ICD-10-CM are held in English only: another language is checked against the English names, and the message says so.
1The date for which the validation should be valid.
1Response
A FHIR Parameters resource carrying result.
A FHIR R4 Parameters.