NexHealth Treatment Plans API

A treatment plans resource

OpenAPI Specification

nexhealth-treatment-plans-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: NexHealth Adjustment Types Treatment Plans API
  description: v3.0.0 and v20240412 are two names for the same API version; the Nex-Api-Version header accepts either value. Welcome to the developer hub and documentation for NexHealth API. This section of guide describes the operations, response parameters, request parameters, and parameter constraints related to User API. The term Operations refer to functions or methods. The operations are included in requests and send to the web server. Each operation performs a different action or a query on database.
  termsOfService: https://www.nexhealth.com/terms-of-service
  contact:
    name: NexHealth
    email: info@nexhealth.com
  license:
    name: NexHealth License 1.0
    url: https://www.nexhealth.com/privacy
  version: v20240412
servers:
- url: https://nexhealth.info
security:
- Authorization: []
tags:
- name: Treatment Plans
  description: A treatment plans resource
paths:
  /treatment_plans:
    get:
      summary: View treatment plans
      description: Returns a cursor-paginated list of treatment plans for the institution, with each plan's procedures embedded. Soft-deleted treatment plans are excluded. Results can be filtered by patient_id, status, and updated_since, and are ordered by id ascending — when using updated_since for incremental sync, do not assume results are ordered by update time.
      parameters:
      - in: header
        name: Nex-Api-Version
        description: The NexHealth API version
        required: true
        schema:
          type: string
          default: v3.0.0
      - in: query
        name: subdomain
        description: Used to scope the request to the specified institution
        required: true
        schema:
          type: string
      - in: query
        name: patient_id
        description: Filter by patient
        required: false
        example: 115
        schema:
          type: integer
          format: int32
      - in: query
        name: status
        description: Filter by status
        required: false
        example: proposed
        schema:
          type: string
          enum:
          - not_applicable
          - proposed
          - accepted
          - rejected
          - completed
      - in: query
        name: updated_since
        description: 'Treatment plans updated at or after the specified time (UTC). The boundary is inclusive: a plan whose updated_at exactly equals this value is returned'
        required: false
        example: '2024-01-15T00:00:00Z'
        schema:
          type: string
          format: date-time
      - in: query
        name: start_cursor
        description: First item of the current page. Starts empty
        required: false
        schema:
          type: string
      - in: query
        name: end_cursor
        description: Last item of the current page. Starts empty
        required: false
        schema:
          type: string
      - in: query
        name: per_page
        description: Number of results to return per page. Maximum allowed amount is 1000.
        required: false
        schema:
          type: integer
          format: int32
          default: 5
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_V20240412_Entities_TreatmentPlan_Collection_Response_WithCursor'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Forbidden'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_InternalServerError'
      tags:
      - Treatment Plans
      operationId: getTreatmentPlans
  /treatment_plans/{id}:
    get:
      summary: View treatment plan
      description: Returns a single treatment plan with its procedures embedded. Requesting a soft-deleted or unknown treatment plan returns 404.
      parameters:
      - in: header
        name: Nex-Api-Version
        description: The NexHealth API version
        required: true
        schema:
          type: string
          default: v3.0.0
      - in: path
        name: id
        description: The ID of the treatment plan
        required: true
        schema:
          type: integer
          format: int64
      - in: query
        name: subdomain
        description: Used to scope the request to the specified institution
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_V20240412_Entities_TreatmentPlan_Response'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_Forbidden'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_NotFound'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Errors_InternalServerError'
      tags:
      - Treatment Plans
      operationId: getTreatmentPlansId
components:
  schemas:
    API_V2_Entities_Procedure:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 11
          description: Procedure id
        location_id:
          type: integer
          format: int32
          example: 21
          description: Location id
          nullable: true
        patient_id:
          type: integer
          format: int32
          example: 162
          description: Patient id
          nullable: true
        provider_id:
          type: integer
          format: int32
          example: 84
          description: Provider id
          nullable: true
        appointment_id:
          type: integer
          format: int64
          example: 283
          description: Appointment id. Null when the procedure is not attached to an appointment
          nullable: true
        code:
          type: string
          example: D6100
          description: Procedure code
          nullable: true
        name:
          type: string
          example: Implant Removal
          description: Procedure name
          nullable: true
        status:
          type: string
          enum:
          - planned
          - scheduled
          - completed
          - inactive
          - referred
          example: referred
          description: Procedure status
          nullable: true
        updated_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: Procedure update date in UTC
        body_site:
          $ref: '#/components/schemas/API_V2_Entities_ProcedureBodySite'
        fee:
          $ref: '#/components/schemas/API_V2_Entities_Price'
        start_date:
          type: string
          format: date
          example: '2022-06-24'
          description: Start date for procedure
          nullable: true
        end_date:
          type: string
          format: date
          example: '2022-06-24'
          description: End date for procedure
          nullable: true
    API_Errors_InternalServerError:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_InternalServerError model
    API_V20240412_Entities_TreatmentPlan:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 423
          description: Resource id
        name:
          type: string
          example: Active treatment plan
          description: The name of the treatment plan
          nullable: true
        patient_id:
          type: integer
          format: int32
          example: 115
          description: The ID of patient this treatment plan is for
          nullable: true
        updated_at:
          type: string
          format: date-time
          example: '2020-06-05T20:16:57.007Z'
          description: Treatment plan update date in UTC
        status:
          type: string
          enum:
          - not_applicable
          - proposed
          - accepted
          - rejected
          - completed
          example: proposed
          description: Status of the treatment plan
          nullable: true
        procedures:
          type: array
          items:
            $ref: '#/components/schemas/API_V2_Entities_Procedure'
          description: Procedures assigned to the treatment plan
    API_Errors_Forbidden:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_Forbidden model
    API_Errors_Unauthorized:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_Unauthorized model
    API_V20240412_Entities_TreatmentPlan_Response:
      type: object
      properties:
        code:
          type: boolean
          example: false
          description: Indicates the success or failure of the request
        description:
          type: string
          example: Description
          description: Additional context on the request to help with debugging.
        error:
          type: array
          items:
            type: string
          example:
          - Error message
          description: Any errors that occur during the execution of the request.
        data:
          $ref: '#/components/schemas/API_V20240412_Entities_TreatmentPlan'
        count:
          type: integer
          format: int32
          example: 2
          description: Number of total objects, in case of collection.
      description: API_V20240412_Entities_TreatmentPlan_Response model
    API_Errors_BadRequest:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_BadRequest model
    API_V20240412_Entities_TreatmentPlan_Collection_Response_WithCursor:
      type: object
      properties:
        code:
          type: boolean
          example: false
          description: Indicates the success or failure of the request
        description:
          type: string
          example: Description
          description: Additional context on the request to help with debugging.
        error:
          type: array
          items:
            type: string
          example:
          - Error message
          description: Any errors that occur during the execution of the request.
        data:
          type: array
          items:
            $ref: '#/components/schemas/API_V20240412_Entities_TreatmentPlan'
        page_info:
          type: object
          example:
            has_previous_page: false
            has_next_page: false
            start_cursor: AAAAA
            end_cursor: BBBBBB
          description: Pagination information that can be used for fetching previous and next pages.
      description: API_V20240412_Entities_TreatmentPlan_Collection_Response_WithCursor model
    API_V2_Entities_Price:
      type: object
      properties:
        amount:
          type: string
          example: '62.00'
          description: The currency value, in whole units (e.g. dollars)
        currency:
          type: string
          example: USD
          description: The ISO currency code
    API_Errors_NotFound:
      type: object
      properties:
        code:
          type: boolean
          description: Indicates the success or failure of the request.
        description:
          type: string
          description: Additional context about the request to help with debugging.
        data:
          type: object
        error:
          type: array
          items:
            type: string
          description: Any errors that occured during the execution of the request.
      description: API_Errors_NotFound model
    API_V2_Entities_ProcedureBodySite:
      type: object
      properties:
        tooth:
          type: array
          items:
            type: string
          example:
          - '3'
          - '14'
          description: Tooth identifier strings, typically tooth numbers
        surface:
          type: string
          example: MOD
          description: Tooth surface codes
  securitySchemes:
    Authorization:
      type: apiKey
      name: Authorization
      in: header