kipu package

Submodules

kipu.auth module

Authentication module for Kipu API Implements HMAC SHA1 signature generation as per Kipu API documentation

class kipu.auth.KipuAuth(access_id, secret_key, app_id, version)[source]

Bases: object

add_app_id_to_params(params)[source]

Add app_id to query parameters

Parameters:

params (Dict[str, str]) – Existing query parameters

Return type:

Dict[str, str]

Returns:

Parameters with app_id added

generate_signature(method, uri, date, content_type='', content_md5='')[source]

Generate HMAC signature for Kipu API request Uses SHA1 for API v3, SHA256 for API v4

Parameters:
  • method (str) – HTTP method (GET, POST, PATCH)

  • uri (str) – Request URI including query parameters

  • date (str) – RFC 822 formatted date string

  • content_type (str) – Content-Type header (for POST requests)

  • content_md5 (str) – MD5 hash of request body (for POST requests)

Return type:

str

Returns:

Base64 encoded HMAC signature (algorithm depends on version)

get_auth_headers(method, uri, body=b'', content_type='')[source]

Generate complete authentication headers for Kipu API request

Parameters:
  • method (str) – HTTP method

  • uri (str) – Request URI

  • body (bytes) – Request body (for POST requests)

  • content_type (str) – Content-Type header

Return type:

Dict[str, str]

Returns:

Dictionary of headers needed for authentication

kipu.base_client module

Base HTTP client for Kipu API Handles low-level HTTP operations with proper authentication and error handling

class kipu.base_client.BaseKipuClient(access_id, secret_key, app_id, base_url='https://api.kipuapi.com', version=3, timeout=30)[source]

Bases: object

async get(endpoint, params=None)[source]

Make GET request

Return type:

Dict[str, Any]

async patch(endpoint, data=None, files=None)[source]

Make PATCH request

Return type:

Dict[str, Any]

async post(endpoint, data=None, files=None)[source]

Make POST request

Return type:

Dict[str, Any]

kipu.cli module

Command Line Interface for the Kipu API Python library Provides utility commands for testing and managing the library

kipu.cli.create_parser()[source]

Create command line argument parser

Return type:

ArgumentParser

kipu.cli.get_credentials_from_env()[source]

Get credentials from environment variables

Return type:

tuple

async kipu.cli.get_patients_census(args)[source]

Get patients census

Return type:

None

async kipu.cli.get_vital_signs(args)[source]

Get vital signs

Return type:

None

kipu.cli.main()[source]

Main CLI entry point

Return type:

None

async kipu.cli.test_connection(args)[source]

Test connection to Kipu API

Return type:

None

kipu.client module

Main Kipu API Client Implements all available API endpoints with proper typing and documentation

class kipu.client.KipuClient(access_id, secret_key, app_id, base_url='https://api.kipuapi.com', version=3, timeout=30, auto_flatten=True)[source]

Bases: BaseKipuClient

async create_contact(contact_data, flatten=None)[source]

Create a new contact

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async create_patient(patient_data, files=None, flatten=None)[source]

Create a new patient

Parameters:
  • patient_data (Dict[str, Any]) – Patient data including document[recipient_id] and document[data]

  • files (Optional[Dict[str, Any]]) – File attachments (document[attachments_attributes])

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async create_patient_evaluation(patient_id, evaluation_data, flatten=None)[source]

Create a new patient evaluation

Parameters:
  • patient_id (str) – Patient ID

  • evaluation_data (Dict[str, Any]) – Evaluation data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async create_patient_vital_signs(patient_id, vital_signs_data, flatten=None)[source]

Create a new vital sign for a patient

Parameters:
  • patient_id (str) – Patient ID

  • vital_signs_data (Dict[str, Any]) – Vital signs data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_allergens(params=None, flatten=None)[source]

List all allergens

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_allergies(params=None, flatten=None)[source]

List all allergies

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_appointments(appointment_id, params=None, flatten=None)[source]

Fetch an Appointment Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_care_levels(params=None, flatten=None)[source]

List all Levels of Care

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_ciwa_ars(params=None, flatten=None)[source]

List all CiwaArs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_ciwa_bs(params=None, flatten=None)[source]

List all CiwaBs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

Fetch Details for a Consent Form Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

List all Consent Form Records

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

List all Consent Forms

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_contact(contact_id, params=None, flatten=None)[source]

Fetches a contact

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_contact_types(params=None, flatten=None)[source]

List all contact types

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_contacts(params=None, flatten=None)[source]

List all contacts

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_cows(params=None, flatten=None)[source]

List all Cows

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_evaluation(evaluation_id, params=None, flatten=None)[source]

Fetch Details for a Evaluation

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_evaluations(params=None, flatten=None)[source]

List all Evaluations

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_flag_categories(params=None, flatten=None)[source]

List all flag categories

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_flags(params=None, flatten=None)[source]

List all flags

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_glucose_logs(params=None, flatten=None)[source]

List all GlucoseLogs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_group_session(group_session_id, params=None, flatten=None)[source]

Fetches a group session

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_group_sessions(params=None, flatten=None)[source]

List all group sessions

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_insurances_latest(params=None, flatten=None)[source]

List insurances with updated_at within a date range

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_locations(params=None, flatten=None)[source]

List all locations

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_orthostatic_vital_signs(params=None, flatten=None)[source]

List all orthostatic vital signs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient(patient_id, params=None, flatten=None)[source]

Fetch a Patient Record

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (include_ids, insurance_detail, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_allergies(patient_id, params=None, flatten=None)[source]

List allergies scoped to a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_appointments(patient_id, params=None, flatten=None)[source]

List all appointments scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_care_team(patient_id, params=None, flatten=None)[source]

List a patient’s care team

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_ciwa_ars(patient_id, params=None, flatten=None)[source]

List all CiwaArs scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_ciwa_bs(patient_id, params=None, flatten=None)[source]

List all CiwaBs scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_colors(params=None, flatten=None)[source]

List all patient colors

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

List all Consent Form Records for a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_cows(patient_id, params=None, flatten=None)[source]

List all Cows scoped to a given patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (created_at_start_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_diagnosis_history(patient_id, params=None, flatten=None)[source]

List a patient’s diagnosis history

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_diets(params=None, flatten=None)[source]

List all patient diets

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_evaluation(patient_evaluation_id, params=None, flatten=None)[source]

Fetch Details for a Patient Evaluation

Parameters:
  • patient_evaluation_id (str) – Patient Evaluation ID

  • params (Optional[Dict[str, Any]]) – Query parameters

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_evaluations(params=None, flatten=None)[source]

List all Patient Evaluations

Parameters:
  • params (Optional[Dict[str, Any]]) – Query parameters (evaluation_content, patient_process_id)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_glucose_logs(patient_id, params=None, flatten=None)[source]

List all Glucose Logs scoped to a given patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (created_at_start_date, evaluation_start_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_group_session(patient_id, group_session_id, params=None, flatten=None)[source]

Fetches group session of the given patient

Parameters:
  • patient_id (str) – Patient ID

  • group_session_id (str) – Group session ID

  • params (Optional[Dict[str, Any]]) – Query parameters

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_group_sessions(patient_id, params=None, flatten=None)[source]

List all group sessions scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_order(patient_order_id, params=None, flatten=None)[source]

Fetch Details of a Patient Order

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_orders(params=None, flatten=None)[source]

List all patient orders

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_orthostatic_vital_signs(patient_id, params=None, flatten=None)[source]

List all Orthostatic vital signs scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_patient_diets(patient_id, params=None, flatten=None)[source]

List patient diets scoped to a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_patient_evaluations(patient_id, params=None, flatten=None)[source]

List all Patient Evaluations scoped to a patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (evaluation_content, patient_process_id)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_patient_orders(patient_id, params=None, flatten=None)[source]

List all patient orders scoped to a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_program_history(patient_id, params=None, flatten=None)[source]

List a patient’s program history

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_settings(params=None, flatten=None)[source]

List all patient settings

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_tags(params=None, flatten=None)[source]

List all patient tags

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_ur(patient_id, params=None, flatten=None)[source]

List a patient’s utilization reviews

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_vital_signs(patient_id, params=None, flatten=None)[source]

List all vital signs scoped to a given patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (created_at_start_date, created_at_end_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_admissions(params=None, flatten=None)[source]

List admissions within a date range

Parameters:
  • params (Optional[Dict[str, Any]]) – Query parameters (start_date, end_date, location_id, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_care_teams(params=None, flatten=None)[source]

List all patients’ care teams

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_census(params=None, flatten=None)[source]

List all patients from a census of the database

Parameters:
  • params (Optional[Dict[str, Any]]) – Query parameters (phi_level, page, per, start_date, end_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_latest(params=None, flatten=None)[source]

List patients with updated_at within a date range

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_occupancy(params=None, flatten=None)[source]

Get occupancy information

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_processes(params=None, flatten=None)[source]

List all patient processes

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_provider(provider_id, params=None, flatten=None)[source]

Fetch a Provider Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_provider_appointments(provider_id, params=None, flatten=None)[source]

List all appointments scoped to a given provider

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_provider_roles(provider_id, params=None, flatten=None)[source]

List all roles scoped to a given provider

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_providers(params=None, flatten=None)[source]

List all Providers

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_referrers(params=None, flatten=None)[source]

List all referrers

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_role_users(role_id, params=None, flatten=None)[source]

List all users scoped to a given role

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_roles(params=None, flatten=None)[source]

List all Roles

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointment(appointment_id, params=None, flatten=None)[source]

Fetch an appointment

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointment_statuses(params=None, flatten=None)[source]

List all appointment statuses

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointment_types(params=None, flatten=None)[source]

List all appointment types

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointments(params=None, flatten=None)[source]

List all appointments

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_resources(params=None, flatten=None)[source]

List all resources

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_settings_payors(params=None, flatten=None)[source]

List all payors

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user(user_id, params=None, flatten=None)[source]

Fetch a User Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user_appointments(user_id, params=None, flatten=None)[source]

List all appointments scoped to a given user

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user_roles(user_id, params=None, flatten=None)[source]

List all roles scoped to a given user

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user_titles(params=None, flatten=None)[source]

List user titles

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_users(params=None, flatten=None)[source]

List all Users

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_utilization_reviews_latest(params=None, flatten=None)[source]

List utilization reviews with updated_at within a date range

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_vaults_patients(params=None, flatten=None)[source]

Lists all soft-deleted patients

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_vital_signs(params=None, flatten=None)[source]

List all vital signs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async update_contact(contact_id, contact_data, flatten=None)[source]

Update a contact

Parameters:
  • contact_id (str) – Contact ID

  • contact_data (Dict[str, Any]) – Updated contact data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async update_patient(patient_id, patient_data, files=None, flatten=None)[source]

Update a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async update_patient_ext_id_mapping(patient_id, mapping_id, mapping_data, flatten=None)[source]

Update an external id mapping

Parameters:
  • patient_id (str) – Patient ID

  • mapping_id (str) – Mapping ID

  • mapping_data (Dict[str, Any]) – Updated mapping data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async update_patient_insurance(patient_id, insurance_id, insurance_data, flatten=None)[source]

Update an insurance

Parameters:
  • patient_id (str) – Patient ID

  • insurance_id (str) – Insurance ID

  • insurance_data (Dict[str, Any]) – Updated insurance data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

kipu.examples module

Example usage of the Kipu API library Demonstrates various API operations and response handling

class kipu.examples.KipuExamples(access_id, secret_key, app_id)[source]

Bases: object

async administrative_operations()[source]

Example: Administrative operations

async appointment_operations()[source]

Example: Appointment operations

async basic_patient_operations()[source]

Example: Basic patient operations

async create_patient_example()[source]

Example: Creating a new patient

async create_vital_signs_example(patient_id)[source]

Example: Creating vital signs for a patient

async error_handling_example()[source]

Example: Error handling

async flattening_comparison_example()[source]

Example: Comparing flattened vs raw responses

async medical_records_operations()[source]

Example: Medical records operations

async run_all_examples()[source]

Run all examples

async kipu.examples.main()[source]

kipu.exceptions module

Custom exceptions for the Kipu API library

exception kipu.exceptions.KipuAPIError(message, status_code=None, response_data=None)[source]

Bases: Exception

Base exception for all Kipu API errors

exception kipu.exceptions.KipuAuthenticationError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when authentication fails (401)

exception kipu.exceptions.KipuForbiddenError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when access is forbidden (403)

exception kipu.exceptions.KipuNotFoundError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when resource is not found (404)

exception kipu.exceptions.KipuServerError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when server error occurs (500, 502, 503, 504)

exception kipu.exceptions.KipuValidationError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when request validation fails (400, 422)

kipu.flattener module

JSON Flattener for Kipu API responses Handles deeply nested JSON structures and converts them to flat pandas DataFrames

class kipu.flattener.JsonFlattener(sep='_')[source]

Bases: object

flatten_json(data, parent_key='')[source]

Recursive function to flatten the JSON object and build the records in a cartesian product style.

Return type:

List[Dict[str, Any]]

async flatten_json_df(data)[source]
Return type:

DataFrame

Module contents

Kipu API Python library

A comprehensive Python library for the Kipu Healthcare API (V3). Supports all endpoints with HMAC SHA1 authentication and recursive JSON flattening.

Installation:

pip install kipu-python

Quick Start:

import asyncio from kipu import KipuClient

async def main():
async with KipuClient(

access_id=”your_access_id”, secret_key=”your_secret_key”, app_id=”your_app_id”

) as client:

# Get patient census as flattened DataFrame census_df = await client.get_patients_census() print(f”Found {len(census_df)} patients”)

asyncio.run(main())

Documentation: https://kipu-python.readthedocs.io/ Source Code: https://github.com/Rahulkumar010/kipu-python

class kipu.JsonFlattener(sep='_')[source]

Bases: object

flatten_json(data, parent_key='')[source]

Recursive function to flatten the JSON object and build the records in a cartesian product style.

Return type:

List[Dict[str, Any]]

async flatten_json_df(data)[source]
Return type:

DataFrame

exception kipu.KipuAPIError(message, status_code=None, response_data=None)[source]

Bases: Exception

Base exception for all Kipu API errors

exception kipu.KipuAuthenticationError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when authentication fails (401)

class kipu.KipuClient(access_id, secret_key, app_id, base_url='https://api.kipuapi.com', version=3, timeout=30, auto_flatten=True)[source]

Bases: BaseKipuClient

async create_contact(contact_data, flatten=None)[source]

Create a new contact

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async create_patient(patient_data, files=None, flatten=None)[source]

Create a new patient

Parameters:
  • patient_data (Dict[str, Any]) – Patient data including document[recipient_id] and document[data]

  • files (Optional[Dict[str, Any]]) – File attachments (document[attachments_attributes])

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async create_patient_evaluation(patient_id, evaluation_data, flatten=None)[source]

Create a new patient evaluation

Parameters:
  • patient_id (str) – Patient ID

  • evaluation_data (Dict[str, Any]) – Evaluation data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async create_patient_vital_signs(patient_id, vital_signs_data, flatten=None)[source]

Create a new vital sign for a patient

Parameters:
  • patient_id (str) – Patient ID

  • vital_signs_data (Dict[str, Any]) – Vital signs data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_allergens(params=None, flatten=None)[source]

List all allergens

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_allergies(params=None, flatten=None)[source]

List all allergies

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_appointments(appointment_id, params=None, flatten=None)[source]

Fetch an Appointment Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_care_levels(params=None, flatten=None)[source]

List all Levels of Care

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_ciwa_ars(params=None, flatten=None)[source]

List all CiwaArs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_ciwa_bs(params=None, flatten=None)[source]

List all CiwaBs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

Fetch Details for a Consent Form Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

List all Consent Form Records

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

List all Consent Forms

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_contact(contact_id, params=None, flatten=None)[source]

Fetches a contact

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_contact_types(params=None, flatten=None)[source]

List all contact types

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_contacts(params=None, flatten=None)[source]

List all contacts

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_cows(params=None, flatten=None)[source]

List all Cows

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_evaluation(evaluation_id, params=None, flatten=None)[source]

Fetch Details for a Evaluation

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_evaluations(params=None, flatten=None)[source]

List all Evaluations

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_flag_categories(params=None, flatten=None)[source]

List all flag categories

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_flags(params=None, flatten=None)[source]

List all flags

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_glucose_logs(params=None, flatten=None)[source]

List all GlucoseLogs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_group_session(group_session_id, params=None, flatten=None)[source]

Fetches a group session

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_group_sessions(params=None, flatten=None)[source]

List all group sessions

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_insurances_latest(params=None, flatten=None)[source]

List insurances with updated_at within a date range

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_locations(params=None, flatten=None)[source]

List all locations

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_orthostatic_vital_signs(params=None, flatten=None)[source]

List all orthostatic vital signs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient(patient_id, params=None, flatten=None)[source]

Fetch a Patient Record

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (include_ids, insurance_detail, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_allergies(patient_id, params=None, flatten=None)[source]

List allergies scoped to a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_appointments(patient_id, params=None, flatten=None)[source]

List all appointments scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_care_team(patient_id, params=None, flatten=None)[source]

List a patient’s care team

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_ciwa_ars(patient_id, params=None, flatten=None)[source]

List all CiwaArs scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_ciwa_bs(patient_id, params=None, flatten=None)[source]

List all CiwaBs scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_colors(params=None, flatten=None)[source]

List all patient colors

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

List all Consent Form Records for a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_cows(patient_id, params=None, flatten=None)[source]

List all Cows scoped to a given patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (created_at_start_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_diagnosis_history(patient_id, params=None, flatten=None)[source]

List a patient’s diagnosis history

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_diets(params=None, flatten=None)[source]

List all patient diets

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_evaluation(patient_evaluation_id, params=None, flatten=None)[source]

Fetch Details for a Patient Evaluation

Parameters:
  • patient_evaluation_id (str) – Patient Evaluation ID

  • params (Optional[Dict[str, Any]]) – Query parameters

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_evaluations(params=None, flatten=None)[source]

List all Patient Evaluations

Parameters:
  • params (Optional[Dict[str, Any]]) – Query parameters (evaluation_content, patient_process_id)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_glucose_logs(patient_id, params=None, flatten=None)[source]

List all Glucose Logs scoped to a given patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (created_at_start_date, evaluation_start_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_group_session(patient_id, group_session_id, params=None, flatten=None)[source]

Fetches group session of the given patient

Parameters:
  • patient_id (str) – Patient ID

  • group_session_id (str) – Group session ID

  • params (Optional[Dict[str, Any]]) – Query parameters

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_group_sessions(patient_id, params=None, flatten=None)[source]

List all group sessions scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_order(patient_order_id, params=None, flatten=None)[source]

Fetch Details of a Patient Order

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_orders(params=None, flatten=None)[source]

List all patient orders

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_orthostatic_vital_signs(patient_id, params=None, flatten=None)[source]

List all Orthostatic vital signs scoped to a given patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_patient_diets(patient_id, params=None, flatten=None)[source]

List patient diets scoped to a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_patient_evaluations(patient_id, params=None, flatten=None)[source]

List all Patient Evaluations scoped to a patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (evaluation_content, patient_process_id)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_patient_orders(patient_id, params=None, flatten=None)[source]

List all patient orders scoped to a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_program_history(patient_id, params=None, flatten=None)[source]

List a patient’s program history

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_settings(params=None, flatten=None)[source]

List all patient settings

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_tags(params=None, flatten=None)[source]

List all patient tags

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_ur(patient_id, params=None, flatten=None)[source]

List a patient’s utilization reviews

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patient_vital_signs(patient_id, params=None, flatten=None)[source]

List all vital signs scoped to a given patient

Parameters:
  • patient_id (str) – Patient ID

  • params (Optional[Dict[str, Any]]) – Query parameters (created_at_start_date, created_at_end_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_admissions(params=None, flatten=None)[source]

List admissions within a date range

Parameters:
  • params (Optional[Dict[str, Any]]) – Query parameters (start_date, end_date, location_id, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_care_teams(params=None, flatten=None)[source]

List all patients’ care teams

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_census(params=None, flatten=None)[source]

List all patients from a census of the database

Parameters:
  • params (Optional[Dict[str, Any]]) – Query parameters (phi_level, page, per, start_date, end_date, etc.)

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_latest(params=None, flatten=None)[source]

List patients with updated_at within a date range

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_occupancy(params=None, flatten=None)[source]

Get occupancy information

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_patients_processes(params=None, flatten=None)[source]

List all patient processes

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_provider(provider_id, params=None, flatten=None)[source]

Fetch a Provider Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_provider_appointments(provider_id, params=None, flatten=None)[source]

List all appointments scoped to a given provider

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_provider_roles(provider_id, params=None, flatten=None)[source]

List all roles scoped to a given provider

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_providers(params=None, flatten=None)[source]

List all Providers

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_referrers(params=None, flatten=None)[source]

List all referrers

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_role_users(role_id, params=None, flatten=None)[source]

List all users scoped to a given role

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_roles(params=None, flatten=None)[source]

List all Roles

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointment(appointment_id, params=None, flatten=None)[source]

Fetch an appointment

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointment_statuses(params=None, flatten=None)[source]

List all appointment statuses

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointment_types(params=None, flatten=None)[source]

List all appointment types

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_appointments(params=None, flatten=None)[source]

List all appointments

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_scheduler_resources(params=None, flatten=None)[source]

List all resources

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_settings_payors(params=None, flatten=None)[source]

List all payors

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user(user_id, params=None, flatten=None)[source]

Fetch a User Record

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user_appointments(user_id, params=None, flatten=None)[source]

List all appointments scoped to a given user

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user_roles(user_id, params=None, flatten=None)[source]

List all roles scoped to a given user

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_user_titles(params=None, flatten=None)[source]

List user titles

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_users(params=None, flatten=None)[source]

List all Users

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_utilization_reviews_latest(params=None, flatten=None)[source]

List utilization reviews with updated_at within a date range

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_vaults_patients(params=None, flatten=None)[source]

Lists all soft-deleted patients

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async get_vital_signs(params=None, flatten=None)[source]

List all vital signs

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async update_contact(contact_id, contact_data, flatten=None)[source]

Update a contact

Parameters:
  • contact_id (str) – Contact ID

  • contact_data (Dict[str, Any]) – Updated contact data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async update_patient(patient_id, patient_data, files=None, flatten=None)[source]

Update a patient

Parameters:
Return type:

Union[Dict[str, Any], DataFrame]

async update_patient_ext_id_mapping(patient_id, mapping_id, mapping_data, flatten=None)[source]

Update an external id mapping

Parameters:
  • patient_id (str) – Patient ID

  • mapping_id (str) – Mapping ID

  • mapping_data (Dict[str, Any]) – Updated mapping data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

async update_patient_insurance(patient_id, insurance_id, insurance_data, flatten=None)[source]

Update an insurance

Parameters:
  • patient_id (str) – Patient ID

  • insurance_id (str) – Insurance ID

  • insurance_data (Dict[str, Any]) – Updated insurance data

  • flatten (Optional[bool]) – Override auto_flatten setting

Return type:

Union[Dict[str, Any], DataFrame]

exception kipu.KipuForbiddenError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when access is forbidden (403)

exception kipu.KipuNotFoundError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when resource is not found (404)

exception kipu.KipuServerError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when server error occurs (500, 502, 503, 504)

exception kipu.KipuValidationError(message, status_code=None, response_data=None)[source]

Bases: KipuAPIError

Raised when request validation fails (400, 422)