curl --request POST \
--url 'https://api.haau3.com/v1/fhir/r4/$reconcile-medications' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/fhir+json' \
--data '
{
"resourceType": "Bundle",
"type": "<string>",
"entry": [
{
"fullUrl": "<string>",
"search": {
"mode": "<string>"
}
}
]
}
'import requests
url = "https://api.haau3.com/v1/fhir/r4/$reconcile-medications"
payload = {
"resourceType": "Bundle",
"type": "<string>",
"entry": [
{
"fullUrl": "<string>",
"search": { "mode": "<string>" }
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/fhir+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/fhir+json'},
body: JSON.stringify({
resourceType: 'Bundle',
type: '<string>',
entry: [{fullUrl: '<string>', search: {mode: '<string>'}}]
})
};
fetch('https://api.haau3.com/v1/fhir/r4/$reconcile-medications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.haau3.com/v1/fhir/r4/$reconcile-medications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resourceType' => 'Bundle',
'type' => '<string>',
'entry' => [
[
'fullUrl' => '<string>',
'search' => [
'mode' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/fhir+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.haau3.com/v1/fhir/r4/$reconcile-medications"
payload := strings.NewReader("{\n \"resourceType\": \"Bundle\",\n \"type\": \"<string>\",\n \"entry\": [\n {\n \"fullUrl\": \"<string>\",\n \"search\": {\n \"mode\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/fhir+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.haau3.com/v1/fhir/r4/$reconcile-medications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/fhir+json")
.body("{\n \"resourceType\": \"Bundle\",\n \"type\": \"<string>\",\n \"entry\": [\n {\n \"fullUrl\": \"<string>\",\n \"search\": {\n \"mode\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.haau3.com/v1/fhir/r4/$reconcile-medications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/fhir+json'
request.body = "{\n \"resourceType\": \"Bundle\",\n \"type\": \"<string>\",\n \"entry\": [\n {\n \"fullUrl\": \"<string>\",\n \"search\": {\n \"mode\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"error": "API key required",
"message": "<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>"
]
}
]
}Reconcile one patient's medication records
FHIR system-level operation $reconcile-medications. POST one patient’s MedicationRequest, MedicationStatement, MedicationDispense and MedicationAdministration records, with the Medications they reference, as a collection or searchset Bundle; every entry needs a fullUrl. The response is one reconciled medication list: a collection Bundle holding one reconciled MedicationRequest per clinical drug, a Provenance for each naming the records behind it, and an OperationOutcome when a record was skipped. To evaluate the list as of another date, POST a Parameters resource with resource parts, or one bundle part, and an asOf part. This operation receives patient data, so send it only under an executed agreement. Nothing a request carries is stored or logged, and the operation is not offered inside a batch. The contract is published at https://fhir.haau3.com/OperationDefinition-reconcile-medications.html.
curl --request POST \
--url 'https://api.haau3.com/v1/fhir/r4/$reconcile-medications' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/fhir+json' \
--data '
{
"resourceType": "Bundle",
"type": "<string>",
"entry": [
{
"fullUrl": "<string>",
"search": {
"mode": "<string>"
}
}
]
}
'import requests
url = "https://api.haau3.com/v1/fhir/r4/$reconcile-medications"
payload = {
"resourceType": "Bundle",
"type": "<string>",
"entry": [
{
"fullUrl": "<string>",
"search": { "mode": "<string>" }
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/fhir+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/fhir+json'},
body: JSON.stringify({
resourceType: 'Bundle',
type: '<string>',
entry: [{fullUrl: '<string>', search: {mode: '<string>'}}]
})
};
fetch('https://api.haau3.com/v1/fhir/r4/$reconcile-medications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.haau3.com/v1/fhir/r4/$reconcile-medications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resourceType' => 'Bundle',
'type' => '<string>',
'entry' => [
[
'fullUrl' => '<string>',
'search' => [
'mode' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/fhir+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.haau3.com/v1/fhir/r4/$reconcile-medications"
payload := strings.NewReader("{\n \"resourceType\": \"Bundle\",\n \"type\": \"<string>\",\n \"entry\": [\n {\n \"fullUrl\": \"<string>\",\n \"search\": {\n \"mode\": \"<string>\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/fhir+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.haau3.com/v1/fhir/r4/$reconcile-medications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/fhir+json")
.body("{\n \"resourceType\": \"Bundle\",\n \"type\": \"<string>\",\n \"entry\": [\n {\n \"fullUrl\": \"<string>\",\n \"search\": {\n \"mode\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.haau3.com/v1/fhir/r4/$reconcile-medications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/fhir+json'
request.body = "{\n \"resourceType\": \"Bundle\",\n \"type\": \"<string>\",\n \"entry\": [\n {\n \"fullUrl\": \"<string>\",\n \"search\": {\n \"mode\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "<string>",
"details": {
"text": "<string>"
},
"diagnostics": "<string>",
"expression": [
"<string>"
]
}
]
}{
"error": "API key required",
"message": "<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 (haau3_sk_…), sent as Authorization: Bearer <key>.
Body
Response
The reconciled list: a FHIR Bundle of type collection conforming to haau3 Reconciled Medication Bundle, returned as the response body itself.
The response is of type object.