> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rcintell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LCD/NCD medical-necessity coverage check

> Coverage-only medical-necessity check: match each procedure's diagnoses
against the applicable Medicare local (LCD) and national (NCD) coverage
determinations, localized by state → MAC jurisdiction. Does not run NCCI,
MUE, timely filing, or payment.



## OpenAPI

````yaml /docs/openapi.client.json post /v1/encounter/coverage
openapi: 3.1.0
info:
  description: >-
    Client API for RCIntel. Authenticate with X-API-Key. See Guides → Which API
    to use.
  summary: Multi-tenant knowledge API for healthcare revenue cycle management.
  title: Healthcare Knowledge Layer
  version: 0.1.0
servers: []
security: []
tags:
  - description: >-
      Cited payer policy lookup — GET /v1/policies and GET /v1/policies/changes.
      Medicare FFS returns NCDs/LCDs/MACs; commercial payers return that payer's
      documents only. Query payer, code, state, plan_type.
    name: policies
  - description: >-
      Payer-policy PDF parse and retrieve for Workspace / Payer Knowledge.
      Service-authenticated (X-Admin-Secret); chunks stored in Postgres.
    name: policy
  - description: >-
      Manufacturer 340B contract-pharmacy policy, fail-closed access, and the
      change feed. Different API from GET /v1/policies.
    name: 340B Policy
  - description: CRD-style prior authorization check, documentation, and vendors.
    name: prior-auth
  - description: Public payer directory (no API key on list/detail).
    name: payers-public
  - description: >-
      Payer network directory — search payers, check prior auth requirements,
      view filing rules, denial patterns, and appeal levels.
    name: payers
  - description: >-
      Resolve healthcare billing knowledge across the L1-L6 layer stack.
      Includes payment calculation, billing guidance, and per-layer queries.
    name: knowledge
  - description: >-
      CMS Fee Schedule lookups — OPPS (Addendum B / APC), DMEPOS (state-level
      pricing), and Clinical Lab Fee Schedule (CLFS).
    name: fee-schedules
  - description: >-
      NCCI (National Correct Coding Initiative) — dedicated MUE limits, PTP
      bundling edits, add-on code edits, and code pair validation.
    name: ncci
  - description: >-
      Service code intelligence — CPT/HCPCS lookup, RVU data, NCCI edits,
      payment calculation, implant/GUDID search, and service group
      classification.
    name: codes
  - description: >-
      Submit asynchronous AI agent jobs for code research, medical necessity,
      and denial resolution. Poll for results and retrieve reasoning traces.
    name: agents
  - description: >-
      Register and manage healthcare facilities by CCN (Medicare Provider
      Number). Each facility is the root entity for knowledge resolution.
    name: facilities
  - description: >-
      NPI Registry — live search against CMS NPPES API for provider and
      organization National Provider Identifiers.
    name: npi
  - description: >-
      OpenFDA drug product lookup by NDC. Includes product-level fields with
      normalized ingredient and package detail.
    name: drugs
  - name: encounter
  - name: mcp
  - description: Health checks, service metadata, and Prometheus metrics.
    name: system
paths:
  /v1/encounter/coverage:
    post:
      tags:
        - encounter
      summary: LCD/NCD medical-necessity coverage check
      description: >-
        Coverage-only medical-necessity check: match each procedure's diagnoses

        against the applicable Medicare local (LCD) and national (NCD) coverage

        determinations, localized by state → MAC jurisdiction. Does not run
        NCCI,

        MUE, timely filing, or payment.
      operationId: check_coverage_v1_encounter_coverage_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EncounterCoverageRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EncounterCoverageResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    EncounterCoverageRequest:
      description: >-
        LCD/NCD medical-necessity coverage check for a claim's procedure lines.


        Coverage-only: this evaluates whether each procedure's diagnoses satisfy
        the

        applicable Medicare local (LCD) and national (NCD) coverage
        determinations.

        It does NOT run NCCI, MUE, timely filing, or payment.
      properties:
        claim_type:
          default: professional
          description: professional (per-line DX) or institutional (claim-level DX)
          title: Claim Type
          type: string
        date_of_service:
          anyOf:
            - type: string
            - type: 'null'
          description: Date of service (YYYY-MM-DD)
          title: Date Of Service
        dx:
          description: >-
            Claim-level ICD-10 diagnoses (837 loop 2300 HI). Applied to every
            line for institutional claims; used as a fallback for professional
            lines that carry no DX. The ABK-qualified (or first-listed) entry is
            the principal diagnosis.
          items:
            $ref: '#/components/schemas/EncounterDiagnosis'
          title: Dx
          type: array
        lines:
          description: Procedure lines to evaluate
          items:
            $ref: '#/components/schemas/EncounterCoverageLine'
          maxItems: 50
          minItems: 1
          title: Lines
          type: array
        payer:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Reserved: payer overlay on top of the Medicare base layer. Not yet
            applied — non-Medicare values return the Medicare base with a
            warning.
          title: Payer
        state:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            2-letter state → MAC jurisdiction for LCD localization (NCDs are
            national)
          title: State
      required:
        - lines
      title: EncounterCoverageRequest
      type: object
    EncounterCoverageResponse:
      description: Coverage-only medical-necessity assessment for a claim.
      properties:
        claim_type:
          title: Claim Type
          type: string
        contractor_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Resolved MAC jurisdiction, e.g. JL
          title: Contractor Id
        coverage:
          items:
            $ref: '#/components/schemas/EncounterCoverageResult'
          title: Coverage
          type: array
        coverage_clean:
          description: >-
            True when no line has a coverage blocker
            (dx_not_on_lcd/dx_required/not_covered)
          title: Coverage Clean
          type: boolean
        date_of_service:
          anyOf:
            - type: string
            - type: 'null'
          title: Date Of Service
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        warnings:
          items:
            $ref: '#/components/schemas/EncounterWarning'
          title: Warnings
          type: array
      required:
        - claim_type
        - coverage_clean
      title: EncounterCoverageResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    EncounterDiagnosis:
      description: >-
        One diagnosis with its 837 loop 2300 HI qualifier (primary vs
        secondary).
      properties:
        code:
          description: ICD-10-CM diagnosis code
          title: Code
          type: string
        qualifier:
          default: ABF
          description: >-
            837 HI qualifier: ABK=principal/primary, ABF=secondary,
            ABJ=admitting, APR=reason for visit, ABN=external cause. Accepts
            'primary'/'secondary' aliases.
          title: Qualifier
          type: string
      required:
        - code
      title: EncounterDiagnosis
      type: object
    EncounterCoverageLine:
      description: >-
        One charge line: a procedure code with its linked diagnoses
        (professional).
      properties:
        code:
          description: CPT/HCPCS procedure code
          title: Code
          type: string
        dx:
          description: ICD-10 diagnoses linked to this line (professional claims)
          items:
            $ref: '#/components/schemas/EncounterDiagnosis'
          title: Dx
          type: array
        line_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Caller line identifier, echoed back
          title: Line Id
      required:
        - code
      title: EncounterCoverageLine
      type: object
    EncounterCoverageResult:
      description: >-
        Coverage verdict for one line (professional) or one code
        (institutional).
      properties:
        code:
          title: Code
          type: string
        coverage_status:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            covered, dx_not_on_lcd, dx_required, not_covered, conditional, or
            null
          title: Coverage Status
        dx_required:
          default: false
          title: Dx Required
          type: boolean
        geo_scope:
          anyOf:
            - type: string
            - type: 'null'
          description: national (NCD) or mac_jurisdiction (LCD)
          title: Geo Scope
        lcd_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Lcd Id
        line_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Line Id
        matched_dx:
          items:
            type: string
          title: Matched Dx
          type: array
        ncd_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ncd Id
        policy_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy Title
        primary_covered:
          default: false
          description: True when the principal diagnosis is on the covered list
          title: Primary Covered
          type: boolean
        primary_dx:
          anyOf:
            - type: string
            - type: 'null'
          description: The principal (ABK) diagnosis evaluated
          title: Primary Dx
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: Which policy drove the verdict, e.g. medicare_lcd
          title: Source
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
      required:
        - code
      title: EncounterCoverageResult
      type: object
    EncounterWarning:
      description: A warning or advisory generated during encounter analysis.
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        message:
          title: Message
          type: string
        severity:
          description: info, warning, or critical
          title: Severity
          type: string
      required:
        - severity
        - message
      title: EncounterWarning
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey

````