curl "https://api.haau3.com/v1/fhir/r4/CodeSystem/\$lookup?code=2345-7&system=http://loinc.org&property=SHORTNAME" \
-H "Authorization: Bearer $HAAU3_API_KEY"import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.codeSystemLookup({
code: "2345-7",
system: "http://loinc.org",
property: "SHORTNAME",
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.code_system_lookup(code="2345-7", system="http://loinc.org", property="SHORTNAME")
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.CodeSystemLookup(ctx, haau3.CodeSystemLookupParams{Code: "2345-7", System: new("http://loinc.org"), Property: []string{"SHORTNAME"}})
if err != nil {
log.Fatal(err)
}
for _, parameter := range parameters.Parameter {
if parameter.Name != nil {
fmt.Println(*parameter.Name)
}
}
}
{
"resourceType": "Parameters",
"parameter": [
{
"name": "code",
"valueCode": "2345-7"
},
{
"name": "system",
"valueString": "http://loinc.org"
},
{
"name": "name",
"valueString": "LOINC"
},
{
"name": "version",
"valueString": "2.83"
},
{
"name": "display",
"valueString": "Glucose [Mass/volume] in Serum or Plasma"
},
{
"name": "status",
"valueCode": "active"
},
{
"name": "property",
"part": [
{
"name": "code",
"valueCode": "SHORTNAME"
},
{
"name": "value",
"valueString": "Glucose SerPl-mCnc"
}
]
}
]
}{
"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>"
]
}
]
}Look up a code
FHIR CodeSystem/$lookup. Returns a code’s display and requested properties. On POST, a coding parameter may stand in for system + code. For the code systems this service holds (RxNorm and ICD-10-CM), the answer also names the code and the system, says whether the code is abstract (not for use), and carries the display again as a designation used preferredForLanguage. ICD-10-CM codes are written dotted (E11.9); a lookup answers notSelectable, true for a header, gives the code’s short title as a designation used synonym (http://fhir.org/packages/fhir.tx.support/CodeSystem/designation-usage, as tx.fhir.org gives it) where it differs from the display, and a code not in the version served is a 404 naming that version.
curl "https://api.haau3.com/v1/fhir/r4/CodeSystem/\$lookup?code=2345-7&system=http://loinc.org&property=SHORTNAME" \
-H "Authorization: Bearer $HAAU3_API_KEY"import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.codeSystemLookup({
code: "2345-7",
system: "http://loinc.org",
property: "SHORTNAME",
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.code_system_lookup(code="2345-7", system="http://loinc.org", property="SHORTNAME")
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.CodeSystemLookup(ctx, haau3.CodeSystemLookupParams{Code: "2345-7", System: new("http://loinc.org"), Property: []string{"SHORTNAME"}})
if err != nil {
log.Fatal(err)
}
for _, parameter := range parameters.Parameter {
if parameter.Name != nil {
fmt.Println(*parameter.Name)
}
}
}
{
"resourceType": "Parameters",
"parameter": [
{
"name": "code",
"valueCode": "2345-7"
},
{
"name": "system",
"valueString": "http://loinc.org"
},
{
"name": "name",
"valueString": "LOINC"
},
{
"name": "version",
"valueString": "2.83"
},
{
"name": "display",
"valueString": "Glucose [Mass/volume] in Serum or Plasma"
},
{
"name": "status",
"valueCode": "active"
},
{
"name": "property",
"part": [
{
"name": "code",
"valueCode": "SHORTNAME"
},
{
"name": "value",
"valueString": "Glucose SerPl-mCnc"
}
]
}
]
}{
"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
The code to look up in the code system.
1Code system URI to look up against. Defaults to LOINC (http://loinc.org).
1Optional code system version. Defaults to the server's current version.
1Property to return, repeatable up to 100 times. Narrows the response to the named properties of the code system; omit it to receive all of them. An unrecognised property name is silently omitted from the response, so treat an absent property as 'no answer', never as a negative. More than 100 is refused with a 400 coded too-long.
1Language for the returned display and designations. Defaults to en-US, which also keeps answers small, since a code can have about 30 translations. RxNorm and ICD-10-CM are held in English only: another language is answered in English, with a warning parameter saying so.
1The date for which the lookup should be valid.
1Response
A FHIR Parameters resource describing the code.
A FHIR R4 Parameters.