Download the PHP package opencoreemr/oce-module-sinch-conversations without Composer
On this page you can find all versions of the php package opencoreemr/oce-module-sinch-conversations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download opencoreemr/oce-module-sinch-conversations
More information about opencoreemr/oce-module-sinch-conversations
Files in opencoreemr/oce-module-sinch-conversations
Package oce-module-sinch-conversations
Short Description OpenEMR Sinch Conversations integration module for HIPAA-compliant patient messaging, by OpenCoreEMR Inc
License GPL-3.0-or-later
Homepage https://opencoreemr.com
Informations about the package oce-module-sinch-conversations
OpenEMR Sinch Conversations Module
A HIPAA-compliant, omnichannel patient communication module for OpenEMR using the Sinch Conversations API.
Features
- 📱 Multi-Channel Messaging: SMS, WhatsApp, RCS, MMS, Viber - all through a unified API
- 🔐 HIPAA-Compliant: Approved message templates with no PHI in SMS
- ✅ Consent Management: Track patient opt-ins and honor opt-out requests
- 🤖 Keyword Handling: Automatic HELP/STOP/START response system
- 📅 Appointment Features:
- High-compliance appointment reminders (portal links only)
- Telehealth appointment links
- Missed appointment follow-up
- Pre-visit instructions
- 💬 Portal Notifications:
- New secure message alerts
- Test results available notifications
- 💰 Billing Communications:
- Statement ready notifications
- Balance due reminders (no amounts in SMS)
- 🏥 Wellness & Prevention:
- Annual wellness visit reminders
- Public health campaigns (flu shots, screenings)
- 📢 Operational Messages:
- Office closure alerts
- Emergency updates
- 📊 Post-Visit Surveys: Patient feedback collection
- 🔄 Polling Architecture: No webhooks needed - simple local development
Requirements
- OpenEMR 8.0.0 or later
- PHP 8.2 or later
- MariaDB 10.6 or later
- Sinch Conversations API account with BAA (see Legal Requirements below)
Installation
Important Note About Uninstall/Reinstall
OpenEMR does not automatically drop module tables on uninstall. If you need to reinstall the module cleanly:
This will drop all module tables and allow a clean reinstallation.
Via Composer (Recommended)
- Navigate to your OpenEMR installation directory
-
Install the module via Composer:
- Log into OpenEMR as an administrator
- Navigate to Administration > Modules > Manage Modules
- Find "OpenCoreEMR Sinch Conversations" in the list and click Register
- Click Install
- Click Enable
Manual Installation
- Download the latest release
- Extract to
interface/modules/custom_modules/oce-module-sinch-conversations(relative to your OpenEMR root directory) - Follow steps 3-7 from the Composer installation
Sinch Provisioning CLI
The module includes a CLI tool for managing Sinch configuration programmatically (apps, webhooks, channels). This is useful for:
- Initial setup and inspection
- Multi-tenant configurations
- CI/CD automation
- Avoiding manual dashboard configuration
Quick Start:
📖 Full documentation: See CLI-PROVISIONING.md for complete CLI documentation and API client usage.
Configuration
- Navigate to Administration > Globals > OpenCoreEMR Sinch Conversations Module
-
Configure the following settings:
- Sinch Project ID: Your Sinch project ID
- Sinch App ID: Your Sinch app ID
- API Key: Your Sinch API key (will be encrypted)
- API Secret: Your Sinch API secret (will be encrypted)
- API Region: Select your preferred region (default: 'us')
- Default Channel: SMS, WhatsApp, or RCS
- Clinic Name: Your clinic name (appears in all messages)
- Clinic Phone: Your main clinic phone number
- Save the settings
- Test the connection using the "Test API Connection" button
Usage
Patient Opt-In
CRITICAL: Patients must opt in before receiving any messages.
Methods for collecting consent:
- Patient Portal: Add opt-in checkbox during portal registration
- In-Person: Collect consent on intake forms
- Web Form: Dedicated consent form on clinic website
When a patient opts in, the system will automatically send the required confirmation:
Sending Messages
Individual Messages
Messages are sent automatically based on triggers:
- Appointment Reminder: Sent 24 hours before appointment (configurable)
- Telehealth Link: Sent 15 minutes before telehealth appointment
- Test Results: When results are finalized in OpenEMR
- New Portal Message: When provider sends secure message
- Missed Appointment: When patient marked as no-show
Or manually from the module interface:
- Navigate to Modules > Sinch Conversations
- Click Send Message
- Select patient
- Choose template
- Preview and send
Batch Messages
For announcements to multiple patients:
- Navigate to Modules > Sinch Conversations
- Click Batch Messages
- Select patient cohort (all patients, age range, etc.)
- Choose template (office closure, wellness campaign, etc.)
- Preview and schedule/send
Viewing Conversations
- Navigate to Modules > Sinch Conversations
- View inbox with all conversations
- Click Refresh to check for new patient replies
- Click conversation to view full thread
- Reply to patient messages
Keyword Responses (HELP, STOP)
The system automatically handles patient keyword responses:
| Keyword | Action | Response |
|---|---|---|
| STOP | Opt-out patient | "You have been unsubscribed from our text notifications..." |
| START | Re-subscribe patient | "You have been re-subscribed to text notifications..." |
| HELP | Provide assistance | "Text notifications from {{ clinic_name }}. For assistance, call..." |
Supported opt-out keywords: STOP, STOPALL, UNSUBSCRIBE, CANCEL, END, QUIT Supported opt-in keywords: START, UNSTOP, SUBSCRIBE
Legal Requirements & Disclaimers
⚠️ Business Associate Agreement (BAA) Required
IMPORTANT: This module uses the Sinch Conversations API to send text messages to patients. You MUST have a Business Associate Agreement (BAA) with Sinch before using this module in production with patient data.
OpenCoreEMR has a BAA with Sinch and has received compliance approval for the message templates included in this module.
If you are not using this module through OpenCoreEMR, you must:
- ✅ Execute your own BAA with Sinch before sending any patient messages
- ✅ Submit your message templates to Sinch for compliance review
- ✅ Obtain approval before using templates in production
- ✅ Maintain proper consent records for all patients
To establish a BAA with Sinch:
- OpenCoreEMR Customers: Contact [email protected]
- Other Organizations: Contact Sinch at https://www.sinch.com/contact/
TCPA & HIPAA Compliance
Before sending any SMS messages, you MUST:
1. Obtain Prior Express Written Consent
You must obtain prior express written consent from patients before sending any text messages. This consent must:
- ✅ Be in writing (electronic or paper)
- ✅ Clearly state the patient agrees to receive text messages
- ✅ Include the phone number where they'll receive messages
- ✅ Specify the types of messages they'll receive (appointments, billing, etc.)
- ✅ State that message and data rates may apply
- ✅ Include opt-out instructions
Example Consent Language:
I consent to receive text message notifications from [Clinic Name] at the phone number provided above. I understand that these messages may include appointment reminders, test result notifications, billing reminders, and other healthcare-related communications. I understand that message and data rates may apply, and message frequency varies. I can opt out at any time by replying STOP.
2. Document Consent
You must maintain records of:
- ✅ Patient signature or electronic agreement
- ✅ Date of consent
- ✅ Phone number provided
- ✅ Types of messages agreed to
- ✅ Method of consent (web form, in-person, etc.)
3. Never Include PHI in SMS
Standard SMS is not encrypted. You must NEVER include Protected Health Information such as:
- ❌ Diagnoses
- ❌ Treatment details
- ❌ Specific test results
- ❌ Medication names
- ❌ Account balances (amounts)
- ❌ Specific appointment reasons
Instead: Use the approved templates that direct patients to the secure patient portal.
✅ Good: "Your test results are available. Log in to view: [portal link]" ❌ Bad: "Your cholesterol test came back at 245 mg/dL"
4. Honor Opt-Out Requests Immediately
- ✅ Process STOP keywords within seconds
- ✅ Confirm opt-out with confirmation message
- ✅ Never send marketing messages to opted-out patients
- ✅ May still send critical transactional messages (e.g., appointment cancellations)
5. Identify Yourself in Every Message
Every message must start with your clinic name:
✅ Good: "Example Clinic: Your appointment is tomorrow..." ❌ Bad: "Your appointment is tomorrow..."
6. Include Opt-Out Instructions
Every message must include opt-out instructions:
✅ Required: "Reply STOP to opt-out"
Required Initial Opt-In Confirmation
When a patient first opts in, you MUST send this confirmation message:
This message is required by carriers (CTIA) and the TCPA. The system sends it automatically when a patient opts in.
Approved Message Templates
All message templates included in this module have been reviewed and approved by Sinch for use by OpenCoreEMR under our BAA. These templates are:
- ✅ HIPAA-compliant (when used with proper consent)
- ✅ TCPA-compliant
- ✅ Carrier-compliant (CTIA guidelines)
Template Categories:
- Initial Opt-In Confirmation (required)
- Appointment Reminders (high-compliance version)
- Telehealth Appointment Links
- Missed Appointment Follow-Up
- Pre-Visit Instructions
- Portal Notifications (new messages, test results)
- Billing Reminders (statement ready, balance due)
- Preventive Care / Wellness Reminders
- Public Health Announcements (flu shots, etc.)
- Office Closure / Emergency Updates
- Post-Visit Feedback Surveys
If you create custom templates, you MUST submit them to Sinch for compliance review before using them in production.
See TEMPLATE-IMPLEMENTATION-PLAN.md for complete template details.
Message Timing Restrictions
Best practices for send times:
- ✅ 8 AM - 9 PM local time (patient's timezone)
- ❌ Avoid late night or early morning messages
- ✅ Exception: Emergency/urgent notifications (office closures, safety alerts)
No Warranty / Use at Your Own Risk
This open-source software is provided "AS IS" without warranty of any kind, express or implied. You are solely responsible for ensuring your use of this module complies with:
- HIPAA Privacy and Security Rules
- TCPA (Telephone Consumer Protection Act)
- State-specific privacy laws (e.g., California CMIA, Texas HB300)
- Carrier regulations (CTIA Best Practices)
- Any other applicable laws and regulations
STRONGLY RECOMMENDED: Consult with legal counsel experienced in healthcare compliance before deploying this module in a production environment.
Security
- 🔐 Encrypted Credentials: API keys encrypted using OpenEMR's CryptoGen
- 🔒 TLS/SSL: All API communications use TLS 1.2+
- 📝 Audit Logging: All messages logged for compliance
- ✅ Access Control: OpenEMR ACL integration
- 🛡️ CSRF Protection: All forms protected against CSRF attacks
- 🔑 Patient Consent: Verified before every message send
Architecture
Polling-Based (No Webhooks)
This module uses a polling architecture instead of webhooks:
Benefits:
- ✅ Simple local development (no ngrok needed)
- ✅ Works identically locally and in production
- ✅ User-controlled refresh (click "Refresh" button)
- ✅ Easier testing and debugging
- ✅ No external dependencies
How it works:
- Provider clicks "Refresh" or loads inbox
- Module polls Sinch API for new messages
- Stores new messages in local database
- Displays updated inbox
See POLLING-ARCHITECTURE.md for detailed implementation.
Development
Development Taskfile
This module includes a Taskfile for common development tasks:
Common tasks:
task dev:start- Start Docker environmenttask dev:logs- View live logstask dev:port- Get OpenEMR access URLtask module:cleanup- Drop tables for clean reinstalltask db:shell- Access databasetask check- Run pre-commit checkstask --list- See all available tasks
Docker Development Environment
Quick setup for local module development (or just run task setup):
All local changes are immediately reflected - no rebuild needed! See docker/README.md for details.
Common Docker Commands
Note: We use docker compose exec to run commands in already-running containers:
- Fast execution (no container startup overhead)
- No entrypoint conflicts
- Works with running services
Troubleshooting Docker Issues
Container won't start:
OpenEMR installer keeps running:
Changes not showing up:
Database issues:
Port conflicts:
Module Development in Docker
Installing module in OpenEMR:
- Access OpenEMR at
http://localhost:PORT - Login as admin/pass
- Navigate to Administration > Modules > Manage Modules
- Find "oce-module-sinch-conversations" and click Register
- Click Install then Enable
Testing module changes:
- Edit any PHP/Twig file in your local directory
- Refresh browser - changes appear immediately
- No container rebuild needed!
Running tests inside container:
Debugging:
PHI-Free Development
60-70% of this module can be developed without any PHI:
- ✅ API integration layer
- ✅ Template system
- ✅ Keyword handlers (HELP/STOP)
- ✅ UI framework (with mock data)
- ✅ Database schema
- ✅ Polling service
- ✅ Testing (with synthetic data)
Testing without patient data:
- Send test messages to your own phone number
- Use Sinch test/sandbox environment
- Mock data in UI: "Jane Doe", "+15555551234"
See PHI-ANALYSIS.md for complete development approach.
Running Pre-Commit Checks
Architecture Patterns
This module follows OpenEMR's modern architecture:
- Controllers in
src/Controller/handle HTTP requests - Services in
src/Service/contain business logic - Twig templates in
templates/for all HTML - Symfony HTTP Foundation for Request/Response
- Custom exceptions for error handling
- QueryUtils for all database operations
See CLAUDE.md for complete architecture guide.
Documentation
TEMPLATE-IMPLEMENTATION-PLAN.md- Complete template guidePOLLING-ARCHITECTURE.md- Polling implementation detailsPHI-ANALYSIS.md- PHI-free development approachcopilot-breakdown.md- Feature roadmap and implementation phasesCLAUDE.md- Module architecture patterns
Support
OpenCoreEMR Customers
For support with this module:
- Email: [email protected]
- Phone: Contact your account representative
For Sinch BAA or compliance questions:
- Email: [email protected]
Other Users
For technical issues with this module:
For Sinch BAA or compliance:
- Sinch Contact: https://www.sinch.com/contact/
For legal/compliance advice:
- Consult your own legal counsel
Contributing
This is a complex project with strict compliance requirements. Contributions should:
- ✅ Follow OpenEMR module architecture patterns (see
CLAUDE.md) - ✅ Pass all pre-commit checks (PHPCS, PHPStan, Rector)
- ✅ Include proper error handling with custom exceptions
- ✅ Use Symfony Request/Response objects
- ✅ Use QueryUtils for all database operations
- ✅ Include comprehensive tests
- ✅ Never include PHI in test data
- ✅ Document all API integrations
Before submitting a PR:
- Run
pre-commit run -aand fix all issues - Test with Sinch sandbox/test environment
- Update documentation if adding features
- Ensure no PHI in code, comments, or commits
License
GNU General Public License v3.0 or later
Credits
Developed by OpenCoreEMR Inc
- Website: https://opencoreemr.com
- Email: [email protected]
Disclaimer
This module is designed to help healthcare organizations communicate with patients via text messaging in a HIPAA-compliant manner. However, the ultimate responsibility for compliance rests with the organization using this software.
You must:
- ✅ Have appropriate legal agreements in place (BAA with Sinch)
- ✅ Obtain and document patient consent
- ✅ Train staff on proper usage
- ✅ Monitor for compliance
- ✅ Consult with legal counsel
OpenCoreEMR Inc provides this software "as is" and makes no warranties regarding compliance with any laws or regulations.
All versions of oce-module-sinch-conversations with dependencies
ext-curl Version *
ext-date Version *
ext-filter Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.0
opencoreemr/oce-lib-module-config Version ^0.9
openemr/oe-module-installer-plugin Version ^0.1.5
psr/http-message Version ^1.1 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0
symfony/console Version ^6.4 || ^7.0
symfony/event-dispatcher Version ^6.4 || ^7.0
symfony/http-foundation Version ^6.4 || ^7.0
symfony/yaml Version ^6.4 || ^7.0
twig/twig Version ^3.0