Ritten API Integration
Python SDK for connecting applications to the Ritten EMR Platform. This library simplifies integration with Ritten's Behavioral Health Operations API, allowing developers to use Ritten API seamlessly from any Python environment.
Ritten API specifications:
- Documentation
- Version: 1
Installation
The SDK requires Python 3.10 or higher. Install it directly via pip:
pip install ritten-python-sdk
# Using poetry
poetry add ritten-python-sdk
# Using pipenv
pipenv install ritten-python-sdk
Quickstart Guide
To get started, you must first obtain your integrator client_id and client_secret from your Ritten administrator portal.
Resources
- Review the official Ritten API Documentation for explicit payload schemas.
API Coverage
Coverage against the Ritten OpenAPI specification (v1.0.0). Checked items are available in this SDK today; unchecked items are not yet implemented.
OAuth
-
POST /oauth/token- Obtain an access token (client_credentials grant) - handled automatically byRitten/Auth, no resource method needed
Patients
-
GET /patients- List patients in a clinic -
POST /patients- Create a new patient -
GET /patients/{id}- Retrieve a patient by ID -
PATCH /patients/{id}- Update a patient by ID -
GET /patients/external/{externalId}- Retrieve a patient by external ID -
POST /patients/{id}/vitals- Record patient vitals -
GET /patients/{id}/relationships- List a patient's relationships -
POST /patients/{id}/relationships- Create a new patient relationship -
PATCH /patients/{id}/relationships/{relationshipId}- Update a patient relationship -
DELETE /patients/{id}/relationships/{relationshipId}- Delete a patient relationship -
POST /patients/{id}/attachments- Attach a document to a patient chart -
PATCH /patients/{id}/attachments/{attachmentId}- Update a document on a patient chart
Contacts
-
GET /contacts- List contacts in a clinic -
POST /contacts- Create a new contact -
GET /contacts/{id}- Retrieve a contact by ID -
PATCH /contacts/{id}- Update a contact by ID -
GET /contacts/{id}/relationships- List a contact's relationships -
POST /contacts/{id}/relationships- Create a new contact relationship
Users
-
GET /staff- List all clinic staff users -
POST /users- Create a new user -
DELETE /users/{id}- Delete a user -
POST /users/{id}/roles- Assign a role to a user -
DELETE /users/{id}/roles/{roleID}- Remove a role from a user -
POST /users/{id}/security-groups- Set a user's security groups -
GET /security-groups- List all security groups -
GET /teams- List all clinic teams
Calendar
-
POST /calendar/events/list- Query calendar events -
POST /calendar/events- Create a new calendar event
Insurance
-
GET /insurance/payers- List insurance payers -
GET /insurance/payers/{id}- Retrieve an insurance payer by ID
Encounters
-
POST /encounters- Create an encounter -
GET /encounter-types- List encounter types
Forms
-
GET /forms/definitions- List form definitions -
POST /patients/{id}/forms- Create a form on a patient chart and submit field values
Insights
-
GET /insights/admissions- Get admissions report -
GET /insights/discharges- Get discharges report -
GET /insights/alos- Get average length of stay report -
GET /insights/program-census- Get program census report -
GET /insights/census-report- Get census report -
GET /insights/dbs- Get daily billable services report -
GET /insights/event-audit- Get event audit report -
GET /insights/facility-census- Get facility census report -
GET /insights/clinic-organizations- Get clinic organizations -
GET /insights/organization-notes- Get organization notes -
GET /insights/created-cases- Get created cases report -
GET /insights/disqualified-cases- Get disqualified cases report -
GET /insights/care-teams- Get care teams report -
GET /insights/encounter-history- Get encounter history report -
GET /insights/client-event-history- Get client event history report -
GET /insights/client-attendance-by-status- Get client attendance by status report -
GET /insights/all-transactions- Get the All Transactions report -
GET /insights/form-outcomes- Get form outcomes report
Cases
-
GET /cases- List cases in a clinic -
POST /cases- Create a case -
GET /cases/{id}- Retrieve a case by ID -
PATCH /cases/{id}- Update a case -
POST /cases/{id}/notes- Create a case note -
POST /cases/{id}/action-items- Create a case action item
Facilities
-
GET /facilities- List active facilities in a clinic -
POST /facilities- Create a facility in a clinic -
PATCH /facilities/{id}- Update a facility
Programs
-
GET /programs- List active programs in a clinic -
POST /programs- Create a clinic program -
GET /programs/{id}- Get an active program -
PATCH /programs/{id}- Update a clinic program
Organizations
-
GET /organizations- List active organizations in a clinic -
POST /organizations- Create an organization in a clinic -
GET /organizations/{id}- Get an active organization -
PATCH /organizations/{id}- Update an organization -
GET /organizations/{id}/members- List active organization members
Tasks
-
GET /tasks- List tasks in a clinic -
POST /tasks- Create a task -
PATCH /tasks/{id}- Update a task
Calls
-
POST /calls- Create or update a call
Webhooks (inbound events)
These are events Ritten sends to a receiver endpoint you host - they aren't operations the SDK calls, so there's nothing for a resource method to implement. Listed here for completeness; the SDK does not currently provide helpers for verifying or parsing incoming webhook payloads.
patient.admit,patient.transfer,patient.discharge,patient.createdcase.created,case.status.updateencounter.created,encounter.status.updateappointment.createdcontact.created
About the Author
This SDK is developed and maintained by Wesley Gonçalves under MIT license. Contributions and feedback are welcome!
Metadata
Release files for ritten-python-sdk 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ritten_python_sdk-1.1.0.tar.gz | 14.5 kB | Without provenance | Details for ritten_python_sdk-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ritten_python_sdk-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for ritten_python_sdk-1.1.0-py3-none-any.whl |
Total release size: 39.1 kB
Release files / ritten_python_sdk-1.1.0.tar.gz
| Download URL | ritten_python_sdk-1.1.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c32082bcd15d8a9a81ae19bb590ef2aef99f6db407fc107b47a2b2520905052
|
|
BLAKE2b-256 checksum How to use checksums |
cbba74451f4025dfea1177ffb33e9ef958c12da1d4e4c07179276411ef61e672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.4 Linux/7.0.0-30-generic
|
Release files / ritten_python_sdk-1.1.0-py3-none-any.whl
| Download URL | ritten_python_sdk-1.1.0-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d11c64fb563c7b0ff503cc03c2b617dfcd747e1388f0da071382ac705b223319
|
|
BLAKE2b-256 checksum How to use checksums |
31771e06687aa0b47ea5e4aa369cce4bf9952adeb3cf2ae36827590320af94f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.4 Linux/7.0.0-30-generic
|
Security for ritten-python-sdk 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.