Create or Update Patient
curl --request PUT \
--url https://app.silnahealth.com/api/public/v1/patients/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"source_id": "<string>",
"patient_specialties": [],
"provider_service_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address_line_1": null,
"address_line_2": null,
"city": null,
"state": null,
"zip_code": null,
"sex": null
}
'import requests
url = "https://app.silnahealth.com/api/public/v1/patients/"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"source_id": "<string>",
"patient_specialties": [],
"provider_service_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address_line_1": None,
"address_line_2": None,
"city": None,
"state": None,
"zip_code": None,
"sex": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
source_id: '<string>',
patient_specialties: [],
provider_service_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
provider_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
address_line_1: null,
address_line_2: null,
city: null,
state: null,
zip_code: null,
sex: null
})
};
fetch('https://app.silnahealth.com/api/public/v1/patients/', 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://app.silnahealth.com/api/public/v1/patients/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '2023-12-25',
'source_id' => '<string>',
'patient_specialties' => [
],
'provider_service_location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'provider_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'address_line_1' => null,
'address_line_2' => null,
'city' => null,
'state' => null,
'zip_code' => null,
'sex' => null
]),
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://app.silnahealth.com/api/public/v1/patients/"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"source_id\": \"<string>\",\n \"patient_specialties\": [],\n \"provider_service_location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"provider_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"address_line_1\": null,\n \"address_line_2\": null,\n \"city\": null,\n \"state\": null,\n \"zip_code\": null,\n \"sex\": null\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://app.silnahealth.com/api/public/v1/patients/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"source_id\": \"<string>\",\n \"patient_specialties\": [],\n \"provider_service_location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"provider_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"address_line_1\": null,\n \"address_line_2\": null,\n \"city\": null,\n \"state\": null,\n \"zip_code\": null,\n \"sex\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.silnahealth.com/api/public/v1/patients/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"source_id\": \"<string>\",\n \"patient_specialties\": [],\n \"provider_service_location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"provider_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"address_line_1\": null,\n \"address_line_2\": null,\n \"city\": null,\n \"state\": null,\n \"zip_code\": null,\n \"sex\": null\n}"
response = http.request(request)
puts response.read_body{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>"
}{
"message": "<string>",
"type": "AUTH_INVALID_REQUEST_HEADER"
}{
"message": "<string>"
}Patients
Create or Update Patient
PUT
/
public
/
v1
/
patients
/
Create or Update Patient
curl --request PUT \
--url https://app.silnahealth.com/api/public/v1/patients/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"source_id": "<string>",
"patient_specialties": [],
"provider_service_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address_line_1": null,
"address_line_2": null,
"city": null,
"state": null,
"zip_code": null,
"sex": null
}
'import requests
url = "https://app.silnahealth.com/api/public/v1/patients/"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"source_id": "<string>",
"patient_specialties": [],
"provider_service_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address_line_1": None,
"address_line_2": None,
"city": None,
"state": None,
"zip_code": None,
"sex": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
source_id: '<string>',
patient_specialties: [],
provider_service_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
provider_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
address_line_1: null,
address_line_2: null,
city: null,
state: null,
zip_code: null,
sex: null
})
};
fetch('https://app.silnahealth.com/api/public/v1/patients/', 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://app.silnahealth.com/api/public/v1/patients/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '2023-12-25',
'source_id' => '<string>',
'patient_specialties' => [
],
'provider_service_location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'provider_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'address_line_1' => null,
'address_line_2' => null,
'city' => null,
'state' => null,
'zip_code' => null,
'sex' => null
]),
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://app.silnahealth.com/api/public/v1/patients/"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"source_id\": \"<string>\",\n \"patient_specialties\": [],\n \"provider_service_location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"provider_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"address_line_1\": null,\n \"address_line_2\": null,\n \"city\": null,\n \"state\": null,\n \"zip_code\": null,\n \"sex\": null\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://app.silnahealth.com/api/public/v1/patients/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"source_id\": \"<string>\",\n \"patient_specialties\": [],\n \"provider_service_location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"provider_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"address_line_1\": null,\n \"address_line_2\": null,\n \"city\": null,\n \"state\": null,\n \"zip_code\": null,\n \"sex\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.silnahealth.com/api/public/v1/patients/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"source_id\": \"<string>\",\n \"patient_specialties\": [],\n \"provider_service_location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"provider_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"address_line_1\": null,\n \"address_line_2\": null,\n \"city\": null,\n \"state\": null,\n \"zip_code\": null,\n \"sex\": null\n}"
response = http.request(request)
puts response.read_body{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"message": "<string>"
}{
"message": "<string>",
"type": "AUTH_INVALID_REQUEST_HEADER"
}{
"message": "<string>"
}Behavior Overview
This API has two flows: update and create. We trigger the update flow if we find a patient with a matchingsource_id
or we determine the requested patient to be a duplicate (for example, they have the same first name, last name, and dob as an existing patient).
Else we trigger the create flow.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Patient's first name
Patient's last name
Patient's date of birth
Patient's EHR ID (or other unique identifier) that you have in your system
Patient's specialties. A patient can have multiple
Available options:
PHYSICAL_THERAPY, ABA_THERAPY, SPEECH_THERAPY, OCCUPATIONAL_THERAPY, PSYCHOLOGICAL_TESTING, HOME_HEALTH_CARE, HOSPICE, CARDIAC_REHABILITATION, INTENSIVE_CARDIAC_REHABILITATION, MENTAL_HEALTH, PRINCIPAL_ILLNESS_NAVIGATION, PRINCIPAL_CARE_MANAGEMENT, ADVANCED_PRIMARY_CARE_MODELS, PREVENTATIVE_HEALTH, PARTIAL_HOSPITALIZATION_PROGRAM, INTENSIVE_OUTPATIENT_PROGRAM, INTERVENTIONAL_RADIOLOGY, VASCULAR_SURGERY, INTERVENTIONAL_CARDIOLOGY, ORTHOPEDICS, CHIROPRACTIC, GYNECOLOGY, LONG_TERM_CARE, NUTRITIONAL_COUNSELING, PHYSICAL_MEDICINE, PULMONARY_REHABILITATION, INJECTABLE_SPECIALTY_MEDICATIONS, ALLERGY_TESTING, SKILLED_NURSING, RADIOLOGY, OTOLARYNGOLOGY, DURABLE_MEDICAL_EQUIPMENT, DERMATOLOGY, PROFESSIONAL_OFFICE_VISIT, PSYCHIATRY, PRIVATE_DUTY_NURSING Patient's status
Available options:
INTAKE, ACTIVE, DISCHARGED, ON_HOLD Provider Service Location ID (where the patient receives service)
Patient's street address
Maximum string length:
255Patient's apartment, suite, unit, etc.
Maximum string length:
255Patient's city
Maximum string length:
255Patient's state
Maximum string length:
255Patient's zip code. Empty strings are not allowed
Patient's sex
Available options:
MALE, FEMALE