{
  "openapi": "3.1.0",
  "info": {
    "title": "MedTrainer Public API",
    "version": "1.0.0",
    "description": "The MedTrainer Public API allows external integrations to search and manage\ncore directory resources such as locations, divisions, and practitioners.\n\nThis specification describes the available endpoints, request parameters,\npayloads, authentication requirements, and expected responses for clients\nintegrating with the platform.\n\nMost resource endpoints return FHIR-aligned JSON with content type\n`application/fhir+json`. Protected endpoints accept authentication through\neither the `X-API-Key` header or `Authorization: Bearer <token>`.\n\n## Getting started\n\nThis guide walks you through how to generate an API Key from the platform.\nThis key will allow you to authenticate and interact with the available\nAPIs.\n\n## Prerequisites\n\n**Before you begin, make sure you have:**\n\nA valid account and access to the platform\n\nProper permissions to generate an `API Key (Super Admin / Admin)`\n\nLogged into the platform\n\n## Step-by-step\n\n**1. Log in to the platform**\n\nSign in to the MedTrainer platform using your credentials.\n\n**2. Open Organization settings**\n\n**Once you're in:**\n\nOn the left-side menu\n\nClick on **Organization**\n\n**3. Expand \u201cOrganization Management\u201d and find the \u201cAPI keys manager\u201d**\n\n**Inside Organization Settings:**\n\nExpand \u201cOrganization Management\u201d menu\n\nHere you\u2019ll find all options to configure the organization\n\nLook for \u201cAPI keys manager\u201d option and click on it\n\n**4. Create a new API Key group**\n\n**In the \u201cAPI keys manager\u201d page:**\n\nClick on \u201cCreate API key group\u201d\n\nFill the following fields:\n\n`name`\n\n`description`\n\nConfirm the action by clicking the \u201cCreate\u201d button.\n\n**5. Activate the API Key \u201cDefault\u201d**\n\n**After generating the API key group:**\n\nOn the \u201cAPI Keys Manager\u201d page, you will see the newly created API key\ngroup, along with a \u201cDefault\u201d API key in an \u201cInactive\u201d status.\n\nTo activate the \u201cDefault\u201d API key:\n\nClick on the status to expand the available options.\n\nOnce the list is expanded, select the \u201cActive\u201d status\n\n<div class=\"docs-getting-started-callout docs-getting-started-callout--info\">\n  <span class=\"docs-getting-started-callout__icon\" aria-hidden=\"true\"></span>\n  <span>This API key is required and must be available to use the MedTrainer Public APIs</span>\n</div>\n\n<div class=\"docs-getting-started-callout docs-getting-started-callout--warning\">\n  <span class=\"docs-getting-started-callout__icon\" aria-hidden=\"true\"></span>\n  <span><strong>Important:</strong> Treat your API Key like a password. Keep it private and secure.</span>\n</div>\n\n<div class=\"docs-middle-section-divider\" aria-hidden=\"true\"></div>\n"
  },
  "servers": [
    {
      "url": "/",
      "description": "Public API base URL"
    }
  ],
  "tags": [
    {
      "name": "Locations",
      "description": "Public location lookup and mutation endpoints"
    },
    {
      "name": "Divisions",
      "description": "Public division lookup and mutation endpoints"
    },
    {
      "name": "Positions",
      "description": "Public position lookup endpoints"
    },
    {
      "name": "Departments",
      "description": "Public department lookup endpoints"
    },
    {
      "name": "Practitioner Categories",
      "description": "Public practitioner category lookup endpoints"
    },
    {
      "name": "Practitioners",
      "description": "Public practitioner lookup, search, and mutation endpoints"
    }
  ],
  "paths": {
    "/api/v1/locations": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Search locations",
        "description": "Returns a FHIR `Bundle` with location resources.\n",
        "operationId": "searchLocations",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchCount"
          },
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Location search results",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationSearchBundle"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 3,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/locations?_count=2&_page=2&_elements=id%2Cname"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/locations?_count=2&_page=1&_elements=id%2Cname"
                        },
                        {
                          "relation": "previous",
                          "url": "/api/v1/locations?_count=2&_page=1&_elements=id%2Cname"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/locations?_count=2&_page=2&_elements=id%2Cname"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Location",
                            "id": "LOC-003",
                            "name": "Location test",
                            "state": "State",
                            "division": {
                              "id": "DIV-003",
                              "name": "East Division"
                            },
                            "city": "City",
                            "addressLine": "Address 1",
                            "zipCode": "33101",
                            "phoneNumber": "0987654321",
                            "fax": "1234567890",
                            "email": "test@example.com",
                            "sendEmail": false,
                            "enabledCredentialing": false
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/SearchValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Locations"
        ],
        "summary": "Create a location",
        "operationId": "createLocation",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationCreateRequest"
              },
              "examples": {
                "default": {
                  "value": {
                    "name": "North Campus",
                    "state": "State",
                    "city": "City",
                    "addressLine": "Address 1",
                    "zipCode": "33101",
                    "phoneNumber": "0987654321",
                    "fax": "1234567890",
                    "email": "first@test.com",
                    "sendEmail": false,
                    "enabledCredentialing": false,
                    "division": {
                      "reference": "DIV-001"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LocationCreated"
          },
          "201": {
            "$ref": "#/components/responses/LocationCreated"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/DivisionWriteNotFound"
          },
          "422": {
            "$ref": "#/components/responses/LocationValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/LocationBadGateway"
          }
        }
      }
    },
    "/api/v1/locations/{publicId}": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Get a location by public ID",
        "description": "Resolves the public location identifier before fetching the resource.\nWhen `_elements` is provided, only the requested fields are returned.\n",
        "operationId": "getLocation",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LocationPublicId"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Location resource",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Location",
                      "id": "LOC-001",
                      "name": "North Campus",
                      "addressLine": "Address 1",
                      "city": "City",
                      "state": "State",
                      "division": {
                        "id": "DIV-001",
                        "name": "North Division"
                      },
                      "zipCode": "33101",
                      "phoneNumber": "0987654321",
                      "fax": "1234567890",
                      "email": "first@test.com",
                      "sendEmail": false,
                      "enabledCredentialing": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/LocationWriteNotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/LocationBadGateway"
          }
        }
      },
      "put": {
        "tags": [
          "Locations"
        ],
        "summary": "Update a location",
        "description": "Resolves the public location identifier before updating the resource.\n",
        "operationId": "updateLocation",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LocationPublicId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationUpdateRequest"
              },
              "examples": {
                "default": {
                  "value": {
                    "name": "North Campus",
                    "state": "State",
                    "city": "City",
                    "addressLine": "Address 1",
                    "zipCode": "33101",
                    "phoneNumber": "0987654321",
                    "fax": "1234567890",
                    "email": "first@test.com",
                    "sendEmail": false,
                    "enabledCredentialing": false,
                    "division": {
                      "reference": "DIV-001"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LocationUpdated"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/LocationWriteNotFound"
          },
          "422": {
            "$ref": "#/components/responses/LocationValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/LocationBadGateway"
          }
        }
      },
      "patch": {
        "tags": [
          "Locations"
        ],
        "summary": "Update a location with PATCH",
        "description": "Resolves the public location identifier before updating the resource\nwith the same request body and validation rules as `PUT`.\n",
        "operationId": "patchLocation",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LocationPublicId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationUpdateRequest"
              },
              "examples": {
                "default": {
                  "value": {
                    "name": "North Campus",
                    "state": "State",
                    "city": "City",
                    "addressLine": "Address 1",
                    "zipCode": "33101",
                    "phoneNumber": "0987654321",
                    "fax": "1234567890",
                    "email": "first@test.com",
                    "sendEmail": false,
                    "enabledCredentialing": false,
                    "division": {
                      "reference": "DIV-001"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/LocationUpdated"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/LocationNotFound"
          },
          "422": {
            "$ref": "#/components/responses/LocationValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/LocationBadGateway"
          }
        }
      }
    },
    "/api/v1/position": {
      "get": {
        "tags": [
          "Positions"
        ],
        "summary": "Search positions",
        "description": "Returns a FHIR `Bundle` with position resources.\n",
        "operationId": "searchPositions",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchCount"
          },
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Position search results",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionSearchBundle"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 3,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/position?_count=2&_page=2&_elements=id%2Cname%2Cclinical"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/position?_count=2&_page=1&_elements=id%2Cname%2Cclinical"
                        },
                        {
                          "relation": "previous",
                          "url": "/api/v1/position?_count=2&_page=1&_elements=id%2Cname%2Cclinical"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/position?_count=2&_page=2&_elements=id%2Cname%2Cclinical"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Position",
                            "id": "POS-003",
                            "name": "Supervisor",
                            "clinical": true
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/SearchValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/position/{publicId}": {
      "get": {
        "tags": [
          "Positions"
        ],
        "summary": "Get a position by public ID",
        "description": "Resolves the public position identifier before fetching the resource.\n",
        "operationId": "getPosition",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PositionPublicId"
          }
        ],
        "responses": {
          "200": {
            "description": "Position resource",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/Position"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Position",
                      "id": "POS-001",
                      "name": "Analyst",
                      "clinical": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/PositionNotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      }
    },
    "/api/v1/departments": {
      "get": {
        "tags": [
          "Departments"
        ],
        "summary": "Search departments",
        "description": "Returns a FHIR `Bundle` with department resources.\n",
        "operationId": "searchDepartments",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchCount"
          },
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Department search results",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/DepartmentSearchBundle"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 3,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/departments?_count=2&_page=2&_elements=id%2Cname"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/departments?_count=2&_page=1&_elements=id%2Cname"
                        },
                        {
                          "relation": "previous",
                          "url": "/api/v1/departments?_count=2&_page=1&_elements=id%2Cname"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/departments?_count=2&_page=2&_elements=id%2Cname"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Department",
                            "id": "DEPT-003",
                            "name": "Laboratory"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "description": "Department search request could not be processed",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationOutcome"
                },
                "examples": {
                  "companyNotFound": {
                    "value": {
                      "resourceType": "OperationOutcome",
                      "issue": [
                        {
                          "severity": "error",
                          "code": "invalid",
                          "details": {
                            "text": "Company not found."
                          },
                          "expression": [
                            "company"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/SearchValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      }
    },
    "/api/v1/departments/{publicId}": {
      "get": {
        "tags": [
          "Departments"
        ],
        "summary": "Get a department by public ID",
        "description": "Resolves the public department identifier before fetching the resource.\n",
        "operationId": "getDepartment",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DepartmentPublicId"
          }
        ],
        "responses": {
          "200": {
            "description": "Department resource",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/Department"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Department",
                      "id": "DEPT-001",
                      "name": "Compliance/HIPAA"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/DepartmentNotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      }
    },
    "/api/v1/practitioner-categories": {
      "get": {
        "tags": [
          "Practitioner Categories"
        ],
        "summary": "Search practitioner categories",
        "description": "Returns a FHIR `Bundle` with practitioner category resources.\n",
        "operationId": "searchPractitionerCategories",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchCount"
          },
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/PractitionerCategorySearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Practitioner category search results",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/PractitionerCategorySearchBundle"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 3,
                      "link": [
                        {
                          "relation": "self",
                          "url": "http://localhost/api/v1/practitioner-categories?_count=2&_page=2&_elements=id%2Cname"
                        },
                        {
                          "relation": "first",
                          "url": "http://localhost/api/v1/practitioner-categories?_count=2&_page=1&_elements=id%2Cname"
                        },
                        {
                          "relation": "previous",
                          "url": "http://localhost/api/v1/practitioner-categories?_count=2&_page=1&_elements=id%2Cname"
                        },
                        {
                          "relation": "last",
                          "url": "http://localhost/api/v1/practitioner-categories?_count=2&_page=2&_elements=id%2Cname"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "PractitionerCategory",
                            "id": "PCAT-003",
                            "name": "Operations"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/SearchValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "description": "Practitioner category search request could not be processed",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationOutcome"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "OperationOutcome",
                      "issue": [
                        {
                          "severity": "error",
                          "code": "invalid",
                          "details": {
                            "text": "The request could not be processed."
                          },
                          "expression": [
                            "_count"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/practitioner-categories/{publicId}": {
      "get": {
        "tags": [
          "Practitioner Categories"
        ],
        "summary": "Get a practitioner category by public ID",
        "description": "Resolves the public practitioner category identifier before fetching the resource.\n",
        "operationId": "getPractitionerCategory",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PractitionerCategoryPublicId"
          }
        ],
        "responses": {
          "200": {
            "description": "Practitioner category resource",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/PractitionerCategory"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "PractitionerCategory",
                      "id": "PCAT-001",
                      "name": "Nursing"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/PractitionerCategoryNotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "description": "Practitioner category identifier could not be resolved",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationOutcome"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "OperationOutcome",
                      "issue": [
                        {
                          "severity": "error",
                          "code": "invalid",
                          "details": {
                            "text": "The request could not be processed."
                          },
                          "expression": [
                            "publicId"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/divisions": {
      "get": {
        "tags": [
          "Divisions"
        ],
        "summary": "Search divisions",
        "description": "Returns a FHIR `Bundle` with division resources.\n",
        "operationId": "searchDivisions",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchCount"
          },
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Division search results",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/DivisionSearchBundle"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 3,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/divisions?_count=2&_page=2"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/divisions?_count=2&_page=1"
                        },
                        {
                          "relation": "previous",
                          "url": "/api/v1/divisions?_count=2&_page=1"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/divisions?_count=2&_page=2"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Division",
                            "id": "DIV-003",
                            "name": "East Division",
                            "locations": [
                              {
                                "reference": "LOC-010"
                              },
                              {
                                "reference": "LOC-011"
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/SearchValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Divisions"
        ],
        "summary": "Create a division",
        "description": "Creates a division with a non-blank `name` and at least one linked location ID.",
        "operationId": "createDivision",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DivisionCreateRequest"
              },
              "examples": {
                "singleLocation": {
                  "value": {
                    "name": "North Division",
                    "locations": [
                      "LOC-001"
                    ]
                  }
                },
                "multipleLocations": {
                  "value": {
                    "name": "Clinical Operations",
                    "locations": [
                      "LOC-001",
                      "LOC-002"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DivisionCreated"
          },
          "201": {
            "$ref": "#/components/responses/DivisionCreated"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/DivisionCreateValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/divisions/{divisionId}": {
      "get": {
        "tags": [
          "Divisions"
        ],
        "summary": "Get a division by ID",
        "description": "Resolves the public division identifier before fetching the resource.\n",
        "operationId": "getDivision",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DivisionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Division resource",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/Division"
                },
                "examples": {
                  "default": {
                    "value": {
                      "resourceType": "Division",
                      "id": "DIV-123",
                      "name": "Clinical Division",
                      "locations": [
                        {
                          "reference": "LOC-001"
                        },
                        {
                          "reference": "LOC-002"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/DivisionNotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      },
      "put": {
        "tags": [
          "Divisions"
        ],
        "summary": "Update a division",
        "description": "Accepts partial updates. Send at least one of `name` or `locations`.\nResolves the public division identifier before updating the resource.\nA `422` response also covers duplicate division names, locations that\ndo not exist or belong to another company, and locations that are\nassigned to another non-default division.\n",
        "operationId": "updateDivision",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DivisionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DivisionUpdateRequest"
              },
              "examples": {
                "renameOnly": {
                  "value": {
                    "name": "Updated Division"
                  }
                },
                "replaceLocations": {
                  "value": {
                    "locations": [
                      "LOC-001",
                      "LOC-003"
                    ]
                  }
                },
                "clearLocations": {
                  "value": {
                    "locations": []
                  }
                },
                "renameAndReplaceLocations": {
                  "value": {
                    "name": "Updated Division",
                    "locations": [
                      "LOC-001"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DivisionUpdated"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/DivisionNotFound"
          },
          "422": {
            "$ref": "#/components/responses/DivisionUpdateValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      },
      "patch": {
        "tags": [
          "Divisions"
        ],
        "summary": "Update a division with PATCH",
        "description": "Resolves the public division identifier before updating the resource\nwith the same payload as `PUT` and is routed to the same update handler.\nIt returns the same validation and downstream business-rule errors as\n`PUT`.\n",
        "operationId": "patchDivision",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/DivisionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DivisionUpdateRequest"
              },
              "examples": {
                "renameOnly": {
                  "value": {
                    "name": "Updated Division"
                  }
                },
                "replaceLocations": {
                  "value": {
                    "locations": [
                      "LOC-001",
                      "LOC-003"
                    ]
                  }
                },
                "clearLocations": {
                  "value": {
                    "locations": []
                  }
                },
                "renameAndReplaceLocations": {
                  "value": {
                    "name": "Updated Division",
                    "locations": [
                      "LOC-001"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DivisionUpdated"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/DivisionNotFound"
          },
          "422": {
            "$ref": "#/components/responses/DivisionUpdateValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      }
    },
    "/api/v1/practitioner": {
      "post": {
        "tags": [
          "Practitioners"
        ],
        "summary": "Create a practitioner",
        "description": "Creates a practitioner/provider profile for the authenticated company context.\n\nA `422` response indicates either request-body validation failures,\nunresolved related public IDs such as\n`extension.employment.positionId`,\n`extension.employment.departmentId`, or\n`extension.user.location`, or a validation error returned by the\nupstream provider-profile API.\n",
        "operationId": "createPractitioner",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PractitionerWriteRequest"
              },
              "examples": {
                "default": {
                  "value": {
                    "resourceType": "Practitioner",
                    "name": {
                      "given": "John",
                      "family": "Doe",
                      "middle": "Allen",
                      "other": {
                        "given": "Jonathan",
                        "middle": "Alpha",
                        "family": "Public",
                        "suffix": "III",
                        "usageStartDate": "02/14/2001",
                        "usageEndDate": "02/14/2005"
                      }
                    },
                    "birthDate": "01/01/1990",
                    "gender": "male",
                    "telecom": {
                      "email": "john.payload1@example.com",
                      "primaryEmail": "john.primary@example.com",
                      "personalEmail": "john.personal@example.com",
                      "ccEmail1": "john.cc1@example.com",
                      "ccEmail2": "john.cc2@example.com",
                      "cellPhone": "3055550111",
                      "homePhone": "3055550103",
                      "workPhone": "3055550104",
                      "fax": "3055550105"
                    },
                    "address": {
                      "line": [
                        "Main Street 1",
                        "Suite 10"
                      ],
                      "city": "Miami",
                      "state": "FL",
                      "postalCode": "33101",
                      "country": "United States",
                      "county": "Miami-Dade"
                    },
                    "mailingAddress": {
                      "line": [
                        "Billing Street 9",
                        "Floor 4"
                      ],
                      "city": "Orlando",
                      "state": "FL",
                      "postalCode": "32801",
                      "country": "United States",
                      "county": "Orange",
                      "province": "N/A"
                    },
                    "extension": {
                      "employment": {
                        "positionId": "pos770",
                        "departmentId": "dep1",
                        "hireDate": "06/15/2020",
                        "terminationDate": "06/15/2025"
                      },
                      "user": {
                        "location": "loc4857",
                        "userType": "admin",
                        "password": "<set-at-request-time>",
                        "status": "Active",
                        "statusReason": "Contracted",
                        "ssn": "123456789",
                        "birthPlace": {
                          "country": "United States",
                          "stateOther": "Nuevo Leon",
                          "city": "Monterrey"
                        },
                        "citizenship": "United States",
                        "raceEthnicity": "Hispanic or Latino",
                        "languages": [
                          "Spanish",
                          "French",
                          "German"
                        ],
                        "fnin": {
                          "number": "FNIN12",
                          "countryIssue": "United States"
                        }
                      },
                      "provider": {
                        "npiNumber": "1234567890",
                        "caqhId": "1234567890",
                        "caqhUsername": "caqh_user",
                        "caqhPassword": "<set-at-request-time>",
                        "caqhLastReattestationDate": "03/01/2026",
                        "caqhEmail": "caqh.provider@example.com",
                        "treatsGender": "Both",
                        "patientAgeMinimum": 18,
                        "patientAgeMaximum": 65,
                        "upin": "UPIN12"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PractitionerCreated"
          },
          "201": {
            "$ref": "#/components/responses/PractitionerCreated"
          },
          "400": {
            "$ref": "#/components/responses/PractitionerBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/PractitionerWriteValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "get": {
        "tags": [
          "Practitioners"
        ],
        "summary": "Search practitioners",
        "description": "Returns a FHIR `Bundle` of practitioner resources. `_elements` supports\ncomma-separated selectors and may include nested paths such as\n`telecom.email`, `telecom.homePhone`, `address.city`,\n`extension.user.status`, `extension.user.statusReason`,\n`extension.user.userType`, or `extension.provider.npiNumber`.\n\n`_elements` values are normalized by trimming surrounding whitespace.\nUnknown selectors are preserved in pagination links but ignored when\nbuilding each practitioner resource.\n",
        "operationId": "searchPractitioners",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchCount"
          },
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Practitioner search results",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/PractitionerSearchBundle"
                },
                "examples": {
                  "filtered": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 3,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/practitioner?_count=2&_page=2&_elements=name%2Ctelecom.email%2Ctelecom.homePhone"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/practitioner?_count=2&_page=1&_elements=name%2Ctelecom.email%2Ctelecom.homePhone"
                        },
                        {
                          "relation": "previous",
                          "url": "/api/v1/practitioner?_count=2&_page=1&_elements=name%2Ctelecom.email%2Ctelecom.homePhone"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/practitioner?_count=2&_page=2&_elements=name%2Ctelecom.email%2Ctelecom.homePhone"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Practitioner",
                            "name": {
                              "given": "Katherine",
                              "family": "Johnson"
                            },
                            "telecom": {
                              "email": "katherine@example.test",
                              "homePhone": "3055550103"
                            }
                          }
                        }
                      ]
                    }
                  },
                  "full": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 1,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/practitioner?_count=20&_page=1"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/practitioner?_count=20&_page=1"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/practitioner?_count=20&_page=1"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Practitioner",
                            "id": "PRAC-001",
                            "name": {
                              "given": "Ada",
                              "family": "Lovelace",
                              "middle": "Byron",
                              "other": {
                                "given": "Augusta",
                                "middle": "Ada",
                                "family": "King",
                                "suffix": "Countess",
                                "usageStartDate": "02/14/2001",
                                "usageEndDate": "02/14/2005"
                              }
                            },
                            "telecom": {
                              "email": "ada@example.test",
                              "primaryEmail": "ada.primary@example.test",
                              "personalEmail": "ada.personal@example.test",
                              "cellPhone": "3055550111",
                              "homePhone": "3055550103",
                              "workPhone": "3055550104",
                              "fax": "3055550105"
                            },
                            "birthDate": "01/01/1990",
                            "gender": "Female",
                            "address": {
                              "line": [
                                "Main Street 1",
                                "Suite 10"
                              ],
                              "city": "Miami",
                              "state": "FL",
                              "postalCode": "33101",
                              "country": "United States",
                              "county": "Miami-Dade"
                            },
                            "mailingAddress": {
                              "line": [
                                "Billing Street 9",
                                "Floor 4"
                              ],
                              "city": "Orlando",
                              "state": "FL",
                              "postalCode": "32801",
                              "country": "United States",
                              "county": "Orange",
                              "province": "N/A"
                            },
                            "departments": [
                              {
                                "id": "DEPT-091",
                                "name": "Mathematics"
                              }
                            ],
                            "position": {
                              "id": "POS-011",
                              "name": "Analyst"
                            },
                            "locations": [
                              {
                                "id": "LOC-420",
                                "name": "London Clinic"
                              }
                            ],
                            "divisions": [
                              {
                                "id": "DIV-007",
                                "name": "Clinical Operations"
                              }
                            ],
                            "extension": {
                              "user": {
                                "status": "Active",
                                "statusReason": "Contracted",
                                "userType": "admin",
                                "location": "LOC-420"
                              },
                              "provider": {
                                "npiNumber": "1234567890"
                              }
                            }
                          }
                        }
                      ]
                    }
                  },
                  "nestedElements": {
                    "value": {
                      "resourceType": "Bundle",
                      "type": "searchset",
                      "total": 1,
                      "link": [
                        {
                          "relation": "self",
                          "url": "/api/v1/practitioner?_count=20&_page=1&_elements=extension.user.status%2Cextension.user.statusReason%2Cextension.user.location%2Cextension.provider.npiNumber"
                        },
                        {
                          "relation": "first",
                          "url": "/api/v1/practitioner?_count=20&_page=1&_elements=extension.user.status%2Cextension.user.statusReason%2Cextension.user.location%2Cextension.provider.npiNumber"
                        },
                        {
                          "relation": "last",
                          "url": "/api/v1/practitioner?_count=20&_page=1&_elements=extension.user.status%2Cextension.user.statusReason%2Cextension.user.location%2Cextension.provider.npiNumber"
                        }
                      ],
                      "entry": [
                        {
                          "resource": {
                            "resourceType": "Practitioner",
                            "extension": {
                              "user": {
                                "status": "Active",
                                "statusReason": "Contracted",
                                "location": 420
                              },
                              "provider": {
                                "npiNumber": "1234567890"
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PractitionerBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "422": {
            "$ref": "#/components/responses/PractitionerReadValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/api/v1/practitioner/{publicId}": {
      "get": {
        "tags": [
          "Practitioners"
        ],
        "summary": "Get a practitioner by public ID",
        "description": "Returns a single practitioner resource. If `_elements` is omitted, the\nfull public practitioner resource is returned.\n`_elements` accepts the same nested selector syntax as practitioner\nsearch and trims surrounding whitespace before filtering.\n\nA `404` response indicates the practitioner public ID could not be\nresolved. A `422` response indicates validation failed while reading or\nnormalizing the upstream practitioner data.\n",
        "operationId": "getPractitioner",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PractitionerPublicId"
          },
          {
            "$ref": "#/components/parameters/SearchElements"
          }
        ],
        "responses": {
          "200": {
            "description": "Practitioner resource",
            "content": {
              "application/fhir+json": {
                "schema": {
                  "$ref": "#/components/schemas/Practitioner"
                },
                "examples": {
                  "filtered": {
                    "value": {
                      "resourceType": "Practitioner",
                      "name": {
                        "given": "Ada",
                        "family": "Lovelace"
                      },
                      "telecom": {
                        "email": "ada@example.test",
                        "homePhone": "3055550103"
                      }
                    }
                  },
                  "default": {
                    "value": {
                      "resourceType": "Practitioner",
                      "id": "PRAC-001",
                      "name": {
                        "given": "Ada",
                        "family": "Lovelace",
                        "middle": "Byron",
                        "other": {
                          "given": "Augusta",
                          "middle": "Ada",
                          "family": "King",
                          "suffix": "Countess",
                          "usageStartDate": "02/14/2001",
                          "usageEndDate": "02/14/2005"
                        }
                      },
                      "birthDate": "01/01/1990",
                      "gender": "Female",
                      "departments": [
                        {
                          "id": "DEPT-091",
                          "name": "Mathematics"
                        }
                      ],
                      "position": {
                        "id": "POS-011",
                        "name": "Analyst"
                      },
                      "locations": [
                        {
                          "id": "LOC-420",
                          "name": "London Clinic"
                        }
                      ],
                      "divisions": [
                        {
                          "id": "DIV-007",
                          "name": "Clinical Operations"
                        }
                      ],
                      "telecom": {
                        "email": "ada@example.test",
                        "primaryEmail": "ada.primary@example.test",
                        "personalEmail": "ada.personal@example.test",
                        "cellPhone": "3055550111",
                        "homePhone": "3055550103",
                        "workPhone": "3055550104",
                        "fax": "3055550105"
                      },
                      "address": {
                        "line": [
                          "Main Street 1",
                          "Suite 10"
                        ],
                        "city": "Miami",
                        "state": "FL",
                        "postalCode": "33101",
                        "country": "United States",
                        "county": "Miami-Dade"
                      },
                      "mailingAddress": {
                        "line": [
                          "Billing Street 9",
                          "Floor 4"
                        ],
                        "city": "Orlando",
                        "state": "FL",
                        "postalCode": "32801",
                        "country": "United States",
                        "county": "Orange",
                        "province": "N/A"
                      },
                      "extension": {
                        "user": {
                          "status": "Active",
                          "statusReason": "Contracted",
                          "userType": "admin",
                          "location": "LOC-420"
                        },
                        "provider": {
                          "npiNumber": "1234567890"
                        }
                      }
                    }
                  },
                  "nestedElements": {
                    "value": {
                      "resourceType": "Practitioner",
                      "extension": {
                        "user": {
                          "status": "Active",
                          "statusReason": "Contracted",
                          "location": 420
                        },
                        "provider": {
                          "npiNumber": "1234567890"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PractitionerBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/PractitionerNotFound"
          },
          "422": {
            "$ref": "#/components/responses/PractitionerReadValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      },
      "put": {
        "tags": [
          "Practitioners"
        ],
        "summary": "Update a practitioner",
        "description": "Updates a practitioner/provider profile identified by `publicId`.\n\nThe request body is a partial update: every top-level field is\noptional. Omitted fields retain their existing values. Any field that\nis present is validated with the same format/length/pattern rules as\nthe create payload.\n\nA `422` response indicates either request-body validation failures,\nunresolved related public IDs such as\n`extension.employment.positionId`,\n`extension.employment.departmentId`, or\n`extension.user.location`, or a validation error returned by the\nupstream provider-profile API.\n",
        "operationId": "updatePractitioner",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PractitionerPublicId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PractitionerUpdateRequest"
              },
              "examples": {
                "default": {
                  "value": {
                    "resourceType": "Practitioner",
                    "name": {
                      "given": "John",
                      "family": "Doe",
                      "middle": "Allen",
                      "other": {
                        "given": "Jonathan",
                        "middle": "Alpha",
                        "family": "Public",
                        "suffix": "III",
                        "usageStartDate": "02/14/2001",
                        "usageEndDate": "02/14/2005"
                      }
                    },
                    "birthDate": "01/01/1990",
                    "gender": "male",
                    "telecom": {
                      "email": "john.payload1@example.com",
                      "primaryEmail": "john.primary@example.com",
                      "personalEmail": "john.personal@example.com",
                      "ccEmail1": "john.cc1@example.com",
                      "ccEmail2": "john.cc2@example.com",
                      "cellPhone": "3055550111",
                      "homePhone": "3055550103",
                      "workPhone": "3055550104",
                      "fax": "3055550105"
                    },
                    "address": {
                      "line": [
                        "Main Street 1",
                        "Suite 10"
                      ],
                      "city": "Miami",
                      "state": "FL",
                      "postalCode": "33101",
                      "country": "United States",
                      "county": "Miami-Dade"
                    },
                    "mailingAddress": {
                      "line": [
                        "Billing Street 9",
                        "Floor 4"
                      ],
                      "city": "Orlando",
                      "state": "FL",
                      "postalCode": "32801",
                      "country": "United States",
                      "county": "Orange",
                      "province": "N/A"
                    },
                    "extension": {
                      "employment": {
                        "positionId": "pos770",
                        "departmentId": "dep1",
                        "hireDate": "06/15/2020",
                        "terminationDate": "06/15/2025"
                      },
                      "user": {
                        "location": "loc4857",
                        "userType": "admin",
                        "password": "<set-at-request-time>",
                        "status": "Active",
                        "statusReason": "Contracted",
                        "ssn": "123456789",
                        "birthPlace": {
                          "country": "United States",
                          "stateOther": "Nuevo Leon",
                          "city": "Monterrey"
                        },
                        "citizenship": "United States",
                        "raceEthnicity": "Hispanic or Latino",
                        "languages": [
                          "Spanish",
                          "French",
                          "German"
                        ],
                        "fnin": {
                          "number": "FNIN12",
                          "countryIssue": "United States"
                        }
                      },
                      "provider": {
                        "npiNumber": "1234567890",
                        "caqhId": "1234567890",
                        "caqhUsername": "caqh_user",
                        "caqhPassword": "<set-at-request-time>",
                        "caqhLastReattestationDate": "03/01/2026",
                        "caqhEmail": "caqh.provider@example.com",
                        "treatsGender": "Both",
                        "patientAgeMinimum": 18,
                        "patientAgeMaximum": 65,
                        "upin": "UPIN12"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PractitionerUpdated"
          },
          "400": {
            "$ref": "#/components/responses/PractitionerBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/PractitionerNotFound"
          },
          "422": {
            "$ref": "#/components/responses/PractitionerWriteValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "patch": {
        "tags": [
          "Practitioners"
        ],
        "summary": "Update a practitioner with PATCH",
        "description": "Accepts the same payload as `PUT` and is routed to the same update\nhandler. Both verbs behave as partial updates: send only the fields\nyou want to change.\n\nA `422` response indicates either request-body validation failures,\nunresolved related public IDs such as\n`extension.employment.positionId`,\n`extension.employment.departmentId`, or\n`extension.user.location`, or a validation error returned by the\nupstream provider-profile API.\n",
        "operationId": "patchPractitioner",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PractitionerPublicId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PractitionerUpdateRequest"
              },
              "examples": {
                "default": {
                  "value": {
                    "resourceType": "Practitioner",
                    "name": {
                      "given": "John",
                      "family": "Doe",
                      "middle": "Allen",
                      "other": {
                        "given": "Jonathan",
                        "middle": "Alpha",
                        "family": "Public",
                        "suffix": "III",
                        "usageStartDate": "02/14/2001",
                        "usageEndDate": "02/14/2005"
                      }
                    },
                    "birthDate": "01/01/1990",
                    "gender": "male",
                    "telecom": {
                      "email": "john.payload1@example.com",
                      "primaryEmail": "john.primary@example.com",
                      "personalEmail": "john.personal@example.com",
                      "ccEmail1": "john.cc1@example.com",
                      "ccEmail2": "john.cc2@example.com",
                      "cellPhone": "3055550111",
                      "homePhone": "3055550103",
                      "workPhone": "3055550104",
                      "fax": "3055550105"
                    },
                    "address": {
                      "line": [
                        "Main Street 1",
                        "Suite 10"
                      ],
                      "city": "Miami",
                      "state": "FL",
                      "postalCode": "33101",
                      "country": "United States",
                      "county": "Miami-Dade"
                    },
                    "mailingAddress": {
                      "line": [
                        "Billing Street 9",
                        "Floor 4"
                      ],
                      "city": "Orlando",
                      "state": "FL",
                      "postalCode": "32801",
                      "country": "United States",
                      "county": "Orange",
                      "province": "N/A"
                    },
                    "extension": {
                      "employment": {
                        "positionId": "pos770",
                        "departmentId": "dep1",
                        "hireDate": "06/15/2020",
                        "terminationDate": "06/15/2025"
                      },
                      "user": {
                        "location": "loc4857",
                        "userType": "admin",
                        "password": "<set-at-request-time>",
                        "status": "Active",
                        "statusReason": "Contracted",
                        "ssn": "123456789",
                        "birthPlace": {
                          "country": "United States",
                          "stateOther": "Nuevo Leon",
                          "city": "Monterrey"
                        },
                        "citizenship": "United States",
                        "raceEthnicity": "Hispanic or Latino",
                        "languages": [
                          "Spanish",
                          "French",
                          "German"
                        ],
                        "fnin": {
                          "number": "FNIN12",
                          "countryIssue": "United States"
                        }
                      },
                      "provider": {
                        "npiNumber": "1234567890",
                        "caqhId": "1234567890",
                        "caqhUsername": "caqh_user",
                        "caqhPassword": "<set-at-request-time>",
                        "caqhLastReattestationDate": "03/01/2026",
                        "caqhEmail": "caqh.provider@example.com",
                        "treatsGender": "Both",
                        "patientAgeMinimum": 18,
                        "patientAgeMaximum": 65,
                        "upin": "UPIN12"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PractitionerUpdated"
          },
          "400": {
            "$ref": "#/components/responses/PractitionerBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidOrMissingApiKey"
          },
          "404": {
            "$ref": "#/components/responses/PractitionerNotFound"
          },
          "422": {
            "$ref": "#/components/responses/PractitionerWriteValidationError"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Preferred authentication header for protected endpoints."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Alternative authentication scheme using `Authorization: Bearer <token>`."
      }
    },
    "parameters": {
      "SearchCount": {
        "name": "_count",
        "in": "query",
        "required": false,
        "description": "Number of resources to return. Must be a positive integer.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 20
        }
      },
      "SearchPage": {
        "name": "_page",
        "in": "query",
        "required": false,
        "description": "1-based page number. Must be a positive integer.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "SearchElements": {
        "name": "_elements",
        "in": "query",
        "required": false,
        "description": "Comma-separated field selector.\n\nFor location, division, position, department, and practitioner category\nsearches, the implemented selectors are `id`, `name`, `division`,\n`locations`, and `clinical` as applicable.\nThe default when `_elements` is omitted: locations default to\n`id,name`; divisions default to `id,name,locations`; positions default\nto `id,name,clinical`; departments default to `id,name`; practitioner\ncategories default to `id,name`.\n\nFor practitioners, nested selectors are allowed, including values such\nas `telecom.email`, `telecom.homePhone`, `address.city`,\n`extension.user.status`, `extension.user.statusReason`,\n`extension.user.userType`, or `extension.provider.npiNumber`.\nThe public practitioner response uses\n`extension.user.status` and `extension.user.statusReason` for the\nvisible status state; the legacy `employeeCategoryId` is not exposed.\nWhen `_elements` is omitted on practitioner search or get-by-id, the\nfull public resource is returned.\n\nWhitespace around values is trimmed. Unknown selectors are preserved in\npagination links but ignored when each resource is built.\n\nPagination `link.url` values are returned as absolute URLs including\nscheme and host (for example, `/api/v1/...` resolves against the active\nserver entry).\n",
        "schema": {
          "type": "string",
          "example": "id,name"
        }
      },
      "PractitionerCategorySearchElements": {
        "name": "_elements",
        "in": "query",
        "required": false,
        "description": "Comma-separated field selector for practitioner category search.\n\nThe only implemented selectors for this endpoint are `id` and `name`.\nWhen `_elements` is omitted, practitioner category resources default to\n`id,name`.\n\nWhitespace around values is trimmed. Unknown selectors are preserved in\npagination links but ignored when each resource is built.\n",
        "schema": {
          "type": "string",
          "example": "id,name"
        }
      },
      "LocationPublicId": {
        "name": "publicId",
        "in": "path",
        "required": true,
        "description": "Public location identifier.",
        "schema": {
          "type": "string",
          "example": "LOC-001"
        }
      },
      "DivisionId": {
        "name": "divisionId",
        "in": "path",
        "required": true,
        "description": "Division identifier.",
        "schema": {
          "type": "string",
          "example": "DIV-001"
        }
      },
      "PractitionerPublicId": {
        "name": "publicId",
        "in": "path",
        "required": true,
        "description": "Public practitioner identifier.",
        "schema": {
          "type": "string",
          "example": "PRAC-001"
        }
      },
      "PositionPublicId": {
        "name": "publicId",
        "in": "path",
        "required": true,
        "description": "Public position identifier.",
        "schema": {
          "type": "string",
          "example": "POS-001"
        }
      },
      "DepartmentPublicId": {
        "name": "publicId",
        "in": "path",
        "required": true,
        "description": "Public department identifier.",
        "schema": {
          "type": "string",
          "example": "DEPT-001"
        }
      },
      "PractitionerCategoryPublicId": {
        "name": "publicId",
        "in": "path",
        "required": true,
        "description": "Public practitioner category identifier.",
        "schema": {
          "type": "string",
          "example": "PCAT-001"
        }
      }
    },
    "schemas": {
      "OperationOutcome": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "issue"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "OperationOutcome"
          },
          "issue": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/OperationOutcomeIssue"
            }
          }
        }
      },
      "OperationOutcomeIssue": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "severity",
          "code",
          "details"
        ],
        "properties": {
          "severity": {
            "type": "string",
            "enum": [
              "fatal",
              "error",
              "warning",
              "information"
            ]
          },
          "code": {
            "type": "string",
            "example": "invalid"
          },
          "details": {
            "$ref": "#/components/schemas/OperationOutcomeDetails"
          },
          "expression": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "OperationOutcomeDetails": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "BundleLink": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "relation",
          "url"
        ],
        "properties": {
          "relation": {
            "type": "string",
            "enum": [
              "self",
              "first",
              "previous",
              "next",
              "last"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Location": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Location"
          },
          "id": {
            "type": "string",
            "example": "LOC-001"
          },
          "name": {
            "type": "string",
            "example": "North Campus"
          },
          "addressLine": {
            "type": "string",
            "example": "123 Main St"
          },
          "city": {
            "type": "string",
            "example": "Miami"
          },
          "state": {
            "type": "string",
            "example": "Florida"
          },
          "zipCode": {
            "type": "string",
            "example": "33101"
          },
          "phoneNumber": {
            "type": "string",
            "example": "0987654321"
          },
          "fax": {
            "type": "string",
            "example": "1234567890"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "first@test.com"
          },
          "sendEmail": {
            "type": "boolean",
            "example": false
          },
          "enabledCredentialing": {
            "type": "boolean",
            "example": true
          },
          "division": {
            "type": "object",
            "description": "Division associated with the location.",
            "properties": {
              "id": {
                "type": "string",
                "example": "DIV-001"
              },
              "name": {
                "type": "string",
                "example": "North Division"
              }
            }
          },
          "locations": {
            "type": "array",
            "description": "Optional child location identifiers when requested through `_elements`.",
            "items": {
              "type": "string",
              "example": "LOC-010"
            }
          }
        }
      },
      "DivisionLocationReference": {
        "type": "object",
        "additionalProperties": false,
        "description": "Division location reference. `reference` may be `null` when no location reference is available.",
        "required": [
          "reference"
        ],
        "properties": {
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "example": "LOC-001"
          }
        }
      },
      "Division": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Division"
          },
          "id": {
            "type": "string",
            "example": "DIV-001"
          },
          "name": {
            "type": "string",
            "example": "North Division"
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DivisionLocationReference"
            }
          }
        }
      },
      "Position": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Position"
          },
          "id": {
            "type": "string",
            "example": "POS-001"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Analyst"
          },
          "clinical": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "Department": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Department"
          },
          "id": {
            "type": "string",
            "example": "DEPT-001"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Compliance/HIPAA"
          }
        }
      },
      "PractitionerCategory": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "PractitionerCategory"
          },
          "id": {
            "type": "string",
            "example": "PCAT-001"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Nursing"
          }
        }
      },
      "PractitionerLinkedResource": {
        "type": "object",
        "additionalProperties": false,
        "description": "Related practitioner resource. `name` may be absent when it is not available.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "LOC-420"
          },
          "name": {
            "type": "string",
            "example": "London Clinic"
          }
        }
      },
      "PractitionerName": {
        "type": "object",
        "properties": {
          "given": {
            "type": "string",
            "example": "Ada"
          },
          "family": {
            "type": "string",
            "example": "Lovelace"
          },
          "middle": {
            "type": "string"
          },
          "other": {
            "type": "object"
          }
        }
      },
      "PractitionerTelecom": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "example": "ada@example.test"
          },
          "primaryEmail": {
            "type": "string",
            "format": "email"
          },
          "personalEmail": {
            "type": "string",
            "format": "email"
          },
          "cellPhone": {
            "type": "string"
          },
          "homePhone": {
            "type": "string"
          },
          "workPhone": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          }
        }
      },
      "PractitionerHomeAddress": {
        "type": "object",
        "properties": {
          "line": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "county": {
            "type": "string"
          }
        }
      },
      "PractitionerMailingAddress": {
        "type": "object",
        "properties": {
          "line": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "province": {
            "type": "string"
          }
        }
      },
      "Practitioner": {
        "type": "object",
        "required": [
          "resourceType"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Practitioner"
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "example": "PRAC-001"
          },
          "name": {
            "$ref": "#/components/schemas/PractitionerName"
          },
          "telecom": {
            "$ref": "#/components/schemas/PractitionerTelecom"
          },
          "birthDate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MmDdYyyyDateString"
              },
              {
                "type": "null"
              }
            ]
          },
          "gender": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/PractitionerHomeAddress"
          },
          "mailingAddress": {
            "$ref": "#/components/schemas/PractitionerMailingAddress"
          },
          "departments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PractitionerLinkedResource"
            }
          },
          "position": {
            "$ref": "#/components/schemas/PractitionerLinkedResource"
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PractitionerLinkedResource"
            }
          },
          "divisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PractitionerLinkedResource"
            }
          },
          "extension": {
            "type": "object",
            "description": "Nested extension data may be filtered with `_elements` selectors such as\n`extension.user.status`, `extension.user.statusReason`,\n`extension.user.userType`, or `extension.provider.npiNumber`.\n\nSome fields within `extension` have a known, constrained value set:\n\n  - `extension.user.userType` \u2014 always one of `admin`, `super_admin`,\n    or `student`. If no supported value is available, the field is\n    omitted from the response.\n  - `extension.user.status` \u2014 always one of `Inactive`, `Active`,\n    or `Deactivated` when present.\n  - `extension.user.statusReason` \u2014 exposed as a human-readable\n    status reason string when present.\n  - `extension.provider.treatsGender` \u2014 when present, always one of\n    `Male only`, `Female only`, or `Both`.\n\nPractitioner category data is exposed through the dedicated\npractitioner-category endpoints rather than embedded in the public\npractitioner response.\n"
          }
        }
      },
      "MmDdYyyyDateString": {
        "type": "string",
        "pattern": "^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/[0-9]{4}$",
        "description": "Date string in `MM/DD/YYYY` format.\n\nThe value must represent a real calendar date accepted by server-side\nvalidation, not just a string that matches the pattern. For example,\n`02/31/2026` is rejected.\n",
        "example": "01/31/2026"
      },
      "PractitionerWriteName": {
        "type": "object",
        "description": "Practitioner name payload.\n\n`given` and `family` are required. Any provided string must contain at\nleast one non-whitespace character.\n\nEvery string field below is constrained to letters, numbers, spaces,\napostrophes, periods, and hyphens. The character allowlist regex\nenforced server-side is `^[A-Za-z0-9 .'\\-]+$`. Length limits enforced\nby request validation: `given`/`family` 255, `middle` 100,\n`other.given`/`other.middle`/`other.family` 100, and `other.suffix` 20.\n",
        "required": [
          "given",
          "family"
        ],
        "properties": {
          "given": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "example": "John"
          },
          "family": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "example": "Doe"
          },
          "middle": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "example": "Allen"
          },
          "other": {
            "type": "object",
            "properties": {
              "given": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "middle": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "family": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "suffix": {
                "type": "string",
                "minLength": 1,
                "maxLength": 20,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "usageStartDate": {
                "$ref": "#/components/schemas/MmDdYyyyDateString"
              },
              "usageEndDate": {
                "$ref": "#/components/schemas/MmDdYyyyDateString"
              }
            }
          }
        }
      },
      "PractitionerWriteTelecom": {
        "type": "object",
        "description": "Practitioner telecom payload.\n\n`email` is required. Any provided string must contain at least one\nnon-whitespace character.\n",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "minLength": 1,
            "format": "email",
            "example": "john.payload1@example.com"
          },
          "primaryEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "personalEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "ccEmail1": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "ccEmail2": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "cellPhone": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit cell phone number."
          },
          "homePhone": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit home phone number."
          },
          "workPhone": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit work phone number."
          },
          "fax": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit fax number."
          }
        }
      },
      "PractitionerWriteHomeAddress": {
        "type": "object",
        "description": "Optional home address payload.\n",
        "properties": {
          "line": {
            "type": "array",
            "maxItems": 2,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            }
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "postalCode": {
            "type": "string",
            "minLength": 5,
            "maxLength": 5,
            "pattern": "^\\d{5}$",
            "description": "Exactly 5 digits."
          },
          "country": {
            "type": "string",
            "minLength": 1
          },
          "county": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "PractitionerWriteMailingAddress": {
        "type": "object",
        "description": "Optional mailing address payload.\n\nThe server enforces:\n  - a character allowlist regex `^[A-Za-z0-9 .'\\-]+$` on `line[0]`,\n    `line[1]`, and `city`\n  - `maxLength: 100` on `county` and `province`\n",
        "properties": {
          "line": {
            "type": "array",
            "maxItems": 2,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 150
            }
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "postalCode": {
            "type": "string",
            "minLength": 5,
            "maxLength": 5,
            "pattern": "^\\d{5}$",
            "description": "Exactly 5 digits."
          },
          "country": {
            "type": "string",
            "minLength": 1
          },
          "county": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "province": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "PractitionerWriteEmploymentExtension": {
        "type": "object",
        "description": "Required employment extension payload.\n\nAny other properties under `extension.employment` are silently accepted, with three exceptions: `extension.employment.employeeCategoryId`, `extension.employment.deactivatedDate`, and the legacy `extension.employment.statusId` field are explicitly rejected.\n",
        "required": [
          "positionId",
          "departmentId"
        ],
        "properties": {
          "positionId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Scalar identifier; when sent as a string it is capped at 50 characters.",
            "example": "pos770"
          },
          "departmentId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Scalar identifier; when sent as a string it is capped at 50 characters.",
            "example": "dep1"
          },
          "hireDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          },
          "terminationDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          }
        }
      },
      "PractitionerWriteBirthPlace": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "minLength": 1
          },
          "stateOther": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "description": "Only letters, numbers, spaces, apostrophes, periods, and hyphens are allowed."
          }
        }
      },
      "PractitionerWriteFnin": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "description": "Only letters, numbers, spaces, apostrophes, periods, and hyphens are allowed."
          },
          "countryIssue": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "PractitionerWriteUserExtension": {
        "type": "object",
        "description": "Required user extension payload.\n\nPractitioner status lives here as well: `status` and `statusReason`\nare part of `extension.user`.\n",
        "required": [
          "location",
          "userType",
          "password"
        ],
        "properties": {
          "location": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Scalar identifier; when sent as a string it is capped at 50 characters.",
            "example": "loc4857"
          },
          "userType": {
            "type": "string",
            "enum": [
              "admin",
              "super_admin",
              "student"
            ],
            "description": "Public practitioner role.",
            "example": "admin"
          },
          "status": {
            "type": "string",
            "enum": [
              "Active",
              "Inactive",
              "Deactivated"
            ],
            "description": "Optional practitioner user status. Matching is case-insensitive, but values must preserve spaces exactly.\nUse `statusReason` with `Deactivated`. On create, omit both fields to use the API defaults.\n",
            "example": "Active"
          },
          "statusReason": {
            "type": "string",
            "enum": [
              "Contracted",
              "Independent",
              "Other",
              "On Leave",
              "Prospect",
              "Deceased",
              "Resigned",
              "Retired",
              "Terminated"
            ],
            "description": "Optional practitioner user status reason. Matching is case-insensitive and the allowed value set depends on `status`.\nOmit this field when there is no reason; do not send `null`. A deactivated status must include a valid reason.\n\nAllowed combinations:\n- `Active`: `Contracted`, `Independent`, `Other`\n- `Inactive`: `On Leave`, `Prospect`, `Other`\n- `Deactivated`: `Deceased`, `Resigned`, `Retired`, `Terminated`, `Other`\n",
            "example": "Contracted"
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 51,
            "example": "<set-at-request-time>",
            "description": "Password required for the user account. Required on create;\noptional on update (omit it to leave the stored password unchanged).\n\nWhen present, the following complexity rules are enforced:\n  - at least one uppercase letter\n  - at least one lowercase letter\n  - at least one digit\n  - at least one special character (any non-alphanumeric ASCII character, including punctuation)\n  - must not contain the submitted `telecom.email`, `name.given`, or `name.family` as a case-insensitive substring\n"
          },
          "ssn": {
            "type": "string",
            "minLength": 9,
            "maxLength": 9,
            "pattern": "^\\d{9}$"
          },
          "birthPlace": {
            "$ref": "#/components/schemas/PractitionerWriteBirthPlace"
          },
          "citizenship": {
            "type": "string",
            "minLength": 1
          },
          "raceEthnicity": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Accepted values are `American Indian or Alaska Native`, `Asian`, `Black or African American`, `Hispanic or Latino`, `Native Hawaiian or Other Pacific Islander`, `White`, `Prefer Not to Say`, and `Other`.",
            "enum": [
              "American Indian or Alaska Native",
              "Asian",
              "Black or African American",
              "Hispanic or Latino",
              "Native Hawaiian or Other Pacific Islander",
              "White",
              "Prefer Not to Say",
              "Other"
            ]
          },
          "languages": {
            "type": "array",
            "maxItems": 3,
            "description": "Up to three additional languages. Each entry allows only letters, numbers, spaces, apostrophes, periods, and hyphens.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9 .'\\-]+$"
            }
          },
          "fnin": {
            "$ref": "#/components/schemas/PractitionerWriteFnin"
          }
        }
      },
      "PractitionerWriteProviderExtension": {
        "type": "object",
        "description": "Optional provider extension payload.\n",
        "properties": {
          "npiNumber": {
            "type": "string",
            "minLength": 10,
            "maxLength": 10,
            "pattern": "^\\d{10}$"
          },
          "caqhId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12
          },
          "caqhUsername": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "caqhPassword": {
            "type": "string",
            "minLength": 1,
            "maxLength": 50
          },
          "caqhLastReattestationDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          },
          "caqhEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "treatsGender": {
            "type": "string",
            "minLength": 1,
            "description": "Accepted values are `Male only`, `Female only`, and `Both`.",
            "enum": [
              "Male only",
              "Female only",
              "Both"
            ]
          },
          "patientAgeMinimum": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "string",
                "pattern": "^\\d+$",
                "description": "Numeric string representing an integer between 0 and 100 inclusive."
              }
            ],
            "description": "Must be an integer (or numeric string) in the range `[0, 100]`. Booleans and non-numeric strings are rejected."
          },
          "patientAgeMaximum": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "string",
                "pattern": "^\\d+$",
                "description": "Numeric string representing an integer between 0 and 100 inclusive."
              }
            ],
            "description": "Must be an integer (or numeric string) in the range `[0, 100]`. Booleans and non-numeric strings are rejected."
          },
          "upin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 6,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "description": "Only letters, numbers, spaces, apostrophes, periods, and hyphens are allowed."
          }
        }
      },
      "PractitionerWriteExtension": {
        "type": "object",
        "description": "Practitioner extension payload. `employment` and `user` are required.",
        "required": [
          "employment",
          "user"
        ],
        "properties": {
          "employment": {
            "$ref": "#/components/schemas/PractitionerWriteEmploymentExtension"
          },
          "user": {
            "$ref": "#/components/schemas/PractitionerWriteUserExtension"
          },
          "provider": {
            "$ref": "#/components/schemas/PractitionerWriteProviderExtension"
          }
        }
      },
      "PractitionerUpdateName": {
        "type": "object",
        "description": "Practitioner name payload for partial updates. All fields are optional \u2014\nsend only the fields you want to change.\n\nEvery string field below is constrained to letters, numbers, spaces,\napostrophes, periods, and hyphens. The character allowlist regex\nenforced server-side is `^[A-Za-z0-9 .'\\-]+$`. Length limits enforced\nby request validation: `given`/`family` 255, `middle` 100,\n`other.given`/`other.middle`/`other.family` 100, and `other.suffix` 20.\n",
        "properties": {
          "given": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "example": "John"
          },
          "family": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "example": "Doe"
          },
          "middle": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "example": "Allen"
          },
          "other": {
            "type": "object",
            "properties": {
              "given": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "middle": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "family": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "suffix": {
                "type": "string",
                "minLength": 1,
                "maxLength": 20,
                "pattern": "^[A-Za-z0-9 .'\\-]+$"
              },
              "usageStartDate": {
                "$ref": "#/components/schemas/MmDdYyyyDateString"
              },
              "usageEndDate": {
                "$ref": "#/components/schemas/MmDdYyyyDateString"
              }
            }
          }
        }
      },
      "PractitionerUpdateTelecom": {
        "type": "object",
        "description": "Practitioner telecom payload for partial updates. All fields are optional \u2014\nsend only the fields you want to change. Any provided string must contain\nat least one non-whitespace character.\n",
        "properties": {
          "email": {
            "type": "string",
            "minLength": 1,
            "format": "email",
            "example": "john.payload1@example.com"
          },
          "primaryEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "personalEmail": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "ccEmail1": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "ccEmail2": {
            "type": "string",
            "minLength": 1,
            "format": "email"
          },
          "cellPhone": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit cell phone number."
          },
          "homePhone": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit home phone number."
          },
          "workPhone": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit work phone number."
          },
          "fax": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d{10}$",
            "description": "10 digit fax number."
          }
        }
      },
      "PractitionerUpdateEmploymentExtension": {
        "type": "object",
        "description": "Employment extension payload for partial updates. All fields are optional \u2014\nsend only the fields you want to change.\n\nAny other properties under `extension.employment` are silently accepted, with three exceptions: `extension.employment.employeeCategoryId`, `extension.employment.deactivatedDate`, and the legacy `extension.employment.statusId` field are explicitly rejected.\n",
        "properties": {
          "positionId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Scalar identifier; when sent as a string it is capped at 50 characters.",
            "example": "pos770"
          },
          "departmentId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Scalar identifier; when sent as a string it is capped at 50 characters.",
            "example": "dep1"
          },
          "hireDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          },
          "terminationDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          }
        }
      },
      "PractitionerUpdateUserExtension": {
        "type": "object",
        "description": "User extension payload for partial updates. All fields are optional \u2014\nsend only the fields you want to change. Omit `password` to leave the\nstored password unchanged.\n\nPractitioner status lives here as well: `status` and `statusReason`\nare part of `extension.user`.\n",
        "properties": {
          "location": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ],
            "description": "Scalar identifier; when sent as a string it is capped at 50 characters.",
            "example": "loc4857"
          },
          "userType": {
            "type": "string",
            "enum": [
              "admin",
              "super_admin",
              "student"
            ],
            "description": "Public practitioner role.",
            "example": "admin"
          },
          "status": {
            "type": "string",
            "enum": [
              "Active",
              "Inactive",
              "Deactivated"
            ],
            "description": "Optional practitioner user status for updates. Matching is case-insensitive, but values must preserve spaces exactly.\nIf transitioning to `Deactivated`, send `statusReason` in the same request.\n",
            "example": "Deactivated"
          },
          "statusReason": {
            "type": "string",
            "enum": [
              "Contracted",
              "Independent",
              "Other",
              "On Leave",
              "Prospect",
              "Deceased",
              "Resigned",
              "Retired",
              "Terminated"
            ],
            "description": "Optional practitioner user status reason for updates. Matching is case-insensitive and the allowed value set depends on `status`.\nOmit this field when there is no reason; do not send `null`. A deactivation update must provide a valid reason.\n\nAllowed combinations:\n- `Active`: `Contracted`, `Independent`, `Other`\n- `Inactive`: `On Leave`, `Prospect`, `Other`\n- `Deactivated`: `Deceased`, `Resigned`, `Retired`, `Terminated`, `Other`\n",
            "example": "Terminated"
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 51,
            "example": "<set-at-request-time>",
            "description": "New password. Optional on update \u2014 omit to leave the stored password\nunchanged.\n\nWhen present, the following complexity rules are enforced:\n  - at least one uppercase letter\n  - at least one lowercase letter\n  - at least one digit\n  - at least one special character (any non-alphanumeric ASCII character, including punctuation)\n  - must not contain the submitted `telecom.email`, `name.given`, or `name.family` as a case-insensitive substring\n"
          },
          "ssn": {
            "type": "string",
            "minLength": 9,
            "maxLength": 9,
            "pattern": "^\\d{9}$"
          },
          "birthPlace": {
            "$ref": "#/components/schemas/PractitionerWriteBirthPlace"
          },
          "citizenship": {
            "type": "string",
            "minLength": 1
          },
          "raceEthnicity": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Accepted values are `American Indian or Alaska Native`, `Asian`, `Black or African American`, `Hispanic or Latino`, `Native Hawaiian or Other Pacific Islander`, `White`, `Prefer Not to Say`, and `Other`.",
            "enum": [
              "American Indian or Alaska Native",
              "Asian",
              "Black or African American",
              "Hispanic or Latino",
              "Native Hawaiian or Other Pacific Islander",
              "White",
              "Prefer Not to Say",
              "Other"
            ]
          },
          "languages": {
            "type": "array",
            "maxItems": 3,
            "description": "Up to three additional languages. Each entry allows only letters, numbers, spaces, apostrophes, periods, and hyphens.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9 .'\\-]+$"
            }
          },
          "fnin": {
            "$ref": "#/components/schemas/PractitionerWriteFnin"
          }
        }
      },
      "PractitionerUpdateExtension": {
        "type": "object",
        "description": "Practitioner extension payload for partial updates. All nested objects\nand their fields are optional \u2014 send only the pieces you want to change.\n\nThe practitioner user status fields are nested under `extension.user`.\n",
        "properties": {
          "employment": {
            "$ref": "#/components/schemas/PractitionerUpdateEmploymentExtension"
          },
          "user": {
            "$ref": "#/components/schemas/PractitionerUpdateUserExtension"
          },
          "provider": {
            "$ref": "#/components/schemas/PractitionerWriteProviderExtension"
          }
        }
      },
      "PractitionerWriteRequest": {
        "type": "object",
        "description": "Practitioner create payload. `name`, `telecom`, and `extension` are required objects, and each nested required field documented below must be supplied.\n\nUnknown top-level properties are silently ignored by the server.\nThe practitioner public ID is generated by the backing service and returned in the create success response. Client-supplied top-level `id` values are ignored.\n",
        "required": [
          "name",
          "telecom",
          "extension"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "pattern": "^\\s*Practitioner\\s*$",
            "description": "Optional resource type discriminator. When present it must equal `Practitioner`.",
            "example": "Practitioner"
          },
          "name": {
            "$ref": "#/components/schemas/PractitionerWriteName"
          },
          "birthDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          },
          "gender": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "description": "Only letters, numbers, spaces, apostrophes, periods, and hyphens are allowed. Maximum 100 characters.",
            "example": "male"
          },
          "telecom": {
            "$ref": "#/components/schemas/PractitionerWriteTelecom"
          },
          "address": {
            "$ref": "#/components/schemas/PractitionerWriteHomeAddress"
          },
          "mailingAddress": {
            "$ref": "#/components/schemas/PractitionerWriteMailingAddress"
          },
          "extension": {
            "$ref": "#/components/schemas/PractitionerWriteExtension"
          }
        }
      },
      "PractitionerUpdateRequest": {
        "type": "object",
        "description": "Practitioner update payload. Every top-level field is optional \u2014 send only\nthe fields you want to change. Any field that is present is validated with\nthe same format/length/pattern rules as the create payload. Fields that\nare omitted keep their previous values.\n\nUnknown top-level properties are silently ignored by the server.\n",
        "properties": {
          "resourceType": {
            "type": "string",
            "pattern": "^\\s*Practitioner\\s*$",
            "description": "Optional resource type discriminator. When present it must equal `Practitioner`.",
            "example": "Practitioner"
          },
          "name": {
            "$ref": "#/components/schemas/PractitionerUpdateName"
          },
          "birthDate": {
            "$ref": "#/components/schemas/MmDdYyyyDateString"
          },
          "gender": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "^[A-Za-z0-9 .'\\-]+$",
            "description": "Only letters, numbers, spaces, apostrophes, periods, and hyphens are allowed. Maximum 100 characters.",
            "example": "male"
          },
          "telecom": {
            "$ref": "#/components/schemas/PractitionerUpdateTelecom"
          },
          "address": {
            "$ref": "#/components/schemas/PractitionerWriteHomeAddress"
          },
          "mailingAddress": {
            "$ref": "#/components/schemas/PractitionerWriteMailingAddress"
          },
          "extension": {
            "$ref": "#/components/schemas/PractitionerUpdateExtension"
          }
        }
      },
      "LocationCreateRequest": {
        "type": "object",
        "description": "Payload required to create a location. Both 'name' and 'state' are required.\nUnknown top-level properties are silently ignored by the server.\n",
        "required": [
          "name",
          "state"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Required location name. Cannot be blank or whitespace-only.",
            "example": "North Campus"
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\S+.*$",
            "description": "Required state value. Cannot be blank or whitespace-only.",
            "example": "Florida"
          },
          "addressLine": {
            "type": "string",
            "description": "Location address line.",
            "example": "123 Main St"
          },
          "city": {
            "type": "string",
            "description": "Location city. If provided, it cannot be blank or whitespace-only.",
            "example": "Miami"
          },
          "zipCode": {
            "type": "string",
            "description": "Location ZIP or postal code.",
            "example": "33101"
          },
          "phoneNumber": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "maxLength": 10,
            "description": "Location phone number. Must contain only digits up to 10 characters.",
            "example": "0987654321"
          },
          "fax": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "maxLength": 10,
            "description": "Location fax number. Must contain only digits up to 10 characters.",
            "example": "1234567890"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Location email address.",
            "example": "first@test.com"
          },
          "sendEmail": {
            "type": "boolean",
            "description": "Whether to send email for this location.",
            "default": false
          },
          "enabledCredentialing": {
            "type": "boolean",
            "description": "Whether credentialing is enabled for this location.",
            "default": false
          },
          "division": {
            "type": "object",
            "description": "Optional division reference wrapper.",
            "properties": {
              "reference": {
                "type": "string",
                "minLength": 1,
                "description": "Division ID reference.",
                "example": "DIV-001"
              }
            },
            "required": [
              "reference"
            ]
          }
        }
      },
      "LocationUpdateRequest": {
        "type": "object",
        "description": "Payload to update a location. 'name' is required. 'state' is optional when omitted,\nbut cannot be null or blank if provided in the payload.\nUnknown top-level properties are silently ignored by the server.\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Required location name. Cannot be blank or whitespace-only.",
            "example": "North Campus"
          },
          "state": {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\S+.*$",
            "description": "Optional state value. If provided, it cannot be null, blank, or whitespace-only.\nOmit the field completely if you do not wish to update this field.\n",
            "example": "Florida"
          },
          "addressLine": {
            "type": "string",
            "description": "Location address line.",
            "example": "123 Main St"
          },
          "city": {
            "type": "string",
            "description": "Location city. If provided, it cannot be blank or whitespace-only.",
            "example": "Miami"
          },
          "zipCode": {
            "type": "string",
            "description": "Location ZIP or postal code.",
            "example": "33101"
          },
          "phoneNumber": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "maxLength": 10,
            "description": "Location phone number. Must contain only digits up to 10 characters.",
            "example": "0987654321"
          },
          "fax": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "maxLength": 10,
            "description": "Location fax number. Must contain only digits up to 10 characters.",
            "example": "1234567890"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Location email address.",
            "example": "first@test.com"
          },
          "sendEmail": {
            "type": "boolean",
            "description": "Whether to send email for this location.",
            "default": false
          },
          "enabledCredentialing": {
            "type": "boolean",
            "description": "Whether credentialing is enabled for this location.",
            "default": false
          },
          "division": {
            "type": "object",
            "description": "Optional division reference wrapper.",
            "properties": {
              "reference": {
                "type": "string",
                "minLength": 1,
                "description": "Division ID reference.",
                "example": "DIV-001"
              }
            },
            "required": [
              "reference"
            ]
          }
        }
      },
      "DivisionCreateRequest": {
        "type": "object",
        "description": "Payload required to create a division. Unknown top-level properties are silently ignored by the server.",
        "required": [
          "name",
          "locations"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Required division name. Cannot be blank or whitespace-only.",
            "example": "North Division"
          },
          "locations": {
            "type": "array",
            "description": "Required list of location IDs. At least one value must be provided, and each value cannot be blank or whitespace-only.",
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1,
              "example": "LOC-001"
            }
          }
        }
      },
      "DivisionUpdateRequest": {
        "type": "object",
        "description": "Partial division update payload. Include at least one of `name` or `locations`; omit any property that should remain unchanged. Unknown top-level properties are silently ignored by the server.",
        "anyOf": [
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "locations"
            ]
          }
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Conditionally required division name. Send `name` or `locations`. If `name` is provided, it cannot be blank or whitespace-only.",
            "example": "North Division"
          },
          "locations": {
            "type": "array",
            "description": "Conditionally required list of location IDs. Send `name` or `locations`. Each provided value cannot be blank or whitespace-only. Send an empty array to remove all linked locations.",
            "items": {
              "type": "string",
              "minLength": 1,
              "example": "LOC-001"
            }
          }
        }
      },
      "LocationSearchEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource"
        ],
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/Location"
          }
        }
      },
      "DivisionSearchEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource"
        ],
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/Division"
          }
        }
      },
      "PositionSearchEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource"
        ],
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/Position"
          }
        }
      },
      "DepartmentSearchEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource"
        ],
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/Department"
          }
        }
      },
      "PractitionerCategorySearchEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource"
        ],
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/PractitionerCategory"
          }
        }
      },
      "PractitionerSearchEntry": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resource"
        ],
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/Practitioner"
          }
        }
      },
      "LocationSearchBundle": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "type",
          "total",
          "link",
          "entry"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Bundle"
          },
          "type": {
            "type": "string",
            "const": "searchset"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "link": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLink"
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationSearchEntry"
            }
          }
        }
      },
      "DivisionSearchBundle": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "type",
          "total",
          "link",
          "entry"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Bundle"
          },
          "type": {
            "type": "string",
            "const": "searchset"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "link": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLink"
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DivisionSearchEntry"
            }
          }
        }
      },
      "PositionSearchBundle": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "type",
          "total",
          "link",
          "entry"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Bundle"
          },
          "type": {
            "type": "string",
            "const": "searchset"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "link": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLink"
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionSearchEntry"
            }
          }
        }
      },
      "DepartmentSearchBundle": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "type",
          "total",
          "link",
          "entry"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Bundle"
          },
          "type": {
            "type": "string",
            "const": "searchset"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "link": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLink"
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepartmentSearchEntry"
            }
          }
        }
      },
      "PractitionerCategorySearchBundle": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "type",
          "total",
          "link",
          "entry"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Bundle"
          },
          "type": {
            "type": "string",
            "const": "searchset"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "link": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLink"
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PractitionerCategorySearchEntry"
            }
          }
        }
      },
      "PractitionerSearchBundle": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resourceType",
          "type",
          "total",
          "link",
          "entry"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Bundle"
          },
          "type": {
            "type": "string",
            "const": "searchset"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "link": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BundleLink"
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PractitionerSearchEntry"
            }
          }
        }
      }
    },
    "responses": {
      "LocationCreated": {
        "description": "Location created successfully",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "information",
                      "code": "informational",
                      "details": {
                        "text": "Location created successfully.",
                        "id": "LOC-001"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "LocationUpdated": {
        "description": "Location updated successfully",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "information",
                      "code": "informational",
                      "details": {
                        "text": "Location updated successfully.",
                        "id": "LOC-001"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "DivisionCreated": {
        "description": "Division created successfully",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "information",
                      "code": "informational",
                      "details": {
                        "text": "Division created successfully.",
                        "id": "DIV-001"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "DivisionUpdated": {
        "description": "Division updated successfully",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "information",
                      "code": "informational",
                      "details": {
                        "text": "Division updated successfully.",
                        "id": "DIV-001"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "PractitionerCreated": {
        "description": "Practitioner created successfully. The current runtime success message uses the term `Provider`.",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "information",
                      "code": "informational",
                      "details": {
                        "text": "Practitioner created successfully.",
                        "id": "EMP-PUB-002"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "PractitionerUpdated": {
        "description": "Practitioner updated successfully",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "information",
                      "code": "informational",
                      "details": {
                        "text": "Practitioner updated successfully.",
                        "id": "EMP-PUB-002"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "InvalidOrMissingApiKey": {
        "description": "Missing credentials or invalid API key.\n",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "missingCredentials": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "login",
                      "details": {
                        "text": "Missing or invalid authentication credentials. Provide an API key using the X-API-Key header or Authorization: Bearer <token>."
                      }
                    }
                  ]
                }
              },
              "invalidApiKey": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "login",
                      "details": {
                        "text": "Invalid or revoked API key."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded.\n",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "throttled",
                      "details": {
                        "text": "Rate limit exceeded. Please retry after a short delay."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "BadRequest": {
        "description": "Request rejected before validation or during request processing",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "invalidJson": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Request payload contains invalid \"json\" data."
                      }
                    }
                  ]
                }
              },
              "rejectedByBackingService": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The request could not be processed."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "BadGateway": {
        "description": "The requested resource identifier could not be resolved at this time",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "resolverUnavailable": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Public id resolution request failed."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "LocationBadGateway": {
        "description": "Location identifier or linked division could not be resolved at this time",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "resolverUnavailable": {
                "$ref": "#/components/responses/BadGateway/content/application~1fhir+json/examples/resolverUnavailable"
              },
              "divisionResolutionFailed": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Division reference resolution request failed."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "ValidationError": {
        "description": "Request validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "invalidIntegerQuery": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "This value should be of type integer."
                      },
                      "expression": [
                        "_count"
                      ]
                    }
                  ]
                }
              },
              "invalidPageLowerBound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field '_page' must be greater than 0"
                      },
                      "expression": [
                        "_page"
                      ]
                    }
                  ]
                }
              },
              "invalidElementsType": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field '_elements' must be a comma-separated string"
                      },
                      "expression": [
                        "_elements"
                      ]
                    }
                  ]
                }
              },
              "missingName": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The Location.name field is required."
                      },
                      "expression": [
                        "name"
                      ]
                    }
                  ]
                }
              },
              "missingDivisionName": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The Division.name field is required."
                      },
                      "expression": [
                        "name"
                      ]
                    }
                  ]
                }
              },
              "missingDivisionLocations": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'locations' is required and must contain at least one location ID string"
                      },
                      "expression": [
                        "locations"
                      ]
                    }
                  ]
                }
              },
              "invalidLocations": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'locations' must be an array of non-blank location ID strings"
                      },
                      "expression": [
                        "locations[1]"
                      ]
                    }
                  ]
                }
              },
              "divisionNameTooLong": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'name' must be 100 characters or fewer"
                      },
                      "expression": [
                        "name"
                      ]
                    }
                  ]
                }
              },
              "duplicateDivisionName": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "This division already exists for this company."
                      },
                      "expression": [
                        "name"
                      ]
                    }
                  ]
                }
              },
              "divisionLocationsNotFound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "All locations must exist and belong to the company."
                      },
                      "expression": [
                        "locations"
                      ]
                    }
                  ]
                }
              },
              "divisionLocationsAssigned": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Locations already assigned to another division must first belong to the Default division."
                      },
                      "expression": [
                        "locations"
                      ]
                    }
                  ]
                }
              },
              "emptyDivisionUpdatePayload": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "At least one of 'name' or 'locations' must be provided."
                      },
                      "expression": [
                        "name",
                        "locations"
                      ]
                    }
                  ]
                }
              },
              "missingState": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'state' is required and must be a non-blank string"
                      },
                      "expression": [
                        "state"
                      ]
                    }
                  ]
                }
              },
              "invalidDivisionReference": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'division.reference' must be a non-blank string"
                      },
                      "expression": [
                        "division[reference]"
                      ]
                    }
                  ]
                }
              },
              "practitionerResourceType": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'resourceType' must equal \"Practitioner\""
                      },
                      "expression": [
                        "resourceType"
                      ]
                    }
                  ]
                }
              },
              "practitionerBirthDateFormat": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'birthDate' must use MM/DD/YYYY format"
                      },
                      "expression": [
                        "birthDate"
                      ]
                    }
                  ]
                }
              },
              "practitionerMissingRequiredNestedField": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The Practitioner.telecom.email field is required."
                      },
                      "expression": [
                        "telecom.email"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidScalar": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "This value should be of type scalar."
                      },
                      "expression": [
                        "extension.user.location"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidStatus": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Status must be one of: Active, Inactive, or Deactivated."
                      },
                      "expression": [
                        "extension.user.status"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidActiveStatusReason": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Status Reason must be one of: Contracted, Independent, Other for status Active."
                      },
                      "expression": [
                        "extension.user.statusReason"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidInactiveStatusReason": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Status Reason must be one of: On Leave, Prospect, Other for status Inactive."
                      },
                      "expression": [
                        "extension.user.statusReason"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidDeactivatedStatusReason": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Status Reason must be one of: Deceased, Resigned, Retired, Terminated, Other for status Deactivated."
                      },
                      "expression": [
                        "extension.user.statusReason"
                      ]
                    }
                  ]
                }
              },
              "practitionerIncompatibleStatusReason": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Status Reason \"Terminated\" is not valid for status \"Active\"."
                      },
                      "expression": [
                        "extension.user.statusReason"
                      ]
                    }
                  ]
                }
              },
              "practitionerMissingDeactivatedStatusReason": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Status Reason is required when status is Deactivated."
                      },
                      "expression": [
                        "extension.user.statusReason"
                      ]
                    }
                  ]
                }
              },
              "practitionerCreateMultipleIssues": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The Practitioner.name.given field is required."
                      },
                      "expression": [
                        "name.given"
                      ]
                    },
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The Practitioner.extension.employment.positionId field is required."
                      },
                      "expression": [
                        "extension.employment.positionId"
                      ]
                    },
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "The Practitioner.extension.user.location field is required."
                      },
                      "expression": [
                        "extension.user.location"
                      ]
                    }
                  ]
                }
              },
              "practitionerUnsupportedWriteField": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Field 'extension.employment.employeeCategoryId' is not supported."
                      },
                      "expression": [
                        "extension.employment.employeeCategoryId"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidDepartmentReference": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "One or more department ids could not be resolved."
                      },
                      "expression": [
                        "extension.employment.departmentId"
                      ]
                    }
                  ]
                }
              },
              "practitionerInvalidLocationReference": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "One or more location ids could not be resolved."
                      },
                      "expression": [
                        "extension.user.location"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "SearchValidationError": {
        "description": "Search request validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "invalidIntegerQuery": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidIntegerQuery"
              },
              "invalidPageLowerBound": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidPageLowerBound"
              },
              "invalidElementsType": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidElementsType"
              }
            }
          }
        }
      },
      "LocationValidationError": {
        "description": "Location request validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "missingName": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/missingName"
              },
              "missingState": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/missingState"
              },
              "invalidDivisionReference": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidDivisionReference"
              }
            }
          }
        }
      },
      "DivisionCreateValidationError": {
        "description": "Division creation validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "missingDivisionName": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/missingDivisionName"
              },
              "missingDivisionLocations": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/missingDivisionLocations"
              },
              "invalidLocations": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidLocations"
              },
              "divisionNameTooLong": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/divisionNameTooLong"
              },
              "duplicateDivisionName": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/duplicateDivisionName"
              },
              "divisionLocationsNotFound": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/divisionLocationsNotFound"
              },
              "divisionLocationsAssigned": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/divisionLocationsAssigned"
              }
            }
          }
        }
      },
      "PractitionerReadValidationError": {
        "description": "Practitioner read validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "invalidIntegerQuery": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidIntegerQuery"
              },
              "invalidPageLowerBound": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidPageLowerBound"
              },
              "invalidElementsType": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidElementsType"
              }
            }
          }
        }
      },
      "PractitionerWriteValidationError": {
        "description": "Practitioner write validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "practitionerResourceType": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerResourceType"
              },
              "practitionerBirthDateFormat": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerBirthDateFormat"
              },
              "practitionerMissingRequiredNestedField": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerMissingRequiredNestedField"
              },
              "practitionerInvalidScalar": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidScalar"
              },
              "practitionerInvalidStatus": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidStatus"
              },
              "practitionerInvalidActiveStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidActiveStatusReason"
              },
              "practitionerInvalidInactiveStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidInactiveStatusReason"
              },
              "practitionerInvalidDeactivatedStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidDeactivatedStatusReason"
              },
              "practitionerIncompatibleStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerIncompatibleStatusReason"
              },
              "practitionerMissingDeactivatedStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerMissingDeactivatedStatusReason"
              },
              "practitionerCreateMultipleIssues": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerCreateMultipleIssues"
              },
              "practitionerUnsupportedWriteField": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerUnsupportedWriteField"
              },
              "practitionerInvalidDepartmentReference": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidDepartmentReference"
              },
              "practitionerInvalidLocationReference": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidLocationReference"
              }
            }
          }
        }
      },
      "PractitionerValidationError": {
        "description": "Practitioner request validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "invalidIntegerQuery": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidIntegerQuery"
              },
              "invalidPageLowerBound": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidPageLowerBound"
              },
              "invalidElementsType": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidElementsType"
              },
              "practitionerResourceType": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerResourceType"
              },
              "practitionerBirthDateFormat": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerBirthDateFormat"
              },
              "practitionerMissingRequiredNestedField": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerMissingRequiredNestedField"
              },
              "practitionerInvalidScalar": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidScalar"
              },
              "practitionerInvalidStatus": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidStatus"
              },
              "practitionerInvalidActiveStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidActiveStatusReason"
              },
              "practitionerInvalidInactiveStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidInactiveStatusReason"
              },
              "practitionerInvalidDeactivatedStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidDeactivatedStatusReason"
              },
              "practitionerIncompatibleStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerIncompatibleStatusReason"
              },
              "practitionerMissingDeactivatedStatusReason": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerMissingDeactivatedStatusReason"
              },
              "practitionerCreateMultipleIssues": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerCreateMultipleIssues"
              },
              "practitionerUnsupportedWriteField": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerUnsupportedWriteField"
              },
              "practitionerInvalidDepartmentReference": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidDepartmentReference"
              },
              "practitionerInvalidLocationReference": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/practitionerInvalidLocationReference"
              }
            }
          }
        }
      },
      "DivisionUpdateValidationError": {
        "description": "Division update validation failed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "emptyDivisionUpdatePayload": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/emptyDivisionUpdatePayload"
              },
              "invalidLocations": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/invalidLocations"
              },
              "divisionLocationsNotFound": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/divisionLocationsNotFound"
              },
              "duplicateDivisionName": {
                "$ref": "#/components/responses/ValidationError/content/application~1fhir+json/examples/duplicateDivisionName"
              },
              "divisionLocationsAssignedUpdate": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Locations already assigned to another division must first belong to this division or the Default division."
                      },
                      "expression": [
                        "locations"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "LocationNotFound": {
        "description": "Location or linked division resource was not found",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "locationNotFound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "One or more location ids could not be resolved."
                      }
                    }
                  ]
                }
              },
              "divisionNotFound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "Division not found."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "LocationWriteNotFound": {
        "description": "Location or linked division resource identifier could not be resolved for a write request",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "locationNotFound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "One or more location ids could not be resolved."
                      }
                    }
                  ]
                }
              },
              "divisionNotFound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "One or more division ids could not be resolved."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "DivisionNotFound": {
        "description": "Division resource was not found",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "Division not found."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "DivisionWriteNotFound": {
        "description": "Division resource identifier could not be resolved for a location write request",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "One or more division ids could not be resolved."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "PositionNotFound": {
        "description": "Position resource was not found",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "Position not found."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "PractitionerNotFound": {
        "description": "Practitioner resource was not found",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "Practitioner not found."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "DepartmentNotFound": {
        "description": "Department resource was not found",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "Department not found."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "PractitionerCategoryNotFound": {
        "description": "Practitioner category resource was not found",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "not-found",
                      "details": {
                        "text": "Practitioner category not found."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "PractitionerBadRequest": {
        "description": "Practitioner request could not be processed",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "invalidJson": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Request payload contains invalid \"json\" data."
                      }
                    }
                  ]
                }
              },
              "companyNotFound": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "invalid",
                      "details": {
                        "text": "Company not found"
                      },
                      "expression": [
                        "company"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected internal error",
        "content": {
          "application/fhir+json": {
            "schema": {
              "$ref": "#/components/schemas/OperationOutcome"
            },
            "examples": {
              "default": {
                "value": {
                  "resourceType": "OperationOutcome",
                  "issue": [
                    {
                      "severity": "error",
                      "code": "exception",
                      "details": {
                        "text": "An internal server error occurred. Please try again later."
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}