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

# Get Clinical Questions

> Returns the LOB-specific clinical question set required by the payer's policy for a given drug and diagnosis.



## OpenAPI

````yaml GET /get_clinical_questions
openapi: 3.0.1
info:
  title: Simplex API
  description: API for browser automation, web scraping, and workflow automation
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.simplex.sh
security:
  - bearerAuth: []
paths:
  /get_clinical_questions:
    get:
      description: >-
        Returns the LOB-specific clinical question set required by the payer's
        policy for a given drug and diagnosis.
      parameters:
        - name: bin
          in: query
          required: true
          description: >-
            Pharmacy BIN from the patient's insurance card (e.g. "003858").
            Required — drives LOB routing.
          schema:
            type: string
        - name: state
          in: query
          required: true
          description: >-
            Two-letter state code where the prescription will be filled (e.g.
            "CA"). Required — drives state-DOI mandated forms and state-Medicaid
            / MCO routing.
          schema:
            type: string
        - name: drug_name
          in: query
          required: true
          description: >-
            Drug brand or generic name. Required — drives which clinical schema
            is loaded. Matched case-insensitively on substring.
          schema:
            type: string
            enum:
              - wegovy
              - ozempic
              - zepbound
              - mounjaro
        - name: icd_code
          in: query
          required: true
          description: >-
            Exact ICD-10 diagnosis code (e.g. "E11.9"). Required — drives
            indication mapping and the specific question set returned.
          schema:
            type: string
        - name: pcn
          in: query
          required: false
          description: >-
            Processor Control Number from the patient's insurance card (e.g.
            "A4"). Optional — tiebreaks shared-BIN plans.
          schema:
            type: string
        - name: group_id
          in: query
          required: false
          description: >-
            NCPDP Group ID / group number from the patient's insurance card
            (e.g. "RXINN01"). Optional — tiebreaks when (BIN, PCN) hits multiple
            LOBs.
          schema:
            type: string
        - name: member_id
          in: query
          required: false
          description: >-
            Full member ID from the patient's insurance card (e.g.
            "4XS00000523646"). Optional — the resolver uses the leading alpha
            prefix to tiebreak shared-processor BINs where one (BIN, PCN) pair
            spans multiple lines of business (e.g. BIN 003858 / PCN A4 hosts ESI
            Commercial and Humana Part D). PHI: do not log the full value
            downstream.
          schema:
            type: string
      responses:
        '200':
          description: Get clinical questions response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaFaxGetClinicalQuestionsResponse'
      x-codeSamples:
        - lang: python
          label: Get clinical questions
          source: |-
            import requests

            url = 'https://api.simplex.sh/get_clinical_questions'
            headers = {
                'X-API-Key': 'your_api_key_here'
            }
            params = {
                'bin': '003858',
                'state': 'CA',
                'drug_name': 'wegovy',
                'icd_code': 'E66.01',
                'pcn': 'A4',
                'member_id': '4XS00000523646'
            }

            response = requests.get(url, headers=headers, params=params)
            result = response.json()
            print(f"LOB: {result['lob_id']} ({result['coverage_status']})")
            if result['coverage_status'] == 'resolved':
                for q in result['questions']:
                    print(f"{q['id']}: {q['prompt']} [{q['input_type']}]")
                    if q.get('citation'):
                        print(f"    source: {q['citation']['policy_id']} § {q['citation']['section']}")
                    for opt in q.get('options', []):
                        print(f"    - {opt}")
        - lang: curl
          label: Get clinical questions
          source: >-
            curl -X GET
            "https://api.simplex.sh/get_clinical_questions?bin=003858&state=CA&drug_name=wegovy&icd_code=E66.01&pcn=A4&member_id=4XS00000523646"
            \
              -H "X-API-Key: your_api_key_here"
components:
  schemas:
    PaFaxGetClinicalQuestionsResponse:
      type: object
      properties:
        matched:
          type: boolean
          description: Whether the (BIN, PCN, state) tuple resolved to a known payer.
        routing:
          type: object
          description: Payer routing resolved from the request identifiers.
          properties:
            pbm_name:
              type: string
              description: >-
                Pharmacy Benefit Manager name (e.g. "CVS Caremark", "Express
                Scripts").
            line_of_business:
              type: string
              description: Line of business (e.g. "Aetna Commercial", "Humana Part D").
            plan_name_or_group:
              type: string
              description: Plan / group name when distinguishable from LOB.
            confidence:
              type: string
              enum:
                - high
                - medium
                - low
                - none
              description: >-
                Routing confidence. `none` when the BIN/PCN pair did not match
                any known payer.
        drug:
          type: string
          description: The drug name echoed from the request.
        icd_code:
          type: string
          description: >-
            The ICD-10 code the questions were resolved for (echoed from the
            request).
        coverage_status:
          type: string
          enum:
            - resolved
            - ambiguous
            - not_covered
            - unknown_lob
            - not_attempted
          description: >-
            `resolved`: LOB identified, questions rendered. `ambiguous`:
            multiple LOBs match — supply more identifiers. `not_covered`: drug
            not covered by this LOB (see `rationale` — e.g. Part D statutory
            weight-loss exclusion). `unknown_lob`: drug has a schema but no
            matching LOB. `not_attempted`: `drug_name` didn't map to a drug with
            a clinical schema.
        lob_id:
          type: string
          description: >-
            Resolved line-of-business ID (e.g. "aetna_commercial_wegovy"). Null
            when `coverage_status` is not `resolved`.
        rationale:
          type: string
          description: >-
            Human-readable explanation of the resolution (which LOB won, or why
            one couldn't be chosen).
        questions:
          type: array
          description: >-
            Rendered clinical questions in presentation order. Empty when
            `coverage_status` is not `resolved`.
          items:
            $ref: '#/components/schemas/ClinicalQuestion'
        sources:
          type: array
          description: >-
            Upstream data sources consulted during resolution (payer sheets, CMS
            Part D, Availity, etc.).
          items:
            type: object
            properties:
              source_name:
                type: string
              source_url:
                type: string
              fetch_timestamp:
                type: string
              version:
                type: string
      required:
        - matched
        - coverage_status
        - icd_code
        - questions
    ClinicalQuestion:
      type: object
      description: >-
        A single question on the PA form, rendered from the LOB's clinical
        schema. Question order and presence are gated by `depends_on`.
      properties:
        id:
          type: string
          description: >-
            Stable question identifier — pass back as `question_id` in Fill
            Prior Authorization.
        prompt:
          type: string
          description: Question text as rendered to the reviewer.
        input_type:
          type: string
          enum:
            - boolean
            - numeric
            - date
            - text
            - select
            - multiselect
            - file_upload
        required:
          type: boolean
          description: Whether the question is required on the form.
        units:
          type: string
          description: For `numeric` questions, the expected unit (e.g. "kg/m²", "mg/dL").
        options:
          type: array
          description: For `select` / `multiselect`, the allowed answer values.
          items:
            type: string
        depends_on:
          type: array
          description: >-
            Question IDs that gate this one — rendered only when those parent
            questions are answered affirmatively.
          items:
            type: string
        source:
          type: string
          description: >-
            Evidence markdown path the question was derived from (always
            populated).
        citation:
          allOf:
            - $ref: '#/components/schemas/ClinicalQuestionCitation'
          nullable: true
          description: >-
            Structured per-question citation back to the underlying payer
            policy. Present when the LOB has been backfilled with structured
            citations; `null` otherwise (the `source` path is still populated).
      required:
        - id
        - prompt
        - input_type
    ClinicalQuestionCitation:
      type: object
      description: Pointer back to the payer policy that justifies a clinical question.
      properties:
        policy_url:
          type: string
          description: Canonical policy URL on the payer's site.
        policy_id:
          type: string
          description: Payer policy identifier (e.g. "CPB 0345", "5.01.621").
        section:
          type: string
          description: Section reference within the policy (e.g. "§A Eligibility 1.a").
        quote:
          type: string
          description: Verbatim policy snippet this question encodes.
        effective_date:
          type: string
          description: Policy effective date (YYYY-MM-DD).
        evidence_path:
          type: string
          description: Relative path to the evidence markdown file (LOB-level fallback).
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Simplex API Key

````