Skip to main content

Troubleshooting Sunwave EMR 422 Unprocessable Entity Errors (CRM)

Overview This guide helps you resolve 422 Unprocessable Entity errors when pushing patient records from Dazos to Sunwave EMR. These errors typically occur due to facility mapping issues and Legacy ID configuration problems.

Symptom / Error

When pushing a patient record to Sunwave EMR, you receive an error similar to:

failed Client error: POST https://emr.sunwavehealth.com/SunwaveEMR/api/opportunity/new  resulted in a 422 Unprocessable Entity response:  {"code":"VALIDATION_ERROR","docs":"https://emr.sunwavehealth.com/SunwaveEMR/swagger/", "detail":"One or more fields (truncated...)

⚠️ Note: The error message is often truncated, making it difficult to identify the specific validation issue without contacting Sunwave support.

Cause

422 errors in Sunwave EMR integrations are commonly caused by:

  • Missing or incorrect Legacy ID configuration for service facilities

  • Improper facility mapping between different Sunwave realms (e.g., NJ vs. FL)

  • Integration pointing to the wrong realm where patient records should be created

  • Missing required field mappings in EMR settings

Solution

Step 1 — Check Legacy ID Configuration

  1. Log into your Sunwave EMR instance

  2. Navigate to Practice Set Up → Service Facilities

  3. Confirm each facility has a numeric Legacy ID value (the number after the "/" sign)

  4. If any facilities are missing Legacy IDs, add a unique numeric value (e.g., 930)

Step 2 — Verify Facility Mappings

  1. Identify which Sunwave realm should receive the patient records

  2. Confirm the integration is configured to push to the correct realm

  3. Verify that facility names in Dazos match exactly with facility names in the target Sunwave realm

Step 3 — Review Integration Configuration

  1. In Dazos, navigate to Settings → CRM Settings → Integrations → EMR Settings

  2. Verify the Sunwave configuration points to the intended realm (NJ vs. FL)

  3. Confirm API credentials match the target realm

Step 4 — Contact Sunwave Support for Full Error Details

If the issue persists after checking facility configurations:

  1. Contact Sunwave Support with your account ID

  2. Request the full un-truncated error message from their backend logs

  3. Provide the specific payload that is failing validation

  4. Ask them to identify which fields are causing the validation error

Escalation

Contact Dazos Support if:

  • Legacy IDs are properly configured but 422 errors persist

  • You need assistance accessing Sunwave facility configuration settings

  • Sunwave support identifies backend configuration issues requiring technical intervention

When contacting support, provide:

  • Your CRM instance URL

  • The complete error message and payload

  • Screenshots of your Sunwave service facilities configuration

  • Confirmation of which realm should receive the patient records

Related Resources

Did this answer your question?