Why Length of Stay Differences Occur
There are two main reasons why Length of Stay calculations may differ between Dazos CRM and KIPU EMR:
Calculation Method: Dazos CRM uses date-only math (Discharge Date − Admission Date), while KIPU may use timestamp-based calculations that account for partial days
Data Sync Timing: KIPU webhooks don't work for discharge data, so discharge updates rely on cron jobs instead of real-time syncing
Expected Behavior
A one-day difference between systems is normal because:
Dazos CRM calculates Length of Stay using whole calendar days only
KIPU may count partial days or use 24-hour periods based on admission and discharge timestamps
The CRM only receives and stores discharge dates without time components
How to Investigate Length of Stay Discrepancies
When you notice discrepancies beyond the expected one-day difference:
Check the patient record in Dazos CRM
Note the Admission Date and Discharge Date
Verify the Length of Stay calculation: Discharge Date − Admission Date
Compare with KIPU data
Check the same patient's admission and discharge information in KIPU
Note any time-of-day values that KIPU may be using
Check for sync delays
Remember that discharge updates are not real-time
The CRM pulls updates from KIPU on a scheduled basis (at least once every hour)
A "stuck" cron job can create temporary discrepancies until the next sync runs
Troubleshooting Sync Issues
If discrepancies persist beyond normal calculation differences:
Timing Issue: The cron job may have gotten stuck and didn't update discharge data
Data Issue: There may be a problem with the patient data in one of the systems
Contact support if you need help investigating specific patient records or sync issues.
Alternative Solutions
If you need perfectly aligned Length of Stay calculations:
Create a custom field in Dazos CRM (Settings → CRM Settings → Module Fields & Layout → select module → + Add Custom Field)
Populate this field with your own Length of Stay logic using admission and discharge times
Submit a request to map this custom field to KIPU (only works if KIPU's API supports the field)
Related Resources
KIPU EMR Integration with Dazos CRM documentation
CRM Custom Fields setup guide