{
  "openapi": "3.0.3",
  "info": {
    "title": "Nextech Partner API (R4)",
    "description": "FHIR R4-based partner API for Nextech Select EHR. Requires Bearer token + nx-practice-id header on all requests (except /metadata and /.well-known/smart-configuration). See x-apim-guidance for Azure API Management import notes.",
    "version": "1.0.0",
    "contact": {
      "name": "Nextech Developer Support",
      "url": "http://landing.nextech.com/developers-portal-registration-form"
    },
    "x-apim-guidance": "Import as OpenAPI 3.0.3. Configure OAuth2 token endpoint: https://login.microsoftonline.com/nextech-api.com/oauth2/token. Set nx-practice-id as API subscription key header. BulkExport endpoints use async pattern (202+polling) — configure longer timeouts."
  },
  "servers": [
    {
      "url": "https://select.nextech-api.com/api/r4",
      "description": "Nextech R4 FHIR Partner API"
    }
  ],
  "tags": [
    {
      "name": "Metadata",
      "description": "FHIR capability and SMART configuration"
    },
    {
      "name": "BulkExport",
      "description": "Async bulk data export (202 + polling pattern)"
    },
    {
      "name": "Patient",
      "description": "Patient resource operations"
    },
    {
      "name": "AllergyIntolerance",
      "description": "AllergyIntolerance resource operations"
    },
    {
      "name": "CarePlan",
      "description": "CarePlan resource operations"
    },
    {
      "name": "CareTeam",
      "description": "CareTeam resource operations"
    },
    {
      "name": "Condition",
      "description": "Condition resource operations"
    },
    {
      "name": "Device",
      "description": "Device resource operations"
    },
    {
      "name": "DiagnosticReport",
      "description": "DiagnosticReport resource operations"
    },
    {
      "name": "DocumentReference",
      "description": "DocumentReference resource operations"
    },
    {
      "name": "Encounter",
      "description": "Encounter resource operations"
    },
    {
      "name": "Goal",
      "description": "Goal resource operations"
    },
    {
      "name": "Immunization",
      "description": "Immunization resource operations"
    },
    {
      "name": "MedicationDispense",
      "description": "MedicationDispense resource operations"
    },
    {
      "name": "MedicationRequest",
      "description": "MedicationRequest resource operations"
    },
    {
      "name": "Observation",
      "description": "Observation resource operations"
    },
    {
      "name": "Procedure",
      "description": "Procedure resource operations"
    },
    {
      "name": "RelatedPerson",
      "description": "RelatedPerson resource operations"
    },
    {
      "name": "ServiceRequest",
      "description": "ServiceRequest resource operations (v19.2+)"
    },
    {
      "name": "Specimen",
      "description": "Specimen resource operations"
    },
    {
      "name": "Binary",
      "description": "Binary resource operations"
    },
    {
      "name": "Account",
      "description": "Account resource operations (partner only)"
    },
    {
      "name": "Coverage",
      "description": "Coverage resource operations (partner only)"
    },
    {
      "name": "Location",
      "description": "Location resource operations (partner only)"
    },
    {
      "name": "Organization",
      "description": "Organization resource operations (partner only)"
    },
    {
      "name": "Practitioner",
      "description": "Practitioner resource operations (partner only)"
    },
    {
      "name": "Provenance",
      "description": "Provenance resource operations (partner only)"
    }
  ],
  "paths": {
    "/metadata": {
      "get": {
        "summary": "Get FHIR Capability Statement",
        "operationId": "getCapabilityStatement",
        "tags": [
          "Metadata"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "FHIR CapabilityStatement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilityStatement"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/smart-configuration": {
      "get": {
        "summary": "Get SMART on FHIR Configuration",
        "operationId": "getSmartConfiguration",
        "tags": [
          "Metadata"
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "SMART configuration object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartConfiguration"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/$export": {
      "get": {
        "summary": "System-level bulk export kick-off",
        "operationId": "exportSystem",
        "tags": [
          "BulkExport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "_outputFormat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Output format (e.g. application/fhir+ndjson)"
          },
          {
            "name": "_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return resources updated after this instant (FHIR instant format)"
          },
          {
            "name": "_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of FHIR resource types to include"
          }
        ],
        "responses": {
          "202": {
            "description": "Export job accepted",
            "headers": {
              "Content-Location": {
                "description": "URL to poll for export job status",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/$export": {
      "get": {
        "summary": "Patient-level bulk export kick-off",
        "operationId": "exportPatients",
        "tags": [
          "BulkExport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "_outputFormat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Output format (e.g. application/fhir+ndjson)"
          },
          {
            "name": "_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return resources updated after this instant (FHIR instant format)"
          },
          {
            "name": "_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of FHIR resource types to include"
          }
        ],
        "responses": {
          "202": {
            "description": "Export job accepted",
            "headers": {
              "Content-Location": {
                "description": "URL to poll for export job status",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Group/{groupId}/$export": {
      "get": {
        "summary": "Group-level bulk export kick-off",
        "operationId": "exportGroup",
        "tags": [
          "BulkExport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Group resource ID"
          },
          {
            "name": "_outputFormat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Output format (e.g. application/fhir+ndjson)"
          },
          {
            "name": "_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Return resources updated after this instant (FHIR instant format)"
          },
          {
            "name": "_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of FHIR resource types to include"
          }
        ],
        "responses": {
          "202": {
            "description": "Export job accepted",
            "headers": {
              "Content-Location": {
                "description": "URL to poll for export job status",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Export/{exportJobId}": {
      "get": {
        "summary": "Poll bulk export job status",
        "operationId": "pollExport",
        "tags": [
          "BulkExport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "exportJobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Export job ID from the Content-Location header"
          }
        ],
        "responses": {
          "200": {
            "description": "Export complete",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobStatus"
                }
              }
            }
          },
          "202": {
            "description": "Export in progress",
            "headers": {
              "Content-Location": {
                "description": "URL to continue polling",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Cancel bulk export job",
        "operationId": "cancelExport",
        "tags": [
          "BulkExport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "exportJobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Export job ID to cancel"
          }
        ],
        "responses": {
          "202": {
            "description": "Cancellation accepted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/{patientId}": {
      "get": {
        "summary": "Get Patient by ID",
        "operationId": "getPatient",
        "tags": [
          "Patient"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Patient resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Patient"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Patient": {
      "get": {
        "summary": "Search Patients",
        "operationId": "searchPatients",
        "tags": [
          "Patient"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Family name (last name)"
          },
          {
            "name": "given",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Given name (first name)"
          },
          {
            "name": "birthdate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Date of birth (YYYY-MM-DD)"
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Phone number"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Email address"
          },
          {
            "name": "address-city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "City in address"
          },
          {
            "name": "address-state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "State in address"
          },
          {
            "name": "address-postalcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Postal code"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Any part of the name"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Administrative gender (male|female|other|unknown)"
          },
          {
            "name": "group-id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Group membership filter"
          },
          {
            "name": "_revinclude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reverse include directive"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/_search": {
      "post": {
        "summary": "Search Patient resources (form body)",
        "operationId": "searchPatientsPost",
        "tags": [
          "Patient"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "family": {
                    "type": "string",
                    "description": "Family name"
                  },
                  "given": {
                    "type": "string",
                    "description": "Given name"
                  },
                  "birthdate": {
                    "type": "string",
                    "description": "Date of birth"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Phone number"
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address"
                  },
                  "address-city": {
                    "type": "string",
                    "description": "City"
                  },
                  "address-state": {
                    "type": "string",
                    "description": "State"
                  },
                  "address-postalcode": {
                    "type": "string",
                    "description": "Postal code"
                  },
                  "name": {
                    "type": "string",
                    "description": "Any part of the name"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "gender": {
                    "type": "string",
                    "description": "Administrative gender"
                  },
                  "group-id": {
                    "type": "string",
                    "description": "Group membership"
                  },
                  "_revinclude": {
                    "type": "string",
                    "description": "Reverse include directive"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/AllergyIntolerance/{allergyId}": {
      "get": {
        "summary": "Get AllergyIntolerance by ID",
        "operationId": "getAllergyIntolerance",
        "tags": [
          "AllergyIntolerance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "allergyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The AllergyIntolerance resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllergyIntolerance"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/AllergyIntolerance": {
      "get": {
        "summary": "Search AllergyIntolerances",
        "operationId": "searchAllergyIntolerances",
        "tags": [
          "AllergyIntolerance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_revinclude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reverse include directive"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/{patientUid}/AllergyIntolerance": {
      "get": {
        "summary": "Search AllergyIntolerances for a specific Patient",
        "operationId": "searchPatientAllergyIntolerances",
        "tags": [
          "AllergyIntolerance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patientUid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Patient resource ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_revinclude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reverse include directive"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Patient/AllergyIntolerance/_search": {
      "post": {
        "summary": "Search AllergyIntolerance resources (form body)",
        "operationId": "searchAllergyIntolerancesPost",
        "tags": [
          "AllergyIntolerance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_revinclude": {
                    "type": "string",
                    "description": "Reverse include directive"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/CarePlan/{carePlanId}": {
      "get": {
        "summary": "Get CarePlan by ID",
        "operationId": "getCarePlan",
        "tags": [
          "CarePlan"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "carePlanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The CarePlan resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarePlan"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/CarePlan": {
      "get": {
        "summary": "Search CarePlans",
        "operationId": "searchCarePlans",
        "tags": [
          "CarePlan"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "CarePlan category"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "CarePlan status"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/CarePlan/_search": {
      "post": {
        "summary": "Search CarePlan resources (form body)",
        "operationId": "searchCarePlansPost",
        "tags": [
          "CarePlan"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "category": {
                    "type": "string",
                    "description": "CarePlan category"
                  },
                  "status": {
                    "type": "string",
                    "description": "CarePlan status"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/CareTeam/{careTeamId}": {
      "get": {
        "summary": "Get CareTeam by ID",
        "operationId": "getCareTeam",
        "tags": [
          "CareTeam"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "careTeamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The CareTeam resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CareTeam"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/CareTeam": {
      "get": {
        "summary": "Search CareTeams",
        "operationId": "searchCareTeams",
        "tags": [
          "CareTeam"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "CareTeam status"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_revinclude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reverse include directive"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/CareTeam/_search": {
      "post": {
        "summary": "Search CareTeam resources (form body)",
        "operationId": "searchCareTeamsPost",
        "tags": [
          "CareTeam"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "status": {
                    "type": "string",
                    "description": "CareTeam status"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_revinclude": {
                    "type": "string",
                    "description": "Reverse include directive"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Condition/{conditionId}": {
      "get": {
        "summary": "Get Condition by ID",
        "operationId": "getCondition",
        "tags": [
          "Condition"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "conditionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Condition resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Condition"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Condition": {
      "get": {
        "summary": "Search Conditions",
        "operationId": "searchConditions",
        "tags": [
          "Condition"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference (required)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Condition category (required for v19.1+)"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Condition/_search": {
      "post": {
        "summary": "Search Condition resources (form body)",
        "operationId": "searchConditionsPost",
        "tags": [
          "Condition"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "category": {
                    "type": "string",
                    "description": "Condition category (required for v19.1+)"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Device/{deviceId}": {
      "get": {
        "summary": "Get Device by ID",
        "operationId": "getDevice",
        "tags": [
          "Device"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Device resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Device": {
      "get": {
        "summary": "Search Devices",
        "operationId": "searchDevices",
        "tags": [
          "Device"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Device/_search": {
      "post": {
        "summary": "Search Device resources (form body)",
        "operationId": "searchDevicesPost",
        "tags": [
          "Device"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DiagnosticReport/{diagnosticReportId}": {
      "get": {
        "summary": "Get DiagnosticReport by ID",
        "operationId": "getDiagnosticReport",
        "tags": [
          "DiagnosticReport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "diagnosticReportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The DiagnosticReport resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiagnosticReport"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DiagnosticReport": {
      "get": {
        "summary": "Search DiagnosticReports",
        "operationId": "searchDiagnosticReports",
        "tags": [
          "DiagnosticReport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Report status"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Report category"
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Report code"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Report date"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DiagnosticReport/_search": {
      "post": {
        "summary": "Search DiagnosticReport resources (form body)",
        "operationId": "searchDiagnosticReportsPost",
        "tags": [
          "DiagnosticReport"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "status": {
                    "type": "string",
                    "description": "Report status"
                  },
                  "category": {
                    "type": "string",
                    "description": "Report category"
                  },
                  "code": {
                    "type": "string",
                    "description": "Report code"
                  },
                  "date": {
                    "type": "string",
                    "description": "Report date"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DocumentReference/{documentId}": {
      "get": {
        "summary": "Get DocumentReference by ID",
        "operationId": "getDocumentReference",
        "tags": [
          "DocumentReference"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "DocumentReference resource ID (format: {documenttype}-{id})"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentReference"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DocumentReference": {
      "get": {
        "summary": "Search DocumentReferences",
        "operationId": "searchDocumentReferences",
        "tags": [
          "DocumentReference"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Document status"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Document type"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Document category"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Document date"
          },
          {
            "name": "author",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Document author"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_revinclude",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Reverse include directive"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a DocumentReference",
        "operationId": "createDocumentReference",
        "tags": [
          "DocumentReference"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentReferenceCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "DocumentReference created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentReference"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DocumentReference/_search": {
      "post": {
        "summary": "Search DocumentReference resources (form body)",
        "operationId": "searchDocumentReferencesPost",
        "tags": [
          "DocumentReference"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "status": {
                    "type": "string",
                    "description": "Document status"
                  },
                  "type": {
                    "type": "string",
                    "description": "Document type"
                  },
                  "category": {
                    "type": "string",
                    "description": "Document category"
                  },
                  "date": {
                    "type": "string",
                    "description": "Document date"
                  },
                  "author": {
                    "type": "string",
                    "description": "Document author"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_revinclude": {
                    "type": "string",
                    "description": "Reverse include directive"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/DocumentReference/$docref": {
      "get": {
        "summary": "Generate CCD-A document (GET)",
        "operationId": "generateCcdaGet",
        "tags": [
          "DocumentReference"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Patient logical ID (required)"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Period start date"
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Period end date"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle containing generated CCDA DocumentReference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Generate CCD-A document (POST with FHIR Parameters)",
        "operationId": "generateCcdaPost",
        "tags": [
          "DocumentReference"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FhirParameters"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle containing generated CCDA DocumentReference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Encounter/{encounterId}": {
      "get": {
        "summary": "Get Encounter by ID",
        "operationId": "getEncounter",
        "tags": [
          "Encounter"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "encounterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Encounter resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Encounter"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Encounter": {
      "get": {
        "summary": "Search Encounters",
        "operationId": "searchEncounters",
        "tags": [
          "Encounter"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Encounter date"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Encounter/_search": {
      "post": {
        "summary": "Search Encounter resources (form body)",
        "operationId": "searchEncountersPost",
        "tags": [
          "Encounter"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "date": {
                    "type": "string",
                    "description": "Encounter date"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Goal/{goalId}": {
      "get": {
        "summary": "Get Goal by ID",
        "operationId": "getGoal",
        "tags": [
          "Goal"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "goalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Goal resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Goal"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Goal": {
      "get": {
        "summary": "Search Goals",
        "operationId": "searchGoals",
        "tags": [
          "Goal"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Goal target date"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Goal/_search": {
      "post": {
        "summary": "Search Goal resources (form body)",
        "operationId": "searchGoalsPost",
        "tags": [
          "Goal"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "date": {
                    "type": "string",
                    "description": "Goal target date"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Immunization/{immunizationId}": {
      "get": {
        "summary": "Get Immunization by ID",
        "operationId": "getImmunization",
        "tags": [
          "Immunization"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "immunizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Immunization resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Immunization"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Immunization": {
      "get": {
        "summary": "Search Immunizations",
        "operationId": "searchImmunizations",
        "tags": [
          "Immunization"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Immunization/_search": {
      "post": {
        "summary": "Search Immunization resources (form body)",
        "operationId": "searchImmunizationsPost",
        "tags": [
          "Immunization"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationDispense/{medicationDispenseId}": {
      "get": {
        "summary": "Get MedicationDispense by ID",
        "operationId": "getMedicationDispense",
        "tags": [
          "MedicationDispense"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "medicationDispenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The MedicationDispense resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MedicationDispense"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationDispense": {
      "get": {
        "summary": "Search MedicationDispenses",
        "operationId": "searchMedicationDispenses",
        "tags": [
          "MedicationDispense"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationDispense/_search": {
      "post": {
        "summary": "Search MedicationDispense resources (form body)",
        "operationId": "searchMedicationDispensesPost",
        "tags": [
          "MedicationDispense"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationRequest/{medicationRequestId}": {
      "get": {
        "summary": "Get MedicationRequest by ID",
        "operationId": "getMedicationRequest",
        "tags": [
          "MedicationRequest"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "medicationRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The MedicationRequest resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MedicationRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationRequest": {
      "get": {
        "summary": "Search MedicationRequests",
        "operationId": "searchMedicationRequests",
        "tags": [
          "MedicationRequest"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "intent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Request intent"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Request status"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/MedicationRequest/_search": {
      "post": {
        "summary": "Search MedicationRequest resources (form body)",
        "operationId": "searchMedicationRequestsPost",
        "tags": [
          "MedicationRequest"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "intent": {
                    "type": "string",
                    "description": "Request intent"
                  },
                  "status": {
                    "type": "string",
                    "description": "Request status"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Observation/{observationId}": {
      "get": {
        "summary": "Get Observation by ID",
        "operationId": "getObservation",
        "tags": [
          "Observation"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "observationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Observation resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Observation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Observation": {
      "get": {
        "summary": "Search Observations",
        "operationId": "searchObservations",
        "tags": [
          "Observation"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Observation category"
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Observation code"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Observation date"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Observation/_search": {
      "post": {
        "summary": "Search Observation resources (form body)",
        "operationId": "searchObservationsPost",
        "tags": [
          "Observation"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "category": {
                    "type": "string",
                    "description": "Observation category"
                  },
                  "code": {
                    "type": "string",
                    "description": "Observation code"
                  },
                  "date": {
                    "type": "string",
                    "description": "Observation date"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Procedure/{procedureId}": {
      "get": {
        "summary": "Get Procedure by ID",
        "operationId": "getProcedure",
        "tags": [
          "Procedure"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "procedureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Procedure resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Procedure"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Procedure": {
      "get": {
        "summary": "Search Procedures",
        "operationId": "searchProcedures",
        "tags": [
          "Procedure"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Procedure date"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Procedure/_search": {
      "post": {
        "summary": "Search Procedure resources (form body)",
        "operationId": "searchProceduresPost",
        "tags": [
          "Procedure"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "date": {
                    "type": "string",
                    "description": "Procedure date"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/RelatedPerson/{relatedPersonId}": {
      "get": {
        "summary": "Get RelatedPerson by ID",
        "operationId": "getRelatedPerson",
        "tags": [
          "RelatedPerson"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "relatedPersonId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The RelatedPerson resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedPerson"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/RelatedPerson": {
      "get": {
        "summary": "Search RelatedPersons",
        "operationId": "searchRelatedPersons",
        "tags": [
          "RelatedPerson"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/ServiceRequest/{serviceRequestId}": {
      "get": {
        "summary": "Get ServiceRequest by ID (v19.2+)",
        "operationId": "getServiceRequest",
        "tags": [
          "ServiceRequest"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "serviceRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ServiceRequest resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/ServiceRequest": {
      "get": {
        "summary": "Search ServiceRequests (v19.2+)",
        "operationId": "searchServiceRequests",
        "tags": [
          "ServiceRequest"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "authored",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Authored date"
          },
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/ServiceRequest/_search": {
      "post": {
        "summary": "Search ServiceRequest resources (form body)",
        "operationId": "searchServiceRequestsPost",
        "tags": [
          "ServiceRequest"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "authored": {
                    "type": "string",
                    "description": "Authored date"
                  },
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Specimen/{specimenId}": {
      "get": {
        "summary": "Get Specimen by ID",
        "operationId": "getSpecimen",
        "tags": [
          "Specimen"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "specimenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Specimen resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Specimen"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Specimen": {
      "get": {
        "summary": "Search Specimens",
        "operationId": "searchSpecimens",
        "tags": [
          "Specimen"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Binary/{documentId}": {
      "get": {
        "summary": "Get Binary resource by ID",
        "operationId": "getBinary",
        "tags": [
          "Binary"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Binary resource ID (format: {documenttype}-{id})"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Binary"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Account/{accountId}": {
      "get": {
        "summary": "Get Account by ID",
        "operationId": "getAccount",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Account resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Account": {
      "get": {
        "summary": "Search Accounts",
        "operationId": "searchAccounts",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Account status"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Account name"
          },
          {
            "name": "balance",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Account balance filter"
          },
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Coverage/{coverageId}": {
      "get": {
        "summary": "Get Coverage by ID",
        "operationId": "getCoverage",
        "tags": [
          "Coverage"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "coverageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Coverage resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coverage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Coverage": {
      "get": {
        "summary": "Search Coverages",
        "operationId": "searchCoverages",
        "tags": [
          "Coverage"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "patient",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference (required)"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Coverage/_search": {
      "post": {
        "summary": "Search Coverages (form body)",
        "operationId": "searchCoveragesPost",
        "tags": [
          "Coverage"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                },
                "required": [
                  "patient"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Location/{locationId}": {
      "get": {
        "summary": "Get Location by ID",
        "operationId": "getLocation",
        "tags": [
          "Location"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Location resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Location"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Location": {
      "get": {
        "summary": "Search Locations",
        "operationId": "searchLocations",
        "tags": [
          "Location"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Location status"
          },
          {
            "name": "includeAll",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Include inactive locations"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Location name"
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Address string"
          },
          {
            "name": "address-city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "City"
          },
          {
            "name": "address-state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "State"
          },
          {
            "name": "address-postalcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Postal code"
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Phone number"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Location/_search": {
      "post": {
        "summary": "Search Location resources (form body)",
        "operationId": "searchLocationsPost",
        "tags": [
          "Location"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "status": {
                    "type": "string",
                    "description": "Location status"
                  },
                  "name": {
                    "type": "string",
                    "description": "Location name"
                  },
                  "address": {
                    "type": "string",
                    "description": "Address string"
                  },
                  "address-city": {
                    "type": "string",
                    "description": "City"
                  },
                  "address-state": {
                    "type": "string",
                    "description": "State"
                  },
                  "address-postalcode": {
                    "type": "string",
                    "description": "Postal code"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Phone number"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Organization/{organizationId}": {
      "get": {
        "summary": "Get Organization by ID",
        "operationId": "getOrganization",
        "tags": [
          "Organization"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Organization resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Organization": {
      "get": {
        "summary": "Search Organizations",
        "operationId": "searchOrganizations",
        "tags": [
          "Organization"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Organization status"
          },
          {
            "name": "includeAll",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Include inactive organizations"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Organization name"
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Address string"
          },
          {
            "name": "address-city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "City"
          },
          {
            "name": "address-state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "State"
          },
          {
            "name": "address-postalcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Postal code"
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Phone number"
          },
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Organization type"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Organization/_search": {
      "post": {
        "summary": "Search Organization resources (form body)",
        "operationId": "searchOrganizationsPost",
        "tags": [
          "Organization"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "status": {
                    "type": "string",
                    "description": "Organization status"
                  },
                  "name": {
                    "type": "string",
                    "description": "Organization name"
                  },
                  "address": {
                    "type": "string",
                    "description": "Address string"
                  },
                  "address-city": {
                    "type": "string",
                    "description": "City"
                  },
                  "address-state": {
                    "type": "string",
                    "description": "State"
                  },
                  "address-postalcode": {
                    "type": "string",
                    "description": "Postal code"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Phone number"
                  },
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "type": {
                    "type": "string",
                    "description": "Organization type"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Practitioner/{practitionerId}": {
      "get": {
        "summary": "Get Practitioner by ID",
        "operationId": "getPractitioner",
        "tags": [
          "Practitioner"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "practitionerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Practitioner resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Practitioner"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Practitioner": {
      "get": {
        "summary": "Search Practitioners",
        "operationId": "searchPractitioners",
        "tags": [
          "Practitioner"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Active status filter"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Full name"
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Family name"
          },
          {
            "name": "given",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Given name"
          },
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Address string"
          },
          {
            "name": "address-city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "City"
          },
          {
            "name": "address-state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "State"
          },
          {
            "name": "address-postalcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Postal code"
          },
          {
            "name": "address-country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Country"
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Phone number"
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Email address"
          },
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Administrative gender"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Provenance/{provenanceId}": {
      "get": {
        "summary": "Get Provenance by ID",
        "operationId": "getProvenance",
        "tags": [
          "Provenance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "provenanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The Provenance resource ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Provenance"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Provenance": {
      "get": {
        "summary": "Search Provenances",
        "operationId": "searchProvenances",
        "tags": [
          "Provenance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "parameters": [
          {
            "name": "_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Resource logical ID"
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Business identifier"
          },
          {
            "name": "_lastUpdated",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by last update date"
          },
          {
            "name": "patient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Patient reference"
          },
          {
            "name": "_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 50
            },
            "description": "Results per page (max 50, default 10)"
          }
        ],
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/Provenance/_search": {
      "post": {
        "summary": "Search Provenance resources (form body)",
        "operationId": "searchProvenancesPost",
        "tags": [
          "Provenance"
        ],
        "security": [
          {
            "bearerAuth": [],
            "practiceId": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "_id": {
                    "type": "string",
                    "description": "Resource logical ID"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Business identifier"
                  },
                  "_lastUpdated": {
                    "type": "string",
                    "description": "Filter by last update date"
                  },
                  "patient": {
                    "type": "string",
                    "description": "Patient reference"
                  },
                  "_count": {
                    "type": "integer",
                    "default": 10,
                    "maximum": 50,
                    "description": "Results per page (max 50)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bundle of matching resources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bundle"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — rate limit exceeded (20 req/sec/endpoint)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "OAuth2 Bearer token. Obtain from https://login.microsoftonline.com/nextech-api.com/oauth2/token using resource owner credentials or authorization code grant."
      },
      "practiceId": {
        "type": "apiKey",
        "in": "header",
        "name": "nx-practice-id",
        "description": "Nextech practice identifier header. Required on all partner-facing endpoints."
      }
    },
    "schemas": {
      "Bundle": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Bundle"
          },
          "id": {
            "type": "string"
          },
          "meta": {
            "type": "object"
          },
          "type": {
            "type": "string",
            "description": "Bundle type (searchset, collection, etc.)"
          },
          "total": {
            "type": "integer",
            "description": "Total matching resources"
          },
          "link": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "relation": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "entry": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fullUrl": {
                  "type": "string"
                },
                "resource": {
                  "type": "object"
                },
                "search": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CapabilityStatement": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "CapabilityStatement"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "fhirVersion": {
            "type": "string",
            "example": "4.0.1"
          },
          "format": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rest": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "SmartConfiguration": {
        "type": "object",
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "authorization_endpoint": {
            "type": "string"
          },
          "token_endpoint": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "jwks_uri": {
            "type": "string"
          },
          "grant_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ExportJobStatus": {
        "type": "object",
        "properties": {
          "transactionTime": {
            "type": "string",
            "description": "FHIR instant when export was initiated"
          },
          "request": {
            "type": "string",
            "description": "Original export request URL"
          },
          "requiresAccessToken": {
            "type": "boolean"
          },
          "output": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "error": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "FhirParameters": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Parameters"
          },
          "parameter": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "valueString": {
                  "type": "string"
                },
                "valueDate": {
                  "type": "string",
                  "format": "date"
                }
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "OperationOutcome"
          },
          "issue": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "severity": {
                  "type": "string",
                  "description": "fatal | error | warning | information"
                },
                "code": {
                  "type": "string"
                },
                "details": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Patient": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Patient"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "active": {
            "type": "boolean"
          },
          "name": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "telecom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "gender": {
            "type": "string",
            "description": "male | female | other | unknown"
          },
          "birthDate": {
            "type": "string",
            "format": "date"
          },
          "deceasedBoolean": {
            "type": "boolean"
          },
          "deceasedDateTime": {
            "type": "string"
          },
          "address": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "maritalStatus": {
            "type": "object"
          },
          "contact": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "communication": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "generalPractitioner": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "managingOrganization": {
            "type": "object"
          }
        }
      },
      "AllergyIntolerance": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "AllergyIntolerance"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "clinicalStatus": {
            "type": "object"
          },
          "verificationStatus": {
            "type": "object"
          },
          "type": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "criticality": {
            "type": "string"
          },
          "code": {
            "type": "object"
          },
          "patient": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "recordedDate": {
            "type": "string"
          },
          "recorder": {
            "type": "object"
          },
          "asserter": {
            "type": "object"
          },
          "lastOccurrence": {
            "type": "string"
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "reaction": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "CarePlan": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "CarePlan"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "intent": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "period": {
            "type": "object"
          },
          "created": {
            "type": "string"
          },
          "author": {
            "type": "object"
          },
          "careTeam": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "goal": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "activity": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "CareTeam": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "CareTeam"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "period": {
            "type": "object"
          },
          "participant": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "managingOrganization": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "telecom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Condition": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Condition"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "clinicalStatus": {
            "type": "object"
          },
          "verificationStatus": {
            "type": "object"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "severity": {
            "type": "object"
          },
          "code": {
            "type": "object"
          },
          "bodySite": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "onsetDateTime": {
            "type": "string"
          },
          "abatementDateTime": {
            "type": "string"
          },
          "recordedDate": {
            "type": "string"
          },
          "recorder": {
            "type": "object"
          },
          "asserter": {
            "type": "object"
          },
          "stage": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Device": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Device"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "udiCarrier": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "type": "string"
          },
          "manufacturer": {
            "type": "string"
          },
          "manufactureDate": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string"
          },
          "lotNumber": {
            "type": "string"
          },
          "serialNumber": {
            "type": "string"
          },
          "deviceName": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "modelNumber": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "patient": {
            "type": "object"
          },
          "owner": {
            "type": "object"
          },
          "contact": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "url": {
            "type": "string"
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DiagnosticReport": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "DiagnosticReport"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "basedOn": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "code": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "effectiveDateTime": {
            "type": "string"
          },
          "issued": {
            "type": "string"
          },
          "performer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "specimen": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "result": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "media": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "conclusion": {
            "type": "string"
          },
          "presentedForm": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "DocumentReference": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "DocumentReference"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "masterIdentifier": {
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "docStatus": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "subject": {
            "type": "object"
          },
          "date": {
            "type": "string"
          },
          "author": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "authenticator": {
            "type": "object"
          },
          "custodian": {
            "type": "object"
          },
          "relatesTo": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "description": {
            "type": "string"
          },
          "securityLabel": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "context": {
            "type": "object"
          }
        }
      },
      "DocumentReferenceCreate": {
        "type": "object",
        "required": [
          "resourceType",
          "status",
          "content"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "DocumentReference"
          },
          "status": {
            "type": "string",
            "description": "current | superseded | entered-in-error"
          },
          "type": {
            "type": "object",
            "description": "Document type code"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "subject": {
            "type": "object",
            "description": "Patient reference"
          },
          "date": {
            "type": "string",
            "description": "Document date (FHIR instant)"
          },
          "author": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "content": {
            "type": "array",
            "description": "Document content attachments",
            "items": {
              "type": "object",
              "properties": {
                "attachment": {
                  "type": "object"
                },
                "format": {
                  "type": "object"
                }
              }
            }
          },
          "context": {
            "type": "object"
          }
        }
      },
      "Encounter": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Encounter"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "statusHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "class": {
            "type": "object"
          },
          "classHistory": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "type": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "serviceType": {
            "type": "object"
          },
          "priority": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "participant": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "period": {
            "type": "object"
          },
          "length": {
            "type": "object"
          },
          "reasonCode": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "diagnosis": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "hospitalization": {
            "type": "object"
          },
          "location": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "serviceProvider": {
            "type": "object"
          }
        }
      },
      "Goal": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Goal"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "lifecycleStatus": {
            "type": "string"
          },
          "achievementStatus": {
            "type": "object"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "priority": {
            "type": "object"
          },
          "description": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "target": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "statusDate": {
            "type": "string",
            "format": "date"
          },
          "statusReason": {
            "type": "string"
          },
          "expressedBy": {
            "type": "object"
          },
          "addresses": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "outcomeCode": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "outcomeReference": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Immunization": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Immunization"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "statusReason": {
            "type": "object"
          },
          "vaccineCode": {
            "type": "object"
          },
          "patient": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "occurrenceDateTime": {
            "type": "string"
          },
          "recorded": {
            "type": "string"
          },
          "primarySource": {
            "type": "boolean"
          },
          "location": {
            "type": "object"
          },
          "manufacturer": {
            "type": "object"
          },
          "lotNumber": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string",
            "format": "date"
          },
          "site": {
            "type": "object"
          },
          "route": {
            "type": "object"
          },
          "doseQuantity": {
            "type": "object"
          },
          "performer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "reasonCode": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "isSubpotent": {
            "type": "boolean"
          },
          "reaction": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "protocolApplied": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "MedicationDispense": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "MedicationDispense"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "partOf": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "type": "string"
          },
          "category": {
            "type": "object"
          },
          "medicationCodeableConcept": {
            "type": "object"
          },
          "medicationReference": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "context": {
            "type": "object"
          },
          "performer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "location": {
            "type": "object"
          },
          "authorizingPrescription": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "type": {
            "type": "object"
          },
          "quantity": {
            "type": "object"
          },
          "daysSupply": {
            "type": "object"
          },
          "whenPrepared": {
            "type": "string"
          },
          "whenHandedOver": {
            "type": "string"
          },
          "destination": {
            "type": "object"
          },
          "receiver": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "dosageInstruction": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "MedicationRequest": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "MedicationRequest"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "statusReason": {
            "type": "object"
          },
          "intent": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "priority": {
            "type": "string"
          },
          "doNotPerform": {
            "type": "boolean"
          },
          "medicationCodeableConcept": {
            "type": "object"
          },
          "medicationReference": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "authoredOn": {
            "type": "string"
          },
          "requester": {
            "type": "object"
          },
          "performer": {
            "type": "object"
          },
          "recorder": {
            "type": "object"
          },
          "reasonCode": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "dosageInstruction": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "dispenseRequest": {
            "type": "object"
          },
          "substitution": {
            "type": "object"
          }
        }
      },
      "Observation": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Observation"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "basedOn": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "partOf": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "code": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "focus": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "encounter": {
            "type": "object"
          },
          "effectiveDateTime": {
            "type": "string"
          },
          "effectivePeriod": {
            "type": "object"
          },
          "issued": {
            "type": "string"
          },
          "performer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "valueQuantity": {
            "type": "object"
          },
          "valueCodeableConcept": {
            "type": "object"
          },
          "valueString": {
            "type": "string"
          },
          "dataAbsentReason": {
            "type": "object"
          },
          "interpretation": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "bodySite": {
            "type": "object"
          },
          "method": {
            "type": "object"
          },
          "specimen": {
            "type": "object"
          },
          "device": {
            "type": "object"
          },
          "referenceRange": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "hasMember": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "derivedFrom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "component": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Procedure": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Procedure"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "basedOn": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "partOf": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "status": {
            "type": "string"
          },
          "statusReason": {
            "type": "object"
          },
          "category": {
            "type": "object"
          },
          "code": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "performedDateTime": {
            "type": "string"
          },
          "performedPeriod": {
            "type": "object"
          },
          "recorder": {
            "type": "object"
          },
          "asserter": {
            "type": "object"
          },
          "performer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "location": {
            "type": "object"
          },
          "reasonCode": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "bodySite": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "outcome": {
            "type": "object"
          },
          "report": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "complication": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "followUp": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "focalDevice": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "RelatedPerson": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "RelatedPerson"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "active": {
            "type": "boolean"
          },
          "patient": {
            "type": "object"
          },
          "relationship": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "name": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "telecom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "gender": {
            "type": "string"
          },
          "birthDate": {
            "type": "string",
            "format": "date"
          },
          "address": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "photo": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "period": {
            "type": "object"
          },
          "communication": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ServiceRequest": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "ServiceRequest"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "basedOn": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "replaces": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "requisition": {
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "intent": {
            "type": "string"
          },
          "category": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "priority": {
            "type": "string"
          },
          "doNotPerform": {
            "type": "boolean"
          },
          "code": {
            "type": "object"
          },
          "orderDetail": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "subject": {
            "type": "object"
          },
          "encounter": {
            "type": "object"
          },
          "occurrenceDateTime": {
            "type": "string"
          },
          "asNeededBoolean": {
            "type": "boolean"
          },
          "authoredOn": {
            "type": "string"
          },
          "requester": {
            "type": "object"
          },
          "performerType": {
            "type": "object"
          },
          "performer": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "reasonCode": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "insurance": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "supportingInfo": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "specimen": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "bodySite": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "patientInstruction": {
            "type": "string"
          }
        }
      },
      "Specimen": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Specimen"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "accessionIdentifier": {
            "type": "object"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "subject": {
            "type": "object"
          },
          "receivedTime": {
            "type": "string"
          },
          "parent": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "request": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "collection": {
            "type": "object"
          },
          "processing": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "container": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "condition": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "note": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Binary": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Binary"
          },
          "id": {
            "type": "string"
          },
          "meta": {
            "type": "object"
          },
          "contentType": {
            "type": "string",
            "description": "MIME type of the binary content"
          },
          "data": {
            "type": "string",
            "description": "Base64-encoded content (if inline)"
          },
          "url": {
            "type": "string",
            "description": "URL reference to binary content"
          }
        }
      },
      "Account": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Account"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "servicePeriod": {
            "type": "object"
          },
          "coverage": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "owner": {
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "guarantor": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "partOf": {
            "type": "object"
          }
        }
      },
      "Coverage": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Coverage"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "object"
          },
          "policyHolder": {
            "type": "object"
          },
          "subscriber": {
            "type": "object"
          },
          "subscriberId": {
            "type": "string"
          },
          "beneficiary": {
            "type": "object"
          },
          "dependent": {
            "type": "string"
          },
          "relationship": {
            "type": "object"
          },
          "period": {
            "type": "object"
          },
          "payor": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "class": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "order": {
            "type": "integer"
          },
          "network": {
            "type": "string"
          },
          "costToBeneficiary": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "subrogation": {
            "type": "boolean"
          },
          "contract": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Location": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Location"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "status": {
            "type": "string"
          },
          "operationalStatus": {
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "alias": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "type": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "telecom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "address": {
            "type": "object"
          },
          "physicalType": {
            "type": "object"
          },
          "position": {
            "type": "object"
          },
          "managingOrganization": {
            "type": "object"
          },
          "partOf": {
            "type": "object"
          },
          "hoursOfOperation": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "availabilityExceptions": {
            "type": "string"
          },
          "endpoint": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Organization": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Organization"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "active": {
            "type": "boolean"
          },
          "type": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "name": {
            "type": "string"
          },
          "alias": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "telecom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "address": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "partOf": {
            "type": "object"
          },
          "contact": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "endpoint": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Practitioner": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Practitioner"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "active": {
            "type": "boolean"
          },
          "name": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "telecom": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "address": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "gender": {
            "type": "string"
          },
          "birthDate": {
            "type": "string",
            "format": "date"
          },
          "photo": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "qualification": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "communication": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Provenance": {
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "Provenance"
          },
          "id": {
            "type": "string",
            "description": "Logical resource ID"
          },
          "meta": {
            "type": "object",
            "description": "Resource metadata"
          },
          "text": {
            "type": "object",
            "description": "Narrative text"
          },
          "extension": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "FHIR extensions"
          },
          "identifier": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Business identifiers"
          },
          "target": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "occurredPeriod": {
            "type": "object"
          },
          "occurredDateTime": {
            "type": "string"
          },
          "recorded": {
            "type": "string"
          },
          "policy": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "type": "object"
          },
          "reason": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "activity": {
            "type": "object"
          },
          "agent": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "entity": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "signature": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      }
    }
  }
}