curl -X POST "https://api.haau3.com/v1/fhir/r4/\$structure-dosage" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{ "name": "text", "valueString": "Take 1 tablet by mouth daily" },
{
"valueCodeableConcept": {
"coding": [
{
"code": "311354",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"display": "lisinopril 5 MG Oral Tablet"
}
]
},
"name": "medication"
}
]
}'import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.structureDosage({
resourceType: "Parameters",
parameter: [
{ name: "text", valueString: "Take 1 tablet by mouth daily" },
{
valueCodeableConcept: {
coding: [
{
code: "311354",
system: "http://www.nlm.nih.gov/research/umls/rxnorm",
display: "lisinopril 5 MG Oral Tablet",
},
],
},
name: "medication",
},
],
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.structure_dosage(
{
"resourceType": "Parameters",
"parameter": [
{"name": "text", "valueString": "Take 1 tablet by mouth daily"},
{
"valueCodeableConcept": {
"coding": [
{
"code": "311354",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"display": "lisinopril 5 MG Oral Tablet",
}
]
},
"name": "medication",
},
],
}
)
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.StructureDosage(ctx, &fhir.Parameters{
Parameter: []fhir.ParametersParameter{
{Name: new("text"), ValueString: new("Take 1 tablet by mouth daily")},
{
Name: new("medication"),
ValueCodeableConcept: &fhir.CodeableConcept{
Coding: []fhir.Coding{
{
Code: new("311354"),
Display: new("lisinopril 5 MG Oral Tablet"),
System: new("http://www.nlm.nih.gov/research/umls/rxnorm"),
},
},
},
},
},
})
if err != nil {
log.Fatal(err)
}
for _, parameter := range parameters.Parameter {
if parameter.Name != nil {
fmt.Println(*parameter.Name)
}
}
}
{
"resourceType": "Parameters",
"parameter": [
{
"valueDosage": {
"extension": [
{
"url": "https://haau3.com/fhir/StructureDefinition/structured-sig-engine-version",
"valueString": "2026-10-30.v2"
},
{
"url": "https://haau3.com/fhir/StructureDefinition/structured-sig-vocabulary-version",
"valueString": "2026-10-29.v1"
},
{
"url": "https://haau3.com/fhir/StructureDefinition/structured-sig-rxnorm-release",
"valueString": "10052026"
}
],
"timing": {
"repeat": {
"frequency": 1,
"period": 1,
"periodUnit": "d"
},
"code": {
"coding": [
{
"code": "69620002",
"system": "http://snomed.info/sct",
"display": "Daily"
},
{
"code": "QD",
"system": "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
"display": "QD"
}
]
}
},
"route": {
"coding": [
{
"code": "26643006",
"system": "http://snomed.info/sct",
"display": "Oral route"
},
{
"code": "C38288",
"system": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl",
"display": "Oral Route of Administration"
}
]
},
"method": {
"coding": [
{
"code": "419652001",
"system": "http://snomed.info/sct",
"display": "Take"
}
]
},
"doseAndRate": [
{
"doseQuantity": {
"value": 1,
"unit": "Tablet",
"system": "http://unitsofmeasure.org",
"code": "{tbl}"
}
}
],
"text": "Take 1 tablet by mouth daily"
},
"name": "dosage"
}
]
}{
"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>"
]
}
]
}Structure a prescription's directions as a FHIR Dosage
FHIR system-level operation $structure-dosage. POST a Parameters resource with one text part, a prescription’s directions as written, at most 1,000 characters, and optionally one medication part, the medication’s codings as a CodeableConcept (RxNorm or NDC). The answer is a Parameters resource with one dosage part: a FHIR Dosage conforming to haau3 Structured Dosage, whose text is the directions exactly as sent and whose dose and unit, route, method, timing and as-needed elements are coded where the words support them, in SNOMED CT (Global Patient Set concepts only), NCIt and UCUM. Nothing is invented: an element the directions do not support is absent. Anything a person should check is a review flag on the Dosage, an extension with a code from https://haau3.com/fhir/CodeSystem/structured-sig-review-flag and, when the flag is about words, those words. Every Dosage names the engine and vocabulary versions it was written under, and the RxNorm release when the medication’s code was looked up. With an RxNorm code, the product’s dose form checks the dose’s unit and the route, and supplies either when the directions name none, each flagged. Send the directions and the medication’s codings only, never a patient’s name or identifiers. Nothing a request carries is stored or logged, apart from the request’s ids, and every answer is sent with Cache-Control: no-store. The operation takes no query parameters, and may be sent inside a batch, one request per entry. The contract is published at https://fhir.haau3.com/OperationDefinition-structure-dosage.html.
curl -X POST "https://api.haau3.com/v1/fhir/r4/\$structure-dosage" \
-H "Authorization: Bearer $HAAU3_API_KEY" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{ "name": "text", "valueString": "Take 1 tablet by mouth daily" },
{
"valueCodeableConcept": {
"coding": [
{
"code": "311354",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"display": "lisinopril 5 MG Oral Tablet"
}
]
},
"name": "medication"
}
]
}'import { Haau3 } from "@haau3/sdk";
const haau3 = new Haau3(); // reads HAAU3_API_KEY
const parameters = await haau3.structureDosage({
resourceType: "Parameters",
parameter: [
{ name: "text", valueString: "Take 1 tablet by mouth daily" },
{
valueCodeableConcept: {
coding: [
{
code: "311354",
system: "http://www.nlm.nih.gov/research/umls/rxnorm",
display: "lisinopril 5 MG Oral Tablet",
},
],
},
name: "medication",
},
],
});
for (const parameter of parameters.parameter ?? []) console.log(parameter.name);
from haau3 import Haau3
client = Haau3() # reads HAAU3_API_KEY
parameters = client.structure_dosage(
{
"resourceType": "Parameters",
"parameter": [
{"name": "text", "valueString": "Take 1 tablet by mouth daily"},
{
"valueCodeableConcept": {
"coding": [
{
"code": "311354",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"display": "lisinopril 5 MG Oral Tablet",
}
]
},
"name": "medication",
},
],
}
)
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.StructureDosage(ctx, &fhir.Parameters{
Parameter: []fhir.ParametersParameter{
{Name: new("text"), ValueString: new("Take 1 tablet by mouth daily")},
{
Name: new("medication"),
ValueCodeableConcept: &fhir.CodeableConcept{
Coding: []fhir.Coding{
{
Code: new("311354"),
Display: new("lisinopril 5 MG Oral Tablet"),
System: new("http://www.nlm.nih.gov/research/umls/rxnorm"),
},
},
},
},
},
})
if err != nil {
log.Fatal(err)
}
for _, parameter := range parameters.Parameter {
if parameter.Name != nil {
fmt.Println(*parameter.Name)
}
}
}
{
"resourceType": "Parameters",
"parameter": [
{
"valueDosage": {
"extension": [
{
"url": "https://haau3.com/fhir/StructureDefinition/structured-sig-engine-version",
"valueString": "2026-10-30.v2"
},
{
"url": "https://haau3.com/fhir/StructureDefinition/structured-sig-vocabulary-version",
"valueString": "2026-10-29.v1"
},
{
"url": "https://haau3.com/fhir/StructureDefinition/structured-sig-rxnorm-release",
"valueString": "10052026"
}
],
"timing": {
"repeat": {
"frequency": 1,
"period": 1,
"periodUnit": "d"
},
"code": {
"coding": [
{
"code": "69620002",
"system": "http://snomed.info/sct",
"display": "Daily"
},
{
"code": "QD",
"system": "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
"display": "QD"
}
]
}
},
"route": {
"coding": [
{
"code": "26643006",
"system": "http://snomed.info/sct",
"display": "Oral route"
},
{
"code": "C38288",
"system": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl",
"display": "Oral Route of Administration"
}
]
},
"method": {
"coding": [
{
"code": "419652001",
"system": "http://snomed.info/sct",
"display": "Take"
}
]
},
"doseAndRate": [
{
"doseQuantity": {
"value": 1,
"unit": "Tablet",
"system": "http://unitsofmeasure.org",
"code": "{tbl}"
}
}
],
"text": "Take 1 tablet by mouth daily"
},
"name": "dosage"
}
]
}{
"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
Your platform API key, sent as Authorization: Bearer <key>: a live key (haau3_sk_live_…) for every service, or a test key (haau3_sk_test_…) for the Sandbox, the one place a test key works and a live key does not.
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
The structured directions: a FHIR Parameters resource with one dosage part, a Dosage conforming to haau3 Structured Dosage.
A FHIR R4 Parameters.