> ## 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.

# Resolve full knowledge stack

> Resolve the full L1-L6 knowledge stack for a facility.

Given a CCN (Medicare Provider Number) plus either a single ``cpt`` or
claim-shaped ``lines[]`` + ``dx[]``, returns L1–L6 including GPCI, payment
system, billing form, payer rules, per-line service group, RVU estimate,
LCD DX match, and NCCI PTP across the claim.



## OpenAPI

````yaml /docs/openapi.client.json post /v1/knowledge/resolve
openapi: 3.1.0
info:
  description: >-
    Client API for RCIntel. Admin ingest, catalog sync, and internal audit
    routes are omitted. 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: >-
      Geographic payer policy lookup (national NCD vs MAC LCD vs state). Query
      payer, code, state, plan_type. Each row includes geo_scope and
      document_version.
    name: policies
  - 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
  - description: Health checks, service metadata, and Prometheus metrics.
    name: system
paths:
  /v1/knowledge/resolve:
    post:
      tags:
        - knowledge
      summary: Resolve full knowledge stack
      description: >-
        Resolve the full L1-L6 knowledge stack for a facility.


        Given a CCN (Medicare Provider Number) plus either a single ``cpt`` or

        claim-shaped ``lines[]`` + ``dx[]``, returns L1–L6 including GPCI,
        payment

        system, billing form, payer rules, per-line service group, RVU estimate,

        LCD DX match, and NCCI PTP across the claim.
      operationId: resolve_knowledge_v1_knowledge_resolve_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeResolveRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeResolveResponse'
          description: Complete L1-L6 resolution with optional payment estimate
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    KnowledgeResolveRequest:
      description: >-
        Resolve the full L1-L6 knowledge stack for a facility and optional
        claim.


        Two equivalent input shapes (both valid):


        * Single-code (legacy): ``cpt`` + optional ``dx_codes``

        * Claim-shaped (locked): ``lines[]`` + ``dx[]`` — same line object as
          ``POST /v1/knowledge/payment-calc/claim``

        When ``lines`` is present it is authoritative; ``cpt`` is ignored.

        ``dx`` wins over the legacy ``dx_codes`` alias when both are sent.
      examples:
        - care_setting: outpatient
          ccn: '170001'
          dx:
            - M17.11
            - E11.9
          lines:
            - code: '99213'
              units: 1
            - code: '36415'
              units: 1
          payer: Medicare
        - care_setting: outpatient
          ccn: '170001'
          cpt: '99213'
          dx_codes:
            - M17.11
          payer: Medicare
      properties:
        care_setting:
          anyOf:
            - type: string
            - type: 'null'
          description: Care setting context
          examples:
            - outpatient
          title: Care Setting
        ccn:
          description: 6-digit Medicare Provider Number (CCN)
          examples:
            - '170001'
          pattern: ^\d{6}$
          title: Ccn
          type: string
        cpt:
          anyOf:
            - pattern: ^[A-Za-z0-9]{5}$
              type: string
            - type: 'null'
          description: Single CPT/HCPCS code (legacy). Ignored when lines[] is sent.
          examples:
            - '99213'
          title: Cpt
        date_of_service:
          anyOf:
            - type: string
            - type: 'null'
          description: YYYY-MM-DD for NCCI versioning
          title: Date Of Service
        dx:
          description: ICD-10-CM diagnosis codes for the claim (preferred over dx_codes)
          items:
            type: string
          title: Dx
          type: array
        dx_codes:
          description: Legacy DX alias. Prefer dx[].
          examples:
            - - M17.11
              - E11.9
          items:
            type: string
          title: Dx Codes
          type: array
        lines:
          description: Claim procedure lines (max 25). Same shape as payment-calc/claim.
          items:
            $ref: '#/components/schemas/PaymentClaimLine'
          maxItems: 25
          title: Lines
          type: array
        payer:
          anyOf:
            - type: string
            - type: 'null'
          description: Payer name or identifier
          examples:
            - Medicare
          title: Payer
        place_of_service:
          anyOf:
            - type: string
            - type: 'null'
          description: Claim-level POS default (e.g. 11, 22)
          examples:
            - '22'
          title: Place Of Service
      required:
        - ccn
      title: KnowledgeResolveRequest
      type: object
    KnowledgeResolveResponse:
      description: |-
        Full knowledge resolution result across all applicable layers.

        ``layers`` + ``payment_estimate`` stay the single-code view (first line)
        for existing clients. ``dx`` / ``lines`` / ``ncci_*`` are the locked
        claim-shaped fields.
      properties:
        audit_tier:
          anyOf:
            - type: string
            - type: 'null'
          description: SENTINEL audit tier (green/yellow/red)
          title: Audit Tier
        ccn:
          description: The queried CCN
          title: Ccn
          type: string
        coverage_info:
          anyOf:
            - $ref: '#/components/schemas/CoverageInfo'
            - type: 'null'
          description: Coverage context if payer was provided
        dx:
          description: Normalized claim DX
          items:
            type: string
          title: Dx
          type: array
        facility_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Resolved facility name
          title: Facility Name
        layers:
          description: Resolved L1-L6 layer data
          items:
            $ref: '#/components/schemas/LayerData'
          title: Layers
          type: array
        lines:
          description: Per-line L5/L6/coverage. Empty when no CPT/lines were sent.
          items:
            $ref: '#/components/schemas/KnowledgeResolveLineResult'
          title: Lines
          type: array
        ncci_clean:
          default: true
          title: Ncci Clean
          type: boolean
        ncci_conflicts:
          items:
            $ref: '#/components/schemas/NCCIBatchConflict'
          title: Ncci Conflicts
          type: array
        payment_estimate:
          anyOf:
            - $ref: '#/components/schemas/PaymentEstimate'
            - type: 'null'
          description: Physician RVU estimate for the first line (legacy)
      required:
        - ccn
        - layers
      title: KnowledgeResolveResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    PaymentClaimLine:
      description: >-
        One procedure line on a claim — shared by payment-calc/claim and
        resolve.
      properties:
        code:
          maxLength: 5
          minLength: 5
          pattern: ^[A-Za-z0-9]{5}$
          title: Code
          type: string
        line_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Client line id; defaults to 1-based index
          title: Line Id
        modifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Modifier
        place_of_service:
          anyOf:
            - type: string
            - type: 'null'
          description: POS override for this line
          title: Place Of Service
        units:
          default: 1
          maximum: 999
          minimum: 1
          title: Units
          type: integer
      required:
        - code
      title: PaymentClaimLine
      type: object
    CoverageInfo:
      description: Coverage context resolved from payer layer.
      properties:
        conditions:
          items:
            type: string
          title: Conditions
          type: array
        coverage_status:
          anyOf:
            - type: string
            - type: 'null'
          description: covered, not_covered, conditional
          title: Coverage Status
        lcd_ncd_reference:
          anyOf:
            - type: string
            - type: 'null'
          description: LCD/NCD policy reference
          title: Lcd Ncd Reference
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      title: CoverageInfo
      type: object
    LayerData:
      description: Resolved data for a single knowledge layer.
      properties:
        data:
          additionalProperties: true
          description: Layer-specific resolved data
          title: Data
          type: object
        layer:
          description: Layer identifier (l1, l2, ... l6)
          title: Layer
          type: string
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: Data source URL or reference
          title: Source
      required:
        - layer
        - data
      title: LayerData
      type: object
    KnowledgeResolveLineResult:
      description: Per-line L5/L6 plus LCD DX match for a claim-shaped resolve.
      properties:
        code:
          title: Code
          type: string
        coverage:
          anyOf:
            - $ref: '#/components/schemas/PaymentClaimCoverage'
            - type: 'null'
        l5:
          additionalProperties: true
          title: L5
          type: object
        l6:
          additionalProperties: true
          title: L6
          type: object
        line_id:
          title: Line Id
          type: string
        modifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Modifier
        place_of_service:
          anyOf:
            - type: string
            - type: 'null'
          title: Place Of Service
        units:
          default: 1
          title: Units
          type: integer
      required:
        - line_id
        - code
      title: KnowledgeResolveLineResult
      type: object
    NCCIBatchConflict:
      description: A single PTP conflict found within the batch.
      properties:
        claim_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Claim Type
        code1:
          title: Code1
          type: string
        code2:
          title: Code2
          type: string
        col1_proc_cd:
          anyOf:
            - type: string
            - type: 'null'
          title: Col1 Proc Cd
        col2_proc_cd:
          anyOf:
            - type: string
            - type: 'null'
          title: Col2 Proc Cd
        effective_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Effective Date
        is_bundled:
          default: true
          title: Is Bundled
          type: boolean
        modifier_allowed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Modifier Allowed
        modifier_indicator:
          anyOf:
            - type: string
            - type: 'null'
          title: Modifier Indicator
        ptp_rationale:
          anyOf:
            - type: string
            - type: 'null'
          title: Ptp Rationale
      required:
        - code1
        - code2
      title: NCCIBatchConflict
      type: object
    PaymentEstimate:
      description: Structured payment estimate from knowledge resolution.
      properties:
        conversion_factor:
          anyOf:
            - type: number
            - type: 'null'
          title: Conversion Factor
        estimated_payment:
          anyOf:
            - type: number
            - type: 'null'
          description: Estimated Medicare payment in USD
          title: Estimated Payment
        methodology:
          anyOf:
            - type: string
            - type: 'null'
          description: 'Payment system: MPFS, OPPS, etc.'
          title: Methodology
        mp_gpci:
          anyOf:
            - type: number
            - type: 'null'
          title: Mp Gpci
        mp_rvu:
          anyOf:
            - type: number
            - type: 'null'
          title: Mp Rvu
        pe_gpci:
          anyOf:
            - type: number
            - type: 'null'
          title: Pe Gpci
        pe_rvu:
          anyOf:
            - type: number
            - type: 'null'
          title: Pe Rvu
        pw_gpci:
          anyOf:
            - type: number
            - type: 'null'
          title: Pw Gpci
        total_rvu:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Rvu
        work_rvu:
          anyOf:
            - type: number
            - type: 'null'
          title: Work Rvu
      title: PaymentEstimate
      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
    PaymentClaimCoverage:
      description: LCD/NCD vs claim DX for one procedure code.
      properties:
        code:
          title: Code
          type: string
        coverage_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Coverage Status
        dx_required:
          default: false
          title: Dx Required
          type: boolean
        lcd_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Lcd Id
        matched_dx:
          items:
            type: string
          title: Matched Dx
          type: array
        ncd_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ncd Id
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
      required:
        - code
      title: PaymentClaimCoverage
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey

````