FHIR API for Bp Premier

The HL7 FHIR API for Best Practice Bp Premier, delivered through Halo Connect. Built to the AU Base 4.1.0 implementation guide, falling back to FHIR R4 (4.0.1) where needed. Resources are served under the base path https://api.haloconnect.io/integrator/sites/{siteId}/fhir/R4/ with a CapabilityStatement at {baseUrl}/metadata; documented resources and operations include Patient, Appointment, Slot (Find Free Slots) and a Patient $summary document. The per-Bp-Premier resource mappings are published as a FHIR Implementation Guide in the Bp Premier knowledge base (login required). Access is gated to approved Best Practice partners; the FHIR search operations are also described in the Halo Cloud Integrator OpenAPI.

OpenAPI Specification

haloconnect-integrator-openapi.json Raw ↑
{
  "openapi": "3.1.1",
  "info": {
    "version": "26.619.10213",
    "title": "Halo Cloud API for Integrators",
    "contact": {
      "name": "Halo Connect Support",
      "email": "support@haloconnect.io"
    },
    "license": {
      "name": "Copyright © Halo Connect 2023",
      "url": "http://haloconnect.io"
    },
    "x-logo": {
      "url": "https://20496383.fs1.hubspotusercontent-na1.net/hubfs/20496383/halo_logo%20(1).png",
      "altText": "Halo Connect Logo"
    },
    "description": "## Introduction\nThis API reference documents the endpoints available to integrators using the Halo Connect Cloud API. It covers:\n\n- **Sites** – Retrieve site metadata and onboarding information\n- **SQL Passthrough** – Execute SQL queries against practice databases\n- **FHIR** – Query practice data using FHIR resources\n- **Registered Queries** – Execute recurring SQL queries against practice databases\n\nFor more information about Halo Connect, visit our [website](https://haloconnect.io) or [blog](https://haloconnect.io/blog).\n\n## Prerequisites\n\nAll API endpoints require an active pairing with the target site. Use the [Pair with a site](#operation/Integrator_PairSite) endpoint to establish access before making queries.\n\n## Definitions\n\nFor detailed documentation and guides, see our [documentation portal](https://docs.haloconnect.io).\n\n- **Site:** An instance of Halo Link connected to a practice's PMS database.\n- **Halo GUID:** A unique identifier for a site, used by Halo Connect to route queries.\n- **PMS:** Practice Management Software.\n- **PMS ID:** The identifier assigned to a site by the PMS vendor.\n"
  },
  "servers": [
    {
      "url": "https://api.haloconnect.io",
      "description": "Production"
    },
    {
      "url": "https://api.stage.haloconnect.io",
      "description": "Stage"
    }
  ],
  "tags": [
    {
      "name": "Sites",
      "description": "Endpoints for practice onboarding and site metadata."
    },
    {
      "name": "SQL Passthrough",
      "description": "Send SQL queries to practices as immediate, async or registered queries.\n\n**Immediate queries** are small, time-sensitive queries that return a result in seconds. Response size is limited to 8MB.\n\n**Async queries** are queued for execution and results can be retrieved later. The workflow is:\n\n  1. **Submit async query** – Creates a query and returns a `queryId` on success.\n  2. **Get query status** – Check query status. When complete, includes pagination details.\n  3. **Get query result page** – Retrieve result pages using the pagination info from the status response.\n\n**Registered Queries** are also supported. See the [Registered Queries](#tag/Registered-Queries) section for more information.\n"
    },
    {
      "name": "FHIR",
      "description": "Query practices using FHIR resources."
    },
    {
      "name": "Registered Queries",
      "description": "Recurring queries that run at a specified frequency, and can be used to monitor for updates or new records. This type is recommended for polling use cases."
    }
  ],
  "paths": {
    "/integrator/sites/{siteId}/queries/immediate": {
      "post": {
        "tags": [
          "SQL Passthrough"
        ],
        "summary": "Execute immediate query",
        "description": "Send an immediate query to a site and receive the result in the response.\n\nQuery status can also be retrieved using the **GET Query status** endpoint.\n",
        "operationId": "createImmediateQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200ImmediateQuery"
          },
          "400": {
            "$ref": "#/components/responses/400ErrorForIntegratorQuery"
          },
          "401": {
            "$ref": "#/components/responses/401ErrorForIntegratorQuery"
          },
          "403": {
            "$ref": "#/components/responses/403ErrorForIntegratorQuery"
          },
          "404": {
            "$ref": "#/components/responses/404ErrorForIntegratorQuery"
          },
          "500": {
            "$ref": "#/components/responses/500ErrorForIntegratorQuery"
          },
          "503": {
            "$ref": "#/components/responses/503ErrorForIntegratorQuery"
          },
          "504": {
            "$ref": "#/components/responses/504ErrorForIntegratorQuery"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/commandBySiteImmediatePostReqBody"
        }
      }
    },
    "/integrator/sites/{siteId}/queries/async": {
      "post": {
        "tags": [
          "SQL Passthrough"
        ],
        "summary": "Submit async query",
        "description": "Queue an async query for execution. Use the **GET Query status** endpoint to check progress and retrieve pagination details for results.",
        "operationId": "createAsyncQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "201": {
            "$ref": "#/components/responses/201AsyncQuery"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "503": {
            "$ref": "#/components/responses/503Error"
          },
          "504": {
            "$ref": "#/components/responses/504Error"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/commandBySiteAsyncPostReqBody"
        }
      }
    },
    "/integrator/sites/{siteId}/queries/registered": {
      "post": {
        "tags": [
          "Registered Queries"
        ],
        "summary": "Create registered query",
        "description": "Create a registered query to be queued for execution.",
        "operationId": "createRegisteredQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "202": {
            "$ref": "#/components/responses/202RegisteredQuery"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        },
        "requestBody": {
          "$ref": "#/components/requestBodies/RegisteredPostReqBody"
        }
      },
      "get": {
        "tags": [
          "Registered Queries"
        ],
        "summary": "List registered queries",
        "description": "List all registered queries that are currently active and queued for execution.",
        "operationId": "getRegisteredQueries",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200GetRegisteredQueries"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/queries/registered/{queryId}": {
      "get": {
        "tags": [
          "Registered Queries"
        ],
        "summary": "Get registered query details",
        "description": "Get the details of a registered query.",
        "operationId": "getRegisteredQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/QueryId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200RegisteredQuery"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Registered Queries"
        ],
        "summary": "Cancel registered query",
        "description": "Cancel a registered query that is currently queued for execution.",
        "operationId": "cancelRegisteredQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/QueryId"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/204RegisteredQueryDelete"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/queries/registered/{queryId}/results": {
      "get": {
        "tags": [
          "Registered Queries"
        ],
        "summary": "Get registered query results",
        "description": "Get the result of a registered query that has completed execution.",
        "operationId": "getRegisteredQueryResult",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/QueryId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200RegisteredQueryResult"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/queries/{queryId}": {
      "get": {
        "tags": [
          "SQL Passthrough"
        ],
        "summary": "Get query status",
        "description": "Check the status of an immediate or async query.\n\nFor async queries, successful responses include a `results` object with pagination details for retrieving result pages. Immediate queries do not include pagination since results are returned with the initial request.\n",
        "operationId": "getQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/QueryId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200IntegratorGetQuery"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/queries/status": {
      "post": {
        "tags": [
          "SQL Passthrough"
        ],
        "summary": "Get batch query status",
        "description": "Returns the status of the specified queries for a site. Submit an array of query IDs in the request body to retrieve their current status.\n\nEach result indicates whether the query was found or not found, and includes the full query details when found.\n",
        "operationId": "getQueryStatusBatch",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/QueryStatusBatchReqBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/200GetQueryStatusBatch"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/queries/{queryId}/results/{pageNumber}": {
      "get": {
        "tags": [
          "SQL Passthrough"
        ],
        "summary": "Get query result page",
        "description": "Get a result page from a successful async query.",
        "operationId": "getResultPage",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/QueryId"
          },
          {
            "$ref": "#/components/parameters/PageNumber"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200GetResultPage"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "410": {
            "$ref": "#/components/responses/410Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/queries/{queryId}/results/{pageNumber}/stream": {
      "get": {
        "tags": [
          "SQL Passthrough"
        ],
        "summary": "Stream result page",
        "operationId": "streamResultPage",
        "description": "Streams the JSON content of a single page of query results. This is useful for large result sets that are paginated and delivered as streamed responses to reduce memory usage.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/QueryId"
          },
          {
            "$ref": "#/components/parameters/PageNumber"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200StreamResultPage"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "410": {
            "$ref": "#/components/responses/410Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/fhir/R4/{fhirParameters}": {
      "get": {
        "tags": [
          "FHIR"
        ],
        "summary": "Search FHIR resources",
        "description": "Send a FHIR query to a site and receive the result in the response.\n\nInclude the resource name and search parameters in `fhirParameters`. Example: `Patient?given=John`\n\nSee the [FHIR API docs](https://docs.haloconnect.io/halo-cloud/fhir-api/overview) for supported resources and parameters.\n",
        "operationId": "getFhirQuery",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/FhirParameters"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200FhirQuery"
          },
          "400": {
            "$ref": "#/components/responses/400ErrorForFhirQuery"
          },
          "401": {
            "$ref": "#/components/responses/401ErrorForFhirQuery"
          },
          "403": {
            "$ref": "#/components/responses/403ErrorForFhirQuery"
          },
          "404": {
            "$ref": "#/components/responses/404ErrorForFhirQuery"
          },
          "500": {
            "$ref": "#/components/responses/500ErrorForFhirQuery"
          },
          "503": {
            "$ref": "#/components/responses/503ErrorForFhirQuery"
          },
          "504": {
            "$ref": "#/components/responses/504ErrorForFhirQuery"
          }
        }
      }
    },
    "/integrator/sites/{siteId}/fhir/R4/{resource}/_search": {
      "post": {
        "tags": [
          "FHIR"
        ],
        "summary": "Search FHIR resources (POST)",
        "description": "Send a FHIR search query with parameters in the request body.\n\nPOST is recommended for sensitive queries containing personally identifiable information (PII), as it avoids URL length limits and keeps parameters out of logs.\n\nSee the [FHIR API docs](https://docs.haloconnect.io/halo-cloud/fhir-api/overview) for supported resources and parameters. Errors may return as HTTP errors or FHIR [OperationOutcome](https://hl7.org/fhir/R4/operationoutcome.html) resources.\n",
        "operationId": "postFhirSearch",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          },
          {
            "$ref": "#/components/parameters/FhirResource"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200FhirSearch"
          },
          "400": {
            "$ref": "#/components/responses/400ErrorForFhirQuery"
          },
          "401": {
            "$ref": "#/components/responses/401ErrorForFhirQuery"
          },
          "403": {
            "$ref": "#/components/responses/403ErrorForFhirQuery"
          },
          "404": {
            "$ref": "#/components/responses/404ErrorForFhirQuery"
          },
          "500": {
            "$ref": "#/components/responses/500ErrorForFhirQuery"
          },
          "503": {
            "$ref": "#/components/responses/503ErrorForFhirQuery"
          },
          "504": {
            "$ref": "#/components/responses/504ErrorForFhirQuery"
          }
        },
        "requestBody": {
          "description": "FHIR search parameters.",
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "given": "John",
                "birthdate": "gt1900-01-01",
                "_sort": "birthdate"
              }
            }
          }
        }
      }
    },
    "/integrator/pair-site": {
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Pair with a site",
        "description": "Pair with a site to enable API access. Best Practice sites require a pairing code generated by the practice. Pairing is still required for other PMS types, but no pairing code is needed.",
        "operationId": "Integrator_PairSite",
        "parameters": [
          {
            "name": "practiceManagementSiteId",
            "in": "query",
            "description": "The PMS ID of the site to pair with.",
            "required": true,
            "schema": {
              "type": "string",
              "example": 12345
            }
          },
          {
            "name": "practiceManagementName",
            "in": "query",
            "description": "The name of the Practice Management Software used by the site.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Best Practice",
                "Zedmed",
                "D4w"
              ],
              "example": "Best Practice"
            }
          },
          {
            "name": "pairingCode",
            "in": "query",
            "description": "A pairing code generated by the practice. Required for Best Practice sites only.",
            "schema": {
              "type": "string",
              "example": "ABC123"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200IntegratorGetSite"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "502": {
            "$ref": "#/components/responses/502Error"
          }
        }
      }
    },
    "/integrator/pairSite": {
      "post": {
        "tags": [
          "Sites"
        ],
        "summary": "Pair with a site (deprecated)",
        "description": "**Deprecated:** Use `/integrator/pair-site` instead. Pair with a site to enable API access. Best Practice sites require a pairing code generated by the practice. Pairing is still required for other PMS types, but no pairing code is needed.",
        "deprecated": true,
        "operationId": "pairSite",
        "parameters": [
          {
            "name": "practiceManagementSiteId",
            "in": "query",
            "description": "The PMS ID of the site to pair with.",
            "required": true,
            "schema": {
              "type": "string",
              "example": 12345
            }
          },
          {
            "name": "practiceManagementName",
            "in": "query",
            "description": "The name of the Practice Management Software used by the site.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "Best Practice",
                "Zedmed",
                "D4w"
              ],
              "example": "Best Practice"
            }
          },
          {
            "name": "pairingCode",
            "in": "query",
            "description": "A pairing code generated by the practice. Required for Best Practice sites only.",
            "schema": {
              "type": "string",
              "example": "ABC123"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200IntegratorGetSite"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          },
          "502": {
            "$ref": "#/components/responses/502Error"
          }
        }
      }
    },
    "/integrator/sites": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Find sites by PMS ID",
        "description": "Retrieve Halo GUIDs for sites matching the query parameters. Use this to exchange a known PMS ID for the corresponding Halo GUID.",
        "operationId": "getSites",
        "parameters": [
          {
            "$ref": "#/components/parameters/PracticeManagementSiteIdRequired"
          },
          {
            "$ref": "#/components/parameters/PracticeManagementName"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200IntegratorGetSites"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    },
    "/integrator/sites/{siteId}": {
      "get": {
        "tags": [
          "Sites"
        ],
        "summary": "Get site status",
        "description": "Check the status of a site using its Halo GUID.",
        "operationId": "getSite",
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200IntegratorGetSite"
          },
          "400": {
            "$ref": "#/components/responses/400Error"
          },
          "401": {
            "$ref": "#/components/responses/401Error"
          },
          "403": {
            "$ref": "#/components/responses/403Error"
          },
          "404": {
            "$ref": "#/components/responses/404Error"
          },
          "500": {
            "$ref": "#/components/responses/500Error"
          }
        }
      }
    }
  },
  "security": [
    {
      "SubscriptionKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "SubscriptionKey": {
        "type": "apiKey",
        "name": "Ocp-Apim-Subscription-Key",
        "in": "header",
        "description": "The subscription key for the API."
      }
    },
    "parameters": {
      "SiteId": {
        "name": "siteId",
        "in": "path",
        "description": "Halo GUID of the site.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "QueryId": {
        "name": "queryId",
        "in": "path",
        "description": "Id of the query.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "PageNumber": {
        "name": "pageNumber",
        "in": "path",
        "description": "Page number of the results for a query.",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "FhirParameters": {
        "name": "fhirParameters",
        "in": "path",
        "description": "Resource names and search parameters per the R4 FHIR specification for using [RESTful APIs](http://hl7.org/fhir/R4/http.html) and [search](http://hl7.org/fhir/R4/search.html).",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "FhirResource": {
        "name": "resource",
        "in": "path",
        "description": "The name of the FHIR resource to search for.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "PracticeManagementSiteIdRequired": {
        "name": "practiceManagementSiteId",
        "in": "query",
        "description": "Filters by the PMS Site Id.",
        "schema": {
          "type": "string"
        },
        "required": true
      },
      "PracticeManagementName": {
        "name": "practiceManagementName",
        "in": "query",
        "description": "Filters by the name of the Practice Management Software used by the site.",
        "schema": {
          "$ref": "#/components/schemas/PracticeManagementName"
        },
        "required": true
      }
    },
    "schemas": {
      "ImmediateMaxTimeInQueue": {
        "type": "integer",
        "format": "milli-seconds",
        "example": 15000,
        "minimum": 0,
        "maximum": 60000,
        "default": 30000
      },
      "ExecutionMode": {
        "description": "Selects between fetching data or writing to the database. `reader` executes the command (e.g. SELECT) and returns rows of data. `nonQuery` executes the command (e.g. UPDATE, INSERT, or DELETE) and does not return data.  `scalar` returns first value of first row of query results.  For Querys using RETURN @values please use `returnValue` Parameters.",
        "type": "string",
        "enum": [
          "reader",
          "nonQuery",
          "scalar"
        ],
        "default": "reader"
      },
      "CommandType": {
        "description": "Indicates how the text property is to be interpreted. `text` executes the SQL contained within the text property. `storedProcedure` calls the stored procedure named in the text property. `storedProcedure` is currently experimental.",
        "type": "string",
        "enum": [
          "text",
          "storedProcedure"
        ],
        "default": "text"
      },
      "Direction": {
        "description": "A value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.",
        "type": "string",
        "enum": [
          "output",
          "input",
          "inputOutput",
          "returnValue"
        ]
      },
      "Type": {
        "description": "Specifies SQL Server-specific data type of a field, property.",
        "type": "string",
        "enum": [
          "BigInt",
          "Binary",
          "Bit",
          "Char",
          "String",
          "Date",
          "DateTime",
          "DateTime2",
          "DateTimeOffset",
          "Decimal",
          "Float",
          "Image",
          "Int",
          "Money",
          "NChar",
          "NText",
          "NVarChar",
          "Real",
          "SmallDateTime",
          "SmallInt",
          "SmallMoney",
          "Structured",
          "Text",
          "Time",
          "Timestamp",
          "TinyInt",
          "Udt",
          "UniqueIdentifier",
          "VarBinary",
          "VarChar",
          "Variant",
          "Xml"
        ]
      },
      "Value": {
        "description": "Gets or sets the value of the parameter.",
        "type": [
          "string",
          "null"
        ],
        "format": "base64 (output)",
        "example": "66"
      },
      "Size": {
        "description": "The maximum size, in bytes, of the data within the column.",
        "type": "integer",
        "example": 43
      },
      "Parameter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "@siteid",
            "description": "The name of the parameter."
          },
          "direction": {
            "$ref": "#/components/schemas/Direction"
          },
          "type": {
            "$ref": "#/components/schemas/Type"
          },
          "value": {
            "$ref": "#/components/schemas/Value"
          },
          "size": {
            "$ref": "#/components/schemas/Size"
          }
        }
      },
      "Command": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "example": "GetPatientID",
            "description": "The SQL statement to execute or the name of the stored procedure to run."
          },
          "executionMode": {
            "$ref": "#/components/schemas/ExecutionMode"
          },
          "type": {
            "$ref": "#/components/schemas/CommandType"
          },
          "parameters": {
            "type": "array",
            "description": "Parameters are used to supply data to, or read outputs from, a stored procedure.",
            "items": {
              "$ref": "#/components/schemas/Parameter"
            }
          }
        },
        "required": [
      

# --- truncated at 32 KB (92 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/best-practice/refs/heads/main/openapi/haloconnect-integrator-openapi.json