curl -X POST "https://api.haau3.com/v1/fhir/r4/CodeSystem/\$validate-code" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{ "name": "url", "valueUri": "http://loinc.org" },
{ "name": "code", "valueCode": "2345-7" }
]
}'import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.codeSystemValidateCodePost({
resourceType: "Parameters",
parameter: [{ name: "url", valueUri: "http://loinc.org" }, { name: "code", valueCode: "2345-7" }],
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.code_system_validate_code_post(
{
"resourceType": "Parameters",
"parameter": [{"name": "url", "valueUri": "http://loinc.org"}, {"name": "code", "valueCode": "2345-7"}],
}
)
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.CodeSystemValidateCodePost(ctx, &fhir.Parameters{
Parameter: []fhir.ParametersParameter{
{Name: new("url"), ValueURI: new("http://loinc.org")},
{Name: new("code"), ValueCode: new("2345-7")},
},
})
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": "code",
"valueString": "2345-7"
},
{
"name": "display",
"valueString": "Glucose [Mass/volume] in Serum or Plasma"
},
{
"name": "active",
"valueBoolean": true
},
{
"name": "system",
"valueString": "http://loinc.org"
},
{
"name": "version",
"valueString": "2.83"
}
]
}{
"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 in a code system
FHIR CodeSystem/$validate-code. Asks whether a code exists in a code system. The ValueSet operation of the same name asks about membership of a particular set instead. On POST, a coding or codeableConcept parameter may stand in for url + code; a codeableConcept validates if any of its codings does. An ICD-10-CM header is a code, so it answers true, with a message saying it is not valid for submission; to check a code for a claim, ask ValueSet/$validate-code with https://haau3.com/fhir/ValueSet/icd-10-cm-valid-for-submission.
curl -X POST "https://api.haau3.com/v1/fhir/r4/CodeSystem/\$validate-code" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{ "name": "url", "valueUri": "http://loinc.org" },
{ "name": "code", "valueCode": "2345-7" }
]
}'import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.codeSystemValidateCodePost({
resourceType: "Parameters",
parameter: [{ name: "url", valueUri: "http://loinc.org" }, { name: "code", valueCode: "2345-7" }],
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.code_system_validate_code_post(
{
"resourceType": "Parameters",
"parameter": [{"name": "url", "valueUri": "http://loinc.org"}, {"name": "code", "valueCode": "2345-7"}],
}
)
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.CodeSystemValidateCodePost(ctx, &fhir.Parameters{
Parameter: []fhir.ParametersParameter{
{Name: new("url"), ValueURI: new("http://loinc.org")},
{Name: new("code"), ValueCode: new("2345-7")},
},
})
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": "code",
"valueString": "2345-7"
},
{
"name": "display",
"valueString": "Glucose [Mass/volume] in Serum or Plasma"
},
{
"name": "active",
"valueBoolean": true
},
{
"name": "system",
"valueString": "http://loinc.org"
},
{
"name": "version",
"valueString": "2.83"
}
]
}{
"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.