Updates a patient
curl --request PATCH \
--url https://api.staging.scan.com/api/v2/patients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient": {
"first_name": "<string>",
"middle_initial": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"patient_profile_attributes": {
"date_of_birth": "2023-12-25",
"gender": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>"
}
}
}
'require 'uri'
require 'net/http'
url = URI("https://api.staging.scan.com/api/v2/patients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patient\": {\n \"first_name\": \"<string>\",\n \"middle_initial\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"patient_profile_attributes\": {\n \"date_of_birth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyimport requests
url = "https://api.staging.scan.com/api/v2/patients/{id}"
payload = { "patient": {
"first_name": "<string>",
"middle_initial": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"patient_profile_attributes": {
"date_of_birth": "2023-12-25",
"gender": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>"
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient: {
first_name: '<string>',
middle_initial: '<string>',
last_name: '<string>',
email: '[email protected]',
phone: '<string>',
patient_profile_attributes: {
date_of_birth: '2023-12-25',
gender: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
state: '<string>',
zip_code: '<string>'
}
}
})
};
fetch('https://api.staging.scan.com/api/v2/patients/{id}', 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.staging.scan.com/api/v2/patients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'patient' => [
'first_name' => '<string>',
'middle_initial' => '<string>',
'last_name' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'patient_profile_attributes' => [
'date_of_birth' => '2023-12-25',
'gender' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip_code' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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.staging.scan.com/api/v2/patients/{id}"
payload := strings.NewReader("{\n \"patient\": {\n \"first_name\": \"<string>\",\n \"middle_initial\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"patient_profile_attributes\": {\n \"date_of_birth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"middle_initial": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"phone_number": "<string>",
"date_of_birth": "<string>",
"date_of_birth_iso": "2023-12-25",
"identifier": {
"system": "https://scan.com/fhir/sid/patient-id",
"value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"gender": "<string>",
"weight": 123,
"height_feet": 123,
"height_inches": 123
}Patients
Updates a patient
Updates a patient belonging to the authenticated group.
PATCH
/
api
/
v2
/
patients
/
{id}
Updates a patient
curl --request PATCH \
--url https://api.staging.scan.com/api/v2/patients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient": {
"first_name": "<string>",
"middle_initial": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"patient_profile_attributes": {
"date_of_birth": "2023-12-25",
"gender": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>"
}
}
}
'require 'uri'
require 'net/http'
url = URI("https://api.staging.scan.com/api/v2/patients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patient\": {\n \"first_name\": \"<string>\",\n \"middle_initial\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"patient_profile_attributes\": {\n \"date_of_birth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyimport requests
url = "https://api.staging.scan.com/api/v2/patients/{id}"
payload = { "patient": {
"first_name": "<string>",
"middle_initial": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"patient_profile_attributes": {
"date_of_birth": "2023-12-25",
"gender": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>"
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient: {
first_name: '<string>',
middle_initial: '<string>',
last_name: '<string>',
email: '[email protected]',
phone: '<string>',
patient_profile_attributes: {
date_of_birth: '2023-12-25',
gender: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
state: '<string>',
zip_code: '<string>'
}
}
})
};
fetch('https://api.staging.scan.com/api/v2/patients/{id}', 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.staging.scan.com/api/v2/patients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'patient' => [
'first_name' => '<string>',
'middle_initial' => '<string>',
'last_name' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'patient_profile_attributes' => [
'date_of_birth' => '2023-12-25',
'gender' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip_code' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/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.staging.scan.com/api/v2/patients/{id}"
payload := strings.NewReader("{\n \"patient\": {\n \"first_name\": \"<string>\",\n \"middle_initial\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"patient_profile_attributes\": {\n \"date_of_birth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"middle_initial": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"phone_number": "<string>",
"date_of_birth": "<string>",
"date_of_birth_iso": "2023-12-25",
"identifier": {
"system": "https://scan.com/fhir/sid/patient-id",
"value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"gender": "<string>",
"weight": 123,
"height_feet": 123,
"height_inches": 123
}Authorizations
Authorization: Bearer <api_token>. Sandbox tokens come from Get API keys
and allow 2,000 successful requests or 7 days. Failed 4xx/5xx responses do
not consume the allowance. Production tokens are issued from the group's
API access tab.
Path Parameters
Patient ID
Body
application/json
Show child attributes
Show child attributes
Response
patient updated
MM/DD/YYYY. Deprecated. Prefer date_of_birth_iso.
Show child attributes
Show child attributes

