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

# Deactivate a risk factor

> Deactivate a risk factor match for a patient.



## OpenAPI

````yaml /openapi-public.yml delete /api/v1/patients/{patient_id}/risk_factors/{risk_factor_id}
openapi: 3.0.3
info:
  title: Blend API
  version: 1.0.0
  description: API for Blend
servers:
  - url: https://api.byblend.com
    description: Blend production server
security:
  - bearerAuth: []
tags:
  - name: Orders
    description: Order management endpoints
  - name: Patients
    description: Patient management endpoints
  - name: Reports
    description: Reporting endpoints
  - name: Products and Materials
    description: Product catalog and inventory endpoints
  - name: Electronic Prescriptions
    description: Electronic prescription management endpoints
  - name: Prescriptions
    description: Prescription management endpoints
  - name: Authentication
    description: Authentication endpoints
  - name: Notifications
    description: User management endpoints
  - name: Prescribers
paths:
  /api/v1/patients/{patient_id}/risk_factors/{risk_factor_id}:
    delete:
      tags:
        - Patients
      summary: Deactivate a risk factor
      description: Deactivate a risk factor match for a patient.
      parameters:
        - name: patient_id
          in: path
          required: true
          description: >-
            Unique identifier for the patient, either UUID or external ID (e.g.
            my-patients-128318AA2) if you have provided one during patient
            creation or update.
          schema:
            type: string
            format: uuid
        - name: risk_factor_id
          in: path
          required: true
          description: Unique (UUID) identifier for the risk factor
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Risk factor deactivated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RiskFactorMedication'
components:
  schemas:
    RiskFactorMedication:
      allOf:
        - $ref: '#/components/schemas/RiskFactorParent'
        - type: object
          properties:
            medication_detail:
              type: object
              allOf:
                - $ref: '#/components/schemas/RiskFactorMedicationDetail'
    RiskFactorParent:
      description: Represents a mapping of risk factor to a patient.
      allOf:
        - $ref: '#/components/schemas/ID'
        - $ref: '#/components/schemas/Timestamps'
        - type: object
          properties:
            risk_factor_id:
              type: string
              example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
              description: >-
                Reference ID for the Blend database entry for this unique risk
                factor
        - $ref: '#/components/schemas/RiskFactorBase'
    RiskFactorMedicationDetail:
      type: object
      properties:
        brand_name:
          type: string
          example: Benadryl
          description: Brand name, if applicable, of the medication
        clinical_product_rxcui:
          type: string
          example: '978941'
          description: RXNorm CUI of the clinical product, if applicable
        ingredient_name:
          type: string
          example: diphenhydramine
          description: If applicable, ingredient name
        ingredient_rxcui:
          type: string
          example: '4083'
          description: RXNorm CUI of the ingredient, if applicable
        name:
          type: string
          example: estradiol valerate 3 MG Oral Tablet
          description: >-
            Representative name of the medication, typically ignored in DUR in
            favor of the clinical drug form
        normalization_key:
          type: string
          example: SCDG:1165185|generic
          description: Normalization key used to identify appropriate matches
        product_rxcui:
          type: string
          example: '978941'
          description: RxNorm CUI of the product, if applicable
        scdf_name:
          type: string
          example: estradiol Oral Tablet
          description: >-
            SCDF (Semantic Clinical Drug Form) name of the medication, if
            applicable
        scdf_rxcui:
          type: string
          example: '372078'
          description: >-
            SCDF (Semantic Clinical Drug Form) RXCUI of the medication, if
            applicable
        scdg_name:
          type: string
          example: estradiol Oral Product
          description: >-
            SCDG (Semantic Clinical Drug Group) name of the medication, if
            applicable
        scdg_rxcui:
          type: string
          example: '1165185'
          description: >-
            SCDG (Semantic Clinical Drug Group) RXCUI of the medication, if
            applicable
    ID:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
          example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
    Timestamps:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: Date and time of creation
          example: '2025-03-15T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: Date and time of last update
          example: '2025-03-15T12:00:00Z'
    RiskFactorBase:
      type: object
      properties:
        confidence:
          type: number
          example: 0.95
          description: If matched, confidence score for the risk factor match
        is_active:
          type: boolean
          example: true
          description: >-
            Whether the risk factor is active. Risk factors can be manually
            deactivated if not applicable.
        match_source:
          type: string
          example: autocomplete
          description: Source of the match, one of `autocomplete`, `text`, or `manual`.
        match_type:
          type: string
          example: product
          description: For medications, type of match.
        matched:
          type: boolean
          example: true
          description: >-
            If the risk factor has been matched to a representative entry.
            Autocomplete matches are always true, as are 1.0 confidence matches,
            and manual confirmations.
        matched_via_synonym:
          type: boolean
          example: false
          description: >-
            If the risk factor was matched via a synonym lookup to a
            representative entry.
        patient_id:
          type: string
          example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
          description: ID of the patient associated with the risk factor
        risk_factor_text_id:
          type: string
          example: 0227d1e5-ba9a-42b5-8fe2-38882aa65708
          description: >-
            If applicable, reference ID for the freeform text entry that
            produced this risk factor
        text_chunk:
          type: string
          example: liothyronine
          description: If applicable, the matching text chunk from the freeform text
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````