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

# Send Prior Authorization

## Overview

This endpoint is designed to streamline the submission of prior authorization requests for medications or treatments. It requires various key pieces of information about the patient, including demographics, insurance details, and the prescription in question. Additionally, the submission should include supporting evidence, such as visit notes, lab results, and intake forms, to justify the need for the prescribed medication or treatment.

## How to Use

To effectively use this endpoint, please ensure the following information is included in your request:

* **Patient Demographics**: Essential details such as the patient's name, date of birth, and contact information.
* **Prescriber Information**: Details about the prescribing healthcare provider, including the prescriber's name, NPI (National Provider Identifier), contact information, and practice or facility details.
* **Insurance Details**: A photo or scan of the patient's insurance card (preferably front and back), including the group number, payer, membership number and RX details. If an image is not available, or the patient provided extra information not on their card (such as rx codes) you can also provide this structured data in the API.
* **Prescription Information**: Detailed data on the prescribed medication or treatment, such as drug name, dosage, and administration instructions.
* **Evidence**: Critical supporting documents and data such as visit notes and laboratory results. This section is particularly versatile, allowing for a variety of formats and contents to support the authorization request.

Given the diverse nature of medical records and evidence, our API is built to accommodate a wide range of data formats. Structured data can be filled into predefined fields, while unstructured data, such as additional JSON content about the patient, can be included in the content block within the evidence objects. This flexibility ensures that even non-standardized data can be effectively utilized in the prior authorization process.

<Tip>We highly recommend you talk to a member of your company who actively submits prior authorizations when collecting the data for this endpoint. For the system to work effectively, we require the **exact** same data that those staff members currently have access to. A great test is to collect the data and see if the staff member is able to use that data alone to submit a new prior authorization through your existing system.</Tip>

## Response

After submitting a request, the system processes the data and returns a response indicating either the successful reception of the request or detailing any errors or additional information needed. Our advanced AI algorithms will analyze the provided information, including any uploaded files or scans, extracting and utilizing relevant details to facilitate the authorization process.

## Building the Integration

We suggest taking the following approach when integrating:

1. Make the API request for *all* prior authorizations that you need to submit, and let us handle coverage on our end. We'd recommend not feature flagging or limiting this to certain patients. Using this approach allows us to work with your ops team to resolve unsupported scenarios while giving you a complete view of which requests Develop Health can process.
2. If you receive an error code, fallback to your company's existing process for handling prior authorizations. We'll gradually reduce the number of errors you receive as we expand to 100% coverage.

<Tip>
  As a developer reading these docs we understand it might be difficult to know what data to provide and how best to structure it. Please know that we at Develop Health are here to help! A member of our engineering team will happily work with you to ensure you're providing the right data in the right format.
</Tip>


## OpenAPI

````yaml post /prior-authorization
openapi: 3.1.0
info:
  title: Develop Health Public API
  description: Develop Health Public API
  version: '1.0'
servers:
  - url: https://api.develophealth.ai
security: []
paths:
  /prior-authorization:
    post:
      tags:
        - public-api
      summary: Create Prior Auth Route
      operationId: create_prior_auth_route_prior_authorization_post
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreatePriorAuthRequest'
              title: Data
              examples:
                - diagnoses:
                    - code: E66.9
                  evidence:
                    - content:
                        bmi_value: 32
                        date_measured: '2023-11-10'
                      date_created: '2023-11-10T10:15:00'
                      title: BMI Chart
                    - content:
                        medication_name: Metformin
                        response: No significant weight loss
                      date_created: '2023-11-10T10:15:00'
                      title: Previous Medication History
                  patient:
                    address:
                      street: 123 Health St.
                      city: Wellness
                      state_province: CA
                      zip_postal_code: '12345'
                      country: USA
                    date_of_birth: '1980-01-01'
                    email: johndoe@email.com
                    first_name: John
                    last_name: Doe
                    gender: male
                    internal_id: '123456'
                    phone: 123-456-7890
                  insurance:
                    - file_content: >-
                        iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgwJ/lzvN2QAAAABJRU5ErkJggg==
                    - file_content: >-
                        iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgwJ/lzvN2QAAAABJRU5ErkJggg==
                  prescription:
                    days_supply: 30
                    quantity: 2
                    directions: Inject subcutaneously once a week
                    drug_name: Wegovy
                    strength: 0.25 mg/0.5 mL (0.25 mg dose)
                    dose_form: injectable
                    route_of_administration: subcutaneous
                    extra:
                      prescribing_information: >-
                        Prescribed for weight management in patients with
                        obesity
                    prescription_date: '2024-02-14T05:46:07.764000'
                  provider:
                    address:
                      street: 456 Care Blvd.
                      city: Healtown
                      state_province: CA
                      zip_postal_code: '67890'
                      country: USA
                    fax: 987-654-3211
                    first_name: Alice
                    internal_id: provider_12345
                    last_name: Smith
                    npi: '1234567890'
                    phone: 987-654-3210
                  pharmacy:
                    name: Walgreens
                    address:
                      street: 789 Pharmacy Ave.
                      city: Medtown
                      state_province: MD
                      zip_postal_code: '12345'
                      country: USA
                  questionnaires:
                    - questions:
                        - answer: >-
                            I usually eat a balanced diet and exercise 3 times a
                            week.
                          question: >-
                            Please describe your current diet and exercise
                            routine.
                        - answer: >-
                            Yes, I have tried metformin without significant
                            results.
                          question: >-
                            Have you previously tried other weight loss
                            medications?
                      date_created: '2023-11-01T08:00:00'
                  visit_notes:
                    - content: >-
                        Patient presents with a BMI of 32, indicating obesity.
                        Recommended to start Wegovy for weight management.
                      date_created: '2023-11-10T10:00:00'
                  priority: 2
        required: true
      responses:
        '200':
          description: Successful creation of a prior authorization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePriorAuthResponse'
              example:
                status: success
                data:
                  id: pa_sdkfj3f
        '400':
          description: API error during creation of the prior authorization request
          content:
            application/json:
              example:
                status: error
                error:
                  title: Unsupported Drug
                  description: >-
                    The drug you submitted is not yet supported for prior
                    authorization.
                  code: unsupported_drug
        '409':
          description: >-
            Conflict: prescription message already linked to existing prior
            authorization
          content:
            application/json:
              example:
                status: error
                error:
                  title: Prescription Already Linked
                  description: >-
                    The prescription_message_id provided is already linked to a
                    prior authorization request that is in progress or has
                    already been completed as approved. The existing PA request
                    must be cancelled before submitting a new request for the
                    same prescription.
                  code: prescription_message_already_linked
                  existing_prior_auth_request_id: par_example123
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggJWTAuthentication: []
components:
  schemas:
    CreatePriorAuthRequest:
      properties:
        diagnoses:
          items:
            $ref: '#/components/schemas/Diagnosis'
          type: array
          title: Diagnoses
          description: Clinical diagnoses for the patient in ICD-10 format. i.e. 'E66.9'
        evidence:
          items:
            $ref: '#/components/schemas/EvidenceItem'
          type: array
          title: Evidence
          description: >-
            A collection of evidence items supporting the authorization request.
            Any supporting evidence that doesn't belong in the other predefined
            fields can be added here.
        patient:
          allOf:
            - $ref: '#/components/schemas/Patient'
          title: Patient
          description: Demographic information for the patient
        insurance:
          items:
            $ref: >-
              #/components/schemas/api__schemas__platform__public_api__insurance_document__InsuranceDocument
          type: array
          title: Insurance
          description: >-
            Insurance information for the patient. We will extract the required
            information from the insurance card images you provide. Please
            provide both the front and the back of the card. This is optional if
            you provide `insurance_content`, but highly recommended to ensure
            best results.
        insurance_content:
          allOf:
            - $ref: '#/components/schemas/PartialInsuranceInfo'
          title: Insurance Content
          description: >-
            Insurance information for the patient. Values provided here will be
            used in combination with those extracted from any insurance cards
            provided. We recommend providing this information when available to
            ensure best results. If you provide both `insurance` and
            `insurance_content`, the values provided here will be used and the
            values extracted from `insurance` will be used as a fallback.
        prescription:
          anyOf:
            - $ref: '#/components/schemas/CodedPrescription'
            - $ref: '#/components/schemas/Prescription'
          title: Prescription
          description: >-
            Information regarding the prescription this prior authorization is
            being created for. Required unless `ndp_submission` is provided with
            a `prescription_message_id`. Prefer coded prescriptions when NDCs
            are available.
        provider:
          allOf:
            - $ref: '#/components/schemas/Provider'
          title: Provider
          description: Details of the healthcare provider who created the prescription.
        pharmacy:
          allOf:
            - $ref: '#/components/schemas/Pharmacy'
          title: Pharmacy
          description: >-
            Information about the pharmacy where the prescription will be
            filled.
        questionnaires:
          items:
            $ref: '#/components/schemas/Questionnaire'
          type: array
          title: Questionnaires
          description: >-
            List of questionnaires. This is the best place to send structured
            Q&A format data, such as intake forms, etc.
        visit_notes:
          items:
            $ref: '#/components/schemas/VisitNote'
          type: array
          title: Visit Notes
          description: List of visit notes.
        ndp_submission:
          $ref: '#/components/schemas/PriorAuthRequestNDPSubmission'
        resubmission_info:
          $ref: '#/components/schemas/PriorAuthRequestResubmissionInfo'
        appeal_details:
          allOf:
            - $ref: '#/components/schemas/AppealDetails'
          title: Appeal Details
          description: >-
            Details for submitting an appeal of a previously denied prior
            authorization. When provided, the request will be processed as an
            appeal.
        mock_result:
          anyOf:
            - $ref: '#/components/schemas/PriorAuthMockResultApproved'
            - $ref: '#/components/schemas/PriorAuthMockResultDenied'
            - $ref: '#/components/schemas/PriorAuthMockResultOther'
            - $ref: '#/components/schemas/PriorAuthMockResultNotSubmitted'
          title: Mock Result
          description: >-
            Specifies the simulated outcome for a completed prior authorization.
            Setting this field will instantly complete the prior authorization
            request and send a webhook with the value of this field. You will
            not be charged for these requests and you will not be sent the prior
            auth for manual review.
        priority:
          allOf:
            - $ref: '#/components/schemas/Priority'
          description: >-
            Specifies the priority of the prior authorization request. This is
            used to determine the order in which requests are processed. Lower
            values indicate higher priority.
          default: 2
        trigger_benefit_verification:
          allOf:
            - $ref: '#/components/schemas/TriggerBenefitVerificationConfig'
          title: Trigger Benefit Verification
          description: >-
            If provided and enabled, triggers a benefit verification to check
            drug coverage before the PA proceeds.
      type: object
      required:
        - diagnoses
        - patient
        - provider
      title: CreatePriorAuthRequest
      description: >-
        Represents a request for creating a prior authorization for a
        medication. This includes detailed

        information about the patient, their diagnosis, prescribed medication,
        evidence supporting the need for treatment,

        insurance details, and responses to relevant questionnaires.
    CreatePriorAuthResponse:
      properties:
        status:
          anyOf:
            - type: string
              enum:
                - success
            - type: string
              enum:
                - error
          title: Status
          default: success
        error:
          allOf:
            - $ref: '#/components/schemas/CreatePriorAuthResponseError'
          title: Error
          description: >-
            Error payload of the response, containing details of the error that
            occurred during the creation of the prior authorization request.
        data:
          allOf:
            - $ref: '#/components/schemas/CreatePriorAuthResponseData'
          title: Data
          description: >-
            Data payload of the response, containing details of the created
            prior authorization request, or None if the request was
            unsuccessful.
      type: object
      title: CreatePriorAuthResponse
      description: >-
        Models the response received upon creating a prior authorization
        request.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Diagnosis:
      properties:
        code:
          type: string
          title: Code
          description: ICD-10 code for the diagnosis. i.e. 'E66.9'
      type: object
      required:
        - code
      title: Diagnosis
      description: Represents a medical diagnosis with a code and description.
    EvidenceItem:
      properties:
        asset:
          allOf:
            - $ref: '#/components/schemas/Asset'
          title: Asset
          description: >-
            File asset containing the evidence. This is an alternative to the
            `content` field which must be unused or null if `asset` is provided.
        content:
          anyOf:
            - type: object
            - type: string
          title: Content
          description: >-
            Detailed content of the evidence, which varies based on the type of
            evidence.
        date_created:
          type: string
          format: date-time
          title: Date Created
          description: >-
            The date and time (if available) when the evidence was created. This
            is important for ensuring we have an accurate timeline of the
            patient's history.
        title:
          type: string
          title: Title
          description: >-
            Title of the evidence. This will be shown to users in the platform
            UI so it's recommended to give it a name that would be meaningful to
            them, such as 'Intake Form'
      type: object
      required:
        - date_created
        - title
      title: EvidenceItem
      description: >-
        Represents an item of evidence, which can include an associated digital
        asset.
    Patient:
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
          title: Address
          description: The patient's postal address
        date_of_birth:
          type: string
          format: date
          title: Date Of Birth
          description: The patient's date of birth
        email:
          type: string
          format: email
          title: Email
          description: The patient's email address
        first_name:
          type: string
          minLength: 1
          title: First Name
          description: The patient's first name
        last_name:
          type: string
          minLength: 1
          title: Last Name
          description: The patient's last name
        gender:
          allOf:
            - $ref: '#/components/schemas/Gender'
          description: The patient's gender
        internal_id:
          type: string
          minLength: 1
          title: Internal Id
          description: >-
            Your internal ID for this patient. This is used for linking all of
            the requests for a given patient.
        mrn:
          type: string
          title: Mrn
          description: Medical record number
        phone:
          type: string
          title: Phone
          description: The patient's phone number
      type: object
      required:
        - address
        - date_of_birth
        - first_name
        - last_name
        - gender
        - internal_id
      title: Patient
      description: Represents patient information.
    api__schemas__platform__public_api__insurance_document__InsuranceDocument:
      properties:
        file_content:
          type: string
          title: File Content
      type: object
      required:
        - file_content
      title: InsuranceDocument
      description: |-
        Represents an insurance document.

        Attributes:
            file_content (str): The content of the insurance document,
                                base64 encoded
    PartialInsuranceInfo:
      properties:
        client_name:
          type: string
          title: Client Name
          description: The client/employer name.
        group_number:
          type: string
          title: Group Number
          description: The group number on the card.
        member_name:
          type: string
          title: Member Name
          description: The member name on the card.
        member_number:
          type: string
          title: Member Number
          description: The member number on the card.
        payer_name:
          type: string
          title: Payer Name
          description: >-
            The payer name on the card. This field is not normalized, so the
            same plan may have different names depending on the way it appears
            on the card. i.e. 'United Healthcare', 'United', 'United Health'
            could all appear
        plan_name:
          type: string
          title: Plan Name
          description: >-
            The plan name on the card. This field is not normalized, so the same
            plan may have different names depending on the way it appears on the
            card
        rx_bin:
          type: string
          title: Rx Bin
          description: The Rx BIN number on the card.
        rx_group:
          type: string
          title: Rx Group
          description: The Rx group number on the card.
        rx_pcn:
          type: string
          title: Rx Pcn
          description: The Rx PCN number on the card.
      type: object
      title: PartialInsuranceInfo
    CodedPrescription:
      properties:
        ndc:
          type: string
          pattern: >-
            ^(\d{5}-?\d{4}-?\d{2}|\d{4,5}-\d{3,4}-\d{1,2}|\d{5}-?\d{4}|\d{4,5}-\d{3,4})$
          title: Ndc
          description: The NDC of the medication. Both 10 and 11-digit NDCs are supported.
          examples:
            - 00169-4505-14
            - 0169-4505-14
            - 169450514
        directions:
          type: string
          minLength: 1
          title: Directions
          description: Instructions on how the medication should be taken.
          examples:
            - Inject 0.25 mg under the skin once weekly
            - Take 1 tablet by mouth daily
        quantity:
          type: integer
          title: Quantity
          description: The quantity of the medication.
          examples:
            - 1
        quantity_unit_of_measure:
          type: string
          title: Quantity Unit Of Measure
          description: >-
            The unit of measurement for the quantity of the medication (subset
            code C89510). Either an NCIt code or the name of the term. If not
            provided, C38046 (Unspecified) will be used.
          default: C38046
          examples:
            - C48504
            - Kit
        days_supply:
          type: integer
          title: Days Supply
          description: The number of days the prescription will be expected to last.
          examples:
            - 28
            - 30
            - 90
        expected_length_of_therapy:
          type: string
          title: Expected Length Of Therapy
          description: >-
            The expected length of therapy for the prescribed drug. Defaults to
            'Until No Longer Needed' if not provided.
          examples:
            - Until No Longer Needed
            - 12 months
            - 6 weeks
        extra:
          type: object
          title: Extra
          description: >-
            An optional dictionary containing additional information related to
            the drug or future prescription.
          examples:
            - notes: Patient prefers brand name
              prior_auth_reference: ABC123
        prescription_date:
          type: string
          format: date-time
          title: Prescription Date
          description: The date the prescription was issued
      type: object
      required:
        - ndc
        - directions
        - quantity
        - days_supply
        - prescription_date
      title: CodedPrescription
      description: |-
        Represents a prescription issued by a healthcare provider. This is an
        alternative to the Prescription model that is more closely aligned with
        NCPDP standards and helps reduce any confusion on the payer-side. Prefer
        this model over Prescription when NDCs are available.
    Prescription:
      properties:
        days_supply:
          type: integer
          title: Days Supply
          description: The number of days the prescription will be expected to last.
        quantity:
          type: integer
          title: Quantity
          description: The quantity of the medication.
        directions:
          type: string
          minLength: 1
          title: Directions
          description: Instructions on how the medication should be taken.
        drug_name:
          type: string
          minLength: 1
          title: Drug Name
          description: The name of the medication.
        strength:
          type: string
          minLength: 1
          title: Strength
          description: The strength of the medication.
        dose_form:
          allOf:
            - $ref: '#/components/schemas/DoseForm'
          description: The form of the medication.
        route_of_administration:
          allOf:
            - $ref: '#/components/schemas/RouteOfAdministration'
          description: The route of administration for the medication.
        extra:
          type: object
          title: Extra
          description: >-
            An optional dictionary containing additional information related to
            the drug or future prescription.
        expected_length_of_therapy:
          type: string
          title: Expected Length Of Therapy
          description: >-
            The expected length of therapy for the prescribed drug. Defaults to
            'Until No Longer Needed' if not provided.
          examples:
            - Until No Longer Needed
            - 12 months
            - 6 weeks
        prescription_date:
          type: string
          format: date-time
          title: Prescription Date
          description: The date the prescription was issued
      type: object
      required:
        - days_supply
        - quantity
        - directions
        - drug_name
        - strength
        - dose_form
        - route_of_administration
        - prescription_date
      title: Prescription
      description: |-
        Represents a prescription issued by a healthcare provider. Prefer
        CodedPrescription when NDCs are available.
    Provider:
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/OptionalAddress'
          title: Address
          description: The provider's postal address.
        fax:
          type: string
          title: Fax
          description: The provider's fax number.
        first_name:
          type: string
          minLength: 1
          title: First Name
          description: The provider's first name.
        internal_id:
          type: string
          title: Internal Id
          description: >-
            Your internal ID for this provider. This is used for linking all of
            the requests for a given provider.
        last_name:
          type: string
          minLength: 1
          title: Last Name
          description: The provider's last name.
        npi:
          type: string
          minLength: 1
          title: Npi
          description: The provider's NPI.
        phone:
          type: string
          title: Phone
          description: The provider's phone number.
      type: object
      required:
        - address
        - first_name
        - last_name
        - npi
      title: Provider
      description: Represents a healthcare provider.
    Pharmacy:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: The name of the pharmacy.
        address:
          $ref: '#/components/schemas/Address'
      type: object
      required:
        - name
      title: Pharmacy
      description: |-
        Represents a pharmacy.

        Attributes:
            name (str): The name of the pharmacy.
            address (Address): The pharmacy's postal address.
    Questionnaire:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/Question'
          type: array
          title: Questions
          description: A list of questions included in the questionnaire.
        date_created:
          type: string
          format: date-time
          title: Date Created
          description: >-
            The date and time when the questionnaire was answered. This is
            important for ensuring we have an accurate timeline of the patient's
            history.
      type: object
      required:
        - questions
        - date_created
      title: Questionnaire
    VisitNote:
      properties:
        title:
          type: string
          minLength: 1
          title: Title
          description: >-
            The title of the visit note. This is optional and can be used to
            give the note a meaningful name, such as 'Initial Consultation'.
        content:
          type: string
          minLength: 1
          title: Content
          description: The content of the visit note.
        date_created:
          type: string
          format: date-time
          title: Date Created
          description: >-
            The date and time (if available) when the visit note was created.
            This is important for ensuring we have an accurate timeline of the
            patient's history.
      type: object
      required:
        - content
        - date_created
      title: VisitNote
      description: Represents a note made during a patient visit.
    PriorAuthRequestNDPSubmission:
      properties:
        prescription_message_id:
          type: string
          minLength: 1
          title: Prescription Message Id
          description: The Surescripts message ID for the prescription transfer.
        ignore_eligibility_check_error:
          type: boolean
          title: Ignore Eligibility Check Error
          description: >-
            If set to True, error responses from the eligibility check will not
            terminate the PA request.
        submit_pa_with_eligibility_check_government_plan:
          type: boolean
          title: Submit Pa With Eligibility Check Government Plan
          description: >-
            If set to True, the PA request will be submitted even if the
            eligibility check reveals the patient has only government insurance
            plan(s).
          default: false
        preferred_pharmacy_ncpdp_id:
          type: string
          pattern: ^\d{7}$
          title: Preferred Pharmacy Ncpdp Id
          description: >-
            The NCPDP ID of the preferred pharmacy where the prescription will
            be transferred after the PA request has been approved.
        preferred_pharmacy_details:
          type: string
          title: Preferred Pharmacy Details
          description: >-
            Free-text pharmacy preference information (e.g. 'CVS Pharmacy, 123
            Main St, Portland OR 97201'). At least one of
            preferred_pharmacy_ncpdp_id or preferred_pharmacy_details must be
            provided.
      type: object
      required:
        - prescription_message_id
        - ignore_eligibility_check_error
      title: PriorAuthRequestNDPSubmission
      description: >-
        Configuration for processing the prescription associated with this PA
        request.


        This field should only be provided when a prescription has been sent to
        Develop

        Health's non-dispensing pharmacy.
    PriorAuthRequestResubmissionInfo:
      properties:
        previous_prior_auth_request_id:
          type: string
          title: Previous Prior Auth Request Id
          description: Identifier of the previous prior authorization request.
        note:
          type: string
          title: Note
          description: >-
            Reason for resubmission or additional instructions for this attempt.
            Required unless `appeal_details` is provided.
        quantity_limit_exception_reason:
          type: string
          title: Quantity Limit Exception Reason
          description: >-
            Explanation for requesting an exception to the plan's quantity
            limit. Required when resubmitting due to a quantity limit denial.
      type: object
      title: PriorAuthRequestResubmissionInfo
      description: Information provided when resubmitting a prior authorization request.
    AppealDetails:
      properties:
        appeal_letter:
          allOf:
            - $ref: '#/components/schemas/AppealLetter'
          title: Appeal Letter
          description: Appeal letter file to submit with the appeal.
        is_urgent:
          type: boolean
          title: Is Urgent
          description: Whether this appeal should be treated as urgent.
          default: false
      type: object
      required:
        - appeal_letter
      title: AppealDetails
      description: >-
        Details for submitting an appeal of a previously denied prior
        authorization.
    PriorAuthMockResultApproved:
      properties:
        result:
          type: string
          enum:
            - Approved
          const: Approved
          title: Result
          description: The Prior Authorization has been approved.
          default: Approved
        detail_code:
          allOf:
            - $ref: '#/components/schemas/PriorAuthOutcomeApprovalDetail'
          description: >-
            A code indicating the reason for the prior auth outcome. The
            possible values are:

            - **prior_auth_not_required**: A prior authorization is not
            required.

            - **approval**: The prior authorization request has been approved.

            - **existing_approval**: An active prior authorization approval
            already exists for the patient.
        prescription_transfer_error_code:
          allOf:
            - $ref: '#/components/schemas/PrescriptionTransferErrorCode'
          description: >-
            This field is only used if the
            ndp_submission.preferred_pharmacy_ncpdp_id was provided in the
            request. If provided, a prescription transfer error will be mocked.
            Otherwise / by default, a successful transfer will be mocked.
      type: object
      title: PriorAuthMockResultApproved
      description: Represents a mock result for a prior authorization request.
    PriorAuthMockResultDenied:
      properties:
        result:
          type: string
          enum:
            - Denied
          const: Denied
          title: Result
          description: The Prior Authorization has been denied.
          default: Denied
        detail_code:
          allOf:
            - $ref: '#/components/schemas/PriorAuthOutcomeDenialDetail'
          description: >-
            A code indicating the reason for the prior auth outcome. The
            possible values are:

            - **formulary_alternative_preferred**: The formulary alternative is
            preferred.

            - **medical_necessity_criteria_not_met**: The medical necessity
            criteria are not met.

            - **plan_exclusion**: The drug is excluded by the plan.

            - **step_therapy_criteria_not_met**: The step therapy criteria are
            not met.

            - **existing_denial**: An existing denial is on file for this
            medication and patient. Please follow the appeals process if you
            wish to adjust this outcome

            - **coverage_limits_exceeded**: The coverage limits have been
            exceeded for this patient's plan.

            - **prior_weight_loss_program_required**: The patient has not
            completed the required weight loss program prior to therapy.

            - **unknown**: The prior authorization request has been denied.
        client_code:
          type: string
          title: Client Code
          description: >-
            A client-specific outcome code for the denial. This will be returned
            in the outcome response.
      type: object
      title: PriorAuthMockResultDenied
      description: Represents a mock result for a prior authorization request.
    PriorAuthMockResultOther:
      properties:
        result:
          type: string
          enum:
            - Other
          const: Other
          title: Result
          description: >-
            The Prior Authorization has completed without an approval/denial
            determination.
          default: Other
        detail_code:
          allOf:
            - $ref: '#/components/schemas/PriorAuthOutcomeOtherDetailPublic'
          description: >-
            A code indicating the reason for the prior auth outcome. The
            possible values are:

            - **coverage_inactive**: The patient's coverage has expired.

            - **coverage_not_yet_started**: The patient's coverage has not yet
            started.

            - **no_pharmacy_benefits**: The patient's insurance does not include
            pharmacy benefits.

            - **payer_unable_to_locate_member**: The payer could not locate the
            member in their system.

            - **npi_taxonomy_ineligible**: The payer rejected the request
            because the prescriber's NPI taxonomy, provider type, specialty, or
            credentials are not eligible to submit this prior authorization.

            - **payer_reported_invalid_patient_info**: The payer located the
            patient in their system but some submitted patient information does
            not match.

            - **duplicate_request**: The request is a duplicate. Please cancel
            the existing request and resubmit if needed.

            - **prior_auth_not_required**: A prior authorization is not required
            for this medication.

            - **patient_consent_required**: The payer requires verbal consent
            from the patient before discussing or processing the prior
            authorization.

            - **more_information_required**: Insufficient information provided
            to complete the prior authorization.

            - **other**: A problem not listed here was encountered. Check the
            `outcome.detail` field for more information.
        trigger_message:
          type: boolean
          title: Trigger Message
          description: >-
            If True, a message will be added to the prior authorization after
            creation. This simulates a follow-up message and will trigger the
            prior authorization message webhook.
          default: false
      type: object
      title: PriorAuthMockResultOther
      description: Represents a mock result for a prior authorization request.
    PriorAuthMockResultNotSubmitted:
      properties:
        result:
          type: string
          enum:
            - Not Submitted
          const: Not Submitted
          title: Result
          description: >-
            The prior authorization request will not be submitted. For example,
            when the eligibility check is enabled and the check returns as
            error.
          default: Not Submitted
        detail_code:
          allOf:
            - $ref: '#/components/schemas/PriorAuthOutcomeNotSubmittedDetail'
          description: >-
            A code indicating the reason for the prior auth outcome. The
            possible values are:

            - **eligibility_check_error**: Indicates eligibility check
            encountered an error. Error details will be surfaced in the
            `eligibility_check_response` field. This status will not happen if
            `ndp_submission.ignore_eligibility_check_error` was set to True for
            the PA request.

            - **eligibility_check_government_plan**: Indicates that the
            eligibility check revealed the patient has only government insurance
            plan(s). The `eligibility_check_response` field will contain the
            successful eligibility check response. This status will not happen
            if `ndp_submission.submit_pa_with_eligibility_check_government_plan`
            was set to True for the PA request.

            - **prescription_message_not_found**: Indicates the provided
            prescription message ID does not correspond to a prescription. This
            can happen if the eScript received to the NDP could not be converted
            into a valid prescription.

            - **more_information_required**: Indicates that additional
            information is required before this request can be submitted. The
            request was not submitted and should be resubmitted with the
            additional details.

            - **formulary_alternative_required**: Indicates that the patient
            needs to try a formulary alternative before the PA can be approved.
            The request was not submitted and should instead be submitted for
            the formulary alternative outlined in the outcome message.

            - **benefit_verification_no_medication_coverage**: Indicates that a
            triggered benefit verification determined the prescribed medication
            is not covered by the patient's plan.

            - **benefit_verification_only_alternative_medication_covered**:
            Indicates that a triggered benefit verification determined the
            prescribed medication is not covered, but an alternative medication
            specified in the request is covered.

            - **benefit_verification_pa_not_required**: Indicates that a
            triggered benefit verification determined the prescribed medication
            is covered and does not require prior authorization.

            - **pbm_excluded**: Indicates that the eligibility check revealed
            only an excluded PBM payer and the PA was not submitted. The
            `eligibility_check_response` field will contain the successful
            eligibility check response.

            - **payer_not_supported**: Indicates that the eligibility check
            revealed the patient's health plan is not supported. Currently,
            Kaiser health plans are not supported. The
            `eligibility_check_response` field will contain the successful
            eligibility check response.
      type: object
      title: PriorAuthMockResultNotSubmitted
      description: >-
        Represents a mock result where the prior authorization was NOT submitted

        because the eligibility check either encountered an error or revealed
        the

        patient has a government plan.
    Priority:
      type: integer
      enum:
        - 0
        - 1
        - 2
        - 3
      title: Priority
      description: |-
        Represents a priority level. Lower numbers are higher priority.

        - CRITICAL: 0
        - HIGH: 1
        - MEDIUM: 2
        - LOW: 3
    TriggerBenefitVerificationConfig:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether to trigger a benefit verification when creating this PA.
        additional_medications:
          items:
            $ref: '#/components/schemas/TriggerBenefitVerificationMedication'
          type: array
          title: Additional Medications
          description: >-
            Additional medications to check coverage for alongside the
            prescribed medication.
      type: object
      required:
        - enabled
      title: TriggerBenefitVerificationConfig
    CreatePriorAuthResponseError:
      properties:
        title:
          type: string
          title: Title
          description: A brief title summarizing the error.
        description:
          type: string
          title: Description
          description: >-
            A detailed message explaining the error. These messages may be
            unique to the specific prior authorization request.
        code:
          allOf:
            - $ref: '#/components/schemas/PriorAuthErrorCode'
          description: >-
            A specific code identifying the error. While we'll aim to ensure
            that the occurence of these errors is minimal, it's likely they will
            occur. To prevent delays to patient care, we generally recommend
            that you implement a strategy of falling back to your existing
            process for handling a prior authorization if you encounter one of
            these errors. The Develop Health team will then work with you in
            parallel to fix the issue. The following codes are currently
            possible: 

            - **unsupported_patient**: This means that the patient you submitted
            the prior authorization for is not currently supported. We're
            rapidly increasing our PBM and payer coverage, so we'll be reducing
            the occurrence of these over time.

            - **unsupported_drug**: The drug you submitted is not yet supported
            for prior authorization.

            - **insurance_card_member_id_ocr_failure**: We were unable to
            extract the member ID from the insurance card image provided and no
            discrete values were provided.

            - **insurance_content_invalid_rx_bin**: The Rx BIN provided in the
            insurance content is invalid. This should be a 6 digit number.

            - **prescription_message_not_found**: The prescription_message_id
            provided does not correspond to any known prescription.

            - **prescription_message_already_linked**: The
            prescription_message_id provided is already linked to a prior
            authorization request that is in progress or has already been
            completed as approved. The existing PA request must be cancelled
            before submitting a new request for the same prescription.

            - **provider_not_authorized**: The NPI provided is not authorized to
            submit requests. To enable prior authorization requests for this
            provider, please complete the provider authorization process.

            - **evidence_file_download_failed**: The evidence file could not be
            downloaded from the provided URL.

            - **invalid_qle_resubmission**: Quantity limit exception
            resubmissions are only allowed when the previous prior authorization
            was approved or was not required.

            - **previous_pa_request_in_progress**: The previous prior
            authorization request referenced in resubmission_info is still in
            progress. It must be completed or cancelled before a new
            resubmission can be created.

            - **other**: An unexpected error occurred during the prior
            authorization process.
          choices:
            - - unsupported_patient
              - unsupported_patient
            - - unsupported_drug
              - unsupported_drug
            - - insurance_card_member_id_ocr_failure
              - insurance_card_member_id_ocr_failure
            - - insurance_content_invalid_rx_bin
              - insurance_content_invalid_rx_bin
            - - prescription_message_not_found
              - prescription_message_not_found
            - - prescription_message_already_linked
              - prescription_message_already_linked
            - - provider_not_authorized
              - provider_not_authorized
            - - evidence_file_download_failed
              - evidence_file_download_failed
            - - invalid_qle_resubmission
              - invalid_qle_resubmission
            - - previous_pa_request_in_progress
              - previous_pa_request_in_progress
            - - other
              - other
        existing_prior_auth_request_id:
          type: string
          title: Existing Prior Auth Request Id
          description: >-
            Identifier of an existing prior authorization request related to
            this error.
      type: object
      required:
        - title
        - code
      title: CreatePriorAuthResponseError
    CreatePriorAuthResponseData:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
          description: The unique identifier for the created prior authorization request.
      type: object
      required:
        - id
      title: CreatePriorAuthResponseData
      description: >-
        Represents the data contained in the response for a create prior
        authorization request.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Asset:
      properties:
        file_content:
          type: string
          minLength: 1
          title: File Content
          description: >-
            The file content, encoded in Base64 format. Currently only PDF files
            are supported. This field cannot be used if `file_url` is provided.
        file_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: File Url
          description: >-
            URL pointing to the file. The file will be downloaded immediately.
            This field cannot be used if `file_content` is provided.
      type: object
      title: Asset
    Address:
      properties:
        street:
          type: string
          minLength: 1
          title: Street
          description: Street address of residence.
        street_line_2:
          type: string
          title: Street Line 2
          description: Additional street address information.
        city:
          type: string
          minLength: 1
          title: City
          description: City of residence.
        state_province:
          type: string
          minLength: 1
          title: State Province
          description: State or province of residence.
        zip_postal_code:
          type: string
          minLength: 1
          title: Zip Postal Code
          description: ZIP or postal code part of the address.
        country:
          type: string
          minLength: 1
          title: Country
          description: Country of residence.
      type: object
      required:
        - street
        - city
        - state_province
        - zip_postal_code
        - country
      title: Address
      description: Represents a postal address.
    Gender:
      type: string
      enum:
        - male
        - female
        - other
        - not_specified
      title: Gender
      description: An enumeration.
    DoseForm:
      type: string
      enum:
        - aerosol
        - bar
        - bead
        - breadstick
        - bulk
        - capsule
        - catheter
        - cement
        - cigarette
        - cloth
        - concentrate
        - cone
        - cream
        - crystal
        - culture
        - dentifrice
        - deposit
        - device
        - diaphragm
        - disc
        - douche
        - dressing
        - drops
        - elixir
        - emulsion
        - enema
        - extract
        - film
        - food
        - foam
        - gel
        - generator
        - globule
        - graft
        - gum
        - implant
        - infusion
        - inhalant
        - inhalation
        - inhaler
        - injectable
        - injection
        - insert
        - irrigant
        - irrigation
        - jelly
        - kit
        - lens
        - liner
        - liniment
        - lipstick
        - liquid
        - lollipop
        - lotion
        - lozenge
        - miscellaneous
        - mouthwash
        - mucilage
        - oil
        - ointment
        - packing
        - paste
        - pastille
        - patch
        - pellet
        - pill
        - plaster
        - poultice
        - powder
        - resin
        - ring
        - rinse
        - rod
        - salve
        - shampoo
        - soap
        - sol
        - solution
        - sponge
        - spray
        - stick
        - strip
        - suppository
        - suspension
        - suture
        - swab
        - syrup
        - tablet
        - tampon
        - tape
        - tea
        - test
        - tincture
        - troche
        - vaginal_suppository
        - vaginal_tablet
        - wafer
        - wash
        - wax
      title: DoseForm
      description: An enumeration.
    RouteOfAdministration:
      type: string
      enum:
        - auricular (otic)
        - otic
        - buccal
        - conjunctival
        - cutaneous
        - dental
        - electro-osmosis
        - endocervical
        - endosinusial
        - endotracheal
        - enteral
        - epidural
        - extra-amniotic
        - extracorporeal
        - hemodialysis
        - infiltration
        - interstitial
        - intra-abdominal
        - intra-amniotic
        - intra-arterial
        - intra-articular
        - intrabiliary
        - intrabronchial
        - intrabursal
        - intracameral
        - intracanalicular
        - intracardiac
        - intracartilaginous
        - intracaudal
        - intracavernous
        - intracavitary
        - intracerebral
        - intracisternal
        - intracorneal
        - intracoronal, dental
        - intracoronary
        - intracorporus cavernosum
        - intracranial
        - intradermal
        - intradiscal
        - intraductal
        - intraduodenal
        - intradural
        - intraepicardial
        - intraepidermal
        - intraesophageal
        - intragastric
        - intragingival
        - intrahepatic
        - intraileal
        - intralesional
        - intralingual
        - intraluminal
        - intralymphatic
        - intramammary
        - intramedullary
        - intrameningeal
        - intramuscular
        - intranodal
        - intraocular
        - intraomentum
        - intraovarian
        - intrapericardial
        - intraperitoneal
        - intrapleural
        - intraprostatic
        - intrapulmonary
        - intraruminal
        - intrasinal
        - intraspinal
        - intrasynovial
        - intratendinous
        - intratesticular
        - intrathecal
        - intrathoracic
        - intratubular
        - intratumor
        - intratympanic
        - intrauterine
        - intravascular
        - intravenous
        - intraventricular
        - intravesical
        - intravitreal
        - iontophoresis
        - irrigation
        - laryngeal
        - nasal
        - nasogastric
        - not applicable
        - occlusive dressing technique
        - ophthalmic
        - oral
        - oropharyngeal
        - parenteral
        - percutaneous
        - periarticular
        - peridural
        - perineural
        - periodontal
        - rectal
        - respiratory (inhalation)
        - inhalation
        - retrobulbar
        - soft tissue
        - subarachnoid
        - subconjunctival
        - subcutaneous
        - subgingival
        - sublingual
        - submucosal
        - subretinal
        - suprachoroidal
        - topical
        - transdermal
        - transendocardial
        - transmucosal
        - transplacental
        - transtracheal
        - transtympanic
        - ureteral
        - urethral
        - vaginal
      title: RouteOfAdministration
      description: >-
        See:
        https://www.fda.gov/industry/structured-product-labeling-resources/route-administration
    OptionalAddress:
      properties:
        street:
          type: string
          title: Street
          description: Street address of residence.
        street_line_2:
          type: string
          title: Street Line 2
          description: Additional street address information.
        city:
          type: string
          title: City
          description: City of residence.
        state_province:
          type: string
          title: State Province
          description: State or province of residence.
        zip_postal_code:
          type: string
          title: Zip Postal Code
          description: ZIP or postal code part of the address.
        country:
          type: string
          title: Country
          description: Country of residence.
      type: object
      title: OptionalAddress
      description: >-
        Represents a postal address with optional fields.

        Used for cases where address information may not be complete at creation
        time.
    Question:
      properties:
        answer:
          type: string
          minLength: 1
          title: Answer
          description: The answer to the question.
        choices:
          items:
            type: string
          type: array
          title: Choices
          description: >-
            Optional list of choices for the question. If provided, the answer
            must be one of the choices. It's important to include this list of
            choices for any multiple choice question. This allows our AI to know
            what a user has effectively said 'no' to by picking another option.
            I.e. for a question 'Do you have any of the following conditions:
            Diabetes, Heart Disease, Cancer, None of the above' if the user
            answers 'None of the above' we can infer that they don't have any of
            those conditions. Without the choices list we would have no way of
            knowing that.
        question:
          type: string
          minLength: 1
          title: Question
          description: The question to be answered.
      type: object
      required:
        - answer
        - question
      title: Question
      description: Represents a single question, as part of a questionnaire.
    AppealLetter:
      properties:
        asset:
          allOf:
            - $ref: '#/components/schemas/Asset'
          title: Asset
          description: File asset containing the appeal letter.
        title:
          type: string
          minLength: 1
          title: Title
          description: Title of the appeal letter
        date_created:
          type: string
          format: date-time
          title: Date Created
          description: The date and time when the appeal letter was created.
      type: object
      required:
        - asset
        - title
        - date_created
      title: AppealLetter
      description: An appeal letter file to include with the appeal submission.
    PriorAuthOutcomeApprovalDetail:
      type: string
      enum:
        - prior_auth_not_required
        - approval
        - existing_approval
      title: PriorAuthOutcomeApprovalDetail
      description: An enumeration.
    PrescriptionTransferErrorCode:
      type: string
      enum:
        - pharmacy_does_not_exist
        - pharmacy_permanently_closed
        - pharmacy_unable_to_accept_transfer
        - pharmacy_unable_to_fill_prescription
        - prescription_transfer_not_received
        - transfer_timed_out
        - other
      title: PrescriptionTransferErrorCode
      description: An enumeration.
    PriorAuthOutcomeDenialDetail:
      type: string
      enum:
        - formulary_alternative_preferred
        - medical_necessity_criteria_not_met
        - plan_exclusion
        - step_therapy_criteria_not_met
        - existing_denial
        - coverage_limits_exceeded
        - prior_weight_loss_program_required
        - unknown
      title: PriorAuthOutcomeDenialDetail
      description: An enumeration.
    PriorAuthOutcomeOtherDetailPublic:
      type: string
      enum:
        - coverage_inactive
        - coverage_not_yet_started
        - no_pharmacy_benefits
        - payer_unable_to_locate_member
        - npi_taxonomy_ineligible
        - payer_reported_invalid_patient_info
        - duplicate_request
        - prior_auth_not_required
        - patient_consent_required
        - more_information_required
        - other
      title: PriorAuthOutcomeOtherDetailPublic
      description: >-
        Public version of PriorAuthOutcomeOtherDetail. This is used in the API
        response.
    PriorAuthOutcomeNotSubmittedDetail:
      type: string
      enum:
        - eligibility_check_error
        - eligibility_check_government_plan
        - prescription_message_not_found
        - more_information_required
        - formulary_alternative_required
        - benefit_verification_no_medication_coverage
        - benefit_verification_only_alternative_medication_covered
        - benefit_verification_pa_not_required
        - pbm_excluded
        - payer_not_supported
      title: PriorAuthOutcomeNotSubmittedDetail
      description: An enumeration.
    TriggerBenefitVerificationMedication:
      properties:
        ndc:
          type: string
          title: Ndc
          description: The NDC of the additional medication to check coverage for.
        quantity:
          type: integer
          title: Quantity
          description: The quantity of the medication to check coverage for.
      type: object
      required:
        - ndc
        - quantity
      title: TriggerBenefitVerificationMedication
    PriorAuthErrorCode:
      type: string
      enum:
        - unsupported_patient
        - unsupported_drug
        - insurance_card_member_id_ocr_failure
        - insurance_content_invalid_rx_bin
        - prescription_message_not_found
        - prescription_message_already_linked
        - provider_not_authorized
        - evidence_file_download_failed
        - invalid_qle_resubmission
        - previous_pa_request_in_progress
        - other
      title: PriorAuthErrorCode
      description: Public version of PriorAuthErrorCode. This is used in the API response.
  securitySchemes:
    FronteggJWTAuthentication:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````