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

# Reorder Patient Policies

> Swap coverage tiers across a patient's active policies in one
transaction.



## OpenAPI

````yaml https://api.getsolum.com/openapi.json post /v1/patient-policies/reorder
openapi: 3.1.0
info:
  title: Solum Health API
  description: '## Solum Health Backend API '
  version: 1.0.0
servers: []
security: []
paths:
  /v1/patient-policies/reorder:
    post:
      tags:
        - Patient Policies
      summary: Reorder Patient Policies
      description: |-
        Swap coverage tiers across a patient's active policies in one
        transaction.
      operationId: reorder_patient_policies_v1_patient_policies_reorder_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientPolicyReorderRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientPolicyList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: validation_error
                  code:
                    type: string
                    example: invalid_parameter
                  message:
                    type: string
                    example: Field validation failed
                  param:
                    type: string
                    example: phone_number
                required:
                  - type
                  - code
                  - message
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    PatientPolicyReorderRequest:
      properties:
        patient_id:
          type: string
          title: Patient Id
          description: The patient whose policies to reorder
        items:
          items:
            $ref: '#/components/schemas/PatientPolicyReorderItem'
          type: array
          title: Items
          description: Every active policy's new tier
      additionalProperties: false
      type: object
      required:
        - patient_id
        - items
      title: PatientPolicyReorderRequest
      description: |-
        Give a patient's active policies new tiers, in one transaction.

        *items* must be EVERY active policy of the patient — one that misses one
        or names a foreign policy is a stale picture (409, from the service). No
        two items may name the same policy or claim the same tier; those are
        caught here, before anything is locked or written.
    PatientPolicyList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PatientPolicy'
          type: array
          title: Data
        pagination:
          $ref: '#/components/schemas/Pagination'
      additionalProperties: false
      type: object
      required:
        - data
        - pagination
      title: PatientPolicyList
      description: List response for patient policies.
    PatientPolicyReorderItem:
      properties:
        policy_id:
          type: string
          title: Policy Id
          description: The policy to move
        coverage_tier:
          $ref: '#/components/schemas/InsuranceTier'
          description: The tier to give it
        version:
          type: integer
          title: Version
          description: The policy's current version, for optimistic locking
      additionalProperties: false
      type: object
      required:
        - policy_id
        - coverage_tier
        - version
      title: PatientPolicyReorderItem
      description: One policy's new tier, in a reorder request.
    PatientPolicy:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        patient_id:
          type: string
          title: Patient Id
        insurance_id:
          type: string
          title: Insurance Id
        insurance_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Insurance Display Name
        member_number:
          type: string
          title: Member Number
        coverage_tier:
          $ref: '#/components/schemas/InsuranceTier'
        group_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Number
        group_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Description
        medicaid_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Medicaid Id
        plan_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan Name
        insurance_type:
          anyOf:
            - $ref: '#/components/schemas/InsurancePlanType'
            - type: 'null'
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
        relationship_to_subscriber:
          anyOf:
            - $ref: '#/components/schemas/RelationshipToSubscriber'
            - type: 'null'
        subscriber:
          anyOf:
            - $ref: '#/components/schemas/PolicySubscriber'
            - type: 'null'
          description: Null when every subscriber field is null
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        active:
          type: boolean
          title: Active
          default: true
        version:
          type: integer
          title: Version
          default: 0
        current_version:
          anyOf:
            - $ref: '#/components/schemas/Payor'
            - type: 'null'
          description: >-
            The current verification: the result of the policy's latest
            completed VOB. Null when no VOB of the policy has completed yet.
        insurance:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Insurance
        patient:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Patient
      type: object
      required:
        - id
        - created_at
        - updated_at
        - patient_id
        - insurance_id
        - member_number
        - coverage_tier
      title: PatientPolicy
      description: |-
        A patient policy: one coverage a patient holds.

        Its verifications (its VOBs' results) are not nested here: each is read
        with its VOB, through `/v1/verification-of-benefits` (filter by
        `patient_policy_id`, `include=result`). `current_version` is the one
        exception: the policy's current verification — the result of its latest
        completed VOB — embedded for convenience, and null while the policy is
        not verified yet.
    Pagination:
      properties:
        has_more:
          type: boolean
          title: Has More
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        limit:
          type: integer
          title: Limit
      additionalProperties: false
      type: object
      required:
        - has_more
        - total
        - page
        - limit
      title: Pagination
      description: |-
        Pagination information for list responses.

        Fields:
        - has_more: Whether more items exist beyond this page
        - total: Total number of items across all pages
        - page: Current page number (1-based)
        - limit: Number of items per page
    InsuranceTier:
      type: string
      enum:
        - primary
        - secondary
        - tertiary
        - quaternary
      title: InsuranceTier
      description: Insurance tier enum matching Prisma
    InsurancePlanType:
      type: string
      enum:
        - '01'
        - '02'
        - '03'
        - '12'
        - '13'
        - '14'
        - '15'
        - '16'
        - '17'
        - '18'
        - '19'
        - '41'
        - '42'
        - '43'
        - '47'
        - '48'
        - '49'
        - AP
        - C1
        - CO
        - CP
        - D
        - DB
        - EP
        - FF
        - GP
        - HB
        - HD
        - HG
        - HM
        - HN
        - HP
        - HS
        - IN
        - IP
        - LC
        - LD
        - LI
        - LT
        - M
        - MA
        - MB
        - MC
        - MD
        - ME
        - MH
        - MI
        - MJ
        - MK
        - ML
        - MM
        - MN
        - MO
        - MP
        - MR
        - MT
        - OA
        - OT
        - PE
        - PL
        - PP
        - PR
        - PS
        - QM
        - RP
        - SA
        - SP
        - TF
        - WC
        - WU
      title: InsurancePlanType
      description: Insurance plan type enum matching Prisma - X12 standard codes
    RelationshipToSubscriber:
      type: string
      enum:
        - spouse
        - self
        - child
        - employee
        - unknown
        - organ_donor
        - cadaver_donor
        - life_partner
        - other_relationship
      title: RelationshipToSubscriber
      description: Relationship to subscriber enum matching Prisma @map values
    PolicySubscriber:
      properties:
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: Subscriber's first name
        middle_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Middle Name
          description: Subscriber's middle name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: Subscriber's last name
        dob:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Dob
          description: Subscriber's date of birth
        gender:
          anyOf:
            - $ref: '#/components/schemas/Gender'
            - type: 'null'
          description: Subscriber's gender
        member_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Member Number
          description: Subscriber's own member/subscriber ID
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: Subscriber's address
        address2:
          anyOf:
            - type: string
            - type: 'null'
          title: Address2
          description: Subscriber's address line 2
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: Subscriber's city
        state:
          anyOf:
            - $ref: '#/components/schemas/States'
            - type: 'null'
          description: Subscriber's state
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
          description: Subscriber's ZIP code
      additionalProperties: false
      type: object
      title: PolicySubscriber
      description: |-
        The person who holds the policy — nested on `PatientPolicy` rather than
        the flat `subscriber_*` columns the table actually has.

        Imported directly by the patients module's inline policy schemas
        (Task 8): this is the one definition of the subscriber's wire shape.
    Payor:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        patient_id:
          type: string
          title: Patient Id
        patient_policy_id:
          type: string
          title: Patient Policy Id
          description: The policy this result verifies.
        billing_credentialing_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Billing Credentialing Id
          description: >-
            The credentialing record this version's checks bill under, when one
            is pinned; the VOB flows preselect it for the coverage.
        provider_network_status:
          anyOf:
            - $ref: '#/components/schemas/ProviderNetworkStatus'
            - type: 'null'
        cbh_status:
          anyOf:
            - $ref: '#/components/schemas/CbhStatus'
            - type: 'null'
        plan_funding_type:
          anyOf:
            - $ref: '#/components/schemas/PlanFundingType'
            - type: 'null'
        plan_renewal_date_type:
          anyOf:
            - $ref: '#/components/schemas/PlanRenewalDateType'
            - type: 'null'
        benefit_period_end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Benefit Period End Date
        cob_on_file:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Cob On File
        cob_last_verified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cob Last Verified At
        has_other_active_coverage:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Other Active Coverage
        cob_other_coverages:
          anyOf:
            - items:
                $ref: '#/components/schemas/OtherCoverage'
              type: array
            - type: 'null'
          title: Cob Other Coverages
        out_of_state_benefits:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Out Of State Benefits
        out_of_state_benefits_comments:
          anyOf:
            - type: string
            - type: 'null'
          title: Out Of State Benefits Comments
        in_grace_period:
          anyOf:
            - type: boolean
            - type: 'null'
          title: In Grace Period
        last_payment_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Last Payment Date
        is_cobra_coverage:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Cobra Coverage
        deductible_apply_to_oop:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Deductible Apply To Oop
        eligibility_check_status:
          $ref: '#/components/schemas/EligibilityStatus'
          default: pending
        eligibility_check_comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Eligibility Check Comment
        eligibility_check_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Eligibility Check Date
        eligibility_version:
          type: integer
          title: Eligibility Version
          default: 0
        individual_deductible_policy_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Deductible Policy In Network
        individual_deductible_policy_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Deductible Policy Out Network
        individual_deductible_remaining_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Deductible Remaining In Network
        individual_deductible_remaining_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Deductible Remaining Out Network
        family_deductible_policy_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Deductible Policy In Network
        family_deductible_policy_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Deductible Policy Out Network
        family_deductible_remaining_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Deductible Remaining In Network
        family_deductible_remaining_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Deductible Remaining Out Network
        individual_oop_max_policy_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Oop Max Policy In Network
        individual_oop_max_policy_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Oop Max Policy Out Network
        individual_oop_max_remaining_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Oop Max Remaining In Network
        individual_oop_max_remaining_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Individual Oop Max Remaining Out Network
        family_oop_max_policy_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Oop Max Policy In Network
        family_oop_max_policy_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Oop Max Policy Out Network
        family_oop_max_remaining_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Oop Max Remaining In Network
        family_oop_max_remaining_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Family Oop Max Remaining Out Network
        benefits_related_entities:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Benefits Related Entities
        ai_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Ai Summary
        ai_summary_generated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ai Summary Generated At
        patient:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Patient
        services:
          anyOf:
            - items:
                $ref: '#/components/schemas/PayorService'
              type: array
            - type: 'null'
          title: Services
        active:
          type: boolean
          title: Active
          default: true
        version:
          type: integer
          title: Version
          default: 1
      type: object
      required:
        - id
        - created_at
        - updated_at
        - patient_id
        - patient_policy_id
      title: Payor
      description: |-
        Payor resource: one VOB's result on a patient policy.

        Carries what one verification found — the eligibility result, benefits,
        COB, services and the AI summary. The coverage itself (insurance, member
        number, tier, subscriber, external ID...) is the policy's
        (`patient_policy_id`). The result of the policy's latest completed,
        active VOB is its current verification.
    Gender:
      type: string
      enum:
        - male
        - female
        - other
      title: Gender
      description: Gender enum matching Prisma
    States:
      type: string
      enum:
        - alabama
        - alaska
        - arizona
        - arkansas
        - california
        - colorado
        - connecticut
        - delaware
        - florida
        - georgia
        - hawaii
        - idaho
        - illinois
        - indiana
        - iowa
        - kansas
        - kentucky
        - louisiana
        - maine
        - maryland
        - massachusetts
        - michigan
        - minnesota
        - mississippi
        - missouri
        - montana
        - nebraska
        - nevada
        - new_hampshire
        - new_jersey
        - new_mexico
        - new_york
        - north_carolina
        - north_dakota
        - ohio
        - oklahoma
        - oregon
        - pennsylvania
        - rhode_island
        - south_carolina
        - south_dakota
        - tennessee
        - texas
        - utah
        - vermont
        - virginia
        - washington
        - west_virginia
        - wisconsin
        - wyoming
        - district_of_columbia
        - puerto_rico
        - virgin_islands
        - guam
        - northern_mariana_islands
        - american_samoa
      title: States
      description: US States enum matching Prisma @map values
    ProviderNetworkStatus:
      type: string
      enum:
        - unknown
        - in_network
        - out_of_network
      title: ProviderNetworkStatus
      description: Provider network status enum matching Prisma @map values
    CbhStatus:
      type: string
      enum:
        - active
        - inactive
      title: CbhStatus
      description: >-
        CBH (Community Behavioral Health) coverage status matching Prisma @map
        values.


        Captured per-payor; the checklist counterpart is

        VerificationRequirement.ASK_FOR_CBH.
    PlanFundingType:
      type: string
      enum:
        - fully_funded
        - self_funded
        - unknown
      title: PlanFundingType
      description: Plan funding type enum matching Prisma @map values
    PlanRenewalDateType:
      type: string
      enum:
        - calendar_year
        - service_year
        - contract
      title: PlanRenewalDateType
      description: Plan renewal date type enum matching Prisma @map values
    OtherCoverage:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: Carrier name as the payer states it
        position:
          anyOf:
            - $ref: '#/components/schemas/InsuranceTier'
            - type: 'null'
          description: >-
            Where this coverage sits in the member's coordination order. Left
            empty when the payer names a carrier without stating its position.
      additionalProperties: false
      type: object
      required:
        - name
      title: OtherCoverage
      description: >-
        One other insurance the payer holds on file for a member.


        Stored as JSON on `payors.cob_other_coverages`. `name` is free text on

        purpose — the carriers a payer names are frequently ones we do not
        contract

        with, so a catalog reference would block recording them.
    EligibilityStatus:
      type: string
      enum:
        - active
        - inactive
        - pending
        - failed
      title: EligibilityStatus
      description: >-
        Eligibility check status. Bound to the PG enum "EligibilityStatus"

        (labels pending, active, inactive, failed) used by

        eligibility_checks.eligibility_status. payors.eligibility_check_status
        is

        a different PG type (eligibility_check_status, no failed) and is
        declared

        literally on the Payor model.
    PayorService:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        payor_id:
          type: string
          title: Payor Id
        service_type:
          $ref: '#/components/schemas/ServiceType'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        verification_benefits_status:
          $ref: '#/components/schemas/VerificationBenefitsStatus'
          default: pending
        verification_dates:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Verification Dates
        verification_user_ids:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - type: 'null'
              type: array
            - type: 'null'
          title: Verification User Ids
        verification_benefits_comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Verification Benefits Comment
        pre_cert_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Cert Name
        pre_cert_phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Cert Phone Number
        pre_cert_fax:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Cert Fax
        pre_cert_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Cert Url
        pre_cert_penalty:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Cert Penalty
        pre_cert_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Cert Email
        sca_instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Sca Instructions
        claim_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Claim Address
        oon_reimbursement_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Oon Reimbursement Rate
        oon_reimbursement_rate_type:
          anyOf:
            - $ref: '#/components/schemas/OonReimbursementRateType'
            - type: 'null'
        eligibility_check_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Eligibility Check Id
        carve_out_insurer_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Carve Out Insurer Id
        location_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Id
        rep_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Rep Name
        call_reference_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Call Reference Number
        called_phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Called Phone Number
        covered_cpt_codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Covered Cpt Codes
        not_covered_cpt_codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Not Covered Cpt Codes
        covered_icd_codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Covered Icd Codes
        not_covered_icd_codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Not Covered Icd Codes
        version:
          type: integer
          title: Version
          default: 1
        location_rates:
          anyOf:
            - items:
                $ref: '#/components/schemas/PayorServiceLocation'
              type: array
            - type: 'null'
          title: Location Rates
        payor:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Payor
      type: object
      required:
        - id
        - payor_id
        - service_type
        - created_at
        - updated_at
      title: PayorService
      description: >-
        Payor service resource.


        Represents insurance verification and benefit details for a specific
        service.
      example:
        copay_in_network: 25
        created_at: '2024-01-15T10:30:00Z'
        eligibility_check_status: ELIGIBLE
        id: 550e8400-e29b-41d4-a716-446655440014
        payor_id: 550e8400-e29b-41d4-a716-446655440012
        service_type: PT
        updated_at: '2024-01-15T10:30:00Z'
        verification_benefits_status: VERIFIED
    ServiceType:
      type: string
      enum:
        - medical_care
        - surgical
        - consultation
        - diagnostic_x_ray
        - diagnostic_lab
        - radiation_therapy
        - anesthesia
        - surgical_assistance
        - other_medical
        - blood_charges
        - used_durable_medical_equipment
        - durable_medical_equipment_purchase
        - ambulatory_service_center_facility
        - renal_supplies_in_home
        - alternate_method_dialysis
        - chronic_renal_disease_equipment
        - pre_admission_testing
        - durable_medical_equipment_rental
        - pneumonia_vaccine
        - second_surgical_opinion
        - third_surgical_opinion
        - social_work
        - diagnostic_dental
        - periodontics
        - restorative
        - endodontics
        - maxillofacial_prosthetics
        - adjunctive_dental_services
        - health_benefit_plan_coverage
        - plan_waiting_period
        - chiropractic
        - chiropractic_office_visits
        - dental_care
        - dental_crowns
        - dental_accident
        - orthodontics
        - prosthodontics
        - oral_surgery
        - routine_preventive_dental
        - home_health_care
        - home_health_prescriptions
        - home_health_visits
        - hospice
        - respite_care
        - hospital
        - hospital_inpatient
        - hospital_room_and_board
        - hospital_outpatient
        - hospital_emergency_accident
        - hospital_emergency_medical
        - hospital_ambulatory_surgical
        - long_term_care
        - major_medical
        - medically_related_transportation
        - air_transportation
        - cabulance
        - licensed_ambulance
        - general_benefits
        - in_vitro_fertilization
        - mri_cat_scan
        - donor_procedures
        - acupuncture
        - newborn_care
        - pathology
        - smoking_cessation
        - well_baby_care
        - maternity
        - transplants
        - audiology_exam
        - inhalation_therapy
        - diagnostic_medical
        - private_duty_nursing
        - prosthetic_device
        - dialysis
        - otological_exam
        - chemotherapy
        - allergy_testing
        - immunizations
        - routine_physical
        - family_planning
        - infertility
        - abortion
        - aids
        - emergency_services
        - cancer
        - pharmacy
        - free_standing_prescription_drug
        - mail_order_prescription_drug
        - brand_name_prescription_drug
        - generic_prescription_drug
        - podiatry
        - podiatry_office_visits
        - podiatry_nursing_home_visits
        - professional_physician
        - anesthesiologist
        - professional_visit_office
        - professional_visit_inpatient
        - professional_visit_outpatient
        - professional_visit_nursing_home
        - professional_visit_skilled_nursing_facility
        - professional_visit_home
        - psychiatric
        - psychiatric_room_and_board
        - psychotherapy
        - psychiatric_inpatient
        - psychiatric_outpatient
        - rehabilitation
        - rehabilitation_room_and_board
        - rehabilitation_inpatient
        - rehabilitation_outpatient
        - occupational_therapy
        - physical_medicine
        - speech_therapy
        - skilled_nursing_care
        - skilled_nursing_care_room_and_board
        - substance_abuse
        - alcoholism
        - drug_addiction
        - vision_optometry
        - frames
        - routine_exam
        - lenses
        - nonmedically_necessary_physical
        - experimental_drug_therapy
        - burn_care
        - brand_name_prescription_drug_formulary
        - brand_name_prescription_drug_non_formulary
        - independent_medical_evaluation
        - partial_hospitalization_psychiatric
        - day_care_psychiatric
        - cognitive_therapy
        - massage_therapy
        - pulmonary_rehabilitation
        - cardiac_rehabilitation
        - pediatric
        - nursery
        - skin
        - orthopedic
        - cardiac
        - lymphatic
        - gastrointestinal
        - endocrine
        - neurology
        - eye
        - invasive_procedures
        - gynecological
        - obstetrical
        - obstetrical_gynecological
        - mail_order_prescription_drug_brand_name
        - mail_order_prescription_drug_generic
        - physician_visit_office_sick
        - physician_visit_office_well
        - coronary_care
        - private_duty_nursing_inpatient
        - private_duty_nursing_home
        - surgical_benefits_professional
        - surgical_benefits_facility
        - mental_health_provider_inpatient
        - mental_health_provider_outpatient
        - mental_health_facility_inpatient
        - mental_health_facility_outpatient
        - substance_abuse_facility_inpatient
        - substance_abuse_facility_outpatient
        - screening_x_ray
        - screening_laboratory
        - mammogram_high_risk_patient
        - mammogram_low_risk_patient
        - flu_vaccination
        - eyewear_and_accessories
        - case_management
        - dermatology
        - durable_medical_equipment
        - diabetic_supplies
        - generic_prescription_drug_formulary
        - generic_prescription_drug_non_formulary
        - allergy
        - intensive_care
        - mental_health
        - neonatal_intensive_care
        - oncology
        - physical_therapy
        - pulmonary
        - renal
        - residential_psychiatric_treatment
        - transitional_care
        - transitional_nursery_care
        - urgent_care
      title: ServiceType
      description: |-
        X12 Service Type — human-readable enum values stored in the database.
        See app/utils/service_type_mapping.py for code-to-type mappings.
    VerificationBenefitsStatus:
      type: string
      enum:
        - completed
        - pending
        - in_progress
        - not_collected
      title: VerificationBenefitsStatus
      description: Verification benefits status enum matching Prisma @map values
    OonReimbursementRateType:
      type: string
      enum:
        - ucr
        - medicare
        - mnrp
        - maa
        - billed_charges
        - fee_schedule
        - mrc1
        - mrc2
        - local_allowable_rates
        - not_confirmed
      title: OonReimbursementRateType
      description: OON Reimbursement rate type enum matching Prisma @map values
    PayorServiceLocation:
      properties:
        service_location:
          $ref: '#/components/schemas/ServiceLocation'
          description: Service location
        covered_in_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Covered In Network
          description: Whether service is covered in network
        covered_out_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Covered Out Network
          description: Whether service is covered out of network
        copay_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Copay In Network
          description: Copay in network
        copay_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Copay Out Network
          description: Copay out of network
        co_insurance_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Co Insurance In Network
          description: Co-insurance in network (percentage)
        co_insurance_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Co Insurance Out Network
          description: Co-insurance out of network (percentage)
        auth_required_in_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Auth Required In Network
          description: Whether authorization is required in network
        auth_required_out_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Auth Required Out Network
          description: Whether authorization is required out of network
        auth_required_at_visit_in_network:
          anyOf:
            - type: integer
            - type: 'null'
          title: Auth Required At Visit In Network
          description: Visit number from which authorization is required in network
        auth_required_at_visit_out_network:
          anyOf:
            - type: integer
            - type: 'null'
          title: Auth Required At Visit Out Network
          description: Visit number from which authorization is required out of network
        mnr_required_in_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mnr Required In Network
          description: Whether a medical necessity review is required in network
        mnr_required_out_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Mnr Required Out Network
          description: Whether a medical necessity review is required out of network
        mnr_required_at_visit_in_network:
          anyOf:
            - type: integer
            - type: 'null'
          title: Mnr Required At Visit In Network
          description: >-
            Visit number from which a medical necessity review is required in
            network
        mnr_required_at_visit_out_network:
          anyOf:
            - type: integer
            - type: 'null'
          title: Mnr Required At Visit Out Network
          description: >-
            Visit number from which a medical necessity review is required out
            of network
        deductible_apply_in_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Deductible Apply In Network
          description: Whether deductible applies in network
        deductible_apply_out_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Deductible Apply Out Network
          description: Whether deductible applies out of network
        oop_apply_in_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Oop Apply In Network
          description: Whether OOP applies in network
        oop_apply_out_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Oop Apply Out Network
          description: Whether OOP applies out of network
        copay_applies_to_oop_max_in_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Copay Applies To Oop Max In Network
          description: Whether the copay counts toward the out-of-pocket maximum in network
        copay_applies_to_oop_max_out_network:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Copay Applies To Oop Max Out Network
          description: >-
            Whether the copay counts toward the out-of-pocket maximum out of
            network
        dollar_limit_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Dollar Limit In Network
          description: Dollar limit in network
        dollar_limit_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Dollar Limit Out Network
          description: Dollar limit out of network
        dollar_limit_remaining_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Dollar Limit Remaining In Network
          description: Dollar limit remaining in network
        dollar_limit_remaining_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Dollar Limit Remaining Out Network
          description: Dollar limit remaining out of network
        dollar_limit_time_period_in_network:
          anyOf:
            - $ref: '#/components/schemas/PeriodicMaximumTimePeriod'
            - type: 'null'
          description: Dollar limit time period in network
        dollar_limit_time_period_out_network:
          anyOf:
            - $ref: '#/components/schemas/PeriodicMaximumTimePeriod'
            - type: 'null'
          description: Dollar limit time period out of network
        dollar_limit_type_in_network:
          anyOf:
            - $ref: '#/components/schemas/LimitType'
            - type: 'null'
          description: Dollar limit type in network (soft or hard)
        dollar_limit_type_out_network:
          anyOf:
            - $ref: '#/components/schemas/LimitType'
            - type: 'null'
          description: Dollar limit type out of network (soft or hard)
        visit_limit_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Visit Limit In Network
          description: Visit limit in network
        visit_limit_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Visit Limit Out Network
          description: Visit limit out of network
        visit_limit_remaining_in_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Visit Limit Remaining In Network
          description: Visit limit remaining in network
        visit_limit_remaining_out_network:
          anyOf:
            - type: number
            - type: 'null'
          title: Visit Limit Remaining Out Network
          description: Visit limit remaining out of network
        visit_limit_time_period_in_network:
          anyOf:
            - $ref: '#/components/schemas/PeriodicMaximumTimePeriod'
            - type: 'null'
          description: Visit limit time period in network
        visit_limit_time_period_out_network:
          anyOf:
            - $ref: '#/components/schemas/PeriodicMaximumTimePeriod'
            - type: 'null'
          description: Visit limit time period out of network
        visit_limit_type_in_network:
          anyOf:
            - $ref: '#/components/schemas/LimitType'
            - type: 'null'
          description: Visit limit type in network (soft or hard)
        visit_limit_type_out_network:
          anyOf:
            - $ref: '#/components/schemas/LimitType'
            - type: 'null'
          description: Visit limit type out of network (soft or hard)
        id:
          type: string
          title: Id
        payor_service_id:
          type: string
          title: Payor Service Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        version:
          type: integer
          title: Version
          default: 1
      type: object
      required:
        - service_location
        - id
        - payor_service_id
        - created_at
        - updated_at
      title: PayorServiceLocation
      description: Response model for location-specific rates
    ServiceLocation:
      type: string
      enum:
        - home
        - office
        - school
        - daycare
        - community
        - telehealth
        - on_campus_outpatient_hospital
      title: ServiceLocation
      description: Service location enum matching Prisma @@map("service_location").
    PeriodicMaximumTimePeriod:
      type: string
      enum:
        - daily
        - monthly
        - annually
      title: PeriodicMaximumTimePeriod
      description: Periodic maximum time period enum matching Prisma
    LimitType:
      type: string
      enum:
        - soft
        - hard
      title: LimitType
      description: Limit type enum matching Prisma @map values
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````