curl -X POST "https://api.haau3.com/v1/fhir/r4/ValueSet/\$validate-code" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{
"name": "url",
"valueUri": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
},
{
"name": "coding",
"valueCoding": { "system": "http://loinc.org", "code": "8867-4" }
}
]
}'
import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.valueSetValidateCodePost({
resourceType: "Parameters",
parameter: [
{ name: "url", valueUri: "http://hl7.org/fhir/ValueSet/observation-vitalsignresult" },
{ name: "coding", valueCoding: { system: "http://loinc.org", code: "8867-4" } },
],
});
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_post(
{
"resourceType": "Parameters",
"parameter": [
{"name": "url", "valueUri": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"},
{"name": "coding", "valueCoding": {"system": "http://loinc.org", "code": "8867-4"}},
],
}
)
for parameter in parameters.get("parameter", []):
print(parameter.get("name"))
package main
import (
"context"
"fmt"
"log"
"github.com/haau3/haau3-go"
"github.com/haau3/haau3-go/fhir"
)
func main() {
ctx := context.Background()
client, err := haau3.NewClient() // reads HAAU3_API_KEY
if err != nil {
log.Fatal(err)
}
parameters, err := client.ValueSetValidateCodePost(ctx, &fhir.Parameters{
Parameter: []fhir.ParametersParameter{
{
Name: new("url"),
ValueURI: new("http://hl7.org/fhir/ValueSet/observation-vitalsignresult"),
},
{
Name: new("coding"),
ValueCoding: &fhir.Coding{Code: new("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>"
]
}
]
}{
"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 -X POST "https://api.haau3.com/v1/fhir/r4/ValueSet/\$validate-code" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{
"name": "url",
"valueUri": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
},
{
"name": "coding",
"valueCoding": { "system": "http://loinc.org", "code": "8867-4" }
}
]
}'
import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.valueSetValidateCodePost({
resourceType: "Parameters",
parameter: [
{ name: "url", valueUri: "http://hl7.org/fhir/ValueSet/observation-vitalsignresult" },
{ name: "coding", valueCoding: { system: "http://loinc.org", code: "8867-4" } },
],
});
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_post(
{
"resourceType": "Parameters",
"parameter": [
{"name": "url", "valueUri": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"},
{"name": "coding", "valueCoding": {"system": "http://loinc.org", "code": "8867-4"}},
],
}
)
for parameter in parameters.get("parameter", []):
print(parameter.get("name"))
package main
import (
"context"
"fmt"
"log"
"github.com/haau3/haau3-go"
"github.com/haau3/haau3-go/fhir"
)
func main() {
ctx := context.Background()
client, err := haau3.NewClient() // reads HAAU3_API_KEY
if err != nil {
log.Fatal(err)
}
parameters, err := client.ValueSetValidateCodePost(ctx, &fhir.Parameters{
Parameter: []fhir.ParametersParameter{
{
Name: new("url"),
ValueURI: new("http://hl7.org/fhir/ValueSet/observation-vitalsignresult"),
},
{
Name: new("coding"),
ValueCoding: &fhir.Coding{Code: new("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>"
]
}
]
}{
"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.
Body
A FHIR R4 Parameters.
Response
A FHIR Parameters resource carrying result.
A FHIR R4 Parameters.