openapi: 3.1.0
info:
title: Athelas Enterprise Auth Patients API
version: '1.0'
description: Athelas Enterprise Remote Patient Monitoring (RPM) API. Manage patients, sites, prescribers, RPM device shipping, and test results. Harvested verbatim from the per-operation OpenAPI blocks published on the Athelas ReadMe developer hub.
servers:
- url: https://api.athelas.com/enterprise/v1
description: Production
- url: https://staging-api.athelas.com/enterprise/v1
description: Staging
security:
- bearerAuth: []
tags:
- name: Patients
paths:
/patients/create:
post:
summary: Create
description: Create patients
operationId: create
requestBody:
content:
application/json:
schema:
type: object
required:
- first_name
- last_name
- site_id
- prescriber_id
- gender
- phone_number
- address
- condition1
- condition2
- date_of_birth
- insurance_company
- insurance_policy_number
- first_test
- blood_pressure_test
- weight_test
- glucose_test
- is_weight_blind
properties:
first_name:
type: string
description: First name of the patient
default: Priyanka
last_name:
type: string
description: Last name or surname of the patient
default: Mehta
site_id:
type: integer
description: ID of the site that this patient belongs to
default: 524
format: int32
prescriber_id:
type: integer
description: ID of the prescriber associated with this patient
default: 4904
format: int32
gender:
type: string
description: Gender of the patient
default: F
phone_number:
type: string
description: Phone number of the patient
default: '14089259401'
address:
type: string
description: Full address of the patient (for shipping purposes)
default: 160 S Whisman Rd, Mountain View, CA 94014
condition1:
type: string
description: ICD-10 code for underlying condition
default: I10
condition2:
type: string
description: Secondary ICD-10 code for underlying condition
default: I11
date_of_birth:
type: string
description: Date of birth of patient
default: '1991-10-11'
insurance_company:
type: string
description: Insurance company name
default: Aetna
insurance_policy_number:
type: string
description: Insurance policy of patient
default: W23423466
first_test:
type: string
description: What the first device to send the patient should be. One of [ BLOOD_PRESSURE, WEIGHT, GLUCOSE ]
default: BLOOD_PRESSURE
blood_pressure_test:
type: boolean
description: Whether to send a blood pressure cuff for this patient. True or False
default: true
weight_test:
type: boolean
description: Whether to send a weighing scale for this patient. True or False
default: false
glucose_test:
type: boolean
description: Whether to send a glucometer for this patient. True or False
default: false
is_weight_blind:
type: boolean
description: Whether the weighing scale should be blinded. Blinded weighing scales will not show the weight to the patient. True or False
default: false
ship_rpm_devices:
type: boolean
description: Whether the devices for this patient should be queued for shipping immediately
default: false
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": 10,\n \"first_name\": \"Priyanka\",\n \"last_name\": \"Mehta\",\n \"site_id\": 524,\n \"prescriber_id\": 4904,\n \"gender\": \"F\",\n \"phone_number\": \"14089259401\",\n \"address\": \"160 S Whisman Rd, Mountain View, CA 94041\",\n \"address_valid\": \"True\",\n \"condition_1\": \"I10\",\n \"condition_2\": \"I11\",\n \"date_of_birth\": \"1991-10-11\",\n \"first_test\": \"BLOOD_PRESSURE\",\n \"blood_pressure_test\": true,\n \"weight_test\": false,\n \"glucose_test\": false,\n \"is_weight_blind\": false\n}\n"
schema:
type: object
properties:
id:
type: integer
example: 10
default: 0
first_name:
type: string
example: Priyanka
last_name:
type: string
example: Mehta
site_id:
type: integer
example: 524
default: 0
prescriber_id:
type: integer
example: 4904
default: 0
gender:
type: string
example: F
phone_number:
type: string
example: '14089259401'
address:
type: string
example: 160 S Whisman Rd, Mountain View, CA 94041
address_valid:
type: string
example: 'True'
condition_1:
type: string
example: I10
condition_2:
type: string
example: I11
date_of_birth:
type: string
example: '1991-10-11'
first_test:
type: string
example: BLOOD_PRESSURE
blood_pressure_test:
type: boolean
example: true
default: true
weight_test:
type: boolean
example: false
default: true
glucose_test:
type: boolean
example: false
default: true
is_weight_blind:
type: boolean
example: false
default: true
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}/update:
post:
summary: Update
description: Update patient
operationId: edit
parameters:
- name: id
in: path
description: ID of patient to be updated
schema:
type: integer
format: int32
default: 10
required: true
requestBody:
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
description: First name of the patient
default: Priyanka
last_name:
type: string
description: Last name or surname of the patient
default: Mehta
site_id:
type: integer
description: ID of the site that this patient belongs to
default: 524
format: int32
prescriber_id:
type: integer
description: ID of the prescriber associated with this patient
default: 4904
format: int32
gender:
type: string
description: Gender of the patient
default: F
phone_number:
type: string
description: Phone number of the patient
default: '14089259401'
address:
type: string
description: Full address of the patient (for shipping purposes)
default: 160 S Whisman Rd, Mountain View, CA
condition_1:
type: string
description: ICD-10 code for underlying condition
default: I10
condition_2:
type: string
description: Secondary ICD-10 code for underlying condition
default: I11
date_of_birth:
type: string
description: Date of birth of patient
default: '1991-10-11'
insurance_company:
type: string
description: Insurance company name
default: Aetna
insurance_policy_number:
type: string
description: Insurance policy of patient
default: W23423466
first_test:
type: string
description: What the first device to send the patient should be. One of [ BLOOD_PRESSURE, WEIGHT, GLUCOSE ]
default: BLOOD_PRESSURE
blood_pressure_test:
type: boolean
description: Whether to send a blood pressure cuff for this patient. True or False
default: true
weight_test:
type: string
description: Whether to send a weighing scale for this patient. True or False
default: 'false'
glucose_test:
type: string
description: Whether to send a glucometer for this patient. True or False
default: 'false'
is_weight_blind:
type: string
description: Whether the weighing scale should be blinded. Blinded weighing scales will not show the weight to the patient. True or False
default: 'false'
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": 10,\n \"first_name\": \"Priyanka\",\n \"last_name\": \"Mehta\",\n \"site_id\": 524,\n \"prescriber_id\": 4904,\n \"gender\": \"F\",\n \"phone_number\": \"14089259401\",\n \"address\": \"160 S Whisman Rd, Mountain View, CA 94041\",\n \"address_valid\": \"True\",\n \"condition_1\": \"I10\",\n \"condition_2\": \"I11\",\n \"date_of_birth\": \"1991-10-11\",\n \"first_test\": \"BLOOD_PRESSURE\",\n \"blood_pressure_test\": true,\n \"weight_test\": false,\n \"glucose_test\": false,\n \"is_weight_blind\": false\n}\n"
schema:
type: object
properties:
id:
type: integer
example: 10
default: 0
first_name:
type: string
example: Priyanka
last_name:
type: string
example: Mehta
site_id:
type: integer
example: 524
default: 0
prescriber_id:
type: integer
example: 4904
default: 0
gender:
type: string
example: F
phone_number:
type: string
example: '14089259401'
address:
type: string
example: 160 S Whisman Rd, Mountain View, CA 94041
address_valid:
type: string
example: 'True'
condition_1:
type: string
example: I10
condition_2:
type: string
example: I11
date_of_birth:
type: string
example: '1991-10-11'
first_test:
type: string
example: BLOOD_PRESSURE
blood_pressure_test:
type: boolean
example: true
default: true
weight_test:
type: boolean
example: false
default: true
glucose_test:
type: boolean
example: false
default: true
is_weight_blind:
type: boolean
example: false
default: true
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}/activate:
post:
summary: Activate
description: Activate a patient.
operationId: activate-1
parameters:
- name: id
in: path
description: ID of the patient to activate
schema:
type: integer
format: int32
default: 625
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}/deactivate:
post:
summary: Deactivate
description: 'Deactivate a patient. This ensures the following will happen: The patient will be removed from all enrollment flows. No further messages will go out to the given patient.'
operationId: deactivate
parameters:
- name: id
in: path
description: ID of patient to deactivate
schema:
type: string
default: '543'
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}:
get:
summary: Get
description: Fetch the patient object
operationId: get
parameters:
- name: id
in: path
description: ID of Patient to fetch Patient object for
schema:
type: integer
format: int32
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"id\": 10,\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"site_id\": 245,\n \"prescriber_id\": 23,\n \"gender\": \"M\",\n \"phone_number\": \"14088962343\",\n \"address\": \"160 S Whisman Rd, Mountain View, CA 94041\",\n \"address_valid\": \"True\",\n \"condition_1\": \"I10\",\n \"condition_2\": \"I11\",\n \"date_of_birth\": \"1991-10-11\",\n \"first_test\": \"BLOOD_PRESSURE\",\n \"blood_pressure_test\": true,\n \"weight_test\": true,\n \"glucose_test\": false,\n \"is_weight_blind\": false,\n}\n"
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}/test_results:
get:
summary: View Test Results
description: View all the test results for a given patient. The list is sorted by most recent first.
operationId: view-test-results
parameters:
- name: id
in: path
description: ID of the patient for which the results are being queried
schema:
type: string
default: '524'
required: true
responses:
'300':
description: '300'
content:
application/json:
examples:
Result:
value: "{\n \"id\": 10,\n \"patient_id\": 25,\n \"test_type\": \"BLOOD_PRESSURE\",\n \"systolic\": 120,\n \"diastolic\": 80,\n \"units\": \"mmHg\",\n \"created_at\": \"2021-10-12 01:52:30.612685\"\n},\n{\n \"id\": 11,\n \"patient_id\": 25,\n \"test_type\": \"WEIGHT\",\n \"weight\": 95,\n \"units\": \"pounds\",\n \"created_at\": \"2021-10-12 01:52:30.612685\"\n},\n{\n \"id\": 12,\n \"patient_id\": 25,\n \"test_type\": \"GLUCOSE\",\n \"blood_glucose\": \"10\",\n \"units\": \"mmol/L\",\n \"created_at\": \"2021-10-12 01:52:30.612685\"\n}\n"
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}/verify_address:
post:
summary: Verify Address
description: ''
operationId: verify-address
parameters:
- name: id
in: path
description: Patient ID
schema:
type: integer
format: int32
default: 524
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"message\": \"Queued address verification. Check /address_verified to see updated address verification status.\"\n}"
schema:
type: object
properties:
message:
type: string
example: Queued address verification. Check /address_verified to see updated address verification status.
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
/patients/{id}/address_verified:
get:
summary: Address Verified
description: Check if the address verification that you queued manually has been successful
operationId: address-verified
parameters:
- name: id
in: path
description: Patient ID
schema:
type: integer
format: int32
default: 524
required: true
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n\t\"address_verified\": true\n}"
schema:
type: object
properties:
address_verified:
type: boolean
example: true
default: true
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
deprecated: false
tags:
- Patients
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Bearer token obtained from POST /auth/login. Tokens expire after 60 minutes.