What merging this chart into another would do
curl --request GET \
--url https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview \
--header 'Authorization: Bearer <token>' \
--header 'X-Organization-Id: <x-organization-id>'import requests
url = "https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview"
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Organization-Id': '<x-organization-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview', 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.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"isMergeable": true,
"requiresAcknowledgement": true,
"source": {
"patientId": "<string>",
"isMergeable": true,
"blockers": [
{
"code": "pending_billing",
"message": "There is an active balance that needs to be resolved prior to merging patient."
}
],
"totals": {},
"futureAppointments": 123,
"activePrimaryPolicies": 123
},
"target": {
"patientId": "<string>",
"isMergeable": true,
"blockers": [
{
"code": "pending_billing",
"message": "There is an active balance that needs to be resolved prior to merging patient."
}
],
"totals": {},
"futureAppointments": 123,
"activePrimaryPolicies": 123
},
"pairWarnings": [
{
"code": "pending_billing",
"message": "There is an active balance that needs to be resolved prior to merging patient."
}
],
"conflicts": [
{
"code": "demographics_differ",
"fields": [
"<string>"
],
"message": "<string>"
}
],
"transfers": [
"<string>"
],
"doesNotTransfer": [
"<string>"
]
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "capability_unsupported",
"message": "This organization's EHR has no appointment finder.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Patient merges
What merging this chart into another would do
Read-only. Asks the EHR whether each chart may be merged in its role (the path patient is the source, archived by the merge) and lists what EMA copies, what it leaves behind and conflicts staff should confirm. 501 capability_unsupported on an EHR without merge (EZDerm).
GET
/
ehr
/
patients
/
{patientId}
/
merge-preview
What merging this chart into another would do
curl --request GET \
--url https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview \
--header 'Authorization: Bearer <token>' \
--header 'X-Organization-Id: <x-organization-id>'import requests
url = "https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview"
headers = {
"X-Organization-Id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Organization-Id': '<x-organization-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview', 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.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Organization-Id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-Id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview")
.header("X-Organization-Id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.maxcare.ai/v4/ehr/patients/{patientId}/merge-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-Id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "success",
"data": {
"isMergeable": true,
"requiresAcknowledgement": true,
"source": {
"patientId": "<string>",
"isMergeable": true,
"blockers": [
{
"code": "pending_billing",
"message": "There is an active balance that needs to be resolved prior to merging patient."
}
],
"totals": {},
"futureAppointments": 123,
"activePrimaryPolicies": 123
},
"target": {
"patientId": "<string>",
"isMergeable": true,
"blockers": [
{
"code": "pending_billing",
"message": "There is an active balance that needs to be resolved prior to merging patient."
}
],
"totals": {},
"futureAppointments": 123,
"activePrimaryPolicies": 123
},
"pairWarnings": [
{
"code": "pending_billing",
"message": "There is an active balance that needs to be resolved prior to merging patient."
}
],
"conflicts": [
{
"code": "demographics_differ",
"fields": [
"<string>"
],
"message": "<string>"
}
],
"transfers": [
"<string>"
],
"doesNotTransfer": [
"<string>"
]
}
}{
"code": "bad_request",
"message": "'id' must be a valid UUID",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unauthorized",
"message": "Invalid or missing API key",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "forbidden",
"message": "Insufficient scope",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "not_found",
"message": "Resource not found",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "conflict",
"message": "Cannot edit a signed note",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Maximum 1000 requests per 60 seconds.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "capability_unsupported",
"message": "This organization's EHR has no appointment finder.",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"code": "unexpected_integration_error",
"message": "EHR sync failed",
"trace_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
Marketplace API key
Headers
Target clinic organization ID
Path Parameters
Query Parameters
The chart that would survive.
Example:
"pat_c56103bcd39c46d39f3138dd2b5e05f6"
