---
agentTools:
  projectIndex: https://docs.embercopilot.ai/llms.txt
---

# Audit Submitted Charges

Reviews previously submitted charges against the clinical documentation to identify
coding compliance issues. The audit evaluates each submitted charge for:

- **Documentation support** — whether the clinical note supports the billed procedure
- **Overcoding / undercoding** — whether the E/M level or procedure complexity matches the documentation
- **Bundling issues** — procedures that should be bundled under NCCI edits
- **Modifier accuracy** — missing, incorrect, or unnecessary modifiers
- **Missing charges** — procedures documented but not billed
- **Diagnosis linkage** — whether ICD-10-CM codes support medical necessity for each procedure

Each finding includes a severity level, explanation, and suggested corrective action.

# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Medical Coding API",
    "description": "AI-powered medical coding engine for healthcare organizations, specialty groups, and hospitals.\n\nThe Medical Coding API analyzes clinical documentation to produce accurate, guideline-compliant\ncoding outputs across three core capabilities:\n\n- **E/M Coding** — Evaluate clinical documentation against CMS Medical Decision Making (MDM)\n  criteria to determine the appropriate Evaluation & Management CPT code and complexity level.\n- **Charge Capture** — Generate a complete charge list for an encounter, including CPT/HCPCS\n  procedure codes, ICD-10-CM diagnoses, and applicable modifiers.\n- **Coding Audit** — Review previously submitted charges against the clinical documentation\n  to identify overcoding, undercoding, bundling issues, missing modifiers, and unsupported charges.\n\n### Rate Limiting\n\nAll endpoints enforce a maximum of **3 concurrent requests** per API key. Exceeding this limit\nreturns a `429 Too Many Requests` response.\n",
    "version": "1.0.0",
    "contact": {
      "name": "API Support",
      "email": "support@embercopilot.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.embercopilot.ai/v1",
      "description": "Production server"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Coding Audit",
      "description": "Review submitted charges against clinical documentation for compliance"
    }
  ],
  "paths": {
    "/coding/audit": {
      "post": {
        "tags": [
          "Coding Audit"
        ],
        "summary": "Audit Submitted Charges",
        "description": "Reviews previously submitted charges against the clinical documentation to identify\ncoding compliance issues. The audit evaluates each submitted charge for:\n\n- **Documentation support** — whether the clinical note supports the billed procedure\n- **Overcoding / undercoding** — whether the E/M level or procedure complexity matches the documentation\n- **Bundling issues** — procedures that should be bundled under NCCI edits\n- **Modifier accuracy** — missing, incorrect, or unnecessary modifiers\n- **Missing charges** — procedures documented but not billed\n- **Diagnosis linkage** — whether ICD-10-CM codes support medical necessity for each procedure\n\nEach finding includes a severity level, explanation, and suggested corrective action.\n",
        "operationId": "auditCharges",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditRequest"
              },
              "examples": {
                "standard": {
                  "summary": "Audit office visit charges",
                  "value": {
                    "inputText": "Established patient presents with acute bronchitis, productive cough for 5 days. Lungs with bilateral wheezing. Administered nebulizer treatment in office. Prescribed azithromycin.",
                    "charges": [
                      {
                        "procedureCode": "99214",
                        "modifiers": [],
                        "diagnoses": [
                          {
                            "code": "J20.9"
                          }
                        ]
                      },
                      {
                        "procedureCode": "94640",
                        "modifiers": [],
                        "diagnoses": [
                          {
                            "code": "J20.9"
                          }
                        ]
                      }
                    ],
                    "patientType": "Established",
                    "placeOfService": "Office"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Audit completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditResponse"
                },
                "examples": {
                  "withIssues": {
                    "summary": "Audit findings with issues",
                    "value": {
                      "findings": [
                        {
                          "type": "overcoded",
                          "severity": "warning",
                          "procedureCode": "99214",
                          "message": "E/M level 99214 (moderate MDM) is not supported by the documentation. The note describes a single acute uncomplicated problem with straightforward data review and low risk, consistent with low MDM.",
                          "suggestedAction": "Downcode to 99213 (low MDM)."
                        },
                        {
                          "type": "missing_modifier",
                          "severity": "error",
                          "procedureCode": "99214",
                          "message": "E/M service billed on the same date as a separately billable procedure (94640) without modifier 25.",
                          "suggestedAction": "Append modifier 25 to the E/M code to indicate a significant, separately identifiable E/M service."
                        },
                        {
                          "type": "supported",
                          "severity": "info",
                          "procedureCode": "94640",
                          "message": "Nebulizer treatment is supported by documentation of bilateral wheezing on lung exam.",
                          "suggestedAction": null
                        }
                      ],
                      "summary": {
                        "totalChargesReviewed": 2,
                        "supportedCount": 1,
                        "issueCount": 2
                      },
                      "requestId": "8fd9a734-b39c-4f44-9c5a-7e123456789",
                      "requestTimestamp": "2026-04-21T14:30:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceeded"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "API key for authentication. Include in the `Authorization` header using Bearer format:\n```\nAuthorization: Bearer sk_live_...\n```\n"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request due to invalid input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "missingInput": {
                "summary": "Missing required field",
                "value": {
                  "error": {
                    "code": "MISSING_REQUIRED_FIELD",
                    "message": "inputText is required",
                    "requestId": "8fd9a734-b39c-4f44-9c5a-7e123456789"
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized - Invalid or missing API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "UNAUTHORIZED",
                "message": "Invalid or missing API key",
                "requestId": "8fd9a734-b39c-4f44-9c5a-7e123456789"
              }
            }
          }
        }
      },
      "RateLimitExceeded": {
        "description": "Too Many Requests - Concurrent request limit exceeded",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "RATE_LIMIT_EXCEEDED",
                "message": "Rate limit exceeded. Maximum 3 concurrent requests per API key.",
                "requestId": "8fd9a734-b39c-4f44-9c5a-7e123456789"
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "SERVER_ERROR",
                "message": "An unexpected error occurred",
                "requestId": "8fd9a734-b39c-4f44-9c5a-7e123456789"
              }
            }
          }
        }
      }
    },
    "schemas": {
      "AuditRequest": {
        "type": "object",
        "required": [
          "inputText",
          "charges"
        ],
        "properties": {
          "inputText": {
            "type": "string",
            "description": "Clinical documentation to audit the submitted charges against."
          },
          "charges": {
            "type": "array",
            "description": "Previously submitted charges to review for compliance.",
            "items": {
              "$ref": "#/components/schemas/SubmittedCharge"
            }
          },
          "placeOfService": {
            "type": "string",
            "enum": [
              "Office",
              "Inpatient Hospital",
              "Outpatient Hospital",
              "Emergency Room",
              "Nursing Facility"
            ],
            "description": "Clinical setting where the visit occurred. Used to validate E/M code families and place-of-service-specific rules."
          },
          "patientType": {
            "type": "string",
            "enum": [
              "New",
              "Established"
            ],
            "description": "Whether the patient is new or established to the rendering provider."
          },
          "specialty": {
            "type": "string",
            "enum": [
              "Family Medicine",
              "Internal Medicine",
              "Ophthalmology",
              "Dermatology",
              "Orthopedics",
              "Cardiology",
              "General Surgery",
              "Emergency Medicine",
              "Psychiatry",
              "Neurology"
            ],
            "description": "Provider specialty. Used to apply specialty-specific coding rules during audit."
          }
        }
      },
      "SubmittedCharge": {
        "type": "object",
        "required": [
          "procedureCode"
        ],
        "properties": {
          "procedureCode": {
            "type": "string",
            "description": "CPT or HCPCS procedure code that was billed.",
            "example": "99214"
          },
          "modifiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Modifiers submitted with the charge.",
            "example": [
              "25"
            ]
          },
          "diagnoses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubmittedDiagnosis"
            },
            "description": "ICD-10-CM diagnoses linked to this charge."
          }
        }
      },
      "SubmittedDiagnosis": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "ICD-10-CM diagnosis code.",
            "example": "J20.9"
          }
        }
      },
      "AuditResponse": {
        "type": "object",
        "properties": {
          "findings": {
            "type": "array",
            "description": "List of audit findings, one per issue identified. Charges with no issues receive a `supported` finding.",
            "items": {
              "$ref": "#/components/schemas/AuditFinding"
            }
          },
          "summary": {
            "type": "object",
            "description": "Aggregate counts for the audit.",
            "properties": {
              "totalChargesReviewed": {
                "type": "integer",
                "description": "Number of submitted charges that were evaluated.",
                "example": 2
              },
              "supportedCount": {
                "type": "integer",
                "description": "Number of charges fully supported by documentation.",
                "example": 1
              },
              "issueCount": {
                "type": "integer",
                "description": "Number of findings with severity warning or error.",
                "example": 2
              }
            }
          },
          "requestId": {
            "type": "string",
            "description": "Unique identifier for this request.",
            "example": "8fd9a734-b39c-4f44-9c5a-7e123456789"
          },
          "requestTimestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp of when the request was processed.",
            "example": "2026-04-21T14:30:00Z"
          }
        }
      },
      "AuditFinding": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "supported",
              "unsupported",
              "overcoded",
              "undercoded",
              "missing_modifier",
              "incorrect_modifier",
              "bundling_issue",
              "missing_charge",
              "missing_diagnosis"
            ],
            "description": "Category of the audit finding:\n- **supported** — charge is fully supported by the clinical documentation\n- **unsupported** — no documentation support for the billed procedure\n- **overcoded** — documentation supports a lower-level code\n- **undercoded** — documentation supports a higher-level code\n- **missing_modifier** — a required modifier was not submitted\n- **incorrect_modifier** — a submitted modifier is not applicable\n- **bundling_issue** — procedure should be bundled per NCCI edits\n- **missing_charge** — a procedure documented but not billed\n- **missing_diagnosis** — an ICD-10-CM code that should be linked but is absent\n"
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "error"
            ],
            "description": "Severity of the finding:\n- **info** — no action required (e.g., charge is supported)\n- **warning** — potential issue that should be reviewed\n- **error** — compliance issue that should be corrected before submission\n"
          },
          "procedureCode": {
            "type": "string",
            "nullable": true,
            "description": "The CPT/HCPCS code this finding relates to. Null for `missing_charge` findings where the code was not submitted.",
            "example": "99214"
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the finding.",
            "example": "E/M level 99214 (moderate MDM) is not supported by the documentation."
          },
          "suggestedAction": {
            "type": "string",
            "nullable": true,
            "description": "Recommended corrective action. Null when no action is needed.",
            "example": "Downcode to 99213 (low MDM)."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-readable error code.",
                "example": "MISSING_REQUIRED_FIELD"
              },
              "message": {
                "type": "string",
                "description": "Human-readable error message.",
                "example": "inputText is required"
              },
              "requestId": {
                "type": "string",
                "description": "Unique identifier for this request, useful for support inquiries.",
                "example": "8fd9a734-b39c-4f44-9c5a-7e123456789"
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 104,
      "1": 54,
      "2": 62,
      "3": 85,
      "4": 23,
      "5": 39,
      "6": 101,
      "7": 0,
      "8": 15,
      "9": 87,
      "10": 149,
      "11": 43
    }
  }
}
````