Skip to main content

Troubleshooting Lightning Step EMR Client ID Assignment Errors (CRM)

Overview This guide helps resolve "No query results for model [App\Models\Client]" errors that occur when Lightning Step EMR incorrectly assigns client_id values to inquiry records created through the Dazos API integration.

Before You Begin

  • Access to your API integration logs

  • Ability to review Lightning Step inquiry and client records

  • Examples of affected patient records available

Symptom / Error

You receive the following error when Lightning Step processes inquiry records:

Reference Not Found: No query results for model [App\Models\Client] [ID]

This error occurs randomly across different facilities, suggesting a systematic issue with Lightning Step's client_id assignment process.

Cause

Lightning Step is incorrectly assigning client_id values to inquiry records. In Lightning Step's data model:

  • Inquiry records should have client_id = 0 or NULL when first created

  • The client_id is populated only after the inquiry converts to a client

  • When Lightning Step incorrectly sets client_id to the inquiry ID, it causes query failures

Solution

Step 1 — Verify Your API Payload

Confirm your Dazos API payload does not include client_id or episode_id fields. A correct payload should look like this:

json

{   "inquiry_id": "5820",   "fname": "John",   "lname": "Doe",   "dob": "1990-01-01",   "gender": "Male",   "location": "Your Facility Name",   "location_id": "20",   "ice.callerfname": "Jane",   "ice.callerlname": "Smith" }

Step 2 — Review Lightning Step Response

Check the Lightning Step response to see if episode_id is being returned correctly:

json

{   "data": "{\"episode_id\":5451,\"payor_id\":4216}",   "status": "success" }

Step 3 — Contact Lightning Step Support

  1. Provide Lightning Step with the raw API payload you're sending

  2. Request clarification on how client_id values are being assigned internally

  3. Ask Lightning Step to review their inquiry-to-client conversion process

  4. Request enhanced error feedback to help diagnose the assignment logic

Step 4 — Escalate if Needed

  1. If initial support doesn't resolve the issue, request escalation to Tier 2 support

  2. Reference the Lightning Step API documentation for technical context

  3. Provide specific patient examples where errors occurred

Verification / Expected Result

Once resolved, inquiries created through the Dazos API should:

  • Have client_id = 0 or NULL when first created

  • Load properly in Lightning Step without query errors

  • Convert to client records correctly when appropriate

Troubleshooting / Common Errors

Error: "No query results for model [App\Models\Client] [ID]"

  • Lightning Step is assigning the inquiry ID as the client_id

  • Contact Lightning Step support to review their internal mapping logic

Error occurring randomly across different facilities:

  • Indicates a systematic issue with Lightning Step's client_id assignment process, not a specific data problem

Escalation

Contact Dazos Support if:

  • Lightning Step support cannot resolve the client_id assignment issue

  • Errors persist after Lightning Step reviews their internal mapping logic

  • You need assistance providing API payload examples for Lightning Step's investigation

💡 Tip: Regularly monitor API integration logs for new error patterns and document specific patient examples when errors occur to speed up troubleshooting.


Related Resources

Did this answer your question?