Crelio Health & Hubble Integration Guide
This document provides comprehensive integration documentation for Crelio Health (Lab Services) and Hubble (FITCOIN Wallet) integrations with the Azodha Platform API.
Table of Contents
Overview
Crelio Health Integration
Configuration
Patient Registration
Lab Appointment Booking
Webhook Processing
API Endpoints
Hubble Integration
Configuration
FITCOIN Operations
API Endpoints
Error Handling
Security Considerations
Examples
Overview
The Azodha Platform provides seamless integration with:
Crelio Health: Lab services integration for patient registration, appointment booking, and automated lab result processing
Hubble: FITCOIN wallet integration for wellness rewards and digital currency management
Both integrations follow the platform's standard patterns for external service integration, including webhook processing, error handling, and data synchronization.
Crelio Health Integration
Crelio Health integration enables automated lab services including patient registration, appointment booking with billing, and real-time lab result processing through webhooks.
Configuration
Required Environment Variables
Integration Setup
Organization Integration Configuration:
Required Integration Attributes:
apiKey: Crelio Health API key for authenticationorganizationIdLH: Lab organization identifier in Crelio Health system
Invoice Item Configuration
For lab booking, invoice items must include specific Crelio Health attributes:
Patient Registration
Process Flow
Patient Registration: Automatically registers patients in Crelio Health when they are created in the platform
External ID Mapping: Maps platform consumer UUID to Crelio Health patient ID
Data Synchronization: Ensures patient data consistency between systems
API Integration
Endpoint: POST /patientRegister/{apiKey}/
Request Payload:
Response:
Lab Appointment Booking
Process Flow
Invoice Creation: Lab appointment is created with associated invoice
Patient Validation: Verifies patient exists in Crelio Health system
Bill Registration: Registers lab bill with Crelio Health
Appointment Scheduling: Schedules lab appointment
External ID Mapping: Maps invoice and appointment IDs between systems
API Integration
Endpoint: POST /LHRegisterBillAPI/{apiKey}/
Request Payload:
Response:
Webhook Processing
Crelio Health sends webhooks for lab results and observations. The platform processes these automatically.
Lab Report Webhook
Endpoint: POST /webhook/labs/reports
Webhook Payload:
Processing:
Validates webhook payload
Uploads PDF report to cloud storage
Creates file record with health record attributes
Notifies care team providers
Triggers post-processing events
Lab Observations Webhook
Endpoint: POST /webhook/labs/observations
Webhook Payload:
Processing:
Validates webhook payload
Maps observation values to platform observation codes
Creates observation records
Updates file attributes
Triggers post-processing events
API Endpoints
Lab Report Webhook
Lab Observations Webhook
Hubble Integration
Hubble integration provides FITCOIN wallet functionality for wellness rewards and digital currency management.
Configuration
Required Integration Setup
Organization Integration Configuration:
Wallet Configuration:
FITCOIN wallet type must be configured for the organization
Consumer accounts must be linked to FITCOIN wallets
FITCOIN Operations
Get Coin Balance
Retrieves the current FITCOIN balance for a consumer.
Endpoint: GET /webhooks/hubble/consumers/{consumerId}/balance
Response:
Debit Coins
Debits FITCOIN from a consumer's wallet for wellness activities.
Endpoint: POST /webhooks/hubble/consumers/{consumerId}/transactions
Request Payload:
Response:
Reverse Debit Transaction
Reverses a previous FITCOIN debit transaction.
Endpoint: POST /webhooks/hubble/consumers/{consumerId}/transactions/{transactionId}/reverse
Request Payload:
Response:
SSO Authentication
Provides user information for Hubble SSO integration.
Endpoint: GET /webhooks/hubble/auth/sso
Response:
API Endpoints
Get Coin Balance
Debit Coins
Reverse Debit Transaction
SSO Authentication
Error Handling
HTTP Status Codes
200- Success400- Bad Request (validation errors)401- Unauthorized403- Forbidden404- Not Found409- Conflict (duplicate records)500- Internal Server Error
Error Response Format
Common Error Codes
Crelio Health Errors
LABS_INVALID_CONFIGURATION- Integration configuration missing or invalidLABS_REGISTRATION_FAILED- Patient registration failedLABS_BOOKING_FAILED- Lab appointment booking failedLABS_REPORT_NOT_FOUND- Lab report not found in webhookLABS_WEBHOOK_PROCESSING_FAILED- Webhook processing failedLABS_APPOINTMENT_NOT_FOUND- Appointment not foundLABS_INVOICE_ITEM_MISSING_ATTRIBUTES- Invoice item missing required attributes
Hubble Errors
PATIENT_NOT_FOUND- Consumer not foundTRANSACTION_NOT_FOUND- Transaction not foundINVALID_REVERSAL_REQUEST- Invalid reversal requestINSUFFICIENT_BALANCE- Insufficient FITCOIN balance
Security Considerations
Authentication
All endpoints require valid JWT tokens
Organization-level access control enforced
API keys stored securely in integration configuration
Data Protection
All data transmitted over HTTPS
Sensitive data encrypted at rest
PII protection for patient information
Webhook Security
Webhook payloads validated before processing
External ID mapping prevents unauthorized access
Audit logging for all operations
Examples
Complete Lab Workflow
Create Patient:
Create Invoice with Lab Items:
Lab Report Webhook (automatically processed):
Complete Hubble Workflow
Get Coin Balance:
Debit Coins:
Reverse Transaction:
Support
For technical support or questions about Crelio Health or Hubble integrations:
Support Email: [email protected]
Documentation: https://docs.azodha.com
API Reference: https://docs.azodha.com/api-reference
Last updated: January 2024
Last updated