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

# 医保目录查询

> 医保三目录查询(补全)
按名称模糊搜索医保目录项(药品目录、诊疗项目目录、医疗服务设施目录)
支持指定地区编码筛选



## OpenAPI

````yaml POST /doc-agent/api/v1/capability/social-insurance/search
openapi: 3.0.3
info:
  description: |-
    CapabilityService 独立子能力服务
     提供文件上传、图像质检、材料分类、材料抽取等独立能力，不依赖案件流程。
     通过 batch_id 和 material_id 串联各能力调用。

     ## 典型调用流程
     1. 上传文件 → UploadFiles，获得 batch_id 和 material_id 列表
     2. (可选)图像质检 → CheckImageQuality，可独立调用，也可用上传返回的 material_id
     3. (可选)材料分类 → ClassifyMaterial，可独立调用，也可用上传返回的 material_id
     4. 材料抽取 → ExtractMaterial，传入 material_id 列表，返回每个材料的状态和结果
     5. 轮询 → 重复调用 ExtractMaterial 直到所有材料完成，或等待 callback_url 回调
     注: 质检和分类可独立调用，不依赖抽取流程；抽取接口的 material_ids 必须来自上传接口。
     注: ExtractMaterial 幂等，已完成的材料不会重新抽取，失败的材料会自动重试。

     ## 错误响应
     所有接口错误均返回 HTTP 非 200 状态码，body 格式: {"code": 400, "msg": "错误描述"}
     常见错误码:
       400 — 参数校验失败(缺少必填字段、文件数超限等)
       403 — 认证失败(x-ti-app-id 或 x-ti-secret-code 缺失/无效)
       404 — 资源不存在(material_id / batch_id 无效)
       500 — 内部处理异常

     错误响应示例:
       {"code": 404, "msg": "material not found"}
       {"code": 404, "msg": "batch not found"}
       {"code": 400, "msg": "material_ids or batch_id is required"}
       {"code": 400, "msg": "material does not belong to the specified batch"}
       {"code": 400, "msg": "files or file_urls is required"}
       {"code": 400, "msg": "所有材料必须属于同一批次"}
       {"code": 403, "msg": "x-api-key 或 x-ti-app-id/x-ti-secret-code 不能为空"}
  title: CapabilityService API
  version: 0.0.1
servers:
  - url: https://agents.textin.com/
security: []
tags:
  - name: CapabilityService
paths:
  /doc-agent/api/v1/capability/social-insurance/search:
    post:
      tags:
        - CapabilityService
      description: |-
        医保三目录查询(补全)
        按名称模糊搜索医保目录项(药品目录、诊疗项目目录、医疗服务设施目录)
        支持指定地区编码筛选
      operationId: CapabilityService_SearchSocialInsurance
      parameters:
        - in: header
          name: x-ti-app-id
          required: true
          schema:
            type: string
        - in: header
          name: x-ti-secret-code
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            example:
              insurance_name: 阿莫西林
              page_num: 1
              page_size: 10
              zone_code: '310100'
            schema:
              $ref: >-
                #/components/schemas/capability.v1.CapabilitySocialInsuranceRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                code: 200
                data:
                  list:
                    - detail_uuid: 7803cae83918460da4b66d034d411e37
                      dose_form: 口服常释剂型
                      fee_level: '1'
                      fee_level_name: 甲类
                      id: '1821499'
                      medical_invoice_items_type: '1'
                      medical_invoice_items_type_name: 西药费
                      self_ratio: 0
                      self_ratio_type: '1'
                      self_ratio_type_name: 通用-在职职工
                      social_insurance_catalog_code: '632'
                      social_insurance_catalog_name: 阿莫西林
                      social_insurance_catalog_name_pinyin: AMXL
                      social_insurance_catalog_type: '1'
                      social_insurance_catalog_type_name: 药品目录
                      version_code: SIV001738
                      version_level: 1
                      version_name: 上海市药品目录_260424
                      zone_code: '310100'
                      zone_name: 上海市
                  pagination:
                    page: 1
                    page_size: 10
                    sum: 7
                message: OK
              schema:
                properties:
                  code:
                    description: 业务状态码
                    example: 200
                    type: integer
                  data:
                    $ref: >-
                      #/components/schemas/capability.v1.CapabilitySocialInsuranceResponse
                  message:
                    description: 状态说明
                    example: OK
                    type: string
                type: object
          description: OK
components:
  schemas:
    capability.v1.CapabilitySocialInsuranceRequest:
      properties:
        insurance_name:
          description: 医保目录项名称(药品名/诊疗项目名/服务设施名)
          type: string
        page_num:
          description: 页码(从 1 开始，默认 1)
          format: int32
          type: integer
        page_size:
          description: 每页数量(默认 10)
          format: int32
          type: integer
        zone_code:
          description: |-
            地区编码(6 位行政区划编码，如 "120100" 天津市、"510100" 成都市)
             可通过 LookupDivision 接口查询获取，返回结果中的 preferred_code 即为本字段的值
          type: string
      type: object
    capability.v1.CapabilitySocialInsuranceResponse:
      properties:
        list:
          description: 医保目录项列表
          items:
            $ref: '#/components/schemas/capability.v1.SocialInsuranceItem'
          type: array
        pagination:
          allOf:
            - $ref: '#/components/schemas/common.Pagination'
          description: 分页信息
      type: object
    capability.v1.SocialInsuranceItem:
      description: 医保目录项
      properties:
        detail_uuid:
          description: 明细唯一标识
          type: string
        dose_form:
          description: 剂型
          type: string
        fee_level:
          description: '费用等级(1: 甲类, 2: 乙类)'
          type: string
        fee_level_name:
          description: 费用等级名称
          type: string
        hospital_level:
          description: 医院等级
          type: string
        id:
          description: 记录 ID
          type: string
        labels_memo:
          description: 标签备注
          type: string
        limit_price1:
          description: 限价1
          type: string
        limit_price2:
          description: 限价2
          type: string
        limit_price3:
          description: 限价3
          type: string
        medical_invoice_items_type:
          description: 发票项类型编码
          type: string
        medical_invoice_items_type_name:
          description: 发票项类型名称(如 西药费、中成药费)
          type: string
        memo:
          description: 备注
          type: string
        price:
          description: 价格
          type: string
        restricted:
          description: '是否限制用药(0: 否, 1: 是)'
          format: int32
          type: integer
        self_ratio:
          description: 自费比例
          format: double
          type: number
        self_ratio_type:
          description: 自费比例类型
          type: string
        self_ratio_type_name:
          description: 自费比例类型名称
          type: string
        social_insurance_catalog_code:
          description: 医保目录编码
          type: string
        social_insurance_catalog_drug_name:
          description: 药品通用名
          type: string
        social_insurance_catalog_name:
          description: 医保目录名称
          type: string
        social_insurance_catalog_name_pinyin:
          description: 医保目录名称拼音缩写
          type: string
        social_insurance_catalog_type:
          description: '目录类型(1: 药品目录, 2: 诊疗项目, 3: 服务设施)'
          type: string
        social_insurance_catalog_type_name:
          description: 目录类型名称
          type: string
        version_code:
          description: 版本编码
          type: string
        version_level:
          description: 版本级别
          format: int32
          type: integer
        version_name:
          description: 版本名称
          type: string
        zone_code:
          description: 地区编码
          type: string
        zone_name:
          description: 地区名称
          type: string
      type: object
    common.Pagination:
      properties:
        page:
          description: 当前页码（从1开始）
          format: int32
          type: integer
        page_size:
          description: 每页数量
          format: int32
          type: integer
        sum:
          description: 总记录数
          format: int32
          type: integer
      type: object

````