{
  "swagger": "2.0",
  "info": {
    "version": "v1",
    "title": "ODX.API"
  },
  "host": "api.optimaldx.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/v1/elements": {
      "get": {
        "tags": [
          "Biomarkers"
        ],
        "summary": "Returns list of biomarkers",
        "operationId": "Biomarkers_GetElements",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Element"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list biomarkers",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/elements/{labId}": {
      "get": {
        "tags": [
          "Biomarkers"
        ],
        "summary": "Returns list of biomarkers with lab element reference",
        "operationId": "Biomarkers_GetElementsWithLabReference",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "labId",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ElementWithLabReference"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list biomarkers",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/elements/ranges": {
      "get": {
        "tags": [
          "Biomarkers"
        ],
        "summary": "Returns list of biomarkers and ranges",
        "operationId": "Biomarkers_GetElementRanges",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "elementId",
            "in": "query",
            "description": "Biomarker ID - if not provided, all biomarkers will be returned.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "labId",
            "in": "query",
            "description": "Lab ID - optional.",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientGender",
            "in": "query",
            "description": "Patient gender - optional.",
            "required": false,
            "type": "string",
            "enum": [
              "Male",
              "Female"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ElementRangesResponse"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list biomarkers or ranges",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/elements/groups": {
      "get": {
        "tags": [
          "Biomarkers"
        ],
        "summary": "Returns list of biomarker groups",
        "operationId": "Biomarkers_GetElementGroups",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ElementGroup"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/countries": {
      "get": {
        "tags": [
          "Countries"
        ],
        "summary": "Returns list of countries",
        "operationId": "Countries_GetCountries",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Country"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list countries",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/culturecodes": {
      "get": {
        "tags": [
          "CultureCodes"
        ],
        "summary": "Returns list of valid culture codes",
        "operationId": "CultureCodes_GetCultureCodes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/CultureCode"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/labprofiles": {
      "get": {
        "tags": [
          "LabProfiles"
        ],
        "summary": "Returns list of lab profiles available for a practice.",
        "operationId": "LabProfiles_GetLabProfiles",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/LabProfile"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/labprofiles/deep": {
      "get": {
        "tags": [
          "LabProfiles"
        ],
        "summary": "Returns list of lab profiles available for a practice, along with all biomarkers that each profile uses.",
        "operationId": "LabProfiles_GetLabProfilesDeep",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/LabProfile"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/partner/labs": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "Gets available labs for current partner.",
        "operationId": "Partners_GetAvailableLabs",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Lab"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/partner/packages": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "Gets available packages the partner can associate a practice with.",
        "operationId": "Partners_GetAvailablePackages",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Package"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/partner/validateapikey": {
      "get": {
        "tags": [
          "Partners"
        ],
        "summary": "Validates API key",
        "operationId": "Partners_ValidateAPIKey",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patients": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns patients associated with the requesting partner and practice.",
        "operationId": "Patients_GetPatients",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Patient email address (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "firstName",
            "in": "query",
            "description": "Patient first name (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "lastName",
            "in": "query",
            "description": "Patient last name (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "dateOfBirth",
            "in": "query",
            "description": "Patient date of birth (optional)",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "externalPatientId",
            "in": "query",
            "description": "Patient ID provided by the partner (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "partnerId",
            "in": "query",
            "description": "Partner ID (optional)",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Determines the max number of items to be returned in a single call. Max allowed value: 5000",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Patient"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/workspace/{workspaceId}/patients": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns patients associated with the requesting partner, practice and workspace.",
        "operationId": "Patients_GetPatients",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "workspaceId",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Patient email address (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "firstName",
            "in": "query",
            "description": "Patient first name (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "lastName",
            "in": "query",
            "description": "Patient last name (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "dateOfBirth",
            "in": "query",
            "description": "Patient date of birth (optional)",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "externalPatientId",
            "in": "query",
            "description": "Patient ID provided by the partner (optional)",
            "required": false,
            "type": "string"
          },
          {
            "name": "partnerId",
            "in": "query",
            "description": "Partner ID (optional)",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Determines the max number of items to be returned in a single call. Max allowed value: 5000",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Patient"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patients/page": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns patients associated with the requesting partner and practice.",
        "operationId": "Patients_GetPatients",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "id",
            "in": "query",
            "description": "Page information previously returned",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Patient"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/workspace/{workspaceId}/patients/page": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns patients associated with the requesting partner, practice and workspace.",
        "operationId": "Patients_GetPatients",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "workspaceId",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "id",
            "in": "query",
            "description": "Page information previously returned",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Patient"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns a specific patient.",
        "operationId": "Patients_GetPatient",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Patient"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Patients"
        ],
        "summary": "Updates patient information. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Patients_UpdatePatient",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patient",
            "in": "body",
            "description": "Patient information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Patient"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to update a patient",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Patients"
        ],
        "summary": "Deletes a patient. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Patients_DeletePatient",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "401": {
            "description": "Not enough privileges to delete a patient",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient": {
      "post": {
        "tags": [
          "Patients"
        ],
        "summary": "Creates a new patient. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Patients_CreatePatient",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patient",
            "in": "body",
            "description": "Patient information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Patient"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to register a patient",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/partner/{externalPatientId}": {
      "post": {
        "tags": [
          "Patients"
        ],
        "summary": "Associates a patient with an external ID.",
        "operationId": "Patients_CreatePatientPartner",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "externalPatientId",
            "in": "path",
            "description": "Patient ID provided by the partner",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Patients"
        ],
        "summary": "Removes the association between a patient and an external ID.",
        "operationId": "Patients_DeletePatientPartner",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "externalPatientId",
            "in": "path",
            "description": "Patient ID provided by the partner",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/notes": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns patient notes",
        "operationId": "Patients_GetNotes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PatientNote"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/notes/{patientNoteType}": {
      "get": {
        "tags": [
          "Patients"
        ],
        "summary": "Returns patient notes",
        "operationId": "Patients_GetNotes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientNoteType",
            "in": "path",
            "description": "Note type",
            "required": true,
            "type": "string",
            "enum": [
              "Default",
              "Private"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PatientNote"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/note": {
      "post": {
        "tags": [
          "Patients"
        ],
        "summary": "Creates a new patient note. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Patients_CreatePatientNote",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientNote",
            "in": "body",
            "description": "Note",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientNoteNewRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PatientNote"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to register a patient note",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/note/{patientNoteId}": {
      "put": {
        "tags": [
          "Patients"
        ],
        "summary": "Updates a patient note. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Patients_UpdatePatientNote",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientNoteId",
            "in": "path",
            "description": "Patient note ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientNote",
            "in": "body",
            "description": "Note udpate",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientNoteUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PatientNote"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to update a patient note",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Patients"
        ],
        "summary": "Deletes a patient note. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Patients_DeletePatientNote",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientNoteId",
            "in": "path",
            "description": "Patient note ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to delete a patient note",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/tests": {
      "get": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Returns patient tests.",
        "operationId": "PatientTests_GetPatientTests",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PatientTest"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/test/{patientTestId}": {
      "get": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Returns a specific patient test.",
        "operationId": "PatientTests_GetPatientTest",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PatientTest"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "put": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Updates an existing patient test based on an HL7 file.",
        "operationId": "PatientTests_UpdatePatientTest",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTest",
            "in": "body",
            "description": "New patient test information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientTestUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PatientTest"
            }
          },
          "204": {
            "description": "There were no errors, but also no usable data in the HL7 file."
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Deletes a specific patient test.",
        "operationId": "PatientTests_DeletePatientTest",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "401": {
            "description": "Not enough privileges to delete a patient test",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/test": {
      "post": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Registers a new patient test based on an HL7 file.",
        "operationId": "PatientTests_CreatePatientTest",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTest",
            "in": "body",
            "description": "New patient test information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientTestUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PatientTest"
            }
          },
          "204": {
            "description": "There were no errors, but also no usable data in the HL7 file."
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "No more tests available for current billing period",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/test/{patientTestId}/notes": {
      "get": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Returns notes associated with a specific patient test.",
        "operationId": "PatientTests_GetPatientTestNotes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PatientTestNote"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/test/{patientTestId}/notes/{noteType}": {
      "get": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Returns notes associated with a specific patient test.",
        "operationId": "PatientTests_GetPatientTestNotes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "noteType",
            "in": "path",
            "description": "Note type",
            "required": true,
            "type": "string",
            "enum": [
              "Summary",
              "ElementGroup"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PatientTestNote"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/test/{patientTestId}/note": {
      "post": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Add a note to an existing patient test.",
        "operationId": "PatientTests_CreatePatientTestNote",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestNoteNewRequest",
            "in": "body",
            "description": "Note. IMPORTANT: there must not be any JavaScript, custom CSS classes or HTML input tags in the HTML.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientTestNoteNewRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/test/{patientTestId}/note/{patientTestNoteId}": {
      "put": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Update an existing note.",
        "operationId": "PatientTests_UpdatePatientTestNote",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestNoteId",
            "in": "path",
            "description": "Patient test note ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestNoteUpdateRequest",
            "in": "body",
            "description": "Note. IMPORTANT: there must not be any JavaScript, custom CSS classes or HTML input tags in the HTML.",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatientTestNoteUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PatientTests"
        ],
        "summary": "Delete an existing note.",
        "operationId": "PatientTests_DeletePatientTestNote",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestId",
            "in": "path",
            "description": "Patient test ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "patientTestNoteId",
            "in": "path",
            "description": "Patient test note ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/upload": {
      "post": {
        "tags": [
          "PdfParser"
        ],
        "summary": "Uploads a PDF using a multipart request. The request must include the PDF file and a PdfUploadRequest object \r\nserialized as JSON. The multipart section containing the JSON should be named pdfUploadRequest.",
        "operationId": "PdfParser_UploadPDF",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PdfUploadResponse"
            }
          },
          "400": {
            "description": "Invalid request.",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "415": {
            "description": "Unrecognized PDF format.",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/logo": {
      "get": {
        "tags": [
          "PracticeLogos"
        ],
        "summary": "Returns a practice's logo",
        "operationId": "PracticeLogos_GetLogo",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Practice not found or no logo configured",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "post": {
        "tags": [
          "PracticeLogos"
        ],
        "summary": "Updates practice logo. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "PracticeLogos_UpdateLogo",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Practice"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to update practice",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Practice not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PracticeLogos"
        ],
        "summary": "Deletes a practice. ATTENTION: method only available for partners with full access to practice information",
        "operationId": "PracticeLogos_DeleteLogo",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "401": {
            "description": "Not enough privileges to delete logo",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Practice not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/practicepartners": {
      "get": {
        "tags": [
          "PracticePartners"
        ],
        "summary": "Returns practices binding information.",
        "operationId": "PracticePartners_GetPracticePartners",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PracticePartner"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/practicepartner/{practicePartnerId}": {
      "get": {
        "tags": [
          "PracticePartners"
        ],
        "summary": "Returns a specific practice binding information",
        "operationId": "PracticePartners_GetPracticePartner",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "practicePartnerId",
            "in": "path",
            "description": "Practice partner ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PracticePartner"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PracticePartners"
        ],
        "summary": "Unbinds a practice from a partner",
        "operationId": "PracticePartners_DeletePracticePartner",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "practicePartnerId",
            "in": "path",
            "description": "Practice partner ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/practicepartner": {
      "post": {
        "tags": [
          "PracticePartners"
        ],
        "summary": "Binds an existing practice to a partner",
        "operationId": "PracticePartners_CreatePracticePartner",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "practicePartner",
            "in": "body",
            "description": "New practice binding information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PracticePartnerUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PracticePartner"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Unable to access/change practice information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "409": {
            "description": "Duplicate information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practices": {
      "get": {
        "tags": [
          "Practices"
        ],
        "summary": "Returns practices bound to the requesting partner.",
        "operationId": "Practices_GetPractices",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Practice"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}": {
      "get": {
        "tags": [
          "Practices"
        ],
        "summary": "Returns a specific practice information",
        "operationId": "Practices_GetPractice",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Practice"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Practices"
        ],
        "summary": "Updates practice information. ATTENTION: method only available for partners with full access to practice information",
        "operationId": "Practices_UpdatePractice",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "practice",
            "in": "body",
            "description": "Practice information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PracticeUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Practice"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "Not enough privileges to update practice",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Practices"
        ],
        "summary": "Deletes a practice. ATTENTION: method only available for partners with full access to practice information",
        "operationId": "Practices_DeletePractice",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "401": {
            "description": "Not enough privileges to delete practice",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice": {
      "post": {
        "tags": [
          "Practices"
        ],
        "summary": "Creates a new practice. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Practices_CreatePractice",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practice",
            "in": "body",
            "description": "Practice information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PracticeNewRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Practice"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/{reportGroup}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Gets reports available for the partner. These reports will also be available\r\nfor practices that are associated with the current partner.",
        "operationId": "Reports_GetAvailableReports",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "reportGroup",
            "in": "path",
            "description": "Report group",
            "required": true,
            "type": "string",
            "enum": [
              "FunctionalHealthReport",
              "HealthImprovementPlanReport",
              "AdvancedReports"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/AvailableReport"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/{reportGroup}/practice/{practiceId}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Gets reports available for the practice.",
        "operationId": "Reports_GetPracticeAvailableReports",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "reportGroup",
            "in": "path",
            "description": "Report group",
            "required": true,
            "type": "string",
            "enum": [
              "FunctionalHealthReport",
              "HealthImprovementPlanReport",
              "AdvancedReports"
            ]
          },
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/AvailableReport"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/FunctionalHealthReport": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Generates a Functional Health report",
        "operationId": "Reports_GenerateFHRReport",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "reportRequest",
            "in": "body",
            "description": "Report request details",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FunctionalHealthReportRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/HealthImprovementPlanReport": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Generates a Health Improvement Plan report",
        "operationId": "Reports_GenerateHIPReport",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "reportRequest",
            "in": "body",
            "description": "Report request details",
            "required": true,
            "schema": {
              "$ref": "#/definitions/HealthImprovementPlanReportRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/AdvancedReports/test": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Generates Advanced Reports",
        "operationId": "Reports_GenerateAdvancedReportsTest",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "reportRequest",
            "in": "body",
            "description": "Report request details",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AdvancedReportsTestRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/AdvancedReportResponse"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/AdvancedReports": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Generates Advanced Reports",
        "operationId": "Reports_GenerateAdvancedReports",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "reportRequest",
            "in": "body",
            "description": "Report request details",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AdvancedReportsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/AdvancedReportResponse"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/reports/AISummaryReport": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Generates a Functional Health report",
        "operationId": "Reports_GenerateAISummaryReport",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "aiSummaryReportRequest",
            "in": "body",
            "description": "AI Summary Report request details",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AISummaryReportRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/import/test": {
      "post": {
        "tags": [
          "TestImport"
        ],
        "summary": "Imports test information based on an HL7 file.",
        "operationId": "TestImport_ImportTest",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "hl7",
            "in": "body",
            "description": "Test information (REQUIRED)",
            "required": true,
            "schema": {
              "$ref": "#/definitions/HL7Import"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PartnerImportResponseMessage"
            }
          },
          "204": {
            "description": "There were no errors, but also no usable data in the HL7 file."
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "401": {
            "description": "No more tests available for current billing period",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Practice with provided receiving facility ID not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/themes/reports": {
      "get": {
        "tags": [
          "Themes"
        ],
        "summary": "Returns list of themes that can be used when generating reports.",
        "operationId": "Themes_GetReportThemes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ReportTheme"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "No themes found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/themes/reports/{practiceId}": {
      "get": {
        "tags": [
          "Themes"
        ],
        "summary": "Returns list of themes available for a practice that can be used when generating reports.",
        "operationId": "Themes_GetReportThemes",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ReportTheme"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "No themes found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/timezones": {
      "get": {
        "tags": [
          "Timezones"
        ],
        "summary": "Returns list of timezones",
        "operationId": "Timezones_GetTimeZones",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/TimeZone"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/treatments/{treatmentId}": {
      "get": {
        "tags": [
          "Treatments"
        ],
        "summary": "Returns a specific treatment plan.",
        "operationId": "Treatments_GetTreatment",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "treatmentId",
            "in": "path",
            "description": "Treatment ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Treatment"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list treatments",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/patient/{patientId}/treatments": {
      "get": {
        "tags": [
          "Treatments"
        ],
        "summary": "Returns list of treatments per practice and patient.",
        "operationId": "Treatments_GetTreatments",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Treatment"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list treatments",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Returns practice users.",
        "operationId": "Users_GetUsers",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/User"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/workspace/{workspaceId}/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Returns practice users that belong to a specific workspace.",
        "operationId": "Users_GetUsers",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "workspaceId",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/User"
              }
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/user/{userId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Returns a specific user information",
        "operationId": "Users_GetUser",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/User"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Updates user information. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Users_UpdateUser",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "user",
            "in": "body",
            "description": "Practice information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/User"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete a user. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Users_DeleteUser",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "deleteRequest",
            "in": "body",
            "description": "Delete request",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserDeleteRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/user": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Creates a new user. ATTENTION: method only available for partners with full access to practice information.",
        "operationId": "Users_CreateUser",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "user",
            "in": "body",
            "description": "Practice information",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserNewRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/User"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "402": {
            "description": "Practice needs to provide billing information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/webhooks/entities": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Returns available entity and event types.",
        "operationId": "Webhooks_GetEntityEvents",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "object",
              "properties": {
                "Patient": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "Created",
                      "Updated",
                      "Deleted"
                    ],
                    "type": "string"
                  }
                },
                "PatientTest": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "Created",
                      "Updated",
                      "Deleted"
                    ],
                    "type": "string"
                  }
                },
                "TreatmentPlan": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "Created",
                      "Updated",
                      "Deleted"
                    ],
                    "type": "string"
                  }
                },
                "PracticePartnerConnection": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "Created",
                      "Updated",
                      "Deleted"
                    ],
                    "type": "string"
                  }
                },
                "BloodTestResultsPdf": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "Created",
                      "Updated",
                      "Deleted"
                    ],
                    "type": "string"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Returns configured webhooks.",
        "operationId": "Webhooks_GetWebhooks",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PartnerWebhook"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "No records found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/webhook/{partnerWebhookId}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Returns a specific webhook.",
        "operationId": "Webhooks_GetWebhook",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "partnerWebhookId",
            "in": "path",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PartnerWebhook"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "No records found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Updates an existing webhook configuration.",
        "operationId": "Webhooks_UpdateWebhook",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "partnerWebhookId",
            "in": "path",
            "description": "Configuration ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "partnerWebhook",
            "in": "body",
            "description": "Partner webhook",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PartnerWebhookUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PartnerWebhook"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Deletes a specific webhook configuration.",
        "operationId": "Webhooks_DeleteWebhook",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "partnerWebhookId",
            "in": "path",
            "description": "Partner webhook ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Information not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/webhook": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Registers a new webhook configuration.",
        "operationId": "Webhooks_CreateWebhook",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "partnerWebhook",
            "in": "body",
            "description": "Partner webhook",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PartnerWebhookUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PartnerWebhook"
            }
          },
          "400": {
            "description": "Invalid information",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/webhook/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Sends test data to the partner's endpoint",
        "operationId": "Webhooks_TestWebhookConfiguration",
        "consumes": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "testRequest",
            "in": "body",
            "description": "Configuration to be tested",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PartnerWebhookTestRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response"
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/webhook/test/{entityType}/{eventType}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Returns a sample notification (same as it's going to be sent to partner's endpoint)",
        "operationId": "Webhooks_GetSampleNotification",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "entityType",
            "in": "path",
            "description": "Entity type",
            "required": true,
            "type": "string",
            "enum": [
              "Patient",
              "PatientTest",
              "TreatmentPlan",
              "PracticePartnerConnection",
              "BloodTestResultsPdf"
            ]
          },
          {
            "name": "eventType",
            "in": "path",
            "description": "Event that triggers the webhook call",
            "required": true,
            "type": "string",
            "enum": [
              "Created",
              "Updated",
              "Deleted"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/PartnerWebhookEvent"
            }
          },
          "400": {
            "description": "Invalid entity or event type",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Practice or practice partner not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Returns list of workspaces that belong to a specific practice.",
        "operationId": "Workspaces_GetWorkspaces",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Workspace"
              }
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Unable to list workspaces",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    },
    "/v1/practice/{practiceId}/workspace/{workspaceId}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Returns a specific workspaces.",
        "operationId": "Workspaces_GetWorkspace",
        "consumes": [],
        "produces": [
          "application/json",
          "text/json",
          "application/xml",
          "text/xml"
        ],
        "parameters": [
          {
            "name": "practiceId",
            "in": "path",
            "description": "Practice ID",
            "required": true,
            "type": "string",
            "format": "uuid"
          },
          {
            "name": "workspaceId",
            "in": "path",
            "description": "Workspace ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok response",
            "schema": {
              "$ref": "#/definitions/Workspace"
            }
          },
          "403": {
            "description": "Partner not authenticated",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "404": {
            "description": "Workspace not found",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          },
          "500": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/ExceptionInformation"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Element": {
      "description": "Biomarker",
      "type": "object",
      "properties": {
        "elementId": {
          "format": "int32",
          "description": "Biomarker ID",
          "type": "integer"
        },
        "elementName": {
          "description": "Biomarker name",
          "type": "string"
        },
        "elementGenderType": {
          "description": "Gender this biomarker applies to.",
          "enum": [
            "Neutral",
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "cuUnit": {
          "description": "Conventional Units expected for this biomarker",
          "type": "string"
        },
        "siUnit": {
          "description": "Standard International unit expected for this biomarker",
          "type": "string"
        },
        "cuToSiConversionFactor": {
          "format": "double",
          "description": "CU to SI conversion factor",
          "type": "number"
        }
      }
    },
    "ExceptionInformation": {
      "description": "Information about an exceptional return",
      "type": "object",
      "properties": {
        "message": {
          "description": "Message",
          "type": "string"
        }
      }
    },
    "ElementWithLabReference": {
      "description": "Biomarker with lab reference",
      "type": "object",
      "properties": {
        "labId": {
          "format": "int32",
          "description": "Lab ID",
          "type": "integer"
        },
        "elementReferences": {
          "description": "References",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ElementReference"
          }
        },
        "elementId": {
          "format": "int32",
          "description": "Biomarker ID",
          "type": "integer"
        },
        "elementName": {
          "description": "Biomarker name",
          "type": "string"
        },
        "elementGenderType": {
          "description": "Gender this biomarker applies to.",
          "enum": [
            "Neutral",
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "cuUnit": {
          "description": "Conventional Units expected for this biomarker",
          "type": "string"
        },
        "siUnit": {
          "description": "Standard International unit expected for this biomarker",
          "type": "string"
        },
        "cuToSiConversionFactor": {
          "format": "double",
          "description": "CU to SI conversion factor",
          "type": "number"
        }
      }
    },
    "ElementReference": {
      "description": "Reference between an ODX biomarker and a lab biomarker",
      "type": "object",
      "properties": {
        "elementCode": {
          "description": "Biomarker code used by the lab",
          "type": "string"
        },
        "elementName": {
          "description": "Biomarker name",
          "type": "string"
        }
      }
    },
    "ElementRangesResponse": {
      "description": "Ranges response",
      "type": "object",
      "properties": {
        "element": {
          "$ref": "#/definitions/Element",
          "description": "Related biomarker"
        },
        "ranges": {
          "$ref": "#/definitions/ElementRanges",
          "description": "Ranges"
        }
      }
    },
    "ElementRanges": {
      "description": "Ranges for a specific biomarker.",
      "type": "object",
      "properties": {
        "labId": {
          "format": "int32",
          "description": "Lab ID, if not provided.",
          "type": "integer"
        },
        "patientGender": {
          "description": "Patient gender, if not provided.",
          "enum": [
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "optimalRangeLow": {
          "format": "double",
          "description": "Optimal range - low",
          "type": "number"
        },
        "optimalRangeHigh": {
          "format": "double",
          "description": "Optimal range - high",
          "type": "number"
        },
        "standardRangeLow": {
          "format": "double",
          "description": "Standard range - low",
          "type": "number"
        },
        "standardRangeHigh": {
          "format": "double",
          "description": "Standard range - high",
          "type": "number"
        },
        "alarmRangeLow": {
          "format": "double",
          "description": "Alarm range - low",
          "type": "number"
        },
        "alarmRangeHigh": {
          "format": "double",
          "description": "Alarm range - high",
          "type": "number"
        },
        "subGroups": {
          "description": "Ranges sub-groups",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ElementRangesSubGroup"
          }
        }
      }
    },
    "ElementRangesSubGroup": {
      "description": "A sub-group of ranges",
      "type": "object",
      "properties": {
        "menstrualPhase": {
          "description": "Menstrual phase",
          "enum": [
            "Unknown",
            "Follicular",
            "Ovulation",
            "Luteal",
            "Postmenopausal"
          ],
          "type": "string"
        },
        "optimalRangeLow": {
          "format": "double",
          "description": "Optimal range - low",
          "type": "number"
        },
        "optimalRangeHigh": {
          "format": "double",
          "description": "Optimal range - high",
          "type": "number"
        },
        "standardRangeLow": {
          "format": "double",
          "description": "Standard range - low",
          "type": "number"
        },
        "standardRangeHigh": {
          "format": "double",
          "description": "Standard range - high",
          "type": "number"
        },
        "alarmRangeLow": {
          "format": "double",
          "description": "Alarm range - low",
          "type": "number"
        },
        "alarmRangeHigh": {
          "format": "double",
          "description": "Alarm range - high",
          "type": "number"
        }
      }
    },
    "ElementGroup": {
      "description": "Biomarker group",
      "type": "object",
      "properties": {
        "elementGroupId": {
          "format": "int32",
          "description": "Biomarker group ID",
          "type": "integer"
        },
        "name": {
          "description": "Group name",
          "type": "string"
        },
        "elementIds": {
          "description": "Biomarkers that are part of this group.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "Country": {
      "description": "Country information",
      "type": "object",
      "properties": {
        "code": {
          "description": "Country 2 letter code",
          "type": "string"
        },
        "name": {
          "description": "Country english name",
          "type": "string"
        }
      }
    },
    "CultureCode": {
      "description": "Culture information",
      "type": "object",
      "properties": {
        "name": {
          "description": "Culture code (xx-XX)",
          "type": "string"
        },
        "englishName": {
          "description": "English representation of this culture code.",
          "type": "string"
        }
      }
    },
    "LabProfile": {
      "description": "Lab profile",
      "type": "object",
      "properties": {
        "labProfileId": {
          "format": "int32",
          "description": "Lab profile ID",
          "type": "integer"
        },
        "name": {
          "description": "Profile name",
          "type": "string"
        },
        "description": {
          "description": "Profile description",
          "type": "string"
        },
        "biomarkers": {
          "description": "Biomarkers used in this profile",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Lab": {
      "description": "Lab information",
      "type": "object",
      "properties": {
        "labId": {
          "format": "int32",
          "description": "Lab ID",
          "type": "integer"
        },
        "name": {
          "description": "Lab name",
          "type": "string"
        }
      }
    },
    "Package": {
      "description": "ODX Package",
      "type": "object",
      "properties": {
        "practiceId": {
          "format": "int32",
          "description": "Package ID",
          "type": "integer"
        },
        "name": {
          "description": "Name",
          "type": "string"
        },
        "description": {
          "description": "Description",
          "type": "string"
        },
        "packageType": {
          "description": "Defines the purpose of this package",
          "enum": [
            "AddOn",
            "Membership"
          ],
          "type": "string"
        }
      }
    },
    "Patient": {
      "description": "Patient",
      "required": [
        "firstName",
        "lastName",
        "dateOfBirth",
        "gender"
      ],
      "type": "object",
      "properties": {
        "patientId": {
          "format": "int32",
          "description": "Patient Id",
          "type": "integer"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Last updated date",
          "type": "string"
        },
        "userTitle": {
          "description": "User (practitioner) title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "userFirstName": {
          "description": "User (practitioner) first name",
          "type": "string"
        },
        "userLastName": {
          "description": "User (practitioner) last name",
          "type": "string"
        },
        "patientPartners": {
          "description": "Patient association with OptimalDX partners",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PatientPartner"
          }
        },
        "firstName": {
          "description": "First name (REQUIRED)",
          "type": "string"
        },
        "lastName": {
          "description": "Last name (REQUIRED)",
          "type": "string"
        },
        "nickname": {
          "description": "Nickname (OBSOLETE)",
          "type": "string"
        },
        "dateOfBirth": {
          "format": "date-time",
          "description": "Date of birth (REQUIRED)",
          "type": "string"
        },
        "gender": {
          "description": "Gender (REQUIRED)",
          "enum": [
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "homePhone": {
          "description": "Home phone (OBSOLETE)",
          "type": "string"
        },
        "workPhone": {
          "description": "Work phone (OBSOLETE)",
          "type": "string"
        },
        "mobile": {
          "description": "Mobile phone (OBSOLETE)",
          "type": "string"
        },
        "email": {
          "description": "Email",
          "type": "string"
        },
        "address": {
          "description": "Address (OBSOLETE)",
          "type": "string"
        },
        "address2": {
          "description": "Address 2 (OBSOLETE)",
          "type": "string"
        },
        "address3": {
          "description": "Address 3 (OBSOLETE)",
          "type": "string"
        },
        "city": {
          "description": "City (OBSOLETE)",
          "type": "string"
        },
        "province": {
          "description": "Province (OBSOLETE)",
          "type": "string"
        },
        "postalCode": {
          "description": "Postal code (OBSOLETE)",
          "type": "string"
        },
        "country": {
          "description": "Country name  (OBSOLETE)",
          "type": "string"
        },
        "userId": {
          "format": "uuid",
          "description": "User (practitioner) Id. If not provided, will default to the first administrator user available\r\nIf provided and pPractice.isWorkspacesEnabled == true, the user must have access to the workspace specified in workspaceId",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "workspaceId": {
          "format": "int32",
          "description": "Workspace this patient is associated with. If practice.isWorkspacesEnabled == false, the value will be automatically set to 0 (zero).",
          "type": "integer"
        }
      }
    },
    "PatientPartner": {
      "description": "Patient association with a partner",
      "type": "object",
      "properties": {
        "partnerId": {
          "format": "int32",
          "description": "Partner ID",
          "type": "integer"
        },
        "partnerName": {
          "description": "Partner name",
          "type": "string"
        },
        "externalPatientId": {
          "description": "Patient ID provided by the partner.",
          "type": "string"
        }
      }
    },
    "PatientUpdateRequest": {
      "description": "Patient",
      "required": [
        "firstName",
        "lastName",
        "dateOfBirth",
        "gender"
      ],
      "type": "object",
      "properties": {
        "firstName": {
          "description": "First name (REQUIRED)",
          "type": "string"
        },
        "lastName": {
          "description": "Last name (REQUIRED)",
          "type": "string"
        },
        "nickname": {
          "description": "Nickname (OBSOLETE)",
          "type": "string"
        },
        "dateOfBirth": {
          "format": "date-time",
          "description": "Date of birth (REQUIRED)",
          "type": "string"
        },
        "gender": {
          "description": "Gender (REQUIRED)",
          "enum": [
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "homePhone": {
          "description": "Home phone (OBSOLETE)",
          "type": "string"
        },
        "workPhone": {
          "description": "Work phone (OBSOLETE)",
          "type": "string"
        },
        "mobile": {
          "description": "Mobile phone (OBSOLETE)",
          "type": "string"
        },
        "email": {
          "description": "Email",
          "type": "string"
        },
        "address": {
          "description": "Address (OBSOLETE)",
          "type": "string"
        },
        "address2": {
          "description": "Address 2 (OBSOLETE)",
          "type": "string"
        },
        "address3": {
          "description": "Address 3 (OBSOLETE)",
          "type": "string"
        },
        "city": {
          "description": "City (OBSOLETE)",
          "type": "string"
        },
        "province": {
          "description": "Province (OBSOLETE)",
          "type": "string"
        },
        "postalCode": {
          "description": "Postal code (OBSOLETE)",
          "type": "string"
        },
        "country": {
          "description": "Country name  (OBSOLETE)",
          "type": "string"
        },
        "userId": {
          "format": "uuid",
          "description": "User (practitioner) Id. If not provided, will default to the first administrator user available\r\nIf provided and pPractice.isWorkspacesEnabled == true, the user must have access to the workspace specified in workspaceId",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "workspaceId": {
          "format": "int32",
          "description": "Workspace this patient is associated with. If practice.isWorkspacesEnabled == false, the value will be automatically set to 0 (zero).",
          "type": "integer"
        }
      }
    },
    "PatientNote": {
      "description": "Patient note",
      "type": "object",
      "properties": {
        "patientNoteId": {
          "format": "int32",
          "description": "Record ID",
          "type": "integer"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient ID",
          "type": "integer"
        },
        "patientNoteType": {
          "description": "Note type",
          "enum": [
            "Default",
            "Private"
          ],
          "type": "string"
        },
        "note": {
          "description": "Note",
          "type": "string"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Last updated date",
          "type": "string"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "userId": {
          "format": "uuid",
          "description": "User ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "PatientNoteNewRequest": {
      "description": "New note request",
      "type": "object",
      "properties": {
        "patientNoteType": {
          "description": "Note type",
          "enum": [
            "Default",
            "Private"
          ],
          "type": "string"
        },
        "userId": {
          "format": "uuid",
          "description": "User Id (optional). If not provided, the UserId associated with the patient will be used.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "note": {
          "description": "Notes",
          "type": "string"
        }
      }
    },
    "PatientNoteUpdateRequest": {
      "description": "Note update request",
      "type": "object",
      "properties": {
        "note": {
          "description": "Notes",
          "type": "string"
        }
      }
    },
    "PatientTest": {
      "description": "Patient test",
      "type": "object",
      "properties": {
        "patientTestId": {
          "format": "int32",
          "description": "Patient test Id",
          "type": "integer"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient Id",
          "type": "integer"
        },
        "labProfileId": {
          "format": "int32",
          "description": "Lab profile Id",
          "type": "integer"
        },
        "testDate": {
          "format": "date-time",
          "description": "Test date",
          "type": "string"
        },
        "unitType": {
          "description": "Unit type",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Last updated date",
          "type": "string"
        },
        "userId": {
          "format": "uuid",
          "description": "User ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "labId": {
          "format": "int32",
          "description": "Lab Id",
          "type": "integer"
        },
        "externalReference": {
          "description": "External reference (maximum of 100 characters)",
          "type": "string"
        },
        "externalMessageControlId": {
          "description": "External message control ID (maximum of 100 characters)",
          "type": "string"
        },
        "externalPatientTestId": {
          "description": "External patient test ID (maximum of 100 characters)",
          "type": "string"
        },
        "results": {
          "description": "Results",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PatientTestResult"
          }
        },
        "importLogs": {
          "description": "Import logs (returned only after importing a new test)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ElementImportLog"
          }
        },
        "menstrualPhase": {
          "description": "Menstrual phase",
          "enum": [
            "Unknown",
            "Follicular",
            "Ovulation",
            "Luteal",
            "Postmenopausal"
          ],
          "type": "string"
        },
        "isFasting": {
          "description": "Was patient fasting when test was collected?",
          "type": "boolean"
        }
      }
    },
    "PatientTestResult": {
      "description": "Patient test result",
      "type": "object",
      "properties": {
        "elementValue": {
          "format": "double",
          "description": "Value",
          "type": "number"
        },
        "comparison": {
          "description": "Comparison (how to interpret the value)",
          "enum": [
            "EqualsTo",
            "MoreThan",
            "LessThan"
          ],
          "type": "string"
        },
        "unit": {
          "description": "Unit description",
          "type": "string"
        },
        "elementId": {
          "format": "int32",
          "description": "Element ID",
          "type": "integer"
        },
        "elementName": {
          "description": "Element name",
          "type": "string"
        },
        "optimalRangeLow": {
          "format": "double",
          "description": "Optimal range low",
          "type": "number"
        },
        "optimalRangeHigh": {
          "format": "double",
          "description": "Optimal range high",
          "type": "number"
        },
        "standardRangeLow": {
          "format": "double",
          "description": "Standard range low",
          "type": "number"
        },
        "standardRangeHigh": {
          "format": "double",
          "description": "Standard range high",
          "type": "number"
        }
      }
    },
    "ElementImportLog": {
      "description": "Test element import log",
      "type": "object",
      "properties": {
        "observationIdentifier": {
          "description": "HL7 observation identifier",
          "type": "string"
        },
        "observationIdentifierText": {
          "description": "HL7 observation identifier text",
          "type": "string"
        },
        "status": {
          "description": "Status",
          "enum": [
            "Saved",
            "Duplicate",
            "CannotParse",
            "Ignored"
          ],
          "type": "string"
        }
      }
    },
    "PatientTestUpdateRequest": {
      "description": "Patient test",
      "required": [
        "labProfileId",
        "unitType",
        "hl7"
      ],
      "type": "object",
      "properties": {
        "labProfileId": {
          "format": "int32",
          "description": "Lab Profile Id (REQUIRED - use api/v1/practice/{id}/labprofiles to get a list of existing profiles)",
          "type": "integer"
        },
        "labId": {
          "format": "int32",
          "description": "Lab Id (ATTENTION - if not set, the partner's DefaultLabId information will be used)",
          "type": "integer"
        },
        "testDate": {
          "format": "date-time",
          "description": "Test date. If not set, the value from the HL7 file will be used.",
          "type": "string"
        },
        "unitType": {
          "description": "Unit type (REQUIRED)",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "userId": {
          "format": "uuid",
          "description": "User (practitioner) Id. If not provided, will default to the first administrator user available",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "externalReference": {
          "description": "External reference (maximum of 100 characters).",
          "type": "string"
        },
        "externalMessageControlId": {
          "description": "External message control ID (maximum of 100 characters). If not set, the value from the HL7 file will be used.",
          "type": "string"
        },
        "externalPatientTestId": {
          "description": "External patient test ID (maximum of 100 characters). If not set, the value from the HL7 file will be used.",
          "type": "string"
        },
        "hl7": {
          "description": "HL7 (REQUIRED)",
          "type": "string"
        },
        "menstrualPhase": {
          "description": "Menstrual phase",
          "enum": [
            "Unknown",
            "Follicular",
            "Ovulation",
            "Luteal",
            "Postmenopausal"
          ],
          "type": "string"
        },
        "isFasting": {
          "description": "Was patient fasting when test was collected? If not set, the value from the HL7 file will be used.",
          "type": "boolean"
        }
      }
    },
    "PatientTestNote": {
      "description": "Notes added to test record, that can be rendered in the Functional Health Report.",
      "type": "object",
      "properties": {
        "patientTestNoteId": {
          "format": "int32",
          "description": "Record ID.",
          "type": "integer"
        },
        "patientTestId": {
          "format": "int32",
          "description": "Patient test ID.",
          "type": "integer"
        },
        "referenceId": {
          "format": "int32",
          "description": "If PatientTestNoteType == Summary, then it's the patient test ID.\r\nIf PatientTestNoteType == ElementGroup, then it's the element group ID.",
          "type": "integer"
        },
        "noteType": {
          "description": "Type of the note associated with a patient test.",
          "enum": [
            "Summary",
            "ElementGroup"
          ],
          "type": "string"
        },
        "note": {
          "description": "Notes",
          "type": "string"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Last updated date",
          "type": "string"
        }
      }
    },
    "PatientTestNoteNewRequest": {
      "description": "Request to add an existing note.",
      "type": "object",
      "properties": {
        "referenceId": {
          "format": "int32",
          "description": "If PatientTestNoteType == Summary, then it's the patient test ID.\r\nIf PatientTestNoteType == ElementGroup, then it's the element group ID.",
          "type": "integer"
        },
        "noteType": {
          "description": "Type of the note associated with a patient test.",
          "enum": [
            "Summary",
            "ElementGroup"
          ],
          "type": "string"
        },
        "note": {
          "description": "Notes",
          "type": "string"
        }
      }
    },
    "PatientTestNoteUpdateRequest": {
      "description": "Request to update an existing note.",
      "type": "object",
      "properties": {
        "note": {
          "description": "Notes",
          "type": "string"
        }
      }
    },
    "PdfUploadResponse": {
      "description": "Response for the PDF upload endpoint.",
      "type": "object",
      "properties": {
        "patientTestPdfImportId": {
          "format": "int32",
          "description": "Record ID.",
          "type": "integer"
        },
        "uploadedDate": {
          "format": "date-time",
          "description": "When the PDF was uploaded.",
          "type": "string"
        },
        "uploadMode": {
          "description": "How the PDF was uploaded.",
          "enum": [
            "UploadAndParse",
            "StandaloneUpload"
          ],
          "type": "string"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "status": {
          "description": "Process status",
          "enum": [
            "InProgress",
            "Archived",
            "New",
            "Deleted",
            "Imported"
          ],
          "type": "string"
        },
        "patientTestId": {
          "format": "int32",
          "description": "Patient Test Id - null if the PDF hasn't been imported.",
          "type": "integer"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient Id - null if not provided during the upload, and PDF hasn't been imported.",
          "type": "integer"
        },
        "firstName": {
          "description": "Patient's first name provided during updload.",
          "type": "string"
        },
        "lastName": {
          "description": "Patient's last name provided during updload.",
          "type": "string"
        },
        "gender": {
          "description": "Patient's gender provided during updload.",
          "enum": [
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "dateOfBirth": {
          "format": "date-time",
          "description": "Patient's date of birth provided during updload.",
          "type": "string"
        },
        "email": {
          "description": "Patient's email provided during updload.",
          "type": "string"
        },
        "internalComments": {
          "description": "Comments added by the system.",
          "type": "string"
        }
      }
    },
    "Practice": {
      "description": "Practice",
      "required": [
        "practiceName",
        "primaryContactFirstName",
        "primaryContactLastName",
        "primaryContactEmail"
      ],
      "type": "object",
      "properties": {
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "timeZoneDisplayName": {
          "description": "Timezone display name",
          "type": "string",
          "readOnly": true
        },
        "timeZoneUtcOffset": {
          "format": "int32",
          "description": "Timezone UTC offset (hours)",
          "type": "integer",
          "readOnly": true
        },
        "createdDate": {
          "format": "date-time",
          "description": "Record created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Record last updated date",
          "type": "string"
        },
        "freeTrialEndDate": {
          "format": "date-time",
          "description": "Free trial end date",
          "type": "string"
        },
        "packages": {
          "description": "Packages associated with this practice.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Package"
          }
        },
        "partnerAccessLevel": {
          "description": "Access level the partner has regarding practice information. If \"Full\" is requested, the partner will be able\r\nto register and manage practice information, like users and patients. If this information is not provided,\r\nit will default to \"Limited\". ATTENTION: to request full access, the partner will have to have a specific role \r\nconfigured. If you don't know whether you have this role or not, please reach out to our support team.",
          "enum": [
            "Limited",
            "Full"
          ],
          "type": "string"
        },
        "isPracticeAccessEnabled": {
          "description": "If set to false, it means that the practice will not have access to the ODX platform.\r\nOnly the partner will be able to access and change information. ATTENTION: this MUST be set\r\nto true if PartnerAccessLevel == Limited.",
          "type": "boolean"
        },
        "testsRunInCurrentBillingPeriod": {
          "format": "int32",
          "description": "Tests run in current billing period. IMPORTANT: information NOT returned when listing all practices.",
          "type": "integer"
        },
        "remainingTestsForCurrentBillingPeriod": {
          "format": "int32",
          "description": "Remaining tests for the current billing period. IMPORTANT: information NOT returned when listing all practices.",
          "type": "integer"
        },
        "defaultLabId": {
          "format": "int32",
          "description": "Default Lab Id (OBSOLETE).",
          "type": "integer"
        },
        "defaultLabsEnabled": {
          "description": "Default Labs (not used for restricting which LabId's a Partner can use when sending through a patient test).",
          "type": "string"
        },
        "cultureCodesEnabled": {
          "description": "Culture codes available for this practice, for example, when generating a report.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isWorkspacesEnabled": {
          "description": "Indicates if this practice is able to use workspaces.",
          "type": "boolean"
        },
        "recipients": {
          "description": "Report recipients this practice has access to.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Recipient"
          }
        },
        "practiceName": {
          "description": "Practice name (REQUIRED)",
          "type": "string"
        },
        "primaryContactTitle": {
          "description": "Primary contact title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "primaryContactFirstName": {
          "description": "Primary contact first name (REQUIRED)",
          "type": "string"
        },
        "primaryContactLastName": {
          "description": "Primary contact last name (REQUIRED)",
          "type": "string"
        },
        "primaryContactEmail": {
          "description": "Primary contact e-mail (REQUIRED)",
          "type": "string"
        },
        "primaryContactPhone": {
          "description": "Primary contact phone",
          "type": "string"
        },
        "website": {
          "description": "Website",
          "type": "string"
        },
        "disciplineType": {
          "description": "Discipline type",
          "enum": [
            "Naturopathy",
            "FunctionalMedicine",
            "GeneralPractitice",
            "Chiropractic",
            "Acupuncture",
            "NutritionalTherapy",
            "Other"
          ],
          "type": "string"
        },
        "billingAddress": {
          "description": "Billing address",
          "type": "string"
        },
        "billingAddress2": {
          "description": "Billing address 2",
          "type": "string"
        },
        "billingAddress3": {
          "description": "Billing address 3 (OBSOLETE)",
          "type": "string"
        },
        "billingCity": {
          "description": "Billing city",
          "type": "string"
        },
        "billingProvince": {
          "description": "Billing province",
          "type": "string"
        },
        "billingPostalCode": {
          "description": "Billing postal code",
          "type": "string"
        },
        "billingCountry": {
          "description": "Billing country name (use api/v1/countries to get a list of valid countries)",
          "type": "string"
        },
        "timeZoneId": {
          "description": "Timezone Id (use api/v1/timezones to get a list of valid timezones)",
          "type": "string"
        },
        "defaultCultureCode": {
          "description": "Default culture code (use api/v1/culturecodes to get a list of valid codes)",
          "type": "string"
        },
        "defaultUnitType": {
          "description": "Default unit type",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "setupComment": {
          "description": "Any text information about the practice. This information will not be used by the system.",
          "type": "string"
        }
      }
    },
    "Recipient": {
      "description": "Target audience for a report.",
      "type": "object",
      "properties": {
        "recipientId": {
          "format": "int32",
          "description": "Record ID",
          "type": "integer"
        },
        "name": {
          "description": "Name",
          "type": "string"
        }
      }
    },
    "PracticePartner": {
      "description": "Practice partner information",
      "type": "object",
      "properties": {
        "practicePartnerId": {
          "format": "int32",
          "description": "Reference that links the partner to the practice",
          "type": "integer"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "partnerId": {
          "format": "int32",
          "description": "Partner Id",
          "type": "integer"
        },
        "partnerName": {
          "description": "Partner name",
          "type": "string"
        },
        "hl7ReceivingFacilityNamespaceId": {
          "description": "HL7 receiving facility namespace ID",
          "type": "string"
        },
        "partnerAccessLevel": {
          "description": "Access level the partner has over practice information.",
          "enum": [
            "Limited",
            "Full"
          ],
          "type": "string"
        },
        "practiceName": {
          "description": "Practice name",
          "type": "string"
        },
        "primaryContactTitle": {
          "description": "Primary contact title",
          "type": "string"
        },
        "primaryContactFirstName": {
          "description": "Primary contact first name",
          "type": "string"
        },
        "primaryContactLastName": {
          "description": "Primary contact last name",
          "type": "string"
        },
        "primaryContactEmail": {
          "description": "Primary contact e-mail",
          "type": "string"
        },
        "primaryContactPhone": {
          "description": "Primary contact phone",
          "type": "string"
        },
        "practicePartnerStatus": {
          "description": "Activation webhook status",
          "enum": [
            "Active",
            "Failed"
          ],
          "type": "string"
        }
      }
    },
    "PracticePartnerUpdateRequest": {
      "description": "Practice partner information",
      "required": [
        "hl7ReceivingFacilityNamespaceId"
      ],
      "type": "object",
      "properties": {
        "hl7ReceivingFacilityNamespaceId": {
          "description": "HL7 receiving facility namespace ID (REQUIRED)",
          "type": "string"
        }
      }
    },
    "PracticeUpdateRequest": {
      "description": "Practice",
      "required": [
        "practiceName",
        "primaryContactFirstName",
        "primaryContactLastName",
        "primaryContactEmail"
      ],
      "type": "object",
      "properties": {
        "practiceName": {
          "description": "Practice name (REQUIRED)",
          "type": "string"
        },
        "primaryContactTitle": {
          "description": "Primary contact title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "primaryContactFirstName": {
          "description": "Primary contact first name (REQUIRED)",
          "type": "string"
        },
        "primaryContactLastName": {
          "description": "Primary contact last name (REQUIRED)",
          "type": "string"
        },
        "primaryContactEmail": {
          "description": "Primary contact e-mail (REQUIRED)",
          "type": "string"
        },
        "primaryContactPhone": {
          "description": "Primary contact phone",
          "type": "string"
        },
        "website": {
          "description": "Website",
          "type": "string"
        },
        "disciplineType": {
          "description": "Discipline type",
          "enum": [
            "Naturopathy",
            "FunctionalMedicine",
            "GeneralPractitice",
            "Chiropractic",
            "Acupuncture",
            "NutritionalTherapy",
            "Other"
          ],
          "type": "string"
        },
        "billingAddress": {
          "description": "Billing address",
          "type": "string"
        },
        "billingAddress2": {
          "description": "Billing address 2",
          "type": "string"
        },
        "billingAddress3": {
          "description": "Billing address 3 (OBSOLETE)",
          "type": "string"
        },
        "billingCity": {
          "description": "Billing city",
          "type": "string"
        },
        "billingProvince": {
          "description": "Billing province",
          "type": "string"
        },
        "billingPostalCode": {
          "description": "Billing postal code",
          "type": "string"
        },
        "billingCountry": {
          "description": "Billing country name (use api/v1/countries to get a list of valid countries)",
          "type": "string"
        },
        "timeZoneId": {
          "description": "Timezone Id (use api/v1/timezones to get a list of valid timezones)",
          "type": "string"
        },
        "defaultCultureCode": {
          "description": "Default culture code (use api/v1/culturecodes to get a list of valid codes)",
          "type": "string"
        },
        "defaultUnitType": {
          "description": "Default unit type",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "setupComment": {
          "description": "Any text information about the practice. This information will not be used by the system.",
          "type": "string"
        }
      }
    },
    "PracticeNewRequest": {
      "description": "Practice",
      "required": [
        "membershipPackageId",
        "hl7ReceivingFacilityNamespaceId",
        "practiceName",
        "primaryContactFirstName",
        "primaryContactLastName",
        "primaryContactEmail"
      ],
      "type": "object",
      "properties": {
        "membershipPackageId": {
          "format": "int32",
          "description": "Membership package (REQUIRED) - (use api/v1/partner/packages to get a list of valid packages)",
          "type": "integer"
        },
        "additionalPackages": {
          "description": "Additional packages - (use api/v1/partner/packages to get a list of valid packages)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AdditionalPackageRequest"
          }
        },
        "silentSignUp": {
          "description": "If false, an e-mail will be sent to the PrimaryContactEmail regarding the account creation.\r\nOtherwise no notification will be sent. ATTENTION: if SilentSignUp == false and\r\nIsPracticeAccessEnabled == false, the practitioner will receive a notification, but \r\nwill not be able to access the ODX website.",
          "type": "boolean"
        },
        "partnerAccessLevel": {
          "description": "Access level the partner has regarding practice information. If \"Full\" is requested, the partner will be able\r\nto register and manage practice information, like users and patients. If this information is not provided,\r\nit will default to \"Limited\". ATTENTION: to request full access, the partner will have to have a specific role \r\nconfigured. If you don't know whether you have this role or not, please reach out to our support team.",
          "enum": [
            "Limited",
            "Full"
          ],
          "type": "string"
        },
        "isPracticeAccessEnabled": {
          "description": "If set to false, the practice will not have access to the ODX platform.\r\nOnly the partner will be able to access and change information. ATTENTION: this MUST be set\r\nto true if PartnerAccessLevel == Limited.",
          "type": "boolean"
        },
        "hl7ReceivingFacilityNamespaceId": {
          "description": "HL7 receiving facility namespace ID (REQUIRED)",
          "type": "string"
        },
        "practiceName": {
          "description": "Practice name (REQUIRED)",
          "type": "string"
        },
        "primaryContactTitle": {
          "description": "Primary contact title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "primaryContactFirstName": {
          "description": "Primary contact first name (REQUIRED)",
          "type": "string"
        },
        "primaryContactLastName": {
          "description": "Primary contact last name (REQUIRED)",
          "type": "string"
        },
        "primaryContactEmail": {
          "description": "Primary contact e-mail (REQUIRED)",
          "type": "string"
        },
        "primaryContactPhone": {
          "description": "Primary contact phone",
          "type": "string"
        },
        "website": {
          "description": "Website",
          "type": "string"
        },
        "disciplineType": {
          "description": "Discipline type",
          "enum": [
            "Naturopathy",
            "FunctionalMedicine",
            "GeneralPractitice",
            "Chiropractic",
            "Acupuncture",
            "NutritionalTherapy",
            "Other"
          ],
          "type": "string"
        },
        "billingAddress": {
          "description": "Billing address",
          "type": "string"
        },
        "billingAddress2": {
          "description": "Billing address 2",
          "type": "string"
        },
        "billingAddress3": {
          "description": "Billing address 3 (OBSOLETE)",
          "type": "string"
        },
        "billingCity": {
          "description": "Billing city",
          "type": "string"
        },
        "billingProvince": {
          "description": "Billing province",
          "type": "string"
        },
        "billingPostalCode": {
          "description": "Billing postal code",
          "type": "string"
        },
        "billingCountry": {
          "description": "Billing country name (use api/v1/countries to get a list of valid countries)",
          "type": "string"
        },
        "timeZoneId": {
          "description": "Timezone Id (use api/v1/timezones to get a list of valid timezones)",
          "type": "string"
        },
        "defaultCultureCode": {
          "description": "Default culture code (use api/v1/culturecodes to get a list of valid codes)",
          "type": "string"
        },
        "defaultUnitType": {
          "description": "Default unit type",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "setupComment": {
          "description": "Any text information about the practice. This information will not be used by the system.",
          "type": "string"
        }
      }
    },
    "AdditionalPackageRequest": {
      "description": "Request to add a package to a new or existing practice account.",
      "type": "object",
      "properties": {
        "packageId": {
          "format": "int32",
          "description": "Package ID",
          "type": "integer"
        },
        "quantity": {
          "format": "int32",
          "description": "Quantity (defaults to 1)",
          "type": "integer"
        }
      }
    },
    "AvailableReport": {
      "description": "Available report",
      "type": "object",
      "properties": {
        "reportId": {
          "format": "int32",
          "description": "Report ID",
          "type": "integer"
        },
        "reportType": {
          "description": "Report type",
          "enum": [
            "TitlePage",
            "Standard",
            "TableOfContents",
            "SectionDivider",
            "StandardWithSubMenu"
          ],
          "type": "string"
        },
        "name": {
          "description": "Report name",
          "type": "string"
        },
        "summary": {
          "description": "Summary",
          "type": "string"
        },
        "outputTypes": {
          "description": "Available output types",
          "type": "array",
          "items": {
            "enum": [
              "Pdf",
              "Html",
              "Json"
            ],
            "type": "string"
          }
        },
        "sectionReportId": {
          "format": "int32",
          "description": "Section report ID",
          "type": "integer"
        },
        "sectionSortOrder": {
          "format": "int32",
          "description": "Section sort order",
          "type": "integer"
        },
        "allowedRecipientTypes": {
          "description": "Recipient types that can be used with this report (OBSOLETE: use AllowedRecipients)",
          "type": "array",
          "items": {
            "enum": [
              "Practitioner",
              "Patient",
              "Basic"
            ],
            "type": "string"
          }
        },
        "allowedRecipients": {
          "description": "Recipients that can be used with this report",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Recipient"
          }
        }
      }
    },
    "FunctionalHealthReportRequest": {
      "description": "Request to generate a report",
      "required": [
        "patientTestId",
        "unitType",
        "practiceId",
        "patientId",
        "outputType",
        "recipientId",
        "reports"
      ],
      "type": "object",
      "properties": {
        "patientTestId": {
          "format": "int32",
          "description": "Patient test ID",
          "type": "integer"
        },
        "unitType": {
          "description": "Unit type",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "includeThumbsUpDownInBloodTestComparative": {
          "description": "Choose if you'd like to display the thumbs up/down icons in the Blood Test Comparative report. Default value is \"true\".\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "includePercentagesInConditionCharts": {
          "description": "Choose if you'd like to display the numeric percentage in the assessment charts. Default value is \"true\".\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "includeBiomarkerGroupIntroText": {
          "description": "Choose to include the introductory paragraph for biomarker groups in the Blood Test Results report.\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient ID",
          "type": "integer"
        },
        "outputType": {
          "description": "Output type",
          "enum": [
            "Pdf",
            "Html",
            "Json"
          ],
          "type": "string"
        },
        "theme": {
          "description": "Theme (OBSOLETE: use the ThemeId instead)",
          "enum": [
            "ChromaticBlue",
            "TrafficLight"
          ],
          "type": "string"
        },
        "themeId": {
          "format": "int32",
          "description": "Theme ID (get the ID from v1/themes/reports/{practiceId}). Ignored if OutputType == Json",
          "type": "integer"
        },
        "recipient": {
          "description": "Recipient (OBSOLETE: use RecipientId)",
          "enum": [
            "Practitioner",
            "Patient",
            "Basic"
          ],
          "type": "string"
        },
        "recipientId": {
          "format": "int32",
          "description": "Recipient Id",
          "type": "integer"
        },
        "cultureCode": {
          "description": "Culture code (valid values can be found in the practice.cultureCodesEnabled field)",
          "type": "string"
        },
        "reports": {
          "description": "Reports to use. Title page will only be applied to PDF output.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        },
        "addMarginForBinding": {
          "description": "Optionally, include a wider blank space on the left-hand margin of the PDF. This is helpful, if you intend to print the PDF, then bind it into a booklet.\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "userId": {
          "format": "uuid",
          "description": "Optionally, include the ID of the practitioner user who's requesting the report. If this information is not provided, the practitioner associated with the patient will be used.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "HealthImprovementPlanReportRequest": {
      "description": "Request to generate a report",
      "required": [
        "treatmentId",
        "practiceId",
        "patientId",
        "outputType",
        "recipientId",
        "reports"
      ],
      "type": "object",
      "properties": {
        "treatmentId": {
          "format": "int32",
          "description": "Treatment plan ID",
          "type": "integer"
        },
        "includePercentagesInConditionCharts": {
          "description": "Choose if you'd like to display the numeric percentage in the assessment charts. Default value is \"true\".\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient ID",
          "type": "integer"
        },
        "outputType": {
          "description": "Output type",
          "enum": [
            "Pdf",
            "Html",
            "Json"
          ],
          "type": "string"
        },
        "theme": {
          "description": "Theme (OBSOLETE: use the ThemeId instead)",
          "enum": [
            "ChromaticBlue",
            "TrafficLight"
          ],
          "type": "string"
        },
        "themeId": {
          "format": "int32",
          "description": "Theme ID (get the ID from v1/themes/reports/{practiceId}). Ignored if OutputType == Json",
          "type": "integer"
        },
        "recipient": {
          "description": "Recipient (OBSOLETE: use RecipientId)",
          "enum": [
            "Practitioner",
            "Patient",
            "Basic"
          ],
          "type": "string"
        },
        "recipientId": {
          "format": "int32",
          "description": "Recipient Id",
          "type": "integer"
        },
        "cultureCode": {
          "description": "Culture code (valid values can be found in the practice.cultureCodesEnabled field)",
          "type": "string"
        },
        "reports": {
          "description": "Reports to use. Title page will only be applied to PDF output.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        },
        "addMarginForBinding": {
          "description": "Optionally, include a wider blank space on the left-hand margin of the PDF. This is helpful, if you intend to print the PDF, then bind it into a booklet.\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "userId": {
          "format": "uuid",
          "description": "Optionally, include the ID of the practitioner user who's requesting the report. If this information is not provided, the practitioner associated with the patient will be used.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "AdvancedReportsTestRequest": {
      "description": "Advanced reports test request.",
      "required": [
        "reports"
      ],
      "type": "object",
      "properties": {
        "reports": {
          "description": "Reports to use.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "AdvancedReportResponse": {
      "description": "Advanced reports response",
      "type": "object",
      "properties": {
        "reports": {
          "description": "Reports returned",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AdvancedReport"
          }
        }
      }
    },
    "AdvancedReport": {
      "description": "Advanced report",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name",
          "type": "string"
        },
        "success": {
          "description": "Indicates if the report was successfully generated",
          "type": "boolean"
        },
        "message": {
          "description": "Message in case success == false",
          "type": "string"
        },
        "data": {
          "description": "Report data. As the format is report-specific, use the v1/reports/AdvancedReports/test endpoint to check the different formats returned.",
          "type": "object"
        }
      }
    },
    "AdvancedReportsRequest": {
      "description": "Request to generate a report",
      "required": [
        "patientTestId",
        "unitType",
        "practiceId",
        "patientId",
        "outputType",
        "recipientId",
        "reports"
      ],
      "type": "object",
      "properties": {
        "patientTestId": {
          "format": "int32",
          "description": "Patient test ID",
          "type": "integer"
        },
        "unitType": {
          "description": "Unit type (information not used by all reports)",
          "enum": [
            "ConventionalUS",
            "StandardInternational"
          ],
          "type": "string"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient ID",
          "type": "integer"
        },
        "outputType": {
          "description": "Output type",
          "enum": [
            "Pdf",
            "Html",
            "Json"
          ],
          "type": "string"
        },
        "theme": {
          "description": "Theme (OBSOLETE: use the ThemeId instead)",
          "enum": [
            "ChromaticBlue",
            "TrafficLight"
          ],
          "type": "string"
        },
        "themeId": {
          "format": "int32",
          "description": "Theme ID (get the ID from v1/themes/reports/{practiceId}). Ignored if OutputType == Json",
          "type": "integer"
        },
        "recipient": {
          "description": "Recipient (OBSOLETE: use RecipientId)",
          "enum": [
            "Practitioner",
            "Patient",
            "Basic"
          ],
          "type": "string"
        },
        "recipientId": {
          "format": "int32",
          "description": "Recipient Id",
          "type": "integer"
        },
        "cultureCode": {
          "description": "Culture code (valid values can be found in the practice.cultureCodesEnabled field)",
          "type": "string"
        },
        "reports": {
          "description": "Reports to use. Title page will only be applied to PDF output.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        },
        "addMarginForBinding": {
          "description": "Optionally, include a wider blank space on the left-hand margin of the PDF. This is helpful, if you intend to print the PDF, then bind it into a booklet.\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "userId": {
          "format": "uuid",
          "description": "Optionally, include the ID of the practitioner user who's requesting the report. If this information is not provided, the practitioner associated with the patient will be used.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "AISummaryReportRequest": {
      "description": "Request for AI Summary Report",
      "required": [
        "practiceId",
        "patientId",
        "outputType",
        "recipientId",
        "reports"
      ],
      "type": "object",
      "properties": {
        "patientTestId": {
          "format": "int32",
          "description": "Patient Test Id.",
          "type": "integer"
        },
        "regenerate": {
          "description": "Regenerate - If true, the AI Summary will be re-generated.",
          "type": "boolean"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient ID",
          "type": "integer"
        },
        "outputType": {
          "description": "Output type",
          "enum": [
            "Pdf",
            "Html",
            "Json"
          ],
          "type": "string"
        },
        "theme": {
          "description": "Theme (OBSOLETE: use the ThemeId instead)",
          "enum": [
            "ChromaticBlue",
            "TrafficLight"
          ],
          "type": "string"
        },
        "themeId": {
          "format": "int32",
          "description": "Theme ID (get the ID from v1/themes/reports/{practiceId}). Ignored if OutputType == Json",
          "type": "integer"
        },
        "recipient": {
          "description": "Recipient (OBSOLETE: use RecipientId)",
          "enum": [
            "Practitioner",
            "Patient",
            "Basic"
          ],
          "type": "string"
        },
        "recipientId": {
          "format": "int32",
          "description": "Recipient Id",
          "type": "integer"
        },
        "cultureCode": {
          "description": "Culture code (valid values can be found in the practice.cultureCodesEnabled field)",
          "type": "string"
        },
        "reports": {
          "description": "Reports to use. Title page will only be applied to PDF output.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        },
        "addMarginForBinding": {
          "description": "Optionally, include a wider blank space on the left-hand margin of the PDF. This is helpful, if you intend to print the PDF, then bind it into a booklet.\r\nIgnored if OutputType == Json",
          "type": "boolean"
        },
        "userId": {
          "format": "uuid",
          "description": "Optionally, include the ID of the practitioner user who's requesting the report. If this information is not provided, the practitioner associated with the patient will be used.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "HL7Import": {
      "description": "HL7 to be imported",
      "required": [
        "hl7"
      ],
      "type": "object",
      "properties": {
        "hl7": {
          "description": "HL7 (REQUIRED)",
          "type": "string"
        },
        "hl7ReceivingFacilityNamespaceId": {
          "description": "HL7 receiving facility namespace ID \r\n(OPTIONAL - if not specified, system will use information present in MSH-6 position)",
          "type": "string"
        },
        "labId": {
          "format": "int32",
          "description": "Lab Id (ATTENTION - if not set, the partner's DefaultLabId information will be used)",
          "type": "integer"
        },
        "menstrualPhase": {
          "description": "Menstrual phase",
          "enum": [
            "Unknown",
            "Follicular",
            "Ovulation",
            "Luteal",
            "Postmenopausal"
          ],
          "type": "string"
        }
      }
    },
    "PartnerImportResponseMessage": {
      "description": "Import return message",
      "type": "object",
      "properties": {
        "parseTimeTakenMilliseconds": {
          "format": "int64",
          "description": "Time it took for the system to parse the HL7 content",
          "type": "integer"
        },
        "message": {
          "description": "Return message",
          "type": "string"
        },
        "patientTestImportId": {
          "format": "int32",
          "description": "Patient Test Import Id",
          "type": "integer"
        },
        "labId": {
          "format": "int32",
          "description": "Lab Id",
          "type": "integer"
        },
        "MenstrualPhase": {
          "description": "Menstrual phase",
          "enum": [
            "Unknown",
            "Follicular",
            "Ovulation",
            "Luteal",
            "Postmenopausal"
          ],
          "type": "string"
        }
      }
    },
    "ReportTheme": {
      "description": "Report-specific theme.",
      "type": "object",
      "properties": {
        "themeId": {
          "format": "int32",
          "description": "Theme ID",
          "type": "integer"
        },
        "name": {
          "description": "Name",
          "type": "string"
        },
        "description": {
          "description": "Description",
          "type": "string"
        }
      }
    },
    "TimeZone": {
      "description": "TimeZone information",
      "type": "object",
      "properties": {
        "id": {
          "description": "TimeZone id",
          "type": "string"
        },
        "name": {
          "description": "TimeZone display name",
          "type": "string"
        }
      }
    },
    "Treatment": {
      "description": "Treatment plan",
      "type": "object",
      "properties": {
        "treatmentId": {
          "format": "int32",
          "description": "Record ID",
          "type": "integer"
        },
        "patientId": {
          "format": "int32",
          "description": "Patient ID",
          "type": "integer"
        },
        "customReportNotes": {
          "description": "Practitioner notes",
          "type": "string"
        },
        "treatmentDate": {
          "format": "date-time",
          "description": "Treatment date",
          "type": "string"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Last updated date",
          "type": "string"
        },
        "userId": {
          "format": "uuid",
          "description": "User that created this treatment plan",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "patientTestId": {
          "format": "int32",
          "description": "Patient blood test used in this treatment plan",
          "type": "integer"
        },
        "productSources": {
          "description": "Where products used in this treatment plan were pulled from",
          "type": "array",
          "items": {
            "enum": [
              "Global",
              "Local",
              "Remote"
            ],
            "type": "string"
          }
        },
        "focus": {
          "description": "Is the treatment focused on health concerns or products",
          "enum": [
            "HealthConcernFocused",
            "ProductFocused"
          ],
          "type": "string"
        },
        "currentStep": {
          "description": "What's the current step this treatment is in",
          "enum": [
            "ChooseSource",
            "ChoosePatient",
            "ChooseFocus",
            "ChooseConditions",
            "ChooseProductsInputType",
            "ChooseProducts",
            "Complete"
          ],
          "type": "string"
        },
        "partners": {
          "description": "Partners used in this treatment plan",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Partner"
          }
        },
        "conditions": {
          "description": "Conditions being treatment in this treatment plan",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Condition"
          }
        },
        "treatmentProducts": {
          "description": "Products used in this treatment plan",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TreatmentProduct"
          }
        }
      }
    },
    "Partner": {
      "description": "Partner information",
      "type": "object",
      "properties": {
        "partnerId": {
          "format": "int32",
          "description": "Partner ID",
          "type": "integer"
        },
        "name": {
          "description": "Name",
          "type": "string"
        }
      }
    },
    "Condition": {
      "description": "Health condition",
      "type": "object",
      "properties": {
        "conditionId": {
          "format": "int32",
          "description": "Condition ID",
          "type": "integer"
        },
        "name": {
          "description": "Name",
          "type": "string"
        }
      }
    },
    "TreatmentProduct": {
      "description": "Product used in a treatment plan",
      "type": "object",
      "properties": {
        "treatmentProductId": {
          "format": "int32",
          "description": "Record ID",
          "type": "integer"
        },
        "productId": {
          "format": "int32",
          "description": "Product ID",
          "type": "integer"
        },
        "usedName": {
          "description": "Product name used (the practitioner can sometimes change this information)",
          "type": "string"
        },
        "usedDetail": {
          "description": "Used product details (the practitioner can sometimes change this information)",
          "type": "string"
        },
        "usedDosageAndDirections": {
          "$ref": "#/definitions/UsedDosageAndDirections",
          "description": "Used dosage (the practitioner can sometimes change this information)"
        },
        "productVariantId": {
          "description": "Product variant ID, if any",
          "type": "string"
        },
        "purchasedUnits": {
          "format": "int32",
          "description": "Number of units to be purchased",
          "type": "integer"
        },
        "conditions": {
          "description": "Which conditions is this product being used for",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "UsedDosageAndDirections": {
      "description": "Dosage used in the treatment plan.",
      "type": "object",
      "properties": {
        "amount": {
          "description": "Amount",
          "type": "string"
        },
        "frequency": {
          "description": "How frequent should the product be used",
          "enum": [
            "NotSet",
            "OncePerDay",
            "TwicePerDay",
            "ThreeTimesPerDay",
            "FourTimesPerDay",
            "EveryMorning",
            "EveryNight"
          ],
          "type": "string"
        },
        "duration": {
          "description": "For how long should the product be used",
          "enum": [
            "NotSet",
            "AsNeeded",
            "UntilSymptomsResolve",
            "Ongoing",
            "For1Week",
            "For2Weeks",
            "For3Weeks",
            "For1Month",
            "For2Months",
            "For3Months",
            "For6Months"
          ],
          "type": "string"
        },
        "format": {
          "description": "In what format is a product presented",
          "type": "string"
        },
        "additional_info": {
          "description": "Additional information added by the practitioner",
          "type": "string"
        },
        "description": {
          "description": "Text description of the used dosage",
          "type": "string"
        }
      }
    },
    "User": {
      "description": "User information",
      "required": [
        "firstName",
        "lastName",
        "email"
      ],
      "type": "object",
      "properties": {
        "userId": {
          "format": "uuid",
          "description": "User Id",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        },
        "userName": {
          "description": "User name used to login",
          "type": "string"
        },
        "isEnabled": {
          "description": "Indicates if the user is enabled.",
          "type": "boolean"
        },
        "isAdministrator": {
          "description": "Indicates if the user is the account administrator. This user cannot be deleted or disabled via the API.",
          "type": "boolean"
        },
        "timeZoneDisplayName": {
          "description": "Timezone display name",
          "type": "string",
          "readOnly": true
        },
        "timeZoneUtcOffset": {
          "format": "int32",
          "description": "Timezone UTC offset (hours)",
          "type": "integer",
          "readOnly": true
        },
        "reportsRun": {
          "format": "int32",
          "description": "How many reports were run.",
          "type": "integer"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Created date",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Last updated date",
          "type": "string"
        },
        "title": {
          "description": "Title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "firstName": {
          "description": "First name (REQUIRED)",
          "type": "string"
        },
        "lastName": {
          "description": "Last name (REQUIRED)",
          "type": "string"
        },
        "email": {
          "description": "E-mail (REQUIRED)",
          "type": "string"
        },
        "mobile": {
          "description": "Mobile phone",
          "type": "string"
        },
        "timeZoneId": {
          "description": "Timezone Id. If not provided, the practice timezone will be used. Use api/v1/timezones to get a list of valid timezones.",
          "type": "string"
        },
        "cultureCode": {
          "description": "Culture code. Currently only \"en-US\" is accepted.",
          "type": "string"
        },
        "includeEmailInReports": {
          "description": "Indicates if the e-mail should be included in the reports.",
          "type": "boolean"
        },
        "includePhoneInReports": {
          "description": "Indicates if the phone number should be included in the reports.",
          "type": "boolean"
        },
        "workspaceIds": {
          "description": "Workspaces this user is associated with. If practice.isWorkspacesEnabled == false, no values will be returned.\r\nIf the user is an administrator, they will automatically have access to all workspaces.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "UserDeleteRequest": {
      "description": "Delete request",
      "type": "object",
      "properties": {
        "reassignPatientsToUserId": {
          "format": "uuid",
          "description": "Practitioner the patients of the practitioner being deleted should be transferred to.\r\nThis information is not required if there are no patients associated with the practitioner being deleted.\r\nOtherwise this information is required.",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "UserUpdateRequest": {
      "description": "User information",
      "required": [
        "firstName",
        "lastName",
        "email"
      ],
      "type": "object",
      "properties": {
        "isEnabled": {
          "description": "Indicates if the user is enabled.",
          "type": "boolean"
        },
        "title": {
          "description": "Title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "firstName": {
          "description": "First name (REQUIRED)",
          "type": "string"
        },
        "lastName": {
          "description": "Last name (REQUIRED)",
          "type": "string"
        },
        "email": {
          "description": "E-mail (REQUIRED)",
          "type": "string"
        },
        "mobile": {
          "description": "Mobile phone",
          "type": "string"
        },
        "timeZoneId": {
          "description": "Timezone Id. If not provided, the practice timezone will be used. Use api/v1/timezones to get a list of valid timezones.",
          "type": "string"
        },
        "cultureCode": {
          "description": "Culture code. Currently only \"en-US\" is accepted.",
          "type": "string"
        },
        "includeEmailInReports": {
          "description": "Indicates if the e-mail should be included in the reports.",
          "type": "boolean"
        },
        "includePhoneInReports": {
          "description": "Indicates if the phone number should be included in the reports.",
          "type": "boolean"
        },
        "workspaceIds": {
          "description": "Workspaces this user is associated with. If practice.isWorkspacesEnabled == false, no values will be returned.\r\nIf the user is an administrator, they will automatically have access to all workspaces.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "UserNewRequest": {
      "description": "User information",
      "required": [
        "firstName",
        "lastName",
        "email"
      ],
      "type": "object",
      "properties": {
        "sendWelcomeEmail": {
          "description": "Indicates if a welcome email should be sent to the user.",
          "type": "boolean"
        },
        "title": {
          "description": "Title",
          "enum": [
            "Mr",
            "Mrs",
            "Miss",
            "Ms",
            "Dr"
          ],
          "type": "string"
        },
        "firstName": {
          "description": "First name (REQUIRED)",
          "type": "string"
        },
        "lastName": {
          "description": "Last name (REQUIRED)",
          "type": "string"
        },
        "email": {
          "description": "E-mail (REQUIRED)",
          "type": "string"
        },
        "mobile": {
          "description": "Mobile phone",
          "type": "string"
        },
        "timeZoneId": {
          "description": "Timezone Id. If not provided, the practice timezone will be used. Use api/v1/timezones to get a list of valid timezones.",
          "type": "string"
        },
        "cultureCode": {
          "description": "Culture code. Currently only \"en-US\" is accepted.",
          "type": "string"
        },
        "includeEmailInReports": {
          "description": "Indicates if the e-mail should be included in the reports.",
          "type": "boolean"
        },
        "includePhoneInReports": {
          "description": "Indicates if the phone number should be included in the reports.",
          "type": "boolean"
        },
        "workspaceIds": {
          "description": "Workspaces this user is associated with. If practice.isWorkspacesEnabled == false, no values will be returned.\r\nIf the user is an administrator, they will automatically have access to all workspaces.",
          "type": "array",
          "items": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "PartnerWebhook": {
      "description": "Webhook configuration",
      "required": [
        "webhookUrl"
      ],
      "type": "object",
      "properties": {
        "partnerWebhookId": {
          "format": "int32",
          "description": "Partner webhook ID",
          "type": "integer"
        },
        "signingKey": {
          "description": "Key used to validate a webhook call coming from ODX.",
          "type": "string"
        },
        "createDate": {
          "format": "date-time",
          "description": "Create date",
          "type": "string"
        },
        "entityEvents": {
          "description": "Entities and events that should be monitored",
          "type": "object",
          "properties": {
            "Patient": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "PatientTest": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "TreatmentPlan": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "PracticePartnerConnection": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "BloodTestResultsPdf": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            }
          }
        },
        "webhookUrl": {
          "description": "Webhook url",
          "type": "string"
        }
      }
    },
    "PartnerWebhookUpdateRequest": {
      "description": "Webhook configuration update request",
      "required": [
        "webhookUrl"
      ],
      "type": "object",
      "properties": {
        "entityEvents": {
          "description": "Entities and events that should be monitored",
          "type": "object",
          "properties": {
            "Patient": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "PatientTest": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "TreatmentPlan": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "PracticePartnerConnection": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            },
            "BloodTestResultsPdf": {
              "type": "array",
              "items": {
                "enum": [
                  "Created",
                  "Updated",
                  "Deleted"
                ],
                "type": "string"
              }
            }
          }
        },
        "webhookUrl": {
          "description": "Webhook url",
          "type": "string"
        }
      }
    },
    "PartnerWebhookTestRequest": {
      "description": "Information that will be used to send a sample request to the partner's endpoint.",
      "required": [
        "webhookUrl"
      ],
      "type": "object",
      "properties": {
        "webhookUrl": {
          "description": "Webhook url",
          "type": "string"
        },
        "entityType": {
          "description": "Entity type being tested",
          "enum": [
            "Patient",
            "PatientTest",
            "TreatmentPlan",
            "PracticePartnerConnection",
            "BloodTestResultsPdf"
          ],
          "type": "string"
        },
        "eventType": {
          "description": "Event type being tested",
          "enum": [
            "Created",
            "Updated",
            "Deleted"
          ],
          "type": "string"
        },
        "signingKey": {
          "description": "Key used to validate a webhook call coming from ODX.",
          "type": "string"
        }
      }
    },
    "PartnerWebhookEvent": {
      "description": "Event triggered",
      "type": "object",
      "properties": {
        "entityType": {
          "description": "Entity type",
          "enum": [
            "Patient",
            "PatientTest",
            "TreatmentPlan",
            "PracticePartnerConnection",
            "BloodTestResultsPdf"
          ],
          "type": "string"
        },
        "eventType": {
          "description": "Event that's triggering the webhook",
          "enum": [
            "Created",
            "Updated",
            "Deleted"
          ],
          "type": "string"
        },
        "data": {
          "description": "Entity that triggered the event",
          "type": "object"
        }
      }
    },
    "Workspace": {
      "description": "Workspace",
      "type": "object",
      "properties": {
        "workspaceId": {
          "format": "int32",
          "description": "Workspace ID",
          "type": "integer"
        },
        "name": {
          "description": "Name",
          "type": "string"
        },
        "description": {
          "description": "Description",
          "type": "string"
        },
        "createdDate": {
          "format": "date-time",
          "description": "Date the workspace was created",
          "type": "string"
        },
        "lastUpdatedDate": {
          "format": "date-time",
          "description": "Date the workspace was last updated",
          "type": "string"
        },
        "practiceId": {
          "format": "uuid",
          "description": "Practice ID this workspace is associated with",
          "type": "string",
          "example": "00000000-0000-0000-0000-000000000000"
        }
      }
    },
    "PdfUploadRequest": {
      "description": "PDF upload request",
      "required": [
        "uploadType"
      ],
      "type": "object",
      "properties": {
        "patientId": {
          "format": "int32",
          "description": "Patient Id - if this information is provided, the other fields will be ignored.",
          "type": "integer"
        },
        "firstName": {
          "description": "Patient's first name - ignored if the patient Id is provided.",
          "type": "string"
        },
        "lastName": {
          "description": "Patient's last name - ignored if the patient Id is provided.",
          "type": "string"
        },
        "gender": {
          "description": "Patient's gender - ignored if the patient Id is provided.",
          "enum": [
            "Male",
            "Female"
          ],
          "type": "string"
        },
        "dateOfBirth": {
          "format": "date-time",
          "description": "Patient's date of birth - ignored if the patient Id is provided.",
          "type": "string"
        },
        "email": {
          "description": "Patient's email - ignored if the patient Id is provided.",
          "type": "string"
        },
        "uploadType": {
          "description": "What kind of information does the PDF contain.",
          "enum": [
            "BloodTestResults"
          ],
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "apiKey": {
      "type": "apiKey",
      "description": "API Key Authentication",
      "name": "apiKey",
      "in": "header"
    }
  }
}