NexHealth Procedures API

A procedures resource

OpenAPI Specification

nexhealth-procedures-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: NexHealth Adjustment Types Procedures 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: Procedures
  description: A procedures resource
paths:
  /procedures:
    get:
      summary: View procedures
      description: "This endpoint returns a list of procedures.\n You can filter by provider_id, patient_id, appointment_id, started_after, started_before, ended_after, ended_before or\n updated_since. You must provide at least one filter. You may additionally narrow any of these filters by location_id,\n but location_id alone does not satisfy the at-least-one-filter requirement."
      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: sort
        description: "Optional comma-separated string of fields to sort on.\nInclude a leading dash for descending order.\n\nAvailable fields:\n  * updated_at\n  * -updated_at\n"
        required: false
        schema:
          type: string
      - in: query
        name: location_id
        description: Filter for specific location. Cannot be used as the only filter — combine it with at least one other filter
        required: false
        example: 21
        schema:
          type: integer
          format: int32
      - in: query
        name: provider_id
        description: Filter for specific provider
        required: false
        example: 84
        schema:
          type: integer
          format: int32
      - in: query
        name: patient_id
        description: Filter for specific patient
        required: false
        example: 162
        schema:
          type: integer
          format: int32
      - in: query
        name: appointment_id
        description: Filter for specific appointment
        required: false
        example: 283
        schema:
          type: integer
          format: int32
      - in: query
        name: updated_since
        description: Procedures updated at or after the specified time (UTC). The comparison is inclusive, so a record whose updated_at exactly equals the given value is returned
        required: false
        example: '2024-04-12T10:30:00Z'
        schema:
          type: string
          format: date-time
      - in: query
        name: started_after
        description: Filter for procedures with start_date after a specific date (including the date)
        required: false
        example: '2024-04-01'
        schema:
          type: string
          format: date
      - in: query
        name: started_before
        description: Filter for procedures with start_date before a specific date (including the date)
        required: false
        example: '2024-04-30'
        schema:
          type: string
          format: date
      - in: query
        name: ended_after
        description: Filter for procedures with end_date after a specific date (including the date)
        required: false
        example: '2024-04-01'
        schema:
          type: string
          format: date
      - in: query
        name: ended_before
        description: Filter for procedures with end_date before a specific date (including the date)
        required: false
        example: '2024-04-30'
        schema:
          type: string
          format: date
      - 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_V2_Entities_Procedure_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'
        '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:
      - Procedures
      operationId: getProcedures
  /procedures/{id}:
    get:
      summary: View procedure
      description: 'This endpoint returns a single procedure by its NexHealth id. Note: the list endpoint is not filtered by your token''s location access, so ids returned by GET /procedures may return 404 here if the procedure belongs to a location your token cannot access or has no location assigned.'
      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 procedure
        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_Procedure_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:
      - Procedures
      operationId: getProceduresId
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_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_V20240412_Entities_Procedure_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_Procedure'
        count:
          type: integer
          format: int32
          example: 2
          description: Number of total objects, in case of collection.
      description: API_V20240412_Entities_Procedure_Response 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_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_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
        treatment_plan_ids:
          type: array
          items:
            type: integer
            format: int64
          example:
          - 42
          - 57
          description: Treatment plan ids
    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
    API_V2_Entities_Procedure_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_V2_Entities_Procedure'
        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_V2_Entities_Procedure_Collection_Response_WithCursor model
  securitySchemes:
    Authorization:
      type: apiKey
      name: Authorization
      in: header