{"openapi":"3.1.0","info":{"title":"Hermes Health API","description":"Medical records retrieval platform API.\n\n## Base URL\n\nEvery endpoint in this reference is relative to:\n\n```http title=\"Base URL\"\nhttps://api.hermeshealth.ai\n```\n\nThere is no separate sandbox host. Sandbox and production traffic use the same\nbase URL and are separated by which API key you send — see Authentication.\n\n## Authentication\n\nSend your API key as a bearer token on every request:\n\n```http title=\"Request header\"\nAuthorization: Bearer <your-api-key>\n```\n\nThe Hermes Health API uses API keys to authenticate requests. You generate and\nrotate your API keys on the [User Settings page](/settings/api). A key is shown\nonce, when it is generated: Hermes stores only a fingerprint of it, so copy it\ninto your secret store at that moment. If you lose a key, regenerate it; the\nprevious key stops working as soon as the new one is issued.\n\nKeys are issued per user, and there are two of them:\n\n- the **Sandbox API Key**, scoped to projects whose status is `Sandbox`.\n  Sandbox traffic can never read or mutate production data.\n- the **production API Key**, for live projects.\n\nA key is rejected outside its own scope, so the key you send is what decides\nwhether you are working against real data or not. Requests with no credentials\nare rate-limited far more aggressively than authenticated ones — see Errors.\n\n## Idempotency\n\nIdempotency allows you to retry a request without accidentally performing the\nsame operation twice.\n\nThe Hermes Health API supports idempotency on `PUT` requests, which take an\nobject ID in the URL. Create a patient with `PUT .../patients/{patientId}`, and\nif an error occurs partway through, you can resubmit the same request without\ncreating the patient twice.\n\nObjects created with `POST` have their IDs generated by the API, so `POST` is\nnot idempotent.\n\n```bash title=\"Idempotent: PUT with your own ID\"\ncurl https://api.hermeshealth.ai/v0/companies/1/projects/proj_abc123/patients/pat_456 \\\n  -X PUT \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"firstName\": \"Jane\", \"lastNames\": [\"Doe\"], \"dateOfBirth\": \"1990-04-12\" }'\n```\n\n```bash title=\"Not idempotent: POST, the API assigns the ID\"\ncurl https://api.hermeshealth.ai/v0/companies/1/projects/proj_abc123/patients \\\n  -X POST \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"firstName\": \"Jane\", \"lastNames\": [\"Doe\"], \"dateOfBirth\": \"1990-04-12\" }'\n```\n\n## Versioning\n\nThe Hermes Health API is still on version 0 and is unversioned beyond the\n`/v0` path prefix, because of the rate at which it is still changing.\n\nA semantic versioning scheme, a changelog, and a deprecation notice system are\ncoming. Until they land, treat any field you did not ask for as optional and\nignore fields you do not recognise.\n\n## Errors\n\nEvery error returns the same JSON body, whatever the status code:\n\n```json title=\"Error body\"\n{\n  \"error\":   \"Patient not found\",\n  \"errorId\": \"01J8Z3QK7M2N4P6R8T0V2X4Y6A\"\n}\n```\n\n- **`error`** is always present: a human-readable sentence. Show it to\n  your operators; do not parse it. Wording changes without notice.\n- **`code`** is optional and currently set on one condition only\n  (`\"code\": \"roleNotAssigned\"` — a signed-in user whose account has no role\n  yet).\n  Treat its absence as normal and branch on the status code instead.\n- **`errorId`** is a correlation reference. It is present on errors that\n  pass through central classification — which is every `5xx` and most\n  `4xx` raised from domain logic — and absent on validation rejected at\n  the route edge. **Quote it when you contact support**: it is the only\n  way to find the matching server log line.\n\n### Status codes\n\n| Code | Meaning | Retry? |\n| --- | --- | --- |\n| `400` | The request is malformed or a field failed a business rule. | No — fix the request. |\n| `401` | Missing or invalid credentials. | No — check the `Authorization` header. |\n| `403` | Authenticated, but not permitted this company, project, or capability. | No — see below. |\n| `404` | No such resource, **or** one your key cannot see. | No. |\n| `422` | The body parsed as JSON but a field failed validation. | No — the message names the field. |\n| `429` | Rate limited. | Yes — after `Retry-After`. |\n| `500` | Server fault on our side. | Yes, with backoff. |\n| `502` | An upstream partner (EHR, ROI vendor, Clerk) failed or returned an unusable response. | Yes, with backoff. |\n| `503` | Maintenance, or the service is shedding load. | Yes, with backoff. |\n| `504` | A query exceeded its time budget. | Yes — narrow the query first. |\n\nA `500` body is always the literal string `Internal server error\n(ref: <errorId>)`, and a rejected payload names the *field* that failed but\nnot the value it contained. `404` is returned for a resource outside your\nkey's scope rather than `403`, so that an error never confirms that a resource\nyou cannot see exists.\n\n### Rate limits\n\nTwo independent limits, both per rolling minute:\n\n- **Uncredentialed requests are limited per client IP** — 30 requests per\n  minute by default.\n- **Credentialed requests are limited per company** — 600 requests per\n  minute by default. Sending an `Authorization` header moves you off the\n  IP limit and onto this one; it does not exempt you from limiting.\n\nExceeding either returns `429` with a **`Retry-After`** header in whole\nseconds (minimum `1`). Honour it rather than retrying immediately. Both\nceilings are configurable per deployment, so read `Retry-After` rather than\nhard-coding either number.\n\n## Getting started\n\nA walkthrough from a clean account to a downloaded record deliverable. Most steps are API calls; the first three collect IDs and credentials from the web app.\n\n### 1. Sign in\n\nOpen the Hermes Health web app and sign in.\n\n### 2. Grab a sandbox project ID\n\nSandbox projects auto-complete patient searches and record requests against stub data, so you can exercise the full flow end-to-end without waiting on real claims. They are hidden on the projects page by default — toggle **Show Sandbox** to reveal them, open your sandbox project, and copy its ID from the URL (the segment after `/projects/`). You'll pass it as `<project_id>` on every subsequent route.\n\n### 3. Mint your sandbox API key\n\nOpen **Settings** (top-right user menu, or navigate to `/settings`) and select the **API Settings** tab. The panel manages two keys: a production **API Key** and a separate **Sandbox API Key**. **Use the sandbox key for this walkthrough** — it is scoped to projects whose status is `Sandbox`, so test traffic can never read or mutate production data. Click **Generate Sandbox Key** and copy the key it shows: it is displayed only that once, because Hermes keeps just a fingerprint of it. Send it as `Authorization: Bearer <your-sandbox-api-key>` on every request below; the same header shape applies to the production key when you later promote your integration to live projects.\n\n### 4. Create a patient\n\nTwo routes accept the same `PatientForm` body — pick by ID strategy:\n\n- `POST /v0/companies/{companyId}/projects/{projectId}/patients` — Hermes generates and returns the patient ID.\n- `PUT /v0/companies/{companyId}/projects/{projectId}/patients/{patientId}` — you choose the ID. Re-PUT to upsert.\n\n**If you already know which facility you want records from** (you have the hospital or clinic's name and address — you don't need a Hermes site ID, just the real-world identity of the place), you can skip straight to **step 7** and pass `siteName` / `siteAddressLine1` / etc. on the record-request body. Steps 5 and 6 exist to *discover* which facilities a patient visited, by running a claims search and browsing the resulting visits. Skip them if discovery isn't what you need.\n\nSet `siteSonar` to `true` to kick off claims-based discovery of where the patient has been seen; set `patientHistories` to `true` to also retrieve diagnosis and treatment data (the two flags are independent). Omit both if you only want to register the patient — for example, when you already know the facility and are heading straight to step 7. To request a search later for an already-created patient, send `PATCH .../patients/{patientId}/search-level` with `{ \"siteSonar\": true }` — it takes the same two flags with patch semantics: a flag you omit keeps the patient's current setting (whereas omitting a flag here on the create body means *off*).\n\n`lastNames` is the list of every last name the patient has used — the primary (current) last name first, then any alternates such as maiden or prior married names. Each name is searched independently against the clinical-data sources, and the Site Sonar / Patient Histories fee scales with the number of names. A hyphenated last name is a single entry with the hyphen typed in (`Smith-Jones`), never two entries. Suffixes go after the name, separated by a space (`Smith Jr.`); omit middle names.\n\n`zipCodes` is the list of ZIPs where the patient lived **at the time they visited each facility** — *not* their current ZIP. Pass every ZIP you know about; we use them to widen the claims search radius. The legacy single-string `zipCode` field is retained for backward compatibility — pass `zipCodes` in new code.\n\n**A patient with no ZIP code cannot be searched by EHR Search or Patient Histories.** Both partners reject a request without one, so Hermes does not send it: the request stays armed and goes out on its own the moment you add a ZIP code. Creating a patient without one still succeeds — plenty of work needs no ZIP, Site Sonar included — so the create, upsert and `PATCH .../patients/{patientId}/search-level` responses tell you instead, via `ehrSearchBlockedReason` and `patientHistoriesBlockedReason`. Each is `\"MissingZipCode\"` or `null`, and is only ever set for a capability you actually requested. They are distinct from `ehrSearchAvailable` / `patientHistoriesAvailable`, which say whether your company is approved for the feature at all (always `true` on a Sandbox project, whose searches are simulated). The patient's `searchStatus` also reads `MissingZipCode` for as long as the ZIP is the only thing holding the searches back. The bulk CSV routes report the same thing per row, in a `warnings` list beside their row `errors` — a warning never fails a row. None of this applies to a Sandbox project: its searches are simulated, no partner is ever called, and so no ZIP code is required there.\n\n**A patient who died before 2016 is not searched for clinical data.** Claims clearinghouses did not retain history that far back, so a Site Sonar or Patient Histories search for such a patient is guaranteed to return nothing and Hermes does not run it. The date of death is the one extracted from the authorization's supporting documents (a death certificate, or a next-of-kin affidavit); a patient with no such document, or one that establishes death without dating it, is searched normally. Unlike `MissingZipCode` this is not a wait: nothing stays armed, and no input will make the search find records — so the two signals arrive in sequence rather than together. The create, upsert and `PATCH .../search-level` responses report `\"DeceasedBeforeClinicalData\"` on `siteSonarBlockedReason` / `patientHistoriesBlockedReason`; once the gate has run those go back to `null` and the patient's `searchStatus` carries the answer as `DeceasedBeforeClinicalData`. That status is what you see when the horizon answered every search you asked for. EHR Search is deliberately not gated — it enrolls with live EHR systems rather than querying a claims archive — so a patient who also requested it holds at `Processing` until Veradigm answers, then reports what EHR Search found.\n\nThe patient's capability to authorize (competent adult, minor, deceased, incapacitated) and the signer's relationship are no longer supplied here — they are derived from the uploaded authorization document during analysis. The same body shape is accepted by both the POST and PUT routes above.\n\n```json title=\"PatientForm body\" operation=\"POST /v0/companies/{companyId}/projects/{projectId}/patients\"\n{\n  \"firstName\":   \"Jane\",\n  \"lastNames\":   [\"Doe\"],\n  \"dateOfBirth\": \"1990-04-12\",\n  \"sex\":         \"female\",\n  \"zipCodes\":    [\"94110\", \"02139\"],\n  \"siteSonar\":   true\n}\n```\n\n### 4b. Upload the HIPAA authorization\n\nThe signed authorization is uploaded **separately** from the create call — `PatientForm` carries no file field, and no route accepts the document as part of a patient body. You do not, however, need an extra round-trip to ask for an upload URL: the create response already carries one.\n\nEvery patient response — `POST` and `PUT` above, and `GET .../patients/{patientId}` later — includes an `authorization` object holding a short-lived presigned S3 `uploadUrl`. The sibling `hipaaAuthorization` field is a deprecated clone of the same object, kept for backward compatibility; read `authorization` in new code.\n\n```json title=\"Patient response (excerpt)\"\n{\n  \"patient\": { \"id\": \"...\" },\n  \"authorization\": {\n    \"uploadUrl\":     \"https://<bucket>.s3.<region>.amazonaws.com/...&X-Amz-Signature=...\",\n    \"uploadHeaders\": {},\n    \"expiresIn\":     360\n  }\n}\n```\n\nFinish the job by **`PUT`ting the PDF at `uploadUrl`**, raw bytes as the body. This request goes to S3, not to Hermes — send no `Authorization` header and no extra headers (`uploadHeaders` is empty by design). Send the URL exactly as issued: the uploader's identity rides in a *signed* query parameter, so editing or dropping any part of the query string invalidates the signature and S3 answers `403`.\n\n`expiresIn` is the URL's lifetime in seconds. Mint it immediately before uploading rather than caching it — `GET .../patients/{patientId}/authorization` returns a fresh `uploadUrl` at any time, alongside the auth-check analysis of whatever is already on file. Re-uploading to the same URL path replaces the document and sends it back for review.\n\n**Approval is a Hermes-side step.** A newly uploaded authorization sits at `authorizationStatus: NeedsApproval` until our delivery team reviews it; outside a `Sandbox` project (`Live` or `Closed`) the status is not customer-writable. On a `Sandbox` project your own admins can PATCH it, so you can drive your sandbox `authorization` webhooks and reproduce a blocked send on purpose. (A project's `status` is fixed after creation as far as the API is concerned: moving an existing project between `Sandbox`, `Live`, and `Closed` is a Hermes-side change and is answered with a `401`. Create each project at the status you want — `POST .../projects` takes `status`, or the legacy `isSandbox` — or ask your Hermes contact to move an existing one. A `PUT` upsert that omits `status` leaves the project's status untouched.) Newly enabling Site Sonar, Patient Histories, or EHR Search on an already-approved patient sends the authorization back to `NeedsApproval`. The search remains armed but is not submitted until it is approved again. This also applies when re-arming a capability that completed before. Watch `authorizationStatus` on the patient — or subscribe a webhook to `authorization.approved` — before expecting the search to run.\n\n**Correcting a patient sends the authorization back for review.** Editing a patient (`PUT` or `PATCH .../patients/{patientId}`, or a bulk upload row for an existing patient) moves `authorizationStatus` to `NeedsApproval` when the edit changes a field that could fix the current status:\n\n- `Approved` — first name, any last name, date of birth, sex, ZIP codes, or   city/state.\n- `WrongPatientName` — first name or any last name.\n- `WrongDateOfBirth` — date of birth.\n- `MissingZip` — ZIP codes.\n- `MissingGender` — sex.\n\nEvery other status is left as it is by a patient edit — including `WrongDateOfService`, which is about the record request rather than the patient, and the document problems (`MissingSignature`, `MissingPowerOfAttorney`, `MissingProofOfGuardianship`, `MissingRedisclosureSmt`), which are fixed by uploading a corrected authorization. Only the field that matches the status counts: changing the date of birth leaves `WrongPatientName` in place. Re-sending the values already on file changes nothing, and an edit never approves an authorization — `NeedsApproval` means it is queued for review again. The rule is applied to the status at the moment your edit lands: if a reviewer moves the authorization to a status your edit cannot fix while the edit is in flight, the reviewer's decision stands, but a status your edit could fix (including `Approved`) is still sent back to `NeedsApproval`.\n\n**When you can skip this step entirely.** If the project's `purpose` is `CoveredOperations`, `CoveredPayment`, or `CoveredTreatment` — treatment, payment, or health care operations under HIPAA, where no patient authorization is required — patients need no uploaded document. On an `authorizationPdf` project, every other purpose (individual access, insurance, legal, research) requires the authorization above. The purpose is set on the project, not per patient.\n\nProjects with `authorizationMethod: ial2Tokens` may also create patients and record requests without uploading an authorization PDF at creation time. This does not change the purpose-based initial `authorizationStatus`. Each authorization method must first be enabled for the company by Hermes.\n\n### 5. Wait for the search to finish\n\nSite Sonar runs asynchronously. You have two ways to be notified:\n\n- **Subscribe a webhook to `siteSonar.completed`** (recommended) — Hermes POSTs your endpoint once each Site Sonar run finishes, on every run and whatever the result; `data.searchStatus` carries the outcome. `patientHistories.completed` and `ehrSearch.completed` do the same for the other two capabilities. See [Outbound webhooks](#outbound-webhooks) for the configuration UI, the payload envelope, and the signature scheme.\n- **Poll** `GET .../patients/{patientId}` periodically and watch `searchStatus`. Values are `Inactive`, `Processing`, `Completed`, `NoHit`, `AmbiguousIdentity` (we found records under two conflicting identities and are withholding them — set the patient's `sex` to resolve it), `MissingZipCode` (on a Live project, nothing has been sent because the patient has no ZIP code — add one and the search starts on its own) and `RequestRejected` (the EHR partner refused the request file itself, so nothing was searched — this is not a no-hit; the request stays armed and goes out again on its own once the refused details are corrected, though after repeated refusals of an unchanged request we stop resending it and Hermes has to re-arm the patient). The parallel `siteSonarStatus` field is a deprecated alias kept for backward compatibility and will be removed — read `searchStatus` in new code.\n\nSandbox projects auto-complete the search within seconds, so you can advance the walkthrough without waiting on real claims data.\n\n### 6. Read the visits\n\nVisits land on `POST /v0/visits/browse`, which uses the typed query syntax described in [Browsing tables](#browsing-tables). The minimal query for \"every visit for one patient on one project, sorted by earliest service date\" is:\n\n```json title=\"POST /v0/visits/browse\" operation=\"POST /v0/visits/browse\"\n{\n  \"where\": {\n    \"patient\": { \"id\": [{ \"equals\": \"<patient_id>\" }] },\n    \"project\": { \"id\": [{ \"equals\": \"<project_id>\" }] }\n  },\n  \"orderBy\": [\n    { \"visit\": { \"earliestServiceDate\": \"asc\" } }\n  ]\n}\n```\n\nEach row carries `visit`, `patient`, `site`, `payor`, `company`, and `project` blocks. Pick a visit and grab its `site.id` — that's what you'll feed into the record request below.\n\n### 7. Create a record request\n\n`POST /v0/companies/{companyId}/projects/{projectId}/patients/{patientId}/record-requests` takes a `RecordRequestForm`. Identify the facility one of two ways:\n\n- **By site ID (preferred).** Pass `siteId` from a browse row — Hermes already knows the facility's address, NPI, and submission preferences.\n- **By facility info.** If you don't have a site ID, pass `siteName`, `siteAddressLine1`, `siteAddressLine2` (optional), `siteCity`, `siteState`, and `siteZip`. Hermes will resolve the facility for you.\n\nToggle which deliverables you want with the booleans `medicalRecord`, `billing`, and `imaging`. `startDateOfService` and `endDateOfService` bound the visit window the request covers:\n\n```json title=\"RecordRequestForm body\" operation=\"POST /v0/companies/{companyId}/projects/{projectId}/patients/{patientId}/record-requests\"\n{\n  \"siteId\":             \"<site_id>\",\n  \"medicalRecord\":      true,\n  \"billing\":            false,\n  \"imaging\":            false,\n  \"startDateOfService\": \"2024-01-15\",\n  \"endDateOfService\":   \"2024-02-20\"\n}\n```\n\nThe response is a `RecordRequestMany { requests: [...] }` — one entry per request type you toggled on. Each entry's `request.id` is the ID you'll watch in the next step.\n\n### 8. Wait for the request and download the deliverables\n\n`GET .../record-requests/{recordRequestId}` returns a `RecordRequestOutput` that carries both the status and — once `request.status` is `Completed` — the `deliverables` array you download. Two ways to know when to fetch it:\n\n- **Subscribe a webhook to `recordRequest.completed`** — or to `recordRequest.statusChanged` for every transition. `data.status` carries the new value. Webhook payloads are a fixed set of fields, **not** the full `RecordRequestOutput` — so when the request completes, GET it at the envelope's `resource` path to read `deliverables`. See [Outbound webhooks](#outbound-webhooks).\n- **Poll** `GET .../record-requests/{recordRequestId}` and watch `request.status`. `Completed` is the success state; the same response includes `deliverables`, so the polling response *is* the download manifest. `WrongSiteName`, `PatientNotFound`, `ServiceDatesNotFound`, `SiteClosed`, `Canceled`, `Void`, `DuplicateRequest`, `FacilityRefusal`, and `NoRecordFound` are terminal failure states that won't produce a deliverable. `AuthDenied` produces none either, but it is not terminal: the request can move on once the authorization problem is resolved.\n- `NeedToReviewResults` is an **intermediate** state, not a terminal one: records arrived and the retrieval partner reported the chase succeeded. Expect a further transition, usually to `Completed` or `Partial`. For records retrieved over the EHR integration, a request whose whole ask has been answered does **not** pass through this status at all — Hermes moves it straight to its terminal status as soon as the partner is done and the records are in hand. What this status now means for that channel is a **partially delivered** request: part of the ask came back and Hermes is still waiting on the rest, so some deliverables are already present and more may follow. An operator can also select it by hand like any other status. Either way, read `deliverables` rather than assuming it is populated, and keep polling: this is not where the request stops.\n\n### The deliverables listing is a flattened tree\n\nThe `deliverables` array in that response, `GET .../record-requests/{id}/deliverables` and its `/browse` sibling all present a record request's returned documents the way the web app does, not the way S3 stores them. A request whose date-of-service range exceeded the EHR platform's cap is retrieved by several chases sent as ONE plan, and those are ONE retrieval: their charts are listed together under a single `Chart Documents` folder rather than one folder per chase. A genuine re-chase is a different attempt and keeps its own `Latest return` / `Earlier return` folder.\n\nThree consequences for an integration:\n\n- **`fileName` is unique across a request, and is what the `GET`/`DELETE`/`HEAD .../deliverables/{fileName}` routes address.** Where two returns brought the same file name, the second reads as `CCDA_80154372 (2).xml`. Address a deliverable by the `fileName` the listing gave you rather than rebuilding one from `key`.\n- **`folder` is the display folder** a file sits in, `/`-joined, and omitted when the file is at the top of the tree. It is for display and grouping, never for addressing.\n- **Renaming is the exception.** `PATCH .../deliverables/{path}` addresses the STORED path — the part of `key` after `/deliverables/`, which may be several segments — not the display name. It is the one route that does, because it moves a stored object rather than reading one.\n\n`key` is unchanged: it is still the real S3 key, and nothing about this listing moves, copies or deletes a stored object.\n\nEach entry in `deliverables` is a `FileInfo` with a presigned `url` you can download directly — no `Authorization` header needed; the URL signs itself for about an hour. The sibling `deliverable` field on the same response is the generated combined chart when Hermes has published one, stored at the request's singular `deliverable` key and downloaded as `EHR_Charts_Combined.pdf`. It is not the first object under `deliverables/`. The plural `deliverables` array still lists only objects under that prefix (raw payloads); it does not include the canonical file. To get the combined chart, read `deliverable` (or download `EHR_Charts_Combined.pdf` from the web app).\n\nSandbox requests auto-complete to `Completed` shortly after creation with a stub deliverable, so you can verify the end-to-end download flow without contacting any real facility.\n\n## Outbound webhooks\n\nOutbound webhooks notify your server when something happens, so you don't have to poll. You register **endpoints** in the Hermes Health web app; each endpoint is a destination URL plus the named **events** it receives and the **scope** they cover. Endpoints are configured entirely from the UI described below — there is no API to manage them today.\n\n### Configuring endpoints\n\nEach endpoint you create is **owned by you** — the individual user who created it, not your company. Only you can edit or delete it, and your data access alone governs what it may deliver — see [Scope](#scope). Your company's administrators can *view* every member's notifications (read-only, for oversight) but cannot manage them: editing, deleting, and secret rotation stay with the owner.\n\nCreating a **webhook** endpoint requires the `ManageWebhooks` permission — a webhook can deliver PHI to an external URL, so it is gated. (The same **Notifications** surface also offers **email** notifications delivered to your Hermes inbox for holders of `ManageNotifications`; those are out of scope for this section, which covers the webhook delivery channel.)\n\n1. Sign in to Hermes Health.\n2. Open **Settings** (top-right user menu, or navigate to `/settings`).\n3. Select the **API** tab, then **Notifications**.\n4. **Add a notification**, choose the **Webhook** delivery channel, and set:\n   - **URL** — your receiver. Must be publicly resolvable; private and loopback addresses are rejected.\n   - **Environment** — `production` or `sandbox`. An endpoint receives only events from projects in its own environment, so you can point a sandbox endpoint at a test receiver while you build. (Sandbox projects auto-complete searches and requests, so they exercise the full webhook flow without real claims.)\n   - **Events** — see [Named events](#named-events) below.\n   - **Scope** — see [Scope](#scope) below.\n   - **Custom headers** (optional) — up to 20 static `name: value` headers sent on every delivery (e.g. an `Authorization` header your receiver checks). The reserved headers `Content-Type`, `Host`, and the `X-Webhook-*` set cannot be overridden.\n5. Copy the endpoint's **signing secret** — the UUID used to sign every delivery (see [Verifying deliveries](#verifying-deliveries)). You can regenerate it later from the same panel; see [Rotating the secret](#rotating-the-secret).\n\n### Named events\n\nEvents are named `group.event` and grouped by product capability. Ticking a group subscribes the endpoint to every event in it; you can also tick single events. Each delivery's `eventType` is the event's name, and the top-level `webhooks` section of this spec documents each one.\n\n- **Record requests** — `recordRequest.created`, `recordRequest.statusChanged` (any new status), the category events `recordRequest.processing`, `recordRequest.needsResolution`, `recordRequest.completed`, `recordRequest.recordsNotFound` and `recordRequest.canceled` (sent alongside `recordRequest.statusChanged` when a request moves into that category), and `recordRequest.followUpDue` (once a day while the request's follow-up date is on or before today; requires the `ConfigureFollowUpNotifications` permission).\n- **Site Sonar** — `siteSonar.started` and `siteSonar.completed`.\n- **Patient Histories** — `patientHistories.started` and `patientHistories.completed`.\n- **EHR Search** — `ehrSearch.started` and `ehrSearch.completed`.\n- **Patients** — `patient.created`, `patient.updated` (name, date of birth, sex, contact details or ZIP codes) and `patient.searchStatusChanged`.\n- **Authorization** — `authorization.statusChanged`, `authorization.approved` and `authorization.needsAttention` (a move to any status other than approved).\n- **Clinical data** — `clinicalData.added`; see [Net-new clinical data](#net-new-clinical-data).\n- **Notes** — `note.created` and `note.updated`.\n- **AI research** — `aiResearch.completed`; see [AI research completed](#ai-research-completed).\n\nTo learn that a search finished, subscribe to its `.completed` event: it is sent once per run, on every run, whatever the result. A patient created with a search already requested also sends that search's `.started`.\n\nEvery event in a group carries the same documented `data`, so a receiver parses one shape per group:\n\n| Group | `data` |\n| --- | --- |\n| `recordRequest` | `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId` |\n| `siteSonar` | `id`, `siteSonar`, `searchStatus`, `projectId`, `companyId` |\n| `patientHistories` | `id`, `patientHistories`, `searchStatus`, `projectId`, `companyId` |\n| `ehrSearch` | `id`, `ehrSearch`, `searchStatus`, `projectId`, `companyId` |\n| `patient` | `id`, `firstName`, `lastName`, `dateOfBirth`, `sex`, `zipCodes`, `mobile`, `email`, `createdAt`, `searchStatus`, `authorizationStatus`, `projectId`, `companyId` |\n| `authorization` | `id`, `authorizationStatus`, `projectId`, `companyId` |\n| `note` | `id`, `content`, `createdAt`, `updatedAt`, `companyId` |\n| `clinicalData` | `patients` (see [Net-new clinical data](#net-new-clinical-data)) |\n| `aiResearch` | `siteId`, `siteName`, `url` |\n\nA field the owning user's role is not permitted to see is left out of `data`, on every delivery — so a payload never exposes a value the owner could not read in the app, and if the owner's access changes, the payload changes with it.\n\n`data` is the record as it stood when the event was processed. Changes that land within moments of each other can already show in `data`, and two status moves in quick succession can arrive as a single `recordRequest.statusChanged`. Treat `data` as a hint and `GET` the `resource` path for the authoritative state.\n\n### Scope\n\nAn endpoint's scope answers two questions once, for all its events:\n\n- **Projects** — every project in your account, including ones created later (the default), or only the projects you pick. Picked projects must all be sandbox or all production, and the endpoint takes their environment.\n- **Records** — every record the owning user can see (the default), or only the records that user *tracks*: ones they created, or ones they explicitly tracked, which cascades to everything beneath them.\n\n`aiResearch.completed` ignores the project filter: a researched site belongs to no project, and the event goes only to the endpoints of the user who started the run.\n\n### Net-new clinical data\n\n`siteSonar.completed` and `patientHistories.completed` answer *a run finished*, whether that run grew the patient's clinical record or merely re-confirmed what we already held. Subscribe to `clinicalData.added` (webhook endpoints only) when you need the other question answered: *did anything actually change?*\n\nIt fires only for patients whose run produced clinical content they did not already have, and carries the per-artifact-type counts of what is new. A run reports a batch of patients at once; each endpoint is sent only the patients its scope covers:\n\n```json title=\"clinicalData.added delivery\"\n{\n  \"id\":        \"550e8400-e29b-41d4-a716-446655440000\",\n  \"timestamp\": \"2026-06-24T12:34:56Z\",\n  \"version\":   \"events\",\n  \"eventType\": \"clinicalData.added\",\n  \"resource\":  \"companies/1\",\n  \"changed\":   [],\n  \"data\": {\n    \"patients\": [\n      {\n        \"patient\": { \"id\": \"pat_456\", \"…\": \"the full patient resource\" },\n        \"project\": { \"id\": \"proj_123\", \"name\": \"Q3 underwriting\" },\n        \"source\":  \"siteSonar\",\n        \"counts\": {\n          \"newVisits\":            4,\n          \"newDiagnoses\":         3,\n          \"newProcedures\":        0,\n          \"newPrescriptionFills\": 1,\n          \"newLabResults\":        2\n        }\n      }\n    ]\n  }\n}\n```\n\nA run that produced nothing new sends **nothing at all** — there is no delivery carrying all-zero counts. Use the counts to decide whether re-fetching the patient's clinical data is worth it.\n\n`source` names which product's run produced the counts — `siteSonar`, `patientHistories`, or `sandboxSearch` — or `parsePass` for a re-read of clinical data we already hold for the patient (see the next paragraph). It matters when a patient is enrolled in more than one: the products run and finish independently, so one cycle can deliver twice for the same patient, and **each delivery's counts describe only that source's contribution**. Where two sources report the same clinical line, both count it, so do not add the two deliveries together — take the larger, or simply treat any delivery as \"re-fetch this patient\".\n\nThe counts are *net-new to the patient for that source*, not \"rows the vendor returned this time\". We re-derive a patient's clinical record from payloads we already hold whenever our parsing improves, and a re-derived line that merges onto an existing row leaves the row count untouched. The event compares clinical identity rather than row ids, so that merge is reported as new — while a plain re-confirmation of content you already have is not.\n\n### AI research completed\n\nAI research is not owned by a company: a run is started by a person. Subscribe to `aiResearch.completed` on your own webhook or email endpoint to be notified when a run *you* started finishes. A colleague's endpoint in the same company does not fire. Bulk operator batches do not fire. Its `data` is `siteId`, `siteName` and `url` (a link to the site), and its `resource` is the researched site. Email deliveries use the same facts and never include the researched field values.\n\n### Delivery payload\n\nEvery delivery is a POST with a JSON envelope:\n\n```json title=\"Delivery envelope\"\n{\n  \"id\":        \"550e8400-e29b-41d4-a716-446655440000\",\n  \"timestamp\": \"2026-06-24T12:34:56Z\",\n  \"version\":   \"events\",\n  \"eventType\": \"recordRequest.completed\",\n  \"resource\":  \"companies/1/projects/p_123/patients/pat_456/record-requests/req_789\",\n  \"changed\":   [\"status\"],\n  \"data\":      { \"id\": \"req_789\", \"status\": \"Completed\", \"patientId\": \"pat_456\" }\n}\n```\n\n- `id` — unique delivery id, **stable across retries**. Dedupe on it (it is also sent in the `X-Webhook-Id` header).\n- `timestamp` — when the event was emitted (not the per-attempt send time; that rides the signed `X-Webhook-Timestamp` header).\n- `version` — always `events`. A deprecated Classic delivery has no `version` field, so a receiver serving both can branch on its presence.\n- `eventType` — the event's name.\n- `resource` — the path to the record. GET it with your bearer token when the payload isn't enough.\n- `changed` — the payload fields whose value changed; empty when the event is not a change, such as a `.created` event or `recordRequest.followUpDue`.\n- `data` — the group's fixed payload. This is **not** the full `GET` response for the resource — to download deliverables, read presigned URLs, or see other fields, GET `resource`.\n\n### Verifying deliveries\n\nEach delivery carries three headers:\n\n| Header | Meaning |\n| --- | --- |\n| `X-Webhook-Id` | The delivery `id`; stable across retries (dedupe key). |\n| `X-Webhook-Timestamp` | Unix seconds when this attempt was signed. |\n| `X-Webhook-Signature` | HMAC-SHA256 signature(s), hex-encoded. |\n\nTo verify a delivery:\n\n1. Read `X-Webhook-Timestamp` and reject the request if it falls outside your freshness window (e.g. more than five minutes old) — this is what stops a captured request from being replayed.\n2. Compute the hex-encoded `HMAC-SHA256` of `\"{X-Webhook-Timestamp}.{raw_body}\"`, keyed by the endpoint's signing-secret **UUID bytes** (the 16 raw bytes — *not* the UUID's string form), where `raw_body` is the exact bytes you received.\n3. `X-Webhook-Signature` may carry **multiple** comma-separated signatures (see [Rotating the secret](#rotating-the-secret)). Accept the request if your computed value matches **any** of them, comparing in constant time.\n\nRespond `2xx` within 10 seconds to acknowledge. Any other response (or a timeout) is treated as a failure and retried.\n\n### Retries and auto-disable\n\nA failed delivery is retried with exponential backoff — after the first attempt, again at 30s, 2m, 10m, 1h, and 6h (six attempts over roughly eight hours). A delivery that still hasn't succeeded after 24 hours is abandoned. If an endpoint accumulates five consecutive failed deliveries it is automatically disabled and its owner is emailed; re-enable it from the Notifications tab once your receiver is healthy (which also clears the failure count).\n\n### Rotating the secret\n\nRegenerating the secret from the Notifications tab opens a **24-hour grace window**: during it, deliveries are signed with both the new and the old secret, and `X-Webhook-Signature` lists both (comma-separated). Roll your receiver to the new secret any time inside the window — because you accept a match against *any* listed signature, there is no delivery gap.\n\n### Reviewing deliveries and sending a test\n\nThe **Notifications → Notification Log** tab lists every webhook delivery attempt and every email notification, with its channel, status (`pending`, `succeeded`, `failed`, `abandoned`), attempt count, and the last HTTP status code returned — use it to debug a misbehaving receiver. The Notifications tab's **Send test** button delivers one sample payload per subscribed group to the live URL synchronously and shows the result inline; test sends are single-attempt (never retried) and never count toward auto-disable.\n\n### Classic endpoints (deprecated)\n\nEndpoints created before named events use **Classic** column subscriptions. They keep receiving exactly the deliveries they always did, but no new Classic endpoint can be created, and each shows an **Upgrade to Events** button that previews the mapping before switching the endpoint over in one step (its URL, secret and headers carry over). Where its subscriptions had different scopes, the upgrade takes the broadest.\n\n### Subscriptions\n\nA Classic subscription names an **entity** (`recordRequest`, `patient`, or `note`), a **trigger** (`rowCreated`, `columnChanged` — one of the subscribed columns changed value — or `followUpDue`, record-request only), a **scope** (`companyWide` or `tracked`) and a **columns** list of camelCase column keys (e.g. `status`, `searchStatus`, `patientId`). For `columnChanged` the columns both arm the trigger and are delivered; for `rowCreated` and `followUpDue` they are only delivered.\n\nA Classic delivery's `eventType` is `<entity>.<trigger>` — one of `recordRequest.rowCreated`, `recordRequest.columnChanged`, `recordRequest.followUpDue`, `patient.rowCreated`, `patient.columnChanged`, `note.rowCreated`, or `note.columnChanged` — its body is the envelope above without `version`, and its `data` holds only the subscribed columns. On a Classic endpoint, do not subscribe to `searchStatus` alone to learn that a search finished: a repeat run that ends in the status it already had changes nothing and sends nothing. Watch the `siteSonar`, `patientHistories` and `ehrSearch` request flags instead — or upgrade and use the `.completed` events.\n\nA Classic endpoint can also opt into two whole events, picked from the *Events* group of the subscription builder's *Entity* dropdown: `clinicalDataAdded` and `aiResearchCompleted`. Those Classic deliveries use a two-field envelope — `eventType` and `data`, with no `id`, `timestamp`, `resource`, `changed` or `version` — signed with `X-Webhook-Signature` (and no `X-Webhook-Id` to dedupe on), sent once with no retry and no auto-disable on failure. Their `data` is the same as `clinicalData.added` and `aiResearch.completed`.\n\n## Embedding the auth-check UI\n\nHermes Health renders the auth-check analysis as a server-rendered UI that you can drop into your own product as an iframe. **This is the recommended integration path** for any surface that displays auth-check results to end users.\n\n### Why embed?\n\nThe raw auth-check analysis schema (`Analysis`, `AuthCheck`, `CheckItem`, `AdditionalDocuments`, and friends) changes frequently — we ship updates as we expand coverage for new document types, new legal requirements, and new edge cases surfaced by production usage. Consumers that embed the iframe pick up every improvement automatically and never need to handle schema drift. Consumers that marshal the raw schema themselves accept ongoing maintenance cost.\n\nEmbedding also means you never have to forward your backend API key to an end-user browser — the embed token is scoped to a single PDF and expires in an hour.\n\n### 1. Get an embed token\n\nYou almost never need a dedicated call for this — the token rides along on a response you already make. Each path below requires an authenticated backend call with your bearer token.\n\n**a. Eager field on patient / record-request responses.** Every `GET .../patients/<id>` and `GET .../record-requests/<id>` response includes a ready-to-use `embedToken` field when the authorization PDF is present. No extra round-trip is needed — this is the preferred path when you already fetch the patient or record request on page load.\n\n**b. Returned by the standalone upload request.** For the standalone auth-checker, where the document is uploaded outside any patient context, send the `StandaloneAuthCheckBody` body when you request the upload URL: `PUT /v0/auth-check/{filename}` then returns the token on the `embedToken` field of its `FileResponse`, alongside the `uploadUrl`. This is the preferred standalone path — a single call yields both the upload URL and the token, so the iframe is ready as soon as the upload finishes. That body is the patient's `firstName`, `lastName` and `dateOfBirth`, plus an optional `referenceId`: your own identifier for the patient, such as an MRN, at most 255 characters. The reference is not part of the token; it is stored with the submission and shown in the auth-checker's Submissions tab, so each submission can be matched back to your patient.\n\n**c. Explicit mint — for late binding and rotation.** `POST /v0/auth-check/{filename}/embed-token` accepts the same `StandaloneAuthCheckBody` body, including the optional `referenceId`, and returns an `EmbedTokenResponse { token }`. Reach for this only when (b) doesn't fit: you uploaded before you had the patient context (so you omitted the body and got `embedToken: null`), or you need to rotate an expired token for a long-lived embed.\n\nWhichever path you use, the resulting token is a stateless string sealed with authenticated encryption (AES-256-CTR encrypt-then-MAC with HMAC-SHA256, keyed apart from the generic URL-query oracle and verified in constant time before any field is trusted). It carries the patient info, the PDF's S3 key, the minting company, and an expiry (one hour from mint). No database lookup happens at render time, and a forged or tampered token is rejected with `401`.\n\nBeyond the iframe, the standalone JSON endpoint requires the same token: `GET /v0/auth-check/{filename}?token=<token>` uses its patient info to run the patient-comparison verdicts (`patientName`, `patientDateOfBirth`, `signerName`, and friends). A `null` verdict always means the check did not run, not that it passed.\n\n### 2. Drop the iframe into your page\n\nPoint an iframe at `GET /ui/auth-check/embed?token=<token>`:\n\n```html title=\"Embed iframe\"\n<iframe\n  src=\"https://api.hermeshealth.ai/ui/auth-check/embed?token=YOUR_TOKEN\"\n  width=\"100%\"\n  height=\"800\"\n  style=\"border: 0;\"\n  title=\"Auth-check analysis\"></iframe>\n```\n\nThe embed route is token-authed only — no session cookie is required — so it is safe to render inside a third-party site. The token may be passed to the end user.\n\n### Compact badge variant\n\nFor dense surfaces — table rows, list views, dashboards — where the full checklist doesn't fit, point an iframe at `GET /ui/auth-check/embed/badge?token=<token>` instead. It renders only a compact passed / warning / failed stoplight summary (the same per-row badge Hermes shows in its own patient table):\n\n```html title=\"Badge iframe\"\n<iframe\n  src=\"https://api.hermeshealth.ai/ui/auth-check/embed/badge?token=YOUR_TOKEN\"\n  width=\"130\"\n  height=\"28\"\n  style=\"border: 0;\"\n  title=\"Auth-check summary\"></iframe>\n```\n\nThe two endpoints share the same API: identical token auth, identical framing policy — only the path differs, and **one token works on both**. If you are integrating the full auth-check iframe, use this badge alongside it rather than building your own summary from the raw analysis schema: render the badge per row, and open the full embed with the same token when the user clicks through.\n\n### Pending-state behavior\n\nIf the analysis is still processing when the iframe loads, the full embed renders a side-by-side view showing the PDF and a pending spinner (the badge embed shows a compact placeholder pill), and both automatically reload themselves (first poll after 45 seconds, then every 5 seconds) until analysis is ready. Consumers do not need to implement any polling loop of their own.\n\n### Token lifetime\n\nEmbed tokens expire one hour after they were minted. `PatientOutput` and `RecordRequestOutput` mint fresh tokens on every fetch, so for session-style usage it's typically enough to read the token straight off the response and re-fetch on page navigation. For long-lived embeds, call `POST /v0/auth-check/{filename}/embed-token` again to rotate.\n\n## Embedding the site finder\n\nThe site finder is also available as an embeddable, server-rendered UI. Unlike the read-only auth-check embed, this surface is **interactive**: the embedded user can submit facility details, run the finder, review the closest matches (an expandable in-page list — no popups), create a new site from the enriched proposal when nothing matches, and trigger AI research on a site.\n\n### 1. Mint an embed token\n\n`POST /v0/site-finder/embed-token` (authenticated with your bearer token) accepts a `{ \"parentOrigin\": \"https://your-approved-host.example\" }` body and returns an `EmbedTokenResponse { token }`. `parentOrigin` is the exact origin of the page that frames the iframe: `https://host[:port]` with no path, query, fragment, credentials or wildcard, on the deployment's approved browser-origin allowlist. Anything else is answered with `400`. The iframe response binds `frame-ancestors` to that exact origin. The token is a stateless, authenticated-encrypted string scoped to your company and the minting user.\n\n**Deprecated:** omitting the body or `parentOrigin` still mints a token, framed by any page (legacy wildcard framing). A later release will require `parentOrigin` and answer a mint without it with `400`, so send it now.\n\nEverything the embedded user does — searches, site creation, research — is attributed, billed, and rate-limited as the minting user, so mint with a service account if you want a clean audit trail.\n\n### 2. Drop the iframe into your page\n\nPoint an iframe at `GET /ui/site-finder/embed?token=<token>`:\n\n```html title=\"Embed iframe\"\n<iframe\n  src=\"https://api.hermeshealth.ai/ui/site-finder/embed?token=YOUR_TOKEN\"\n  width=\"100%\"\n  height=\"900\"\n  style=\"border: 0;\"\n  title=\"Site finder\"></iframe>\n```\n\nThe embed routes are token-authed only — no session cookie is required — so the token may be passed to the end user, but the iframe can only be framed by the exact approved `parentOrigin` sealed into it. A token minted without one (deprecated) can be framed by any page. You can pre-fill the search form by appending query parameters to the iframe URL: `name`, `addressLine1`, `addressLine2`, `city`, `state`, `zip`, and `isFacility`.\n\n### Token lifetime\n\nSite-finder embed tokens expire one hour after minting, and every action inside the embed re-validates the token — a search or create attempted after expiry fails with 401. Mint a fresh token each time you render the page hosting the iframe rather than caching tokens. Deleting the minting user (or removing their site-finder permission) invalidates outstanding tokens immediately.\n\n## Embedding the clinical-data UI\n\nA patient's clinical data — visits, procedures, diagnoses, prescription fills, and lab results — is available as an embeddable, server-rendered UI you can drop into your own product as an iframe. **This is the recommended integration path** for any surface that displays a patient's clinical data to end users.\n\n### Why embed?\n\nThe per-table browse endpoints (`POST /v0/visits/browse`, `/v0/diagnoses/browse`, and friends — see [Browsing tables](#browsing-tables)) expose the raw clinical-data schemas, and those schemas change frequently as we expand claims coverage and add columns. Consumers that embed the iframe pick up every change automatically and never handle schema drift; consumers that marshal the raw browse rows themselves accept ongoing maintenance cost. Embedding also means you never forward your backend API key to an end-user browser — the embed token is scoped to a single patient and expires in an hour.\n\n### 1. Mint an embed token\n\n`POST /v0/companies/{companyId}/projects/{projectId}/patients/{patientId}/clinical-data-embed-token` (authenticated with your bearer token) accepts a `{ \"parentOrigin\": \"https://your-approved-host.example\" }` body and returns an `EmbedTokenResponse { token }`. The token is a stateless, authenticated-encrypted string locked to that one patient: the embed forces the company/project/patient filters server-side on every render, so a holder can never widen past the patient the token was minted for. Reads are attributed to the minting user. `parentOrigin` is the exact origin of the page that frames the iframe: `https://host[:port]` with no path, query, fragment, credentials or wildcard, on the deployment's approved browser-origin allowlist, or the mint is answered with `400`. It binds framing, and the browse-state messages below, to that exact origin.\n\n**Deprecated:** omitting the body or `parentOrigin` still mints a token, framed by any page and posting its messages to any parent (legacy wildcard). A later release will require `parentOrigin` and answer a mint without it with `400`, so send it now.\n\n### 2. Load the iframe\n\n```html title=\"Embed iframe\"\n<iframe\n  src=\"https://api.hermeshealth.ai/ui/clinical-data/embed?token=<token>\"\n  style=\"border:0;width:100%;height:100%\"\n  title=\"Clinical Data\"></iframe>\n```\n\nThe embed routes are token-authed only — no session cookie — so the token may be handed to the end user, but only the `parentOrigin` sealed into it may frame the iframe. Optional query parameters:\n\n- `tab` — which entity tab to open first (`visits` | `procedures` | `diagnoses` | `prescription-fills` | `lab-results`; defaults to `visits`).\n- `panel` — an opaque browse-state blob to restore filters / sort / page (see below).\n- `map` — `expanded` (default) or `collapsed` for the facility map card's initial state.\n\n### 3. Persist browse state (optional)\n\nA sandboxed cross-origin iframe can't write the host page's URL, so the embed `postMessage`s its current browse state to the parent window on every change: a `{ type: \"hermes:clinical-data\", entity, tab, panel }` message addressed only to the exact approved `parentOrigin` sealed into the token. A token minted without one (deprecated) posts to the wildcard target. Persist the `panel` value (e.g. onto your own URL) and pass it back as the `panel` query parameter to reload the iframe into the same view.\n\n### Token lifetime\n\nClinical-data embed tokens expire one hour after minting, and every embed request re-resolves the minting user and re-checks they can still see the token's patient — so revoking a user's access invalidates their outstanding tokens immediately. Mint a fresh token each time you render the page hosting the iframe rather than caching tokens.\n\n## Browsing tables\n\nWe expose a typed query syntax for large tabular resources. Today this covers `POST /v0/visits/browse`, `POST /v0/procedures/browse`, and `POST /v0/diagnoses/browse`, and we'll move additional list endpoints onto the same contract over time. Every browse route accepts the same JSON request shape — column selection, filters, sorts, aggregates, search, and pagination — and returns a `{ table, aggregate, total }` envelope.\n\n**Displaying a patient's clinical data to end users?** The `visits`, `procedures`, `diagnoses`, `prescription-fills`, and lab browse schemas change frequently as we expand claims coverage and add columns. Rather than marshalling these rows yourself and handling that churn, embed the read-only iframe — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui). The browse endpoints remain the right tool for server-to-server querying and exports.\n\nEach route registers its own request/response schemas in `components.schemas` as `{Entity}BrowseRequest` and `{Entity}BrowseResponse` (e.g. `VisitBrowseRequest`, `ProcedureBrowseResponse`), along with per-slot types (`{Entity}BrowseFilter`, `{Entity}BrowseSort`, `{Entity}BrowseSelect`, `{Entity}BrowseRow`, `{Entity}BrowseAggregateRequest`, `{Entity}BrowseAggregate`). Those schemas are the authoritative list of which columns each route accepts; this section documents the shared syntax so each per-route schema doesn't have to repeat it.\n\n### Root request shape\n\n```json title=\"Request shape\"\n{\n  \"select\":    { },\n  \"where\":     { },\n  \"orderBy\":   [ ],\n  \"aggregate\": { },\n  \"search\":    \"...\",\n  \"take\":      100,\n  \"skip\":      0\n}\n```\n\nEvery top-level field is optional:\n\n- Omit `select` to return every column for every joined entity.\n- Omit `where` to return every row the caller is allowed to see.\n- Omit `orderBy` to use the route's default sort (typically created-at).\n- Omit `aggregate` to skip roll-up computation.\n- Omit `search` to skip the cross-column substring match.\n- Omit `take` to return every matching row (useful for exports).\n- Omit `skip` to start at the first row.\n\n### Entity slots and joins\n\nA browse response is a flat table of rows, but each row is keyed by entity: visits join through to patient, site, payor, company, and project; procedures join through to visit, patient, site, and so on. Every slot of the request — `select`, `where`, `orderBy`, `aggregate` — mirrors this join structure and is keyed by entity name (camelCase). The root entity uses its own name (`visit`, `procedure`, `diagnosis`); joined-in entities use their own keys.\n\nThe exact set of entities and columns per route is documented by the corresponding `{Entity}BrowseRequest` schema — inspect it to see which keys each slot accepts.\n\n### Toggling columns with `select`\n\n`select` is an entity-keyed object where each inner block maps column name to a boolean:\n\n```json title=\"Selecting columns\" operation=\"POST /v0/visits/browse\"\n{\n  \"select\": {\n    \"visit\":   { \"ref\": true, \"earliestServiceDate\": true },\n    \"patient\": { \"firstName\": true, \"lastName\": true }\n  }\n}\n```\n\nEvery column defaults to `false` inside a `select` block. Omitting an entity's block entirely returns every column for that entity; omitting the top-level `select` returns every column for every entity. Response rows mirror the request — each selected entity appears as a nested object keyed by entity name, with only the selected columns present. Unselected columns are absent from the JSON (not `null`).\n\n### Filtering with `where`\n\nEach entity block under `where` maps a column name to a **list of field filters**. All field filters — across columns, across entities, and across entries within the same list — are **ANDed** together.\n\nEvery field filter is one of:\n\n- **Value filter** — an object with a single operator key. The available operators depend on the column's type:\n  - Text (`string`): `equals`, `notEquals`, `contains`, `startsWith`, `endsWith`\n  - Ordered (`integer`, `decimal`, `date`, `datetime`, `double`): `equals`, `notEquals`, `gt`, `gte`, `lt`, `lte`\n  - Categorical (`bool`): `equals`, `notEquals`\n- **List filter** — an object with `in` or `notIn` whose value is an array of candidate values. Available on every column type.\n- **Null check** — the literal string `\"isNull\"` or `\"isNotNull\"`. Available on every nullable column.\n\n```json title=\"Filtering rows\" operation=\"POST /v0/visits/browse\"\n{\n  \"where\": {\n    \"visit\": {\n      \"earliestServiceDate\": [\n        { \"gte\": \"2025-01-01\" },\n        { \"lt\":  \"2026-01-01\" }\n      ]\n    },\n    \"patient\": {\n      \"lastName\": [ { \"startsWith\": \"Smi\" } ]\n    },\n    \"site\": {\n      \"state\":      [ { \"in\": [\"CA\", \"NY\", \"TX\"] } ],\n      \"systemName\": [ \"isNotNull\" ]\n    }\n  }\n}\n```\n\nThe generated `{Entity}BrowseFilter` schema encodes the valid operator set per column, so requests with mismatched operators (e.g. `contains` on an integer) fail deserialization with a 400.\n\n### Sorting with `orderBy`\n\n`orderBy` is an **array**, applied in order — the first entry is the primary sort, the second breaks ties, and so on. Each entry picks one entity and one column:\n\n```json title=\"Sorting rows\" operation=\"POST /v0/visits/browse\"\n{\n  \"orderBy\": [\n    { \"visit\":   { \"earliestServiceDate\": \"desc\" } },\n    { \"patient\": { \"lastName\": \"asc\" } }\n  ]\n}\n```\n\nDirection is `\"asc\"` or `\"desc\"`. A stable per-row tiebreaker (typically the row's `id`) is appended automatically, so pagination is deterministic even when the requested sort produces ties. Omit `orderBy` entirely to use the route's default sort.\n\n### Aggregates\n\nPass an `aggregate` block to compute roll-ups over the **filtered** row set — pagination (`take` / `skip`) does **not** narrow the aggregated rows, so aggregates always describe the full filtered population. Every entity exposes `count`; entities with numeric columns also expose `sum`, `avg`, `min`, and `max`, each keyed by column name with boolean opt-ins. Those four take numeric columns only, never a date, so a visit's service dates are not among them.\n\n```json title=\"Aggregating rows\" operation=\"POST /v0/visits/browse\"\n{\n  \"aggregate\": {\n    \"visit\": { \"count\": true }\n  }\n}\n```\n\nResults come back on `response.aggregate` in the same shape. Omit the block (or set every opt-in to `false`) to skip aggregation.\n\n### Full-text `search`\n\nThe top-level `search` string applies a case-insensitive substring match across every text-like column on every joined entity. It is ANDed with `where`. Use it to power a single-box search UX; use `where` for precise queries.\n\n### Pagination\n\n`skip` and `take` both count **matching rows** (post-filter, post-search). Responses include `total` — the count of matching rows before pagination — so clients can render \"page X of N\" without a second request. Omit `take` to stream every matching row; combine that with `Accept: text/csv` to export.\n\n### Response\n\n```json title=\"Response envelope\"\n{\n  \"table\":     [ ],\n  \"aggregate\": { },\n  \"total\":     4217\n}\n```\n\n- `table` is the paginated rows, each mirroring the `select` shape.\n- `aggregate` mirrors the request's `aggregate` shape; absent when no aggregates were requested.\n- `total` is the count of rows matching `where` + `search`, before `skip` / `take`.\n\n### CSV export\n\nEvery browse route content-negotiates on the `Accept` header. `application/json` (the default) returns the envelope above; `text/csv` returns a CSV of the selected columns only — `aggregate` and `total` are omitted from CSV output. Pair `Accept: text/csv` with an absent `take` to stream a full export.\n","version":"0.1.0"},"servers":[{"url":"https://api.hermeshealth.ai","description":"Production and sandbox. There is no separate sandbox host: the API key you send decides which projects a call can reach."}],"paths":{"/v0/auth-check/{filename}":{"get":{"tags":["auth-check"],"summary":"Retrieve a standalone auth check","description":"Fetch the extraction, derived verdicts, and presigned URLs for a\nstandalone auth-check upload.\n\n`token` is **required**: an embed token minted for this same document via\n`POST /v0/auth-check/<filename>/embed-token`, which carries the patient\ndata the patient-comparison checks (`patientName`, `patientDateOfBirth`,\n`signerName`, `capability`, `minorAuthorization`, `deceasedAuthorization`)\ncompare against. A missing token, a token minted for a different document,\nor an expired or tampered token is rejected with 401. A `filename` that is\nnot a single path segment of at most 255 bytes, starts with a dot, or has no\nname before its extension is rejected with 400.\n\nA `null` field in `verdicts` means that check **did not run** — it does\nnot mean the check passed. `datesOfService` is scoped to a record request\nand never runs here; a HITECH authorization type detected on the document\nclears the revocation / redisclosure / conditioning / sensitive-info\nverdicts; `documentValidity` is `null` when no supporting documents raise\na concern. The exception is `sensitiveInformation`: a `null` category\nverdict there means that category was not requested, and\n`noSensitiveInformationRequested` is set only when none is.\n`purposeAlignment` needs the owning project's purpose, which a standalone\nsubmission has none of, so it never runs here.\n\nWhile the analysis is still running, `verdicts` is `null` as a whole. Poll\non `verdicts`, not `extraction`: `extraction` can already be present, with\nempty `data`, before the analysis finishes.\n\nThe `extraction` schema evolves as we expand document-type and edge-case\ncoverage. If you are rendering the result to end users, prefer the iframe\nembed over consuming this schema directly — see\n[Embedding the auth-check UI](#embedding-the-auth-check-ui).\n\nThis endpoint also returns a presigned `uploadUrl`. That is preserved for\nbackwards compatibility — new integrations should use `PUT\n/v0/auth-check/<filename>` to obtain an upload URL, which avoids the extra\nS3 read-side work this endpoint performs.","operationId":"get_auth_check","parameters":[{"name":"filename","in":"path","description":"The standalone auth-check document's file name, scoped to your user.","required":true,"schema":{"type":"string"}},{"name":"token","in":"query","description":"Embed token minted for this document via `POST /v0/auth-check/{filename}/embed-token`; supplies the patient context the comparison verdicts run against.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request, e.g. a `filename` that is not a single path segment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"put":{"tags":["auth-check"],"summary":"Mint an upload URL for an auth check","description":"Request a presigned S3 upload URL for a standalone auth-check file.\n\nUse this endpoint whenever you need to upload — previously customers had to\ncall `GET /v0/auth-check/<filename>` and pluck the `uploadUrl` out of a\ncombined read/write response. Prefer this route: it never touches S3 on\nthe read path, so it is cheaper and returns faster.\n\nYou may optionally send the same patient-context body accepted by\n`POST /v0/auth-check/<filename>/embed-token`. When you do, the response\ncarries a pre-minted `embedToken` for this document, saving that extra\nround-trip — fetch and embed can proceed as soon as the upload completes.\nOmit the body if you don't yet have the patient context (e.g. the user\nuploads first and fills the form later); mint it separately when ready.\n\nPatient context sent here is stored with the submission, so it stays\nreviewable in the auth-checker's Submissions tab after the one-hour embed\ntoken expires. Uploading again under the same `filename` records a new\nsubmission with the patient context sent that time.\n\nThe body may also carry an optional `referenceId`: your own identifier for\nthe patient (an MRN or account number), at most 255 characters, shown in the\nSubmissions tab so the submission can be matched back to your patient. A\nblank value is treated as absent, and a longer one is rejected with 400. It\nis stored with the submission only, never in the embed token.\n\n`filename` must be a single path segment of at most 255 bytes, must not\nstart with a dot, and must have a name before its extension; anything else\nis rejected with 400.\n\nAfter a successful `PUT` to the returned `uploadUrl`, call\n`GET /v0/auth-check/<filename>` to fetch the analysis payload and a\npresigned download URL for the uploaded object.","operationId":"upload_auth_check","parameters":[{"name":"filename","in":"path","description":"The standalone auth-check document's file name, scoped to your user.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandaloneAuthCheckBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request, e.g. a `filename` that is not a single path segment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/auth-check/{filename}/embed-token":{"post":{"tags":["auth-check"],"summary":"Mint an auth-check embed token","description":"Mint an embed token for iframing the auth-check UI.\n\nThe token encapsulates the patient info and PDF storage key so the\nread-only embed view at `GET /ui/auth-check/embed?token=...` can render\nwithout any session or DB lookup. Tokens are stateless, sealed with\nauthenticated encryption (encrypt-then-MAC, keyed apart from the generic\nURL-query oracle), and expire one hour after minting. The `pdfStorageKey`\nis derived server-side from the authenticated user, so a caller cannot mint\na token for another user's document.\n\nThe same token is also **required** by the JSON endpoint\n`GET /v0/auth-check/<filename>?token=...`, which uses its patient info to\nrun the patient-comparison verdicts.\n\nThe patient info is also stored with the submission, so it stays\nreviewable in the auth-checker's Submissions tab after the token expires.\nMinting again for the same `filename` with different patient info corrects\nit.\n\nThe body may also carry an optional `referenceId`: your own identifier for\nthe patient (an MRN or account number), at most 255 characters, shown in the\nSubmissions tab beside the patient. It is stored with the submission only,\nnever in the token. Minting again with a different `referenceId` replaces\nit. Minting for the same patient without one, or with a blank one, keeps\nthe reference already recorded, so a recorded reference cannot be removed\nthis way; minting for a different patient drops it unless a new one is\nsent, and re-uploading the document clears it. A longer `referenceId` is\nrejected with 400.\n\n`filename` must be a single path segment of at most 255 bytes, must not\nstart with a dot, and must have a name before its extension; anything else\nis rejected with 400.\n\nThis endpoint is for the **standalone** flow (a document uploaded\noutside any patient context — typically via the auth-checker UI). For\npatient- or record-request-scoped documents, `PatientOutput` and\n`RecordRequestOutput` responses include a pre-minted `embedToken` field\nand this extra round-trip is unnecessary.\n\nSee [Embedding the auth-check UI](#embedding-the-auth-check-ui) for the\nfull iframe integration guide.","operationId":"mint_embed_token","parameters":[{"name":"filename","in":"path","description":"The standalone auth-check document's file name, scoped to your user.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandaloneAuthCheckBody"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"400":{"description":"Bad request, e.g. a `filename` that is not a single path segment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/auth-check/{filename}/retrigger":{"post":{"tags":["auth-check"],"summary":"Re-run a standalone auth-check","description":"Discards the document's current analysis and queues it to be analyzed\nagain. The call returns as soon as the re-run is queued; until it finishes,\n`GET /v0/auth-check/{filename}` reports `verdicts` as null. The document\nmust already have been uploaded.","operationId":"retrigger_auth_check","parameters":[{"name":"filename","in":"path","description":"The standalone auth-check document's file name, scoped to your user.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request, e.g. a `filename` that is not a single path segment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects":{"post":{"tags":["projects"],"summary":"Create a project (Hermes-generated ID)","description":"Creates a new project with a generated id. This call is not idempotent:\nretrying a request that succeeded creates a second project, so use the PUT\nform with your own id when you need safe retries. When `purpose` is omitted\nthe company's default purpose is used; a sandbox API key can only create\nsandbox projects. Returns the created project.","operationId":"post_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewProject"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJoin"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Retrieve a project","description":"Returns the project with its company name, counts of its patients, record\nrequests, and visits, and presigned URLs for its request and representation\nletters. Returns 404 when the project does not exist or is not visible to\nthe caller.","operationId":"get_project","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJoin"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"put":{"tags":["projects"],"summary":"Upsert a project by ID","description":"Creates the project under the id you choose, or replaces it if one already\nexists at this path, so repeating the same call is safe. On an existing\nproject, omitted `status`, `purpose`, `authorizationMethod`, and `selfServe`\nfields keep their current values. A sandbox API key can only write sandbox\nprojects, and changing an existing project's status, purpose, authorization\nmethod, or self-serve flag is not permitted for customer callers and\nreturns 401. Returns the stored project.","operationId":"put_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewProject"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJoin"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["projects"],"summary":"Delete a project","description":"Deletes the project's stored files as well, and is not reversible.","operationId":"delete_project","responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"patch":{"tags":["projects"],"summary":"Update a project","description":"Applies a single field change to the project, such as its name or\ndescription, and returns the updated project. Changing the purpose, status,\nauthorization method, or self-serve flag is not permitted for customer\ncallers and returns 401.","operationId":"patch_project","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectPatch"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJoin"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/auth-intake/embed-token":{"post":{"tags":["auth-intake"],"summary":"Mint an auth-intake token for a new patient","description":"Route #1 — brand-new patient. Optional demographics pre-fill the form; an\noptional site makes the authorization site-specific.","operationId":"mint_auth_intake_token","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/MintIntakeTokenRequest"}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"400":{"description":"Malformed or unapproved supplied parent origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Project, patient, or record request not found / not visible to the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients":{"post":{"tags":["patients"],"summary":"Create a patient (Hermes-generated ID)","description":"Hermes assigns the patient ID and returns it. Use `PUT` instead to choose\nthe ID yourself, or to re-send a patient you already have an ID for.\n\nSet `siteSonar` and/or `patientHistories` on the body to begin retrieval\nimmediately; omit both to register the patient without searching. Both\nroutes take the same body — the ID strategy is the only difference.","operationId":"post_patient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientForm"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOutput"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"The body was valid JSON but a field failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}":{"get":{"tags":["patients"],"summary":"Retrieve a patient","description":"Returns the patient's identity fields, `authorizationStatus`, and\n`searchStatus`. Poll this to watch a search progress, or subscribe a webhook\nto the request-flag columns instead.","operationId":"get_patient","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOutput"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"put":{"tags":["patients"],"summary":"Upsert a patient by ID","description":"You supply the patient ID in the URL. If no patient has that ID one is\ncreated; if one does, it is replaced — so retries are idempotent. The ID\nmay be one of your own or one Hermes generated earlier. Use `POST` instead\nwhen you have no ID yet and want Hermes to assign one.\n\nSet `siteSonar` and/or `patientHistories` on the body to begin retrieval\nimmediately; omit both to register the patient without searching. Both\nroutes take the same body — the ID strategy is the only difference.","operationId":"put_patient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientForm"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOutput"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"The body was valid JSON but a field failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["patients"],"summary":"Delete a patient","description":"Removes the patient record itself. To remove only the retrieved clinical\ndata while keeping the patient, use the clinical-data route instead.","operationId":"delete_patient","responses":{"200":{"description":"Success"},"400":{"description":"Bad request (patient has record requests — delete those first)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"patch":{"tags":["patients"],"summary":"Update a patient","description":"Send only the fields you want to change. Changing an identity field (name,\ndate of birth, sex, ZIP) to a genuinely new value resets the authorization\nfor re-approval; non-identity changes never do.","operationId":"patch_patient","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientFieldPatch"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOutput"}}}},"400":{"description":"Bad request: the body exceeded the size limit, or a request-level fault","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"422":{"description":"The body could not be parsed as a patient patch: malformed JSON, or a\nfield that failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/auth-intake/embed-token":{"post":{"tags":["auth-intake"],"summary":"Mint an auth-intake token for a patient","description":"Route #2 — existing patient, broad authorization.","operationId":"mint_auth_intake_token_for_patient","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedOriginRequest"}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"400":{"description":"Malformed or unapproved supplied parent origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Project, patient, or record request not found / not visible to the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/authorization":{"get":{"tags":["patient-authorization"],"summary":"Retrieve a patient's authorization","description":"Fetch the authorization file plus its auth-check analysis for a patient.\n\nThe `analysis` field inside the response wraps the raw `Analysis` /\n`AuthCheck` schema, which changes often as we expand document-type and\nedge-case coverage. For end-user-facing surfaces, prefer the iframe embed\nvia the `embedToken` on `PatientOutput` — see\n[Embedding the auth-check UI](#embedding-the-auth-check-ui).","operationId":"get_patient_authorization","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["patient-authorization"],"summary":"Delete a patient's authorization","description":"Deletes the authorization document on file for the patient, along with its\nanalysis and the documents carved from it. Authorizations are retained for\naudits, so earlier versions are kept. The call succeeds with an empty body even when no document is on file, so\nrepeating it is safe. It answers `404` when the patient does not exist or\nthe caller cannot see it.","operationId":"delete_patient_authorization","responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"head":{"tags":["patient-authorization"],"summary":"Check a patient authorization's status","description":"Returns the `x-progress` and `x-etag` headers without transferring the\ndocument, so you can poll whether auth-check analysis has finished.","operationId":"head_patient_authorization","responses":{"200":{"description":"File metadata headers"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/clinical-data-embed-token":{"post":{"tags":["clinical-data-embed"],"summary":"Mint a clinical-data embed token","description":"Mint an embed token for iframing the clinical-data browse surface of one\npatient.\n\nThe token authorizes the read-only embed at\n`GET /ui/clinical-data/embed?token=...`: anyone holding it can browse this\npatient's visits, procedures, diagnoses, prescription fills, and lab results,\nall attributed to the minting user. The token is locked to this single\npatient — the embed surface forces the company/project/patient browse filters\nserver-side, so a holder can never widen past this patient. Tokens are\nstateless, sealed with authenticated encryption (encrypt-then-MAC, keyed\napart from the generic URL-query oracle and the other embed tokens), and\nexpire one hour after minting — mint a fresh token each time you render the\npage that hosts the iframe.\n\n**Prefer this over the per-table browse endpoints** (`/v0/visits/browse`,\n`/v0/diagnoses/browse`, …) for any surface that shows a patient's clinical\ndata to end users: the raw clinical-data table schemas change frequently as\nwe expand claims coverage, and an embedded iframe picks up those changes\nautomatically with no schema-drift maintenance on your side.\n\nSee [Embedding the clinical-data UI](#embedding-the-clinical-data-ui) for the\nfull iframe integration guide.","operationId":"mint_clinical_data_embed_token","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedOriginRequest"}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"400":{"description":"Malformed or unapproved supplied parent origin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found, or not visible to the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/notes":{"get":{"tags":["patient-notes"],"summary":"List a patient's notes","description":"Returns every note filed on the patient, newest first. Returns 404 when the\npatient does not exist or is not visible to the caller.","operationId":"list_patient_notes","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"post":{"tags":["patient-notes"],"summary":"Add a note to a patient","description":"Creates a new note on the patient, authored by the caller. Each call adds\nanother note, so retrying a request that succeeded creates a duplicate. Any\nwebhook endpoints subscribed to patient note events are notified. Returns an\nempty body on success.","operationId":"post_patient_note","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/notes/{note_id}":{"delete":{"tags":["patient-notes"],"summary":"Delete a patient note","description":"Deletes the note when it is filed on this patient and the caller authored\nit. The call succeeds with an empty body even when no matching note exists,\nso repeating it is safe.","operationId":"delete_patient_note","parameters":[{"name":"note_id","in":"path","description":"The id of the note to delete, as returned when listing the patient's notes.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests":{"post":{"tags":["record-requests"],"summary":"Create a record request (Hermes-generated ID)","description":"Creates one record request for each selected request type, each with a\nnewly generated id. This call is not idempotent: retrying a request that\nsucceeded creates duplicates, so use the PUT form with your own id when you\nneed safe retries. Returns the created record requests.","operationId":"post_record_request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestForm"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestMany"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}":{"put":{"tags":["record-requests"],"summary":"Upsert a record request by ID","description":"Creates the record request under the id you choose, or replaces it\nwholesale if one already exists at this path, so repeating the same call is\nsafe. Exactly one request is created, of the first selected request type,\nand an existing request keeps its order number. Replacing an existing\nrequest requires permission to edit record requests. Returns the stored\nrecord request.","operationId":"put_record_request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestForm"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestOutput"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/deliverables":{"get":{"tags":["record-request-files"],"summary":"List a record request's deliverables","description":"Lists every deliverable returned for the record request as one flat tree,\nsorted by name. Each file carries the unique name the download, status and\ndelete calls address it by, and the folder it displays under, if any.","operationId":"list_record_request_deliverable_folder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/deliverables/{filename}":{"get":{"tags":["record-request-files"],"summary":"Download a deliverable","description":"Returns a short-lived presigned `downloadUrl` for the deliverable; fetch\nthe file from that URL before `expiresIn` seconds elapse. `filename` is the\nname the deliverables listing shows, which is unique across the request\nand not always the stored file name.","operationId":"get_record_request_deliverable","parameters":[{"name":"filename","in":"path","description":"The deliverable's name as the deliverables listing shows it.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["record-request-files"],"summary":"Delete a deliverable","description":"`filename` is the name the listing shows. The flattened tree makes that\nunique across the request, so it is not always the stored basename.","operationId":"delete_record_request_deliverable","parameters":[{"name":"filename","in":"path","description":"The deliverable's name as the deliverables listing shows it.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"head":{"tags":["record-request-files"],"summary":"Check a deliverable's status","description":"Returns the `x-progress` and `x-etag` headers without transferring the\nfile. Poll this before downloading a large deliverable.","operationId":"head_record_request_deliverable","parameters":[{"name":"filename","in":"path","description":"The deliverable's name as the deliverables listing shows it.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File metadata headers"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/deliverables/{path}":{"patch":{"tags":["record-request-files"],"summary":"Rename a deliverable","description":"The path segment is the deliverable's full path within the flattened\ntree, not just its leaf. Renaming changes the leaf only.","operationId":"rename_record_request_deliverable","parameters":[{"name":"path","in":"path","description":"The deliverable's full path within the deliverables tree, which may span several segments; the last segment is the file name being renamed.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameAttachmentRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/documents":{"get":{"tags":["record-request-files"],"summary":"List a record request's documents","description":"Lists the files in the record request's documents folder. Returns 404 when\nthe record request does not exist or is not visible to the caller.","operationId":"list_record_request_document_folder","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/documents/{filename}":{"get":{"tags":["record-request-files"],"summary":"Download a record request document","description":"Returns a short-lived presigned `downloadUrl` for the named document; fetch\nthe file from that URL before `expiresIn` seconds elapse. This call is\nread-only and never returns an upload URL. Returns 404 when the record\nrequest does not exist or is not visible to the caller.","operationId":"get_record_request_document","parameters":[{"name":"filename","in":"path","description":"The document's file name within the record request's documents folder.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"put":{"tags":["record-request-files"],"summary":"Mint an upload URL for a record request document","description":"GET on the same path is read-only, so a caller holding only\n`ViewRecordRequests` never receives an upload URL; minting requires\n`UploadProviderPacket`.","operationId":"upload_record_request_document","parameters":[{"name":"filename","in":"path","description":"The file name to upload under, within the record request's documents folder.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["record-request-files"],"summary":"Delete a record request document","description":"Permanently deletes the named file from the record request's documents\nfolder. Returns 404 when the record request does not exist or is not\nvisible to the caller.","operationId":"delete_record_request_document","parameters":[{"name":"filename","in":"path","description":"The document's file name within the record request's documents folder.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"head":{"tags":["record-request-files"],"summary":"Check a document's status","description":"Returns the `x-progress` and `x-etag` headers without transferring the\nfile.","operationId":"head_record_request_document","parameters":[{"name":"filename","in":"path","description":"The document's file name within the record request's documents folder.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File metadata headers"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"patch":{"tags":["record-request-files"],"summary":"Rename a record request document","description":"Renames the leaf only; the document stays in the same record request.","operationId":"rename_record_request_document","parameters":[{"name":"filename","in":"path","description":"The current file name of the document to rename, within the record request's documents folder.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameAttachmentRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/notes":{"post":{"tags":["record-request-notes"],"summary":"Add a note to a record request","description":"Creates a new note on the record request, authored by the caller. Each call\nadds another note, so retrying a request that succeeded creates a\nduplicate. Any webhook endpoints subscribed to record-request note events\nare notified. Returns an empty body on success.","operationId":"post_record_request_notes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNoteRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/notes/{note_id}":{"delete":{"tags":["record-request-notes"],"summary":"Delete a record request note","description":"Deletes the note when it is filed on this record request and the caller\nauthored it. The call succeeds with an empty body even when no matching\nnote exists, so repeating it is safe.","operationId":"delete_record_request_note","parameters":[{"name":"note_id","in":"path","description":"The id of the note to delete, as returned when listing the record request's notes.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"patch":{"tags":["record-request-notes"],"summary":"Update a record request note","description":"Replaces the note's content. Only the note's author can edit it; a note\nthat does not exist, belongs to another user, or is not filed on this\nrecord request returns 404. Returns an empty body on success.","operationId":"patch_record_request_note","parameters":[{"name":"note_id","in":"path","description":"The id of the note to update, as returned when listing the record request's notes.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNoteRequest"}}},"required":true},"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{record_request_id}/{filename}":{"get":{"tags":["record-request-files"],"summary":"Download a record request attachment","description":"Returns a short-lived presigned `downloadUrl` for the named file stored\ndirectly on the record request; fetch the file from that URL before\n`expiresIn` seconds elapse. This call is read-only and never returns an\nupload URL. Returns 404 when the record request does not exist or is not\nvisible to the caller.","operationId":"get_record_request_file","parameters":[{"name":"filename","in":"path","description":"The attachment's file name, stored directly on the record request.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["record-request-files"],"summary":"Delete a record request attachment","description":"Permanently deletes the named file stored directly on the record request.\nReturns 404 when the record request does not exist or is not visible to the\ncaller.","operationId":"delete_record_request_file","parameters":[{"name":"filename","in":"path","description":"The attachment's file name, stored directly on the record request.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"head":{"tags":["record-request-files"],"summary":"Check an attachment's status","description":"Returns the `x-progress` and `x-etag` headers without transferring the\nfile.","operationId":"head_record_request_file","parameters":[{"name":"filename","in":"path","description":"The attachment's file name, stored directly on the record request.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File metadata headers"},"400":{"description":"Bad request (invalid rename target, destination collision, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. non-Hermes caller on a Hermes-only upload mint)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant parents)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{request_id}":{"get":{"tags":["record-requests"],"summary":"Retrieve a record request","description":"Returns the record request together with its site and departments, notes,\nsubmission history, and presigned URLs for its files (authorization,\nprovider packet, deliverables). Returns 404 when the record request does not\nexist or is not visible to the caller.","operationId":"get_record_request","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestOutput"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Record request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"patch":{"tags":["record-requests"],"summary":"Update a record request","description":"Applies a single field change to the record request, such as its owner,\nservice dates, or request type, and returns the updated record request.\nSetting a start or end date of service resubmits the request. Some fields,\nincluding status, site, and follow-up dates, require permission to edit\nrecord requests; without it the call returns 401.","operationId":"patch_record_request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestPatch"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRequestOutput"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Record request not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{request_id}/auth-intake/embed-token":{"post":{"tags":["auth-intake"],"summary":"Mint an auth-intake token for a record request","description":"Route #3 — existing patient + record request, site-specific authorization.","operationId":"mint_auth_intake_token_for_record_request","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedOriginRequest"}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"400":{"description":"Malformed or unapproved supplied parent origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Project, patient, or record request not found / not visible to the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/record-requests/{request_id}/authorization":{"get":{"tags":["record-request-authorization"],"summary":"Retrieve a record request's authorization","description":"Get authorization analysis for a specific record request. The request's\nDOS is threaded through the auth-check pipeline so `check_dates_of_service`\ncan validate the form's extracted DOS against the request.\n\nThe `analysis` field inside the response wraps the raw `Analysis` /\n`AuthCheck` schema, which changes often as we expand document-type and\nedge-case coverage. For end-user-facing surfaces, prefer the iframe embed\nvia the `embedToken` on `RecordRequestOutput` — see\n[Embedding the auth-check UI](#embedding-the-auth-check-ui).","operationId":"get_request_authorization","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/patients/{patient_id}/search-level":{"patch":{"tags":["patient-search"],"summary":"Update a patient's requested searches","description":"Update which searches are requested for a patient.\n\nPatch semantics — an absent field leaves the patient's current setting\nunchanged (unlike the create body, where an omitted flag means *off*).\nAn empty body is rejected with a 400.\n\nThe response reports whether the capabilities now armed can actually run.\n`ehrSearchBlockedReason: \"MissingZipCode\"` means the patient has no ZIP code\nand the vendor requires one: the request is armed and goes out on its own once\na ZIP code is set, and nothing else is needed.\n`\"DeceasedBeforeClinicalData\"` on `siteSonarBlockedReason` or\n`patientHistoriesBlockedReason` is the opposite kind of answer: the patient's\nauthorization documents date their death before any clearinghouse still holds\nrecords, so the search would be empty and is not run. Unlike the ZIP case\nnothing stays armed, so this reason is reported HERE and then goes back to\n`null` once the gate runs — from that point the answer lives on the\npatient's `searchStatus` instead.","operationId":"patch_patient_search_level","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSearchLevelForm"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSearchLevelResponse"}}}},"400":{"description":"Bad request (empty body — no search field to apply)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"403":{"description":"Forbidden (e.g. patient histories, Site Sonar, or EHR Search not enabled for the company)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Patient not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/companies/{company_id}/projects/{project_id}/{filename}":{"get":{"tags":["project-files"],"summary":"Download a project file","description":"Returns a short-lived presigned `downloadUrl` for the named project file;\nfetch the file from that URL before `expiresIn` seconds elapse. This call is\nread-only. Returns 404 when the project does not exist or is not visible to\nthe caller.","operationId":"get_project_file","parameters":[{"name":"filename","in":"path","description":"The project file's name, a single path segment.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant projects)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"put":{"tags":["project-files"],"summary":"Upload a project file","description":"Returns a short-lived presigned `uploadUrl`, plus any `uploadHeaders` to\nsend with it; `PUT` the file bytes to that URL before `expiresIn` seconds\nelapse. Uploading to a name that already exists replaces that file. A name\nthat is empty or contains a slash, backslash, double quote, semicolon, or\ncontrol character is rejected with 400.","operationId":"upload_project_file","parameters":[{"name":"filename","in":"path","description":"The name to store the file under, a single path segment.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant projects)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"delete":{"tags":["project-files"],"summary":"Delete a project file","description":"Permanently deletes the named file stored on the project. Returns 404 when\nthe project does not exist or is not visible to the caller.","operationId":"delete_project_file","parameters":[{"name":"filename","in":"path","description":"The project file's name, a single path segment.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant projects)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]},"head":{"tags":["project-files"],"summary":"Check a project file's status","description":"Returns the `x-progress` and `x-etag` headers without transferring the\nfile, so you can poll whether an upload has finished processing before\ndownloading it.","operationId":"head_project_file","parameters":[{"name":"filename","in":"path","description":"The project file's name, a single path segment.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File metadata headers"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Not found (including invisible / cross-tenant projects)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/diagnoses/browse":{"post":{"tags":["diagnoses"],"summary":"Browse diagnoses","description":"Queries the diagnoses on the patients visible to the caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.\nUntil clinical data has finished loading after a service restart, the call\nreturns 500 rather than an empty table; retry shortly.","operationId":"post_browse_diagnoses","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for DiagnosisBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/diagnosis-categories/browse":{"post":{"tags":["diagnoses"],"summary":"Browse diagnosis categories","description":"Queries the ICD-10-CM diagnosis category reference table, which is the\nsame for every caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.","operationId":"post_browse_diagnosis_categories","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for DiagnosisCategoryBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/diagnosis-codes/browse":{"post":{"tags":["diagnoses"],"summary":"Browse diagnosis codes","description":"Queries the ICD-10-CM diagnosis code reference table, which is the same\nfor every caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.","operationId":"post_browse_diagnosis_codes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisCodeBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for DiagnosisCodeBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosisCodeBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/lab-accessions/browse":{"post":{"tags":["lab-accessions"],"summary":"Browse lab accessions","description":"Queries the lab accessions on the patients visible to the caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.\nUntil clinical data has finished loading after a service restart, the call\nreturns 500 rather than an empty table; retry shortly.","operationId":"post_browse_lab_accessions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabAccessionBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for LabAccessionBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabAccessionBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/lab-results/browse":{"post":{"tags":["lab-results"],"summary":"Browse lab results","description":"Queries the lab results on the patients visible to the caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.\nUntil clinical data has finished loading after a service restart, the call\nreturns 500 rather than an empty table; retry shortly.","operationId":"post_browse_lab_results","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabResultBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for LabResultBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabResultBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/patients/browse":{"post":{"tags":["patients"],"summary":"Browse patients","description":"JSON/CSV patient table browse.\n\nAuth Check is categorically unavailable here: JSON clients may set\n`limit` to 1000+, and the S3-backed sidecar column is unsafe at that\nscale. Explicit `select` / `where` / `orderBy` / `aggregate` references\nto `authCheck` return 400. Absent select still omits the column (never\nenriched).","operationId":"post_browse_patients","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for PatientBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization or referenced unsupported fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/prescription-fills/browse":{"post":{"tags":["prescription-fills"],"summary":"Browse prescription fills","description":"Queries the prescription fills on the patients visible to the caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.\nUntil clinical data has finished loading after a service restart, the call\nreturns 500 rather than an empty table; retry shortly.","operationId":"post_browse_prescription_fills","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionFillBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for PrescriptionFillBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionFillBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/procedure-codes/browse":{"post":{"tags":["procedures"],"summary":"Browse procedure codes","description":"Queries the CPT/HCPCS procedure code reference table, which is the same\nfor every caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.","operationId":"post_browse_procedure_codes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureCodeBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for ProcedureCodeBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureCodeBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/procedures/browse":{"post":{"tags":["procedures"],"summary":"Browse procedures","description":"Queries the procedures on the patients visible to the caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.\nUntil clinical data has finished loading after a service restart, the call\nreturns 500 rather than an empty table; retry shortly.","operationId":"post_browse_procedures","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for ProcedureBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/record-requests/browse":{"post":{"tags":["record-requests"],"summary":"Browse record requests","description":"Queries every record request visible to the caller, across projects and\npatients. Read-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`. File columns carry presigned URLs that can be fetched\ndirectly.","operationId":"post_browse_record_requests","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for RequestBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/site-finder":{"post":{"tags":["site-finder"],"summary":"Start a site-finder job","description":"Start a site-finder job to resolve a site by name, address, and optional identifiers.\n\nRuns the site resolution pipeline (geocoding, embedding search, AI matching)\nin the background and returns a `jobId`. Poll `GET /v0/site-finder/jobs/<job_id>`\nuntil `status` is `completed` or `failed` to retrieve the result.","operationId":"site_finder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteResolutionInput"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSiteFinderJobResponse"}}}},"400":{"description":"Invalid or unapproved embed parent origin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized or forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Daily Facility Lens quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/site-finder/embed-token":{"post":{"tags":["site-finder"],"summary":"Mint a site-finder embed token","description":"Mint an embed token for iframing the site-finder UI.\n\nThe token authorizes the interactive embed at\n`GET /ui/site-finder/embed?token=...`: anyone holding it can run finder\nsearches, create sites from finder proposals, and trigger AI research,\nall attributed and billed to the minting user's company. Tokens are\nstateless, sealed with authenticated encryption (encrypt-then-MAC, keyed\napart from both the generic URL-query oracle and the auth-check embed\ntokens), and expire one hour after minting — mint a fresh token each time\nyou render the page that hosts the iframe.\n\nSee [Embedding the site finder](#embedding-the-site-finder) for the full\niframe integration guide.","operationId":"mint_site_finder_embed_token","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbedOriginRequest"}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"400":{"description":"Invalid or unapproved embed parent origin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized or forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"Daily Facility Lens quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/site-finder/jobs/{job_id}":{"get":{"tags":["site-finder"],"summary":"Retrieve a site-finder job","description":"Fetch the status and result of a site-finder job started via `POST /v0/site-finder`.\n\nPoll this endpoint until `status` is `completed` or `failed`. On completion,\n`siteFinder` contains the resolution result and `siteFinderProposal` contains\na signed proposal to create a new site if no match was found.","operationId":"get_site_finder_job","parameters":[{"name":"job_id","in":"path","description":"The `jobId` returned when the job was started with `POST /v0/site-finder`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteFinderJobResponse"}}}},"401":{"description":"Unauthorized or forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/sites":{"post":{"tags":["sites"],"summary":"Create a site","description":"Create a new site.\n\nSupports two creation paths:\n\n- **Token path** (from site-finder): when `siteFinderToken` is present, the request\n  originated from the site-finder pipeline (`POST /v0/site-finder`, polled via\n  `GET /v0/site-finder/jobs/<job_id>`). The token is an HMAC-signed blob containing\n  pre-geocoded data (address, coordinates, place ID, etc.) produced during site\n  resolution. The server verifies the HMAC signature and extracts the trusted\n  geocoded fields, skipping the live geocoding step. This avoids redundant geocoding\n  and ensures the created site matches exactly what site-finder resolved.\n\n- **Standard path** (manual): without the token, the server geocodes the provided\n  address from scratch using the geocoding service.","operationId":"post_site","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSiteInfo"}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"400":{"description":"Bad request (invalid token, geocoding failure, etc.)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Unauthorized or forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/sites/{site_id}":{"get":{"tags":["sites"],"summary":"Retrieve a site","description":"Retrieve a single site by ID with its departments, Google Maps URL, and embedding status.","operationId":"get_site_info","parameters":[{"name":"site_id","in":"path","description":"The site's id, as returned by the site finder or a browse row.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOutput"}}}},"401":{"description":"Unauthorized or forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Site not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/sites/{site_id}/research":{"post":{"tags":["site-research"],"summary":"Trigger AI research for a site","description":"Trigger AI research for a site in the background.\n\nReturns the current site data immediately. The research runs asynchronously;\npoll `GET /v0/sites/<site_id>` and check `researchFinished` for completion.","operationId":"post_site_research","parameters":[{"name":"site_id","in":"path","description":"The id of the site to research.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOutput"}}}},"401":{"description":"Unauthorized or forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"Site not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/user-profile":{"get":{"tags":["account"],"summary":"Retrieve your account","description":"The user and company your API key belongs to. Call it first: `companyId`\nis the `{companyId}` in every `/v0/companies/{companyId}/...` route, and\n`permissions` lists what your account may do.","operationId":"get_user_profile","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"404":{"description":"No account found for this API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}},"/v0/visits/browse":{"post":{"tags":["visits"],"summary":"Browse visits","description":"Queries the visits on the patients visible to the caller.\nRead-only. Uses the shared browse syntax described in\n[Browsing tables](#browsing-tables) and returns the `{ table, aggregate,\ntotal }` envelope as JSON, or the selected columns as CSV when you send\n`Accept: text/csv`.\nUntil clinical data has finished loading after a service restart, the call\nreturns 500 rather than an empty table; retry shortly.","operationId":"post_browse_visits","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitBrowseRequest"}}},"required":true},"responses":{"200":{"description":"Typed browse response for VisitBrowseResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitBrowseResponse"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Request body failed deserialization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"500":{"description":"Unexpected failure, logged server-side.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"security":[{"bearer":[]}]}}},"components":{"schemas":{"AdditionalDocument":{"oneOf":[{"type":"object","required":["document","kind"],"properties":{"document":{"type":"array","items":{"$ref":"#/components/schemas/PowerOfAttorneyDoc"}},"kind":{"type":"string","enum":["PowerOfAttorney"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/BirthCertificateDoc"},"kind":{"type":"string","enum":["BirthCertificate"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/DeathCertificateDoc"},"kind":{"type":"string","enum":["DeathCertificate"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/NextOfKinAffidavitDoc"},"kind":{"type":"string","enum":["NextOfKinAffidavit"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/GuardianshipPapersDoc"},"kind":{"type":"string","enum":["GuardianshipPapers"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/DriversLicenseDoc"},"kind":{"type":"string","enum":["DriversLicense"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/PassportDoc"},"kind":{"type":"string","enum":["Passport"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/LettersTestamentaryDoc"},"kind":{"type":"string","enum":["LettersTestamentary"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/LettersOfAdministrationDoc"},"kind":{"type":"string","enum":["LettersOfAdministration"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/LastWillAndTestamentDoc"},"kind":{"type":"string","enum":["LastWillAndTestament"]}}},{"type":"object","required":["document","kind"],"properties":{"document":{"$ref":"#/components/schemas/AdoptionDecreeDoc"},"kind":{"type":"string","enum":["AdoptionDecree"]}}}],"description":"A single supporting document extracted from an authorization packet.\n\nSerialized as `{ \"kind\": <document type>, \"document\": <extracted fields> }`:\n`kind` names the type of document and `document` holds the fields read from\nit.\n\nA power of attorney carries a list: one packet can hold several\npower-of-attorney instruments (a power of attorney and the letter assigning\nit), and each is its own document."},"AdditionalDocumentKind":{"type":"string","description":"The type of a supporting document attached to an authorization, such as\na power of attorney, birth certificate or death certificate. The value is\nthe document type name, and is also the value accepted when filtering by\nsupporting document type.","enum":["PowerOfAttorney","BirthCertificate","DeathCertificate","NextOfKinAffidavit","GuardianshipPapers","DriversLicense","Passport","LettersTestamentary","LettersOfAdministration","LastWillAndTestament","AdoptionDecree"]},"AdditionalDocuments":{"type":"object","properties":{"powersOfAttorney":{"type":"array","items":{"$ref":"#/components/schemas/PowerOfAttorneyDoc"},"description":"Every power-of-attorney instrument in the packet, in packet order —\nincluding a letter or assignment that passes one on or grants a new\none, since several instruments can together form one chain of\nauthority. An override replaces the whole list."},"birthCertificate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BirthCertificateDoc","description":"The birth certificate attached to the authorization, or null if none is attached."}]},"deathCertificate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeathCertificateDoc","description":"The death certificate attached to the authorization, or null if none is attached."}]},"nextOfKinAffidavit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NextOfKinAffidavitDoc","description":"The next of kin affidavit (affidavit of heirship or surviving spouse affidavit) attached to the authorization, or null if none is attached."}]},"guardianshipPapers":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GuardianshipPapersDoc","description":"The guardianship papers attached to the authorization, or null if none are attached."}]},"driversLicense":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DriversLicenseDoc","description":"The driver's license attached to the authorization, or null if none is attached."}]},"passport":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PassportDoc","description":"The passport attached to the authorization, or null if none is attached."}]},"lettersTestamentary":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LettersTestamentaryDoc","description":"The letters testamentary attached to the authorization, or null if none are attached."}]},"lettersOfAdministration":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LettersOfAdministrationDoc","description":"The letters of administration attached to the authorization, or null if none are attached."}]},"lastWillAndTestament":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LastWillAndTestamentDoc","description":"The last will and testament attached to the authorization, or null if none is attached."}]},"adoptionDecree":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdoptionDecreeDoc","description":"The adoption decree attached to the authorization, or null if none is attached."}]}}},"AddressString":{"type":"string","description":"One line of a street address. Surrounding whitespace is trimmed, and it must contain at least one letter or digit: an empty, whitespace-only or punctuation-only value is rejected.","examples":["123 Example Street"]},"AdoptionDecreeDoc":{"type":"object","required":["adoptiveParentNames"],"properties":{"courtName":{"type":["string","null"],"description":"The name of the court that entered the adoption decree"},"caseNumber":{"type":["string","null"],"description":"The number of the case on the adoption decree"},"dateOfDecree":{"type":["string","null"],"format":"date","description":"The date the adoption decree was entered"},"adoptiveParentNames":{"type":"array","items":{"type":"string"},"description":"The names of the adoptive parents. A decree may name two adoptive parents."},"adopteeName":{"type":["string","null"],"description":"The name of the adopted child (should match the patient if the patient\nis the child)"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"AiResearchCompletedPayload":{"type":"object","description":"The payload of an `aiResearchCompleted` delivery: the site whose AI research\nfinished, and where to see it.","required":["siteId","siteName","url"],"properties":{"siteId":{"type":"string","description":"ID of the site that was researched."},"siteName":{"type":"string","description":"The site's name."},"url":{"type":"string","description":"Link to the site in the Hermes Health web app."}}},"ApiErrorBody":{"type":"object","description":"Error body returned by all error responses.\n\n`error` is a human-readable message. `code` is a stable machine-readable\ncode, present only on the few errors a client may want to branch on and\nomitted otherwise. `errorId` is a reference to quote when reporting the\nerror to support; it is omitted on some client errors.","required":["error"],"properties":{"error":{"type":"string","description":"A human-readable message describing the error. On a server error it is\na generic message that ends with the error reference.","example":"Patient not found"},"code":{"type":["string","null"],"description":"A stable machine-readable error code, present only on the few errors a\nclient may want to branch on and absent otherwise.","example":"RoleNotAssigned"},"errorId":{"type":["string","null"],"description":"A short reference for this occurrence of the error, two groups of four\nuppercase letters and digits joined by a hyphen. Quote it when reporting\nthe error to support. Absent on some client errors.","example":"8XK2-M9QF"}}},"AttestationType":{"type":"string","description":"How the signing of a document is attested.\n\n- `Witnessed`: the document bears the signatures of one or more witnesses.\n- `Notarized`: the document bears a notary acknowledgment or seal.\n- `Unattested`: the document shows neither witnesses nor a notary.","enum":["Witnessed","Notarized","Unattested"]},"AuthCheckPatientData":{"type":"object","description":"Lightweight struct with only the patient fields needed by the auth-check pipeline.\nUsed instead of a full patient record so callers (like the standalone auth checker)\ndon't need to construct one.\n\nThe authorization type is deliberately absent: it is extracted from the\ndocument itself, never supplied by the customer.","required":["firstName","lastName","dateOfBirth"],"properties":{"firstName":{"type":"string","description":"The patient's first name, compared with the name on the authorization.","example":"Jane"},"lastName":{"type":"string","description":"The patient's last name, compared with the name on the authorization.","example":"Doe"},"dateOfBirth":{"type":"string","format":"date","description":"The patient's date of birth, as `YYYY-MM-DD`. It is compared with the\ndate of birth on the authorization and, with the signature date, tells\nwhether the patient was a minor when the authorization was signed.","example":"1990-04-12"}}},"AuthCheckRowAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"AuthCheckRowAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckRowNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"AuthCheckRowFields":{"type":"object","properties":{"passed":{"type":"boolean","description":"The number of authorization checks that passed."},"warning":{"type":"boolean","description":"The number of authorization checks that raised a warning."},"failed":{"type":"boolean","description":"The number of authorization checks that failed."},"embedUrl":{"type":"boolean","description":"Relative embed URL (`/ui/auth-check/embed?token=...`) ready to\ndrop straight into an iframe `src`. Read-only, token-authed; meant\nfor external API consumers who iframe the view from their own sites."},"interactiveUrl":{"type":"boolean","description":"Relative interactive URL\n(`/ui/companies/<company_id>/projects/<project_id>/patients/<patient_id>/auth-check`)\nfor the signed-in auth-check view with audit and correction tools.\nAbsent unless the caller is permitted to audit auth-checks; use\n`embedUrl` otherwise."},"audited":{"type":"boolean","description":"`true` when the audit has been marked complete, `false` when not yet.\nAbsent unless the caller is permitted to audit auth-checks."},"tokenCost":{"type":"boolean","description":"USD cost of the LLM tokens spent producing the extraction. Absent unless\nthe caller is permitted to view token costs, or when no cost was\nrecorded."},"additionalDocuments":{"type":"boolean","description":"Kinds of supporting documents attached to the authorization, from the\neffective (override-applied) extraction. VOID documents are included —\npresence is about what accompanies the form — with the void subset\nflagged in `void_documents`."},"voidDocuments":{"type":"boolean","description":"The subset of `additional_documents` marked VOID / CANCELLED /\nREVOKED. Rides the selected row so cells can flag void badges, but is\nneither filterable nor sortable — filter on `additional_documents`."}}},"AuthCheckRowFilter":{"type":"object","properties":{"passed":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The number of authorization checks that passed."},"warning":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The number of authorization checks that raised a warning."},"failed":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The number of authorization checks that failed."},"embedUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Relative embed URL (`/ui/auth-check/embed?token=...`) ready to\ndrop straight into an iframe `src`. Read-only, token-authed; meant\nfor external API consumers who iframe the view from their own sites."},"interactiveUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Relative interactive URL\n(`/ui/companies/<company_id>/projects/<project_id>/patients/<patient_id>/auth-check`)\nfor the signed-in auth-check view with audit and correction tools.\nAbsent unless the caller is permitted to audit auth-checks; use\n`embedUrl` otherwise."},"audited":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"`true` when the audit has been marked complete, `false` when not yet.\nAbsent unless the caller is permitted to audit auth-checks."},"tokenCost":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"USD cost of the LLM tokens spent producing the extraction. Absent unless\nthe caller is permitted to view token costs, or when no cost was\nrecorded."},"additionalDocuments":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["PowerOfAttorney","BirthCertificate","DeathCertificate","NextOfKinAffidavit","GuardianshipPapers","DriversLicense","Passport","LettersTestamentary","LettersOfAdministration","LastWillAndTestament","AdoptionDecree"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["PowerOfAttorney","BirthCertificate","DeathCertificate","NextOfKinAffidavit","GuardianshipPapers","DriversLicense","Passport","LettersTestamentary","LettersOfAdministration","LastWillAndTestament","AdoptionDecree"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["PowerOfAttorney","BirthCertificate","DeathCertificate","NextOfKinAffidavit","GuardianshipPapers","DriversLicense","Passport","LettersTestamentary","LettersOfAdministration","LastWillAndTestament","AdoptionDecree"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["PowerOfAttorney","BirthCertificate","DeathCertificate","NextOfKinAffidavit","GuardianshipPapers","DriversLicense","Passport","LettersTestamentary","LettersOfAdministration","LastWillAndTestament","AdoptionDecree"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Kinds of supporting documents attached to the authorization, from the\neffective (override-applied) extraction. VOID documents are included —\npresence is about what accompanies the form — with the void subset\nflagged in `void_documents`."}}},"AuthCheckRowNumericAggregates":{"type":"object","properties":{"passed":{"type":["string","null"],"description":"The number of authorization checks that passed."},"warning":{"type":["string","null"],"description":"The number of authorization checks that raised a warning."},"failed":{"type":["string","null"],"description":"The number of authorization checks that failed."},"tokenCost":{"type":["string","null"],"description":"USD cost of the LLM tokens spent producing the extraction. Absent unless\nthe caller is permitted to view token costs, or when no cost was\nrecorded."}}},"AuthCheckRowNumericFields":{"type":"object","properties":{"passed":{"type":"boolean","description":"The number of authorization checks that passed.","default":false},"warning":{"type":"boolean","description":"The number of authorization checks that raised a warning.","default":false},"failed":{"type":"boolean","description":"The number of authorization checks that failed.","default":false},"tokenCost":{"type":"boolean","description":"USD cost of the LLM tokens spent producing the extraction. Absent unless\nthe caller is permitted to view token costs, or when no cost was\nrecorded.","default":false}},"additionalProperties":false},"AuthCheckRowSelected":{"type":"object","properties":{"passed":{"type":["integer","null"],"format":"int64","description":"The number of authorization checks that passed."},"warning":{"type":["integer","null"],"format":"int64","description":"The number of authorization checks that raised a warning."},"failed":{"type":["integer","null"],"format":"int64","description":"The number of authorization checks that failed."},"embedUrl":{"type":["string","null"],"description":"Relative embed URL (`/ui/auth-check/embed?token=...`) ready to\ndrop straight into an iframe `src`. Read-only, token-authed; meant\nfor external API consumers who iframe the view from their own sites."},"interactiveUrl":{"type":["string","null"],"description":"Relative interactive URL\n(`/ui/companies/<company_id>/projects/<project_id>/patients/<patient_id>/auth-check`)\nfor the signed-in auth-check view with audit and correction tools.\nAbsent unless the caller is permitted to audit auth-checks; use\n`embedUrl` otherwise."},"audited":{"type":["boolean","null"],"description":"`true` when the audit has been marked complete, `false` when not yet.\nAbsent unless the caller is permitted to audit auth-checks."},"tokenCost":{"type":["string","null"],"description":"USD cost of the LLM tokens spent producing the extraction. Absent unless\nthe caller is permitted to view token costs, or when no cost was\nrecorded."},"additionalDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AdditionalDocumentKind"},"description":"Kinds of supporting documents attached to the authorization, from the\neffective (override-applied) extraction. VOID documents are included —\npresence is about what accompanies the form — with the void subset\nflagged in `void_documents`."},"voidDocuments":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AdditionalDocumentKind"},"description":"The subset of `additional_documents` marked VOID / CANCELLED /\nREVOKED. Rides the selected row so cells can flag void badges, but is\nneither filterable nor sortable — filter on `additional_documents`."}}},"AuthCheckRowSort":{"oneOf":[{"type":"object","required":["passed"],"properties":{"passed":{"type":"string","description":"The number of authorization checks that passed.","enum":["asc","desc"]}}},{"type":"object","required":["warning"],"properties":{"warning":{"type":"string","description":"The number of authorization checks that raised a warning.","enum":["asc","desc"]}}},{"type":"object","required":["failed"],"properties":{"failed":{"type":"string","description":"The number of authorization checks that failed.","enum":["asc","desc"]}}},{"type":"object","required":["embedUrl"],"properties":{"embedUrl":{"type":"string","description":"Relative embed URL (`/ui/auth-check/embed?token=...`) ready to\ndrop straight into an iframe `src`. Read-only, token-authed; meant\nfor external API consumers who iframe the view from their own sites.","enum":["asc","desc"]}}},{"type":"object","required":["interactiveUrl"],"properties":{"interactiveUrl":{"type":"string","description":"Relative interactive URL\n(`/ui/companies/<company_id>/projects/<project_id>/patients/<patient_id>/auth-check`)\nfor the signed-in auth-check view with audit and correction tools.\nAbsent unless the caller is permitted to audit auth-checks; use\n`embedUrl` otherwise.","enum":["asc","desc"]}}},{"type":"object","required":["audited"],"properties":{"audited":{"type":"string","description":"`true` when the audit has been marked complete, `false` when not yet.\nAbsent unless the caller is permitted to audit auth-checks.","enum":["asc","desc"]}}},{"type":"object","required":["tokenCost"],"properties":{"tokenCost":{"type":"string","description":"USD cost of the LLM tokens spent producing the extraction. Absent unless\nthe caller is permitted to view token costs, or when no cost was\nrecorded.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"AuthCheckVerdictCounts":{"type":"object","description":"Tally of auth-check results by status: how many checks passed, failed and\nraised a warning. Checks that did not run (because the required patient\ndata is missing, or because the check does not apply to the detected\nauthorization type) are not counted.","required":["passed","failed","warning"],"properties":{"passed":{"type":"integer","format":"u-int8","description":"The number of checks that passed.","example":18,"minimum":0},"failed":{"type":"integer","format":"u-int8","description":"The number of checks that failed.","example":1,"minimum":0},"warning":{"type":"integer","format":"u-int8","description":"The number of checks that raised a warning.","example":2,"minimum":0}}},"AuthCheckVerdicts":{"type":"object","description":"The verdicts for an auth-check: one result per checklist item, derived from\nthe extracted authorization form and the patient on file.\n\nA field is null when its check did not run — the required patient data was\nmissing, or the check does not apply because the detected authorization type\nis HITECH (direct-access requests carry no revocation / redisclosure / rights\n/ sensitive-info sections).","required":["sensitiveInformation"],"properties":{"signature":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form is signed and dated: fails with no signature, and\nwarns when the signature date is stale or in the future."}]},"patientName":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the patient name on the form matches the patient on file. Null\nwhen there is no patient on file to compare against."}]},"patientDateOfBirth":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Two-phase: with no patient on file, set only when the extracted date\nof birth is in the future (a fail — the one verdict derivable without\na record to compare against); with a patient, always the full record\ncomparison."}]},"datesOfService":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the dates of service the form authorizes cover the dates of\nservice of the record request. Null when there is no record request\nwith dates of service to compare against."}]},"dateOfExpiration":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form states when the authorization expires: fails when no\nexpiration is found, and warns when it is an event rather than a\nconcrete date."}]},"authorizationType":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the kind of authorization (HIPAA authorization or HITECH\ndirect-access request) could be detected on the form. Warns when it\ncould not; the form is then checked as a HIPAA authorization."}]},"sensitiveInformation":{"$ref":"#/components/schemas/SensitiveInformationVerdicts","description":"Per-category sensitive-information verdicts. Unlike the other fields,\na `null` category verdict means that category was not requested."},"authorizedRecipient":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form names who may receive the records: fails when no\nrecipient is named, and warns when the recipient has no contact\ndetails or some are malformed."}]},"disclosingEntity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the disclosing entity suits the authorization's scope: a\npatient (broad) authorization wants a generic recipient, a\nsite-specific one wants its linked site named. The verdict branches on\nthe `AuthorizationScope` the check ran under; the message says which."}]},"signerName":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the person who signed is the patient or a representative an\nattached document vouches for. Warns on a partial name match. Null when\nthere is no patient on file."}]},"signerRelationship":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Validity of the claimed signer relationship: whether the relationship\ncan authorize given the patient's capability (competent adult / minor /\ndeceased / incapacitated), and, for a deceased patient, whether the\nsupporting documents back the claim."}]},"minorAuthorization":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"For a minor patient, whether the signer's authority over the minor is\nestablished by the attached documents, for example by a birth\ncertificate, adoption decree, guardianship papers or power of attorney.\nPasses when the patient is not a minor. Null when there is no patient on\nfile."}]},"deceasedAuthorization":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"For a deceased patient, whether proof of death and the signer's\nauthority to act for the estate or as next of kin are established by\nthe attached documents. Passes when the patient is not deceased. Null\nwhen there is no patient on file."}]},"documentValidity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Warnings about attached supporting documents that are marked void,\ncancelled or revoked, have expired, or are not yet in effect. Null when\nno supporting document raises a warning."}]},"documentReadability":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form and every attached document are legible to a human\nreviewer: fails on an illegible document and warns on a marginal one."}]},"phiDescription":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form describes the health information to be disclosed.\nFails when no description is found."}]},"purposeOfDisclosure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form states the purpose of the disclosure. Fails when no\npurpose is found."}]},"purposeAlignment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the purpose the form states matches the owning project's\npurpose; a project with no purpose fails it. Null when the analysis\ncarries no purpose classification or the document belongs to no\nproject."}]},"potentialForRedisclosure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form states that disclosed information may be redisclosed by\nthe recipient and no longer protected. Fails when the statement is not\nfound. Null for a HITECH direct-access request."}]},"conditioningNotice":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form states whether treatment, payment, enrollment or\neligibility may be conditioned on signing it. Fails when the statement\nis not found. Null for a HITECH direct-access request."}]},"rightToRevoke":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the form states the patient's right to revoke the authorization\nand how to do so: fails when the statement is not found, and warns when\nit gives no way to submit a revocation or a malformed one. Null for a\nHITECH direct-access request."}]},"patientHistoriesTemplate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"Whether the authorization matches a template the Patient Histories\ndata source has approved. Derived only for a patient whose Patient\nHistories run reaches that source. Null when matching never ran, the\ncaller supplied no resolved status, or the authorization is never sent\nto that source."}]}}},"AuthorizationExecution":{"type":"object","properties":{"signatureType":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SignatureType","description":"Signature type when a signature is present on the form; null when the\nform has no signature. See `SignatureType` for variant definitions."}]},"dateOfSignature":{"type":["string","null"],"format":"date","description":"The date of signature of the requester"},"printedName":{"type":["string","null"],"description":"The printed name of the requester (not necessarily the patient)"},"signerRelationship":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SignerRelationship","description":"The signer's relationship to the patient, from the form's \"Relationship\nto Patient\" field. Null/blank means the patient signed for themselves\n(treated as `Self` downstream). See `SignerRelationship`."}]}}},"AuthorizationExpiration":{"oneOf":[{"type":"object","required":["Date"],"properties":{"Date":{"type":"string","format":"date"}}},{"type":"object","required":["Event"],"properties":{"Event":{"type":"string"}}}],"description":"Authorization expiration extracted from the form.\nMay be a concrete date or an event description (e.g., \"until legal matter concludes\")."},"AuthorizationPurpose":{"type":"string","description":"The purpose of disclosure the form states, classified: `General` for an\nunrestricted, unstated, or multi-purpose grant, otherwise the one project\npurpose the form names.","enum":["General","CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]},"AuthorizationStatus":{"type":"string","description":"Where the review of the patient's authorization stands. Hermes does the\nreview; outside a `Sandbox` project the status is not customer-writable.\nA search stays armed but is not submitted until the status is `Approved`.\nNewly requesting a search on an approved patient sends it back to\n`NeedsApproval`, and so does a patient edit that changes a field able to\nresolve the current status (noted below). An edit never approves.\n\n- `NeedsApproval` — an authorization is on file, or about to be, and is\n  waiting for review. The default.\n- `Approved` — reviewed and approved. A change to the first name, a last\n  name, the date of birth, sex, ZIP codes, or city/state sends it back for\n  review.\n- `AwaitingAuthorization` — no authorization document is on file yet.\n  Becomes `NeedsApproval` when one arrives.\n- `WrongPatientName` — the name on the authorization does not match.\n  Correcting the first name or a last name sends it back for review.\n- `WrongDateOfBirth` — the date of birth on the authorization does not\n  match. Correcting the date of birth sends it back for review.\n- `WrongDateOfService` — the dates of service do not match. This concerns\n  the record request, not the patient.\n- `MissingSignature` — the authorization is not signed.\n- `MissingPowerOfAttorney` — the power of attorney a representative signed\n  under is missing.\n- `MissingProofOfGuardianship` — the proof of guardianship a guardian\n  signed under is missing.\n- `MissingRedisclosureSmt` — the authorization lacks the required\n  redisclosure language.\n- `MissingZip` — a ZIP code is needed. Changing the patient's ZIP codes\n  sends it back for review.\n- `MissingGender` — the patient's sex is needed. Changing `sex` sends it\n  back for review.\n- `OtherIssue` — the review found another problem.\n- `Missing` — the authorization was found to be missing.\n- `WaitingForContract` — on hold until a contract is in place.\n\nThe document problems (`MissingSignature`, `MissingPowerOfAttorney`,\n`MissingProofOfGuardianship`, `MissingRedisclosureSmt`) are resolved by\nuploading a corrected authorization, which sends it back for review.","enum":["NeedsApproval","Approved","AwaitingAuthorization","WrongPatientName","WrongDateOfBirth","WrongDateOfService","MissingSignature","MissingPowerOfAttorney","MissingProofOfGuardianship","MissingRedisclosureSmt","MissingZip","MissingGender","OtherIssue","Missing","WaitingForContract"]},"AuthorizationType":{"type":"string","description":"Authorization regime the patient is operating under.\n\n`Hipaa` is the standard third-party release-of-information authorization.\n`Hitech` is a 45 CFR §164.524 / Section 13405 patient-direct-access request,\nwhere the patient is the recipient and several HIPAA sections (revocation,\nredisclosure, patient rights, sensitive information) do not apply.","enum":["Hipaa","Hitech"]},"AuthorizedRecipientInformation":{"type":"object","properties":{"companyName":{"type":["string","null"],"description":"The name of the company/firm"},"address":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsAddressForm","description":"The mailing address of the company/firm"}]},"phoneNumber":{"type":["string","null"],"description":"The phone number of the company/firm"},"email":{"type":["string","null"],"description":"The email address of the company/firm"}}},"BirthCertificateDoc":{"type":"object","properties":{"childName":{"type":["string","null"],"description":"The name of the child on the birth certificate"},"dateOfBirth":{"type":["string","null"],"format":"date","description":"The date of birth of the child on the birth certificate"},"placeOfBirth":{"type":["string","null"],"description":"The place of birth (city, state)"},"motherName":{"type":["string","null"],"description":"The name of the mother on the birth certificate"},"fatherName":{"type":["string","null"],"description":"The name of the father on the birth certificate"},"certificateNumber":{"type":["string","null"],"description":"The certificate number of the birth certificate"},"issuanceDate":{"type":["string","null"],"format":"date","description":"The date of issuance of the birth certificate"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"BulkUploadResponse":{"type":"object","description":"Presigned authorization-upload target returned by a bulk patient /\nrecord-request upload.","required":["authorizationFileName","authorizationUploadUrl","authorizationUploadHeaders"],"properties":{"authorizationFileName":{"type":"string","description":"The authorization file name the uploaded row named, so the file to\nupload can be matched to this upload target.","example":"authorization-0001.pdf"},"authorizationUploadUrl":{"type":"string","description":"Short-lived presigned URL to upload the authorization to: `PUT` the raw\nfile bytes to it exactly as issued, with no `Authorization` header.","example":"https://uploads.example.com/authorization?signature=k3f9x2m7qa"},"authorizationUploadHeaders":{"type":"object","description":"Extra headers to send with the upload. Normally empty.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}}}},"CampusLabel":{"type":"object","description":"A candidate's campus, as the finder shows it and as the tie-break reads it.","required":["name","role"],"properties":{"name":{"type":"string","description":"What the campus is called: the campus row's name, or the minted name."},"role":{"$ref":"#/components/schemas/CampusRole","description":"Whether the candidate is the campus facility itself or a sub-location\non the campus."}}},"CampusRole":{"type":"string","description":"What a candidate is to its campus.","enum":["campus","subLocation"]},"ChaseWarning":{"allOf":[{"$ref":"#/components/schemas/ChaseWarningReason"},{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"A sentence describing the warning and its consequence, ready to show to\na person. Branch on `reason` rather than on this text."}}}],"description":"One advisory about a planned Veradigm chase, carrying both the machine-\nreadable reason and the sentence a human reads.\n\nThe message is rendered here rather than by each surface so the SSR notice,\nthe API body and the activity row cannot describe the same clamp three\ndifferent ways."},"ChaseWarningReason":{"oneOf":[{"type":"object","description":"The declared start of service reaches further back than Veradigm will\nretrieve, so the chase covers `effective_start` onwards instead. Records\nbefore it are not searched.","required":["requested_start","effective_start","lookback_days","reason"],"properties":{"requested_start":{"type":"string","format":"date"},"effective_start":{"type":"string","format":"date"},"lookback_days":{"type":"integer","format":"int64","description":"Inclusive days the lookback spans, floor and today included."},"reason":{"type":"string","enum":["datesOfServiceExceedLookback"]}}},{"type":"object","description":"The declared range and the retrievable window do not overlap at all, so\nNO chase was sent. Not an error: the request is well-formed and nothing\nfailed — there is simply nothing in range to ask for.","required":["requested_start","requested_end","effective_floor","reason"],"properties":{"requested_start":{"type":"string","format":"date"},"requested_end":{"type":"string","format":"date"},"effective_floor":{"type":"string","format":"date"},"reason":{"type":"string","enum":["noChaseableDatesOfService"]}}},{"type":"object","description":"The declared end of service lies in the future, which no encounter can,\nso the chase asks up to today instead. Spending a whole window on\nundatable future days is what this avoids.","required":["requested_end","effective_end","reason"],"properties":{"requested_end":{"type":"string","format":"date"},"effective_end":{"type":"string","format":"date"},"reason":{"type":"string","enum":["endDateReanchored"]}}},{"type":"object","description":"The patient's date of birth falls outside the range Veradigm accepts on a\nchart request. The chase is still SENT — the partner's own rejection is\nvisible in the chase status, so an out-of-range date of birth costs one\nwasted submission rather than blocking an operator.\n\nThe date itself is NOT serialized, and the message does not name it\neither. This warning rides on `RecordRequestOutput`, which carries no\npatient demographics at all and is dispatched verbatim to every webhook\nendpoint a company has registered — putting a date of birth on that\npayload adds a PHI element to an egress channel that never carried one.\nEvery surface that renders the advisory is already showing the patient\nwhose date of birth it is about.","required":["reason"],"properties":{"reason":{"type":"string","enum":["dateOfBirthOutOfRange"]}}}],"description":"Why a chase will not cover the whole ask, or will go out under demographics\nthe partner cannot match.\n\nTyped rather than free text so a consumer can branch on it, and internally\ntagged so the discriminator and the figures behind it arrive as one flat\nobject: `{\"reason\": \"datesOfServiceExceedLookback\", \"requestedStart\": ...}`."},"CheckItem":{"type":"object","description":"One checklist verdict: its status, message and the basis it was reached\nunder.","required":["status","message","basis"],"properties":{"status":{"$ref":"#/components/schemas/CheckStatus","description":"Status of the checklist item: passed (green), failed (red), or warning (yellow)"},"message":{"type":"string","description":"Specific findings about what was found or missing"},"basis":{"$ref":"#/components/schemas/RequirementBasis","description":"Why the item matters: the requirement the verdict was reached under."}}},"CheckStatus":{"type":"string","description":"Outcome of a single checklist item, in ascending severity: `Passed`, then\n`Warning`, then `Failed`.","enum":["Passed","Warning","Failed"]},"City":{"type":"string","description":"A city name. Surrounding whitespace is trimmed, and it must contain at least one letter or digit, or it is rejected. Stored as written, with its case unchanged.","examples":["San Francisco"]},"CityState":{"type":"object","description":"One address a patient may be matched at: a city and its state, always\ntogether. A city without its state, or a state without its city, is never\naccepted. ZIP codes are carried separately.","required":["city","state"],"properties":{"city":{"$ref":"#/components/schemas/City","description":"The city name."},"state":{"$ref":"#/components/schemas/UsState","description":"The state the city is in."}}},"ClinicalDataAddedPayload":{"type":"object","description":"The payload of a `clinicalDataAdded` delivery.","required":["patients"],"properties":{"patients":{"type":"array","items":{"$ref":"#/components/schemas/PatientClinicalDataAdded"},"description":"Each patient a run added clinical content to that they did not already\nhave. Patients from one company and one environment are batched into a\nsingle delivery."}}},"ClinicalDataCounts":{"type":"object","description":"How much clinical content the run added that the patient did not already\nhave, by type. A run that adds nothing sends no delivery, so at least one\ncount is above zero.","required":["newVisits","newDiagnoses","newProcedures","newPrescriptionFills","newLabResults"],"properties":{"newVisits":{"type":"integer","description":"Visits new to the patient.","minimum":0},"newDiagnoses":{"type":"integer","description":"Diagnoses new to the patient.","minimum":0},"newProcedures":{"type":"integer","description":"Procedures new to the patient.","minimum":0},"newPrescriptionFills":{"type":"integer","description":"Prescription fills new to the patient.","minimum":0},"newLabResults":{"type":"integer","description":"Lab results new to the patient.","minimum":0}}},"ClinicalDataProduct":{"type":"string","description":"Which run produced a `clinicalDataAdded` delivery's counts. One of:\n\n- `siteSonar`: a Site Sonar search.\n- `patientHistories`: a Patient Histories retrieval.\n- `sandboxSearch`: a search in a sandbox project, which completes with\n  sample data.\n- `parsePass`: a re-read of clinical data already held for the patient,\n  run when Hermes improves how it reads that data, which can surface lines\n  the earlier read missed.\n\nCounts are per source. A patient enrolled in more than one product gets a\ndelivery from each, and two sources can count the same line, so do not add\ndeliveries together.","enum":["siteSonar","patientHistories","sandboxSearch","parsePass"]},"ClinicalDataVendor":{"type":"string","description":"The clinical-data source a company is, written as one word of ASCII letters and digits."},"CompanyAggregateDataFlattenSelected":{"type":"object","properties":{"userCount":{"type":["integer","null"],"format":"int64","description":"Number of users who belong to the company."},"userLastLogin":{"type":["string","null"],"format":"date-time","description":"When a user of this company last signed in, as reported by the identity\nprovider. Null when no user has signed in or the value is unavailable."},"projectCount":{"type":["integer","null"],"format":"int64","description":"Sandbox projects only. Live and Closed are excluded so the companies\ntable's Projects column reflects sandbox usage."},"patientCount":{"type":["integer","null"],"format":"int64","description":"Patients belonging to sandbox projects only."},"patientActiveCount":{"type":["integer","null"],"format":"int64","description":"Number of the company's patients, across all projects, for whom a\nclinical-data search has been run: those whose search status is\n`Processing`, `Completed`, `NoHit` or `AmbiguousIdentity`."},"requestCount":{"type":["integer","null"],"format":"int64","description":"Record requests belonging to sandbox projects only."},"visitCount":{"type":["integer","null"],"format":"int64","description":"Number of visits on file across all of the company's patients."},"feeUninvoicedAmount":{"type":["string","null"],"description":"Total in US dollars of the company's fees that are not yet on an\ninvoice and are neither paid nor canceled."},"feeTotalNonCanceledAmount":{"type":["string","null"],"description":"Total in US dollars of all of the company's fees except canceled ones."},"feeLastInvoiceDate":{"type":["string","null"],"format":"date-time","description":"Creation time of the company's most recent fee that has been placed on\nan invoice. Null when no fee has been invoiced."},"creditBalance":{"type":["string","null"],"description":"Pre-paid credit wallet balance (always >= 0). Credit is added by\ntop-ups and grants and drawn down when an invoice is confirmed against\nthe wallet."},"billingEmail":{"type":["string","null"],"description":"The email address invoices are sent to, from the billing system. Null\nwhen no billing email is on file or the value is unavailable."}}},"CompanyAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"CompanyAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"CompanyFields":{"type":"object","properties":{"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."},"id":{"type":"boolean","description":"Numeric identifier of the company."},"name":{"type":"boolean","description":"Name of the customer organization associated with the record."},"tier":{"type":"boolean","description":"Commercial tier label set by Hermes, such as `standard` or\n`premium`. Companies created for individual self-signup users carry\n`community`."},"domains":{"type":"boolean","description":"Email domains (for example `example.com`) whose new users are\nautomatically added to this company at signup. Each domain belongs\nto at most one company. Empty when no domain auto-enrolls."},"subdomain":{"type":"boolean","description":"The company's subdomain on the records upload portal, which serves\nthe portal under the company's own host. Null when the company uses\nthe shared portal address."},"defaultRole":{"type":"boolean","description":"Role given to users who join the company automatically through one\nof its `domains`. Null when no default role is set."},"requestStatusWebhook":{"type":"boolean","description":"URL that receives record request status webhooks for production\nprojects. Null when none is configured."},"visitsWebhook":{"type":"boolean","description":"URL that receives visit webhooks for production projects. Null when\nnone is configured."},"patientNoteWebhook":{"type":"boolean","description":"URL that receives patient note webhooks for production projects.\nNull when none is configured."},"requestNoteWebhook":{"type":"boolean","description":"URL that receives record request note webhooks for production\nprojects. Null when none is configured."},"authorizationStatusWebhook":{"type":"boolean","description":"URL that receives patient authorization status webhooks for\nproduction projects. Null when none is configured."},"sandboxRequestStatusWebhook":{"type":"boolean","description":"URL that receives record request status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook; the production URL is never used\ninstead."},"sandboxVisitsWebhook":{"type":"boolean","description":"URL that receives visit webhooks for sandbox projects. Null when\nnone is configured, in which case sandbox projects send no such\nwebhook."},"sandboxPatientNoteWebhook":{"type":"boolean","description":"URL that receives patient note webhooks for sandbox projects. Null\nwhen none is configured, in which case sandbox projects send no such\nwebhook."},"sandboxRequestNoteWebhook":{"type":"boolean","description":"URL that receives record request note webhooks for sandbox projects.\nNull when none is configured, in which case sandbox projects send no\nsuch webhook."},"sandboxAuthorizationStatusWebhook":{"type":"boolean","description":"URL that receives patient authorization status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook."},"purposeCoveredOperations":{"type":"boolean","description":"Whether the company's projects may use the health care operations\npurpose (`CoveredOperations`)."},"purposeCoveredPayment":{"type":"boolean","description":"Whether the company's projects may use the payment purpose\n(`CoveredPayment`)."},"purposeCoveredTreatment":{"type":"boolean","description":"Whether the company's projects may use the treatment purpose\n(`CoveredTreatment`)."},"purposeIndividualAccess":{"type":"boolean","description":"Whether the company's projects may use the patient's right of access\npurpose (`IndividualAccess`)."},"purposeInsuranceLife":{"type":"boolean","description":"Whether the company's projects may use the life insurance\nunderwriting purpose (`InsuranceLife`)."},"purposeInsuranceOther":{"type":"boolean","description":"Whether the company's projects may use the disability, workers'\ncompensation or long-term care underwriting purpose\n(`InsuranceOther`)."},"purposeLegalDefense":{"type":"boolean","description":"Whether the company's projects may use the legal defense purpose\n(`LegalDefense`)."},"purposeLegalMedicalMalpractice":{"type":"boolean","description":"Whether the company's projects may use the medical malpractice\npurpose (`LegalMedicalMalpractice`)."},"purposeLegalPlaintiff":{"type":"boolean","description":"Whether the company's projects may use the purpose for the patient's\nown legal case (`LegalPlaintiff`)."},"purposeResearchClinicalTrials":{"type":"boolean","description":"Whether the company's projects may use the clinical trial research\npurpose (`ResearchClinicalTrials`)."},"purposeResearchPatientRegistries":{"type":"boolean","description":"Whether the company's projects may use the patient registry purpose\n(`ResearchPatientRegistries`)."},"defaultPurpose":{"type":"boolean","description":"Purpose applied to a new project created without one. Null when the\ncompany has no default; a project must then name its purpose."},"authorizationPdfEnabled":{"type":"boolean","description":"Whether the company's projects may use the signed authorization PDF\nmethod (`authorizationPdf`)."},"ial2TokensEnabled":{"type":"boolean","description":"Whether the company's projects may use the IAL2 token authorization\nmethod (`ial2Tokens`)."},"feeOcr":{"type":"boolean","description":"Price in US dollars charged per page of document text extraction."},"feeSiteFinder":{"type":"boolean","description":"Price in US dollars charged per successful facility lookup, which\nmatches a provider name and address to a facility."},"feeAuthCheck":{"type":"boolean","description":"Price in US dollars charged per authorization document check."},"feeRecordRequest":{"type":"boolean","description":"Price in US dollars charged per record request."},"feeInNetworkRequest":{"type":"boolean","description":"Price in US dollars charged when an in-network record request\ncompletes."},"feeSiteSonarHit":{"type":"boolean","description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds results."},"feeSiteSonarNoHit":{"type":"boolean","description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds no results."},"feePatientHistoryHit":{"type":"boolean","description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds results."},"feePatientHistoryNoHit":{"type":"boolean","description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds no results."},"feePatientHistoriesPlus":{"type":"boolean","description":"Price in US dollars charged per last name searched in a patient\nhistory run whose results include lab results, in place of the\nstandard patient history price."},"feeChat":{"type":"boolean","description":"Price in US dollars charged per question answered about a record\nrequest's delivered documents."},"feeAiResearcher":{"type":"boolean","description":"Price in US dollars charged per automated facility research run."},"stripeCustomerId":{"type":"boolean","description":"The company's customer identifier in the billing system. Null when\nno billing account is linked."},"createdAt":{"type":"boolean","description":"When the company was created."},"lastWrite":{"type":"boolean","description":"Date (UTC) of the most recent change made by one of the company's\nusers. Null when none of its users has made a change."},"whiteLabel":{"type":"boolean","description":"Whether outbound record requests are sent under the company's own\ndelivery profile (the `delivery*` fields) instead of Hermes's.\nTakes effect only when the delivery profile is complete; otherwise\nHermes's profile is used."},"patientHistoriesEnabled":{"type":"boolean","description":"Whether the company is approved to request patient histories.\nFlipped on by Hermes staff once the company's authorization\ntemplate has been approved for the feature."},"siteSonarEnabled":{"type":"boolean","description":"Whether the company is approved to use Site Sonar\n(facility/provider discovery). Flipped on by Hermes staff once the\ncompany has been onboarded for the feature."},"ehrSearchEnabled":{"type":"boolean","description":"Whether the company is approved to use EHR Search (electronic health\nrecord discovery). Flipped on by Hermes staff once the company has\nbeen onboarded for the feature."},"recordRequestEnabled":{"type":"boolean","description":"Whether the company is approved to use record requests. While\nthis is off, the Record Request price is omitted from fee\nconfiguration."},"inNetworkRequestEnabled":{"type":"boolean","description":"Whether the company is approved to use in-network requests. While\nthis is off, the In-Network Request price is omitted from fee\nconfiguration."},"preferInNetwork":{"type":"boolean","description":"Soft-prefer in-network sites in Site Finder / claims ingest.\nFlipped on by Hermes staff for companies that want in-network\nsites preferred as the primary match."},"accentColor":{"type":"boolean","description":"Company brand accent color as a `#rrggbb` hex string.\nOverrides the default Hermes purple on every surface rendered on\nthe company's behalf; null keeps the default."},"styledLinks":{"type":"boolean","description":"Whether links wear the brand color. `false` reverts anchors to the\nbrowser's default link colors on every themed surface. Defaults to\n`true`."},"roi":{"type":"boolean","description":"The release-of-information (ROI) vendor this company is, if any.\nNull when the company is not an ROI vendor."},"clinicalDataVendor":{"type":"boolean","description":"The clinical-data vendor this company *is*, if any.\nNull means the company is not a clinical-data vendor. When set,\nthe company's patients are always skipped when submitting for\nclinical-data retrieval. Independent of the ROI-vendor `roi` flag."},"deliveryFormalName":{"type":"boolean","description":"Formal organization name that outbound record requests, cover\nletters and generated authorizations name as the requester. Part of\nthe delivery profile; null when not set."},"deliveryRequesterName":{"type":"boolean","description":"Name of the person outbound record requests name as the requester.\nPart of the delivery profile; null when not set."},"deliveryPhone":{"type":"boolean","description":"Phone number printed on outbound record requests. Part of the\ndelivery profile; null when not set."},"deliveryFaxNumber":{"type":"boolean","description":"Fax number facilities can send records to. Part of the delivery\nprofile; null when not set."},"deliveryRecordsEmail":{"type":"boolean","description":"Email address facilities can send records to. Part of the delivery\nprofile; null when not set."},"deliveryMailingAddressLine1":{"type":"boolean","description":"First line of the mailing address facilities can send records to.\nPart of the delivery profile; null when not set."},"deliveryMailingAddressLine2":{"type":"boolean","description":"Second line of the delivery mailing address, such as a suite\nnumber. Optional; null when not set."},"deliveryMailingAddressCity":{"type":"boolean","description":"City of the delivery mailing address. Part of the delivery profile;\nnull when not set."},"deliveryMailingAddressState":{"type":"boolean","description":"State of the delivery mailing address. Part of the delivery\nprofile; null when not set."},"deliveryMailingAddressZip":{"type":"boolean","description":"ZIP code of the delivery mailing address. Part of the delivery\nprofile; null when not set."},"deliveryEmailSender":{"type":"boolean","description":"Sender address that outbound record request emails are sent from.\nPart of the delivery profile; null when not set."},"deliveryEmailCc":{"type":"boolean","description":"Single email address (or `Display Name <address>` mailbox) copied on\nevery outbound record request email. Optional; null when not set."},"deliveryEmailSignature":{"type":"boolean","description":"Signature block appended to outbound record request emails. Part of\nthe delivery profile; null when not set."},"deliveryEmailSmtpHost":{"type":"boolean","description":"Host name of the SMTP server outbound record request emails are\nsent through. Part of the delivery profile; null when not set."},"userCount":{"type":"boolean","description":"Number of users who belong to the company."},"userLastLogin":{"type":"boolean","description":"When a user of this company last signed in, as reported by the identity\nprovider. Null when no user has signed in or the value is unavailable."},"projectCount":{"type":"boolean","description":"Sandbox projects only. Live and Closed are excluded so the companies\ntable's Projects column reflects sandbox usage."},"patientCount":{"type":"boolean","description":"Patients belonging to sandbox projects only."},"patientActiveCount":{"type":"boolean","description":"Number of the company's patients, across all projects, for whom a\nclinical-data search has been run: those whose search status is\n`Processing`, `Completed`, `NoHit` or `AmbiguousIdentity`."},"requestCount":{"type":"boolean","description":"Record requests belonging to sandbox projects only."},"visitCount":{"type":"boolean","description":"Number of visits on file across all of the company's patients."},"feeUninvoicedAmount":{"type":"boolean","description":"Total in US dollars of the company's fees that are not yet on an\ninvoice and are neither paid nor canceled."},"feeTotalNonCanceledAmount":{"type":"boolean","description":"Total in US dollars of all of the company's fees except canceled ones."},"feeLastInvoiceDate":{"type":"boolean","description":"Creation time of the company's most recent fee that has been placed on\nan invoice. Null when no fee has been invoiced."},"creditBalance":{"type":"boolean","description":"Pre-paid credit wallet balance (always >= 0). Credit is added by\ntop-ups and grants and drawn down when an invoice is confirmed against\nthe wallet."},"billingEmail":{"type":"boolean","description":"The email address invoices are sent to, from the billing system. Null\nwhen no billing email is on file or the value is unavailable."}}},"CompanyFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Numeric identifier of the company."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the customer organization associated with the record."},"tier":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Commercial tier label set by Hermes, such as `standard` or\n`premium`. Companies created for individual self-signup users carry\n`community`."},"domains":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Email domains (for example `example.com`) whose new users are\nautomatically added to this company at signup. Each domain belongs\nto at most one company. Empty when no domain auto-enrolls."},"subdomain":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The company's subdomain on the records upload portal, which serves\nthe portal under the company's own host. Null when the company uses\nthe shared portal address."},"defaultRole":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Role given to users who join the company automatically through one\nof its `domains`. Null when no default role is set."},"requestStatusWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives record request status webhooks for production\nprojects. Null when none is configured."},"visitsWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives visit webhooks for production projects. Null when\nnone is configured."},"patientNoteWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives patient note webhooks for production projects.\nNull when none is configured."},"requestNoteWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives record request note webhooks for production\nprojects. Null when none is configured."},"authorizationStatusWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives patient authorization status webhooks for\nproduction projects. Null when none is configured."},"sandboxRequestStatusWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives record request status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook; the production URL is never used\ninstead."},"sandboxVisitsWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives visit webhooks for sandbox projects. Null when\nnone is configured, in which case sandbox projects send no such\nwebhook."},"sandboxPatientNoteWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives patient note webhooks for sandbox projects. Null\nwhen none is configured, in which case sandbox projects send no such\nwebhook."},"sandboxRequestNoteWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives record request note webhooks for sandbox projects.\nNull when none is configured, in which case sandbox projects send no\nsuch webhook."},"sandboxAuthorizationStatusWebhook":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"URL that receives patient authorization status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook."},"purposeCoveredOperations":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the health care operations\npurpose (`CoveredOperations`)."},"purposeCoveredPayment":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the payment purpose\n(`CoveredPayment`)."},"purposeCoveredTreatment":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the treatment purpose\n(`CoveredTreatment`)."},"purposeIndividualAccess":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the patient's right of access\npurpose (`IndividualAccess`)."},"purposeInsuranceLife":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the life insurance\nunderwriting purpose (`InsuranceLife`)."},"purposeInsuranceOther":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the disability, workers'\ncompensation or long-term care underwriting purpose\n(`InsuranceOther`)."},"purposeLegalDefense":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the legal defense purpose\n(`LegalDefense`)."},"purposeLegalMedicalMalpractice":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the medical malpractice\npurpose (`LegalMedicalMalpractice`)."},"purposeLegalPlaintiff":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the purpose for the patient's\nown legal case (`LegalPlaintiff`)."},"purposeResearchClinicalTrials":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the clinical trial research\npurpose (`ResearchClinicalTrials`)."},"purposeResearchPatientRegistries":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the patient registry purpose\n(`ResearchPatientRegistries`)."},"defaultPurpose":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Purpose applied to a new project created without one. Null when the\ncompany has no default; a project must then name its purpose."},"authorizationPdfEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the signed authorization PDF\nmethod (`authorizationPdf`)."},"ial2TokensEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company's projects may use the IAL2 token authorization\nmethod (`ial2Tokens`)."},"feeOcr":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per page of document text extraction."},"feeSiteFinder":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per successful facility lookup, which\nmatches a provider name and address to a facility."},"feeAuthCheck":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per authorization document check."},"feeRecordRequest":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per record request."},"feeInNetworkRequest":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged when an in-network record request\ncompletes."},"feeSiteSonarHit":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds results."},"feeSiteSonarNoHit":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds no results."},"feePatientHistoryHit":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds results."},"feePatientHistoryNoHit":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds no results."},"feePatientHistoriesPlus":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per last name searched in a patient\nhistory run whose results include lab results, in place of the\nstandard patient history price."},"feeChat":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per question answered about a record\nrequest's delivered documents."},"feeAiResearcher":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Price in US dollars charged per automated facility research run."},"stripeCustomerId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The company's customer identifier in the billing system. Null when\nno billing account is linked."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the company was created."},"lastWrite":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Date (UTC) of the most recent change made by one of the company's\nusers. Null when none of its users has made a change."},"whiteLabel":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether outbound record requests are sent under the company's own\ndelivery profile (the `delivery*` fields) instead of Hermes's.\nTakes effect only when the delivery profile is complete; otherwise\nHermes's profile is used."},"patientHistoriesEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company is approved to request patient histories.\nFlipped on by Hermes staff once the company's authorization\ntemplate has been approved for the feature."},"siteSonarEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company is approved to use Site Sonar\n(facility/provider discovery). Flipped on by Hermes staff once the\ncompany has been onboarded for the feature."},"ehrSearchEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company is approved to use EHR Search (electronic health\nrecord discovery). Flipped on by Hermes staff once the company has\nbeen onboarded for the feature."},"recordRequestEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company is approved to use record requests. While\nthis is off, the Record Request price is omitted from fee\nconfiguration."},"inNetworkRequestEnabled":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the company is approved to use in-network requests. While\nthis is off, the In-Network Request price is omitted from fee\nconfiguration."},"preferInNetwork":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Soft-prefer in-network sites in Site Finder / claims ingest.\nFlipped on by Hermes staff for companies that want in-network\nsites preferred as the primary match."},"accentColor":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Company brand accent color as a `#rrggbb` hex string.\nOverrides the default Hermes purple on every surface rendered on\nthe company's behalf; null keeps the default."},"styledLinks":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether links wear the brand color. `false` reverts anchors to the\nbrowser's default link colors on every themed surface. Defaults to\n`true`."},"roi":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The release-of-information (ROI) vendor this company is, if any.\nNull when the company is not an ROI vendor."},"clinicalDataVendor":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The clinical-data vendor this company *is*, if any.\nNull means the company is not a clinical-data vendor. When set,\nthe company's patients are always skipped when submitting for\nclinical-data retrieval. Independent of the ROI-vendor `roi` flag."},"deliveryFormalName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Formal organization name that outbound record requests, cover\nletters and generated authorizations name as the requester. Part of\nthe delivery profile; null when not set."},"deliveryRequesterName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the person outbound record requests name as the requester.\nPart of the delivery profile; null when not set."},"deliveryPhone":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Phone number printed on outbound record requests. Part of the\ndelivery profile; null when not set."},"deliveryFaxNumber":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Fax number facilities can send records to. Part of the delivery\nprofile; null when not set."},"deliveryRecordsEmail":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Email address facilities can send records to. Part of the delivery\nprofile; null when not set."},"deliveryMailingAddressLine1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First line of the mailing address facilities can send records to.\nPart of the delivery profile; null when not set."},"deliveryMailingAddressLine2":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Second line of the delivery mailing address, such as a suite\nnumber. Optional; null when not set."},"deliveryMailingAddressCity":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"City of the delivery mailing address. Part of the delivery profile;\nnull when not set."},"deliveryMailingAddressState":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"State of the delivery mailing address. Part of the delivery\nprofile; null when not set."},"deliveryMailingAddressZip":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ZIP code of the delivery mailing address. Part of the delivery\nprofile; null when not set."},"deliveryEmailSender":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Sender address that outbound record request emails are sent from.\nPart of the delivery profile; null when not set."},"deliveryEmailCc":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Single email address (or `Display Name <address>` mailbox) copied on\nevery outbound record request email. Optional; null when not set."},"deliveryEmailSignature":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Signature block appended to outbound record request emails. Part of\nthe delivery profile; null when not set."},"deliveryEmailSmtpHost":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Host name of the SMTP server outbound record request emails are\nsent through. Part of the delivery profile; null when not set."},"userCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of users who belong to the company."},"userLastLogin":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When a user of this company last signed in, as reported by the identity\nprovider. Null when no user has signed in or the value is unavailable."},"projectCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Sandbox projects only. Live and Closed are excluded so the companies\ntable's Projects column reflects sandbox usage."},"patientCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patients belonging to sandbox projects only."},"patientActiveCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of the company's patients, across all projects, for whom a\nclinical-data search has been run: those whose search status is\n`Processing`, `Completed`, `NoHit` or `AmbiguousIdentity`."},"requestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Record requests belonging to sandbox projects only."},"visitCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of visits on file across all of the company's patients."},"feeUninvoicedAmount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Total in US dollars of the company's fees that are not yet on an\ninvoice and are neither paid nor canceled."},"feeTotalNonCanceledAmount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Total in US dollars of all of the company's fees except canceled ones."},"feeLastInvoiceDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Creation time of the company's most recent fee that has been placed on\nan invoice. Null when no fee has been invoiced."},"creditBalance":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Pre-paid credit wallet balance (always >= 0). Credit is added by\ntop-ups and grants and drawn down when an invoice is confirmed against\nthe wallet."},"billingEmail":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The email address invoices are sent to, from the billing system. Null\nwhen no billing email is on file or the value is unavailable."}}},"CompanyFlattenSelected":{"type":"object","properties":{"id":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Numeric identifier of the company."}]},"name":{"type":["string","null"],"description":"Name of the customer organization associated with the record."},"tier":{"type":["string","null"],"description":"Commercial tier label set by Hermes, such as `standard` or\n`premium`. Companies created for individual self-signup users carry\n`community`."},"domains":{"type":["array","null"],"items":{"type":"string"},"description":"Email domains (for example `example.com`) whose new users are\nautomatically added to this company at signup. Each domain belongs\nto at most one company. Empty when no domain auto-enrolls."},"subdomain":{"type":["string","null"],"description":"The company's subdomain on the records upload portal, which serves\nthe portal under the company's own host. Null when the company uses\nthe shared portal address."},"defaultRole":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Role","description":"Role given to users who join the company automatically through one\nof its `domains`. Null when no default role is set."}]},"requestStatusWebhook":{"type":["string","null"],"description":"URL that receives record request status webhooks for production\nprojects. Null when none is configured."},"visitsWebhook":{"type":["string","null"],"description":"URL that receives visit webhooks for production projects. Null when\nnone is configured."},"patientNoteWebhook":{"type":["string","null"],"description":"URL that receives patient note webhooks for production projects.\nNull when none is configured."},"requestNoteWebhook":{"type":["string","null"],"description":"URL that receives record request note webhooks for production\nprojects. Null when none is configured."},"authorizationStatusWebhook":{"type":["string","null"],"description":"URL that receives patient authorization status webhooks for\nproduction projects. Null when none is configured."},"sandboxRequestStatusWebhook":{"type":["string","null"],"description":"URL that receives record request status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook; the production URL is never used\ninstead."},"sandboxVisitsWebhook":{"type":["string","null"],"description":"URL that receives visit webhooks for sandbox projects. Null when\nnone is configured, in which case sandbox projects send no such\nwebhook."},"sandboxPatientNoteWebhook":{"type":["string","null"],"description":"URL that receives patient note webhooks for sandbox projects. Null\nwhen none is configured, in which case sandbox projects send no such\nwebhook."},"sandboxRequestNoteWebhook":{"type":["string","null"],"description":"URL that receives record request note webhooks for sandbox projects.\nNull when none is configured, in which case sandbox projects send no\nsuch webhook."},"sandboxAuthorizationStatusWebhook":{"type":["string","null"],"description":"URL that receives patient authorization status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook."},"purposeCoveredOperations":{"type":["boolean","null"],"description":"Whether the company's projects may use the health care operations\npurpose (`CoveredOperations`)."},"purposeCoveredPayment":{"type":["boolean","null"],"description":"Whether the company's projects may use the payment purpose\n(`CoveredPayment`)."},"purposeCoveredTreatment":{"type":["boolean","null"],"description":"Whether the company's projects may use the treatment purpose\n(`CoveredTreatment`)."},"purposeIndividualAccess":{"type":["boolean","null"],"description":"Whether the company's projects may use the patient's right of access\npurpose (`IndividualAccess`)."},"purposeInsuranceLife":{"type":["boolean","null"],"description":"Whether the company's projects may use the life insurance\nunderwriting purpose (`InsuranceLife`)."},"purposeInsuranceOther":{"type":["boolean","null"],"description":"Whether the company's projects may use the disability, workers'\ncompensation or long-term care underwriting purpose\n(`InsuranceOther`)."},"purposeLegalDefense":{"type":["boolean","null"],"description":"Whether the company's projects may use the legal defense purpose\n(`LegalDefense`)."},"purposeLegalMedicalMalpractice":{"type":["boolean","null"],"description":"Whether the company's projects may use the medical malpractice\npurpose (`LegalMedicalMalpractice`)."},"purposeLegalPlaintiff":{"type":["boolean","null"],"description":"Whether the company's projects may use the purpose for the patient's\nown legal case (`LegalPlaintiff`)."},"purposeResearchClinicalTrials":{"type":["boolean","null"],"description":"Whether the company's projects may use the clinical trial research\npurpose (`ResearchClinicalTrials`)."},"purposeResearchPatientRegistries":{"type":["boolean","null"],"description":"Whether the company's projects may use the patient registry purpose\n(`ResearchPatientRegistries`)."},"defaultPurpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectPurpose","description":"Purpose applied to a new project created without one. Null when the\ncompany has no default; a project must then name its purpose."}]},"authorizationPdfEnabled":{"type":["boolean","null"],"description":"Whether the company's projects may use the signed authorization PDF\nmethod (`authorizationPdf`)."},"ial2TokensEnabled":{"type":["boolean","null"],"description":"Whether the company's projects may use the IAL2 token authorization\nmethod (`ial2Tokens`)."},"feeOcr":{"type":["string","null"],"description":"Price in US dollars charged per page of document text extraction."},"feeSiteFinder":{"type":["string","null"],"description":"Price in US dollars charged per successful facility lookup, which\nmatches a provider name and address to a facility."},"feeAuthCheck":{"type":["string","null"],"description":"Price in US dollars charged per authorization document check."},"feeRecordRequest":{"type":["string","null"],"description":"Price in US dollars charged per record request."},"feeInNetworkRequest":{"type":["string","null"],"description":"Price in US dollars charged when an in-network record request\ncompletes."},"feeSiteSonarHit":{"type":["string","null"],"description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds results."},"feeSiteSonarNoHit":{"type":["string","null"],"description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds no results."},"feePatientHistoryHit":{"type":["string","null"],"description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds results."},"feePatientHistoryNoHit":{"type":["string","null"],"description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds no results."},"feePatientHistoriesPlus":{"type":["string","null"],"description":"Price in US dollars charged per last name searched in a patient\nhistory run whose results include lab results, in place of the\nstandard patient history price."},"feeChat":{"type":["string","null"],"description":"Price in US dollars charged per question answered about a record\nrequest's delivered documents."},"feeAiResearcher":{"type":["string","null"],"description":"Price in US dollars charged per automated facility research run."},"stripeCustomerId":{"type":["string","null"],"description":"The company's customer identifier in the billing system. Null when\nno billing account is linked."},"createdAt":{"type":["string","null"],"format":"date-time","description":"When the company was created."},"lastWrite":{"type":["string","null"],"format":"date","description":"Date (UTC) of the most recent change made by one of the company's\nusers. Null when none of its users has made a change."},"whiteLabel":{"type":["boolean","null"],"description":"Whether outbound record requests are sent under the company's own\ndelivery profile (the `delivery*` fields) instead of Hermes's.\nTakes effect only when the delivery profile is complete; otherwise\nHermes's profile is used."},"patientHistoriesEnabled":{"type":["boolean","null"],"description":"Whether the company is approved to request patient histories.\nFlipped on by Hermes staff once the company's authorization\ntemplate has been approved for the feature."},"siteSonarEnabled":{"type":["boolean","null"],"description":"Whether the company is approved to use Site Sonar\n(facility/provider discovery). Flipped on by Hermes staff once the\ncompany has been onboarded for the feature."},"ehrSearchEnabled":{"type":["boolean","null"],"description":"Whether the company is approved to use EHR Search (electronic health\nrecord discovery). Flipped on by Hermes staff once the company has\nbeen onboarded for the feature."},"recordRequestEnabled":{"type":["boolean","null"],"description":"Whether the company is approved to use record requests. While\nthis is off, the Record Request price is omitted from fee\nconfiguration."},"inNetworkRequestEnabled":{"type":["boolean","null"],"description":"Whether the company is approved to use in-network requests. While\nthis is off, the In-Network Request price is omitted from fee\nconfiguration."},"preferInNetwork":{"type":["boolean","null"],"description":"Soft-prefer in-network sites in Site Finder / claims ingest.\nFlipped on by Hermes staff for companies that want in-network\nsites preferred as the primary match."},"accentColor":{"type":["string","null"],"description":"Company brand accent color as a `#rrggbb` hex string.\nOverrides the default Hermes purple on every surface rendered on\nthe company's behalf; null keeps the default."},"styledLinks":{"type":["boolean","null"],"description":"Whether links wear the brand color. `false` reverts anchors to the\nbrowser's default link colors on every themed surface. Defaults to\n`true`."},"roi":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RoiVendor","description":"The release-of-information (ROI) vendor this company is, if any.\nNull when the company is not an ROI vendor."}]},"clinicalDataVendor":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ClinicalDataVendor","description":"The clinical-data vendor this company *is*, if any.\nNull means the company is not a clinical-data vendor. When set,\nthe company's patients are always skipped when submitting for\nclinical-data retrieval. Independent of the ROI-vendor `roi` flag."}]},"deliveryFormalName":{"type":["string","null"],"description":"Formal organization name that outbound record requests, cover\nletters and generated authorizations name as the requester. Part of\nthe delivery profile; null when not set."},"deliveryRequesterName":{"type":["string","null"],"description":"Name of the person outbound record requests name as the requester.\nPart of the delivery profile; null when not set."},"deliveryPhone":{"type":["string","null"],"description":"Phone number printed on outbound record requests. Part of the\ndelivery profile; null when not set."},"deliveryFaxNumber":{"type":["string","null"],"description":"Fax number facilities can send records to. Part of the delivery\nprofile; null when not set."},"deliveryRecordsEmail":{"type":["string","null"],"description":"Email address facilities can send records to. Part of the delivery\nprofile; null when not set."},"deliveryMailingAddressLine1":{"type":["string","null"],"description":"First line of the mailing address facilities can send records to.\nPart of the delivery profile; null when not set."},"deliveryMailingAddressLine2":{"type":["string","null"],"description":"Second line of the delivery mailing address, such as a suite\nnumber. Optional; null when not set."},"deliveryMailingAddressCity":{"type":["string","null"],"description":"City of the delivery mailing address. Part of the delivery profile;\nnull when not set."},"deliveryMailingAddressState":{"type":["string","null"],"description":"State of the delivery mailing address. Part of the delivery\nprofile; null when not set."},"deliveryMailingAddressZip":{"type":["string","null"],"description":"ZIP code of the delivery mailing address. Part of the delivery\nprofile; null when not set."},"deliveryEmailSender":{"type":["string","null"],"description":"Sender address that outbound record request emails are sent from.\nPart of the delivery profile; null when not set."},"deliveryEmailCc":{"type":["string","null"],"description":"Single email address (or `Display Name <address>` mailbox) copied on\nevery outbound record request email. Optional; null when not set."},"deliveryEmailSignature":{"type":["string","null"],"description":"Signature block appended to outbound record request emails. Part of\nthe delivery profile; null when not set."},"deliveryEmailSmtpHost":{"type":["string","null"],"description":"Host name of the SMTP server outbound record request emails are\nsent through. Part of the delivery profile; null when not set."}}},"CompanyId":{"type":"integer","format":"u-int32","description":"The numeric id of the company (tenant) a resource belongs to.","example":115,"minimum":0},"CompanyJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/CompanyAggregates"},{"type":"object"}]},"CompanyJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/CompanyAggregatesRequest"},{"type":"object"}]},"CompanyJoinFields":{"allOf":[{"$ref":"#/components/schemas/CompanyFields"},{"type":"object"}]},"CompanyJoinFilter":{"allOf":[{"$ref":"#/components/schemas/CompanyFilter"},{"type":"object"}]},"CompanyJoinSelected":{"allOf":[{"$ref":"#/components/schemas/CompanySelected"},{"type":"object"}]},"CompanyName":{"type":"object","required":["id","name"],"properties":{"id":{"$ref":"#/components/schemas/CompanyId","description":"Numeric identifier of the company."},"name":{"type":"string","description":"Name of the company.","example":"Example Health System"}}},"CompanyNumericAggregates":{"type":"object"},"CompanyNumericFields":{"type":"object","additionalProperties":false},"CompanySelected":{"allOf":[{"$ref":"#/components/schemas/CompanyFlattenSelected"},{"$ref":"#/components/schemas/CompanyAggregateDataFlattenSelected"},{"type":"object","properties":{"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}}]},"CompanySort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Numeric identifier of the company.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the customer organization associated with the record.","enum":["asc","desc"]}}},{"type":"object","required":["tier"],"properties":{"tier":{"type":"string","description":"Commercial tier label set by Hermes, such as `standard` or\n`premium`. Companies created for individual self-signup users carry\n`community`.","enum":["asc","desc"]}}},{"type":"object","required":["subdomain"],"properties":{"subdomain":{"type":"string","description":"The company's subdomain on the records upload portal, which serves\nthe portal under the company's own host. Null when the company uses\nthe shared portal address.","enum":["asc","desc"]}}},{"type":"object","required":["defaultRole"],"properties":{"defaultRole":{"type":"string","description":"Role given to users who join the company automatically through one\nof its `domains`. Null when no default role is set.","enum":["asc","desc"]}}},{"type":"object","required":["requestStatusWebhook"],"properties":{"requestStatusWebhook":{"type":"string","description":"URL that receives record request status webhooks for production\nprojects. Null when none is configured.","enum":["asc","desc"]}}},{"type":"object","required":["visitsWebhook"],"properties":{"visitsWebhook":{"type":"string","description":"URL that receives visit webhooks for production projects. Null when\nnone is configured.","enum":["asc","desc"]}}},{"type":"object","required":["patientNoteWebhook"],"properties":{"patientNoteWebhook":{"type":"string","description":"URL that receives patient note webhooks for production projects.\nNull when none is configured.","enum":["asc","desc"]}}},{"type":"object","required":["requestNoteWebhook"],"properties":{"requestNoteWebhook":{"type":"string","description":"URL that receives record request note webhooks for production\nprojects. Null when none is configured.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationStatusWebhook"],"properties":{"authorizationStatusWebhook":{"type":"string","description":"URL that receives patient authorization status webhooks for\nproduction projects. Null when none is configured.","enum":["asc","desc"]}}},{"type":"object","required":["sandboxRequestStatusWebhook"],"properties":{"sandboxRequestStatusWebhook":{"type":"string","description":"URL that receives record request status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook; the production URL is never used\ninstead.","enum":["asc","desc"]}}},{"type":"object","required":["sandboxVisitsWebhook"],"properties":{"sandboxVisitsWebhook":{"type":"string","description":"URL that receives visit webhooks for sandbox projects. Null when\nnone is configured, in which case sandbox projects send no such\nwebhook.","enum":["asc","desc"]}}},{"type":"object","required":["sandboxPatientNoteWebhook"],"properties":{"sandboxPatientNoteWebhook":{"type":"string","description":"URL that receives patient note webhooks for sandbox projects. Null\nwhen none is configured, in which case sandbox projects send no such\nwebhook.","enum":["asc","desc"]}}},{"type":"object","required":["sandboxRequestNoteWebhook"],"properties":{"sandboxRequestNoteWebhook":{"type":"string","description":"URL that receives record request note webhooks for sandbox projects.\nNull when none is configured, in which case sandbox projects send no\nsuch webhook.","enum":["asc","desc"]}}},{"type":"object","required":["sandboxAuthorizationStatusWebhook"],"properties":{"sandboxAuthorizationStatusWebhook":{"type":"string","description":"URL that receives patient authorization status webhooks for sandbox\nprojects. Null when none is configured, in which case sandbox\nprojects send no such webhook.","enum":["asc","desc"]}}},{"type":"object","required":["purposeCoveredOperations"],"properties":{"purposeCoveredOperations":{"type":"string","description":"Whether the company's projects may use the health care operations\npurpose (`CoveredOperations`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeCoveredPayment"],"properties":{"purposeCoveredPayment":{"type":"string","description":"Whether the company's projects may use the payment purpose\n(`CoveredPayment`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeCoveredTreatment"],"properties":{"purposeCoveredTreatment":{"type":"string","description":"Whether the company's projects may use the treatment purpose\n(`CoveredTreatment`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeIndividualAccess"],"properties":{"purposeIndividualAccess":{"type":"string","description":"Whether the company's projects may use the patient's right of access\npurpose (`IndividualAccess`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeInsuranceLife"],"properties":{"purposeInsuranceLife":{"type":"string","description":"Whether the company's projects may use the life insurance\nunderwriting purpose (`InsuranceLife`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeInsuranceOther"],"properties":{"purposeInsuranceOther":{"type":"string","description":"Whether the company's projects may use the disability, workers'\ncompensation or long-term care underwriting purpose\n(`InsuranceOther`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeLegalDefense"],"properties":{"purposeLegalDefense":{"type":"string","description":"Whether the company's projects may use the legal defense purpose\n(`LegalDefense`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeLegalMedicalMalpractice"],"properties":{"purposeLegalMedicalMalpractice":{"type":"string","description":"Whether the company's projects may use the medical malpractice\npurpose (`LegalMedicalMalpractice`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeLegalPlaintiff"],"properties":{"purposeLegalPlaintiff":{"type":"string","description":"Whether the company's projects may use the purpose for the patient's\nown legal case (`LegalPlaintiff`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeResearchClinicalTrials"],"properties":{"purposeResearchClinicalTrials":{"type":"string","description":"Whether the company's projects may use the clinical trial research\npurpose (`ResearchClinicalTrials`).","enum":["asc","desc"]}}},{"type":"object","required":["purposeResearchPatientRegistries"],"properties":{"purposeResearchPatientRegistries":{"type":"string","description":"Whether the company's projects may use the patient registry purpose\n(`ResearchPatientRegistries`).","enum":["asc","desc"]}}},{"type":"object","required":["defaultPurpose"],"properties":{"defaultPurpose":{"type":"string","description":"Purpose applied to a new project created without one. Null when the\ncompany has no default; a project must then name its purpose.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationPdfEnabled"],"properties":{"authorizationPdfEnabled":{"type":"string","description":"Whether the company's projects may use the signed authorization PDF\nmethod (`authorizationPdf`).","enum":["asc","desc"]}}},{"type":"object","required":["ial2TokensEnabled"],"properties":{"ial2TokensEnabled":{"type":"string","description":"Whether the company's projects may use the IAL2 token authorization\nmethod (`ial2Tokens`).","enum":["asc","desc"]}}},{"type":"object","required":["feeOcr"],"properties":{"feeOcr":{"type":"string","description":"Price in US dollars charged per page of document text extraction.","enum":["asc","desc"]}}},{"type":"object","required":["feeSiteFinder"],"properties":{"feeSiteFinder":{"type":"string","description":"Price in US dollars charged per successful facility lookup, which\nmatches a provider name and address to a facility.","enum":["asc","desc"]}}},{"type":"object","required":["feeAuthCheck"],"properties":{"feeAuthCheck":{"type":"string","description":"Price in US dollars charged per authorization document check.","enum":["asc","desc"]}}},{"type":"object","required":["feeRecordRequest"],"properties":{"feeRecordRequest":{"type":"string","description":"Price in US dollars charged per record request.","enum":["asc","desc"]}}},{"type":"object","required":["feeInNetworkRequest"],"properties":{"feeInNetworkRequest":{"type":"string","description":"Price in US dollars charged when an in-network record request\ncompletes.","enum":["asc","desc"]}}},{"type":"object","required":["feeSiteSonarHit"],"properties":{"feeSiteSonarHit":{"type":"string","description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds results.","enum":["asc","desc"]}}},{"type":"object","required":["feeSiteSonarNoHit"],"properties":{"feeSiteSonarNoHit":{"type":"string","description":"Price in US dollars charged per last name searched in a facility\ndiscovery run that finds no results.","enum":["asc","desc"]}}},{"type":"object","required":["feePatientHistoryHit"],"properties":{"feePatientHistoryHit":{"type":"string","description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds results.","enum":["asc","desc"]}}},{"type":"object","required":["feePatientHistoryNoHit"],"properties":{"feePatientHistoryNoHit":{"type":"string","description":"Price in US dollars charged per last name searched in a patient\nhistory run that finds no results.","enum":["asc","desc"]}}},{"type":"object","required":["feePatientHistoriesPlus"],"properties":{"feePatientHistoriesPlus":{"type":"string","description":"Price in US dollars charged per last name searched in a patient\nhistory run whose results include lab results, in place of the\nstandard patient history price.","enum":["asc","desc"]}}},{"type":"object","required":["feeChat"],"properties":{"feeChat":{"type":"string","description":"Price in US dollars charged per question answered about a record\nrequest's delivered documents.","enum":["asc","desc"]}}},{"type":"object","required":["feeAiResearcher"],"properties":{"feeAiResearcher":{"type":"string","description":"Price in US dollars charged per automated facility research run.","enum":["asc","desc"]}}},{"type":"object","required":["stripeCustomerId"],"properties":{"stripeCustomerId":{"type":"string","description":"The company's customer identifier in the billing system. Null when\nno billing account is linked.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"When the company was created.","enum":["asc","desc"]}}},{"type":"object","required":["lastWrite"],"properties":{"lastWrite":{"type":"string","description":"Date (UTC) of the most recent change made by one of the company's\nusers. Null when none of its users has made a change.","enum":["asc","desc"]}}},{"type":"object","required":["whiteLabel"],"properties":{"whiteLabel":{"type":"string","description":"Whether outbound record requests are sent under the company's own\ndelivery profile (the `delivery*` fields) instead of Hermes's.\nTakes effect only when the delivery profile is complete; otherwise\nHermes's profile is used.","enum":["asc","desc"]}}},{"type":"object","required":["patientHistoriesEnabled"],"properties":{"patientHistoriesEnabled":{"type":"string","description":"Whether the company is approved to request patient histories.\nFlipped on by Hermes staff once the company's authorization\ntemplate has been approved for the feature.","enum":["asc","desc"]}}},{"type":"object","required":["siteSonarEnabled"],"properties":{"siteSonarEnabled":{"type":"string","description":"Whether the company is approved to use Site Sonar\n(facility/provider discovery). Flipped on by Hermes staff once the\ncompany has been onboarded for the feature.","enum":["asc","desc"]}}},{"type":"object","required":["ehrSearchEnabled"],"properties":{"ehrSearchEnabled":{"type":"string","description":"Whether the company is approved to use EHR Search (electronic health\nrecord discovery). Flipped on by Hermes staff once the company has\nbeen onboarded for the feature.","enum":["asc","desc"]}}},{"type":"object","required":["recordRequestEnabled"],"properties":{"recordRequestEnabled":{"type":"string","description":"Whether the company is approved to use record requests. While\nthis is off, the Record Request price is omitted from fee\nconfiguration.","enum":["asc","desc"]}}},{"type":"object","required":["inNetworkRequestEnabled"],"properties":{"inNetworkRequestEnabled":{"type":"string","description":"Whether the company is approved to use in-network requests. While\nthis is off, the In-Network Request price is omitted from fee\nconfiguration.","enum":["asc","desc"]}}},{"type":"object","required":["preferInNetwork"],"properties":{"preferInNetwork":{"type":"string","description":"Soft-prefer in-network sites in Site Finder / claims ingest.\nFlipped on by Hermes staff for companies that want in-network\nsites preferred as the primary match.","enum":["asc","desc"]}}},{"type":"object","required":["accentColor"],"properties":{"accentColor":{"type":"string","description":"Company brand accent color as a `#rrggbb` hex string.\nOverrides the default Hermes purple on every surface rendered on\nthe company's behalf; null keeps the default.","enum":["asc","desc"]}}},{"type":"object","required":["styledLinks"],"properties":{"styledLinks":{"type":"string","description":"Whether links wear the brand color. `false` reverts anchors to the\nbrowser's default link colors on every themed surface. Defaults to\n`true`.","enum":["asc","desc"]}}},{"type":"object","required":["roi"],"properties":{"roi":{"type":"string","description":"The release-of-information (ROI) vendor this company is, if any.\nNull when the company is not an ROI vendor.","enum":["asc","desc"]}}},{"type":"object","required":["clinicalDataVendor"],"properties":{"clinicalDataVendor":{"type":"string","description":"The clinical-data vendor this company *is*, if any.\nNull means the company is not a clinical-data vendor. When set,\nthe company's patients are always skipped when submitting for\nclinical-data retrieval. Independent of the ROI-vendor `roi` flag.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryFormalName"],"properties":{"deliveryFormalName":{"type":"string","description":"Formal organization name that outbound record requests, cover\nletters and generated authorizations name as the requester. Part of\nthe delivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryRequesterName"],"properties":{"deliveryRequesterName":{"type":"string","description":"Name of the person outbound record requests name as the requester.\nPart of the delivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryPhone"],"properties":{"deliveryPhone":{"type":"string","description":"Phone number printed on outbound record requests. Part of the\ndelivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryFaxNumber"],"properties":{"deliveryFaxNumber":{"type":"string","description":"Fax number facilities can send records to. Part of the delivery\nprofile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryRecordsEmail"],"properties":{"deliveryRecordsEmail":{"type":"string","description":"Email address facilities can send records to. Part of the delivery\nprofile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryMailingAddressLine1"],"properties":{"deliveryMailingAddressLine1":{"type":"string","description":"First line of the mailing address facilities can send records to.\nPart of the delivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryMailingAddressLine2"],"properties":{"deliveryMailingAddressLine2":{"type":"string","description":"Second line of the delivery mailing address, such as a suite\nnumber. Optional; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryMailingAddressCity"],"properties":{"deliveryMailingAddressCity":{"type":"string","description":"City of the delivery mailing address. Part of the delivery profile;\nnull when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryMailingAddressState"],"properties":{"deliveryMailingAddressState":{"type":"string","description":"State of the delivery mailing address. Part of the delivery\nprofile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryMailingAddressZip"],"properties":{"deliveryMailingAddressZip":{"type":"string","description":"ZIP code of the delivery mailing address. Part of the delivery\nprofile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryEmailSender"],"properties":{"deliveryEmailSender":{"type":"string","description":"Sender address that outbound record request emails are sent from.\nPart of the delivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryEmailCc"],"properties":{"deliveryEmailCc":{"type":"string","description":"Single email address (or `Display Name <address>` mailbox) copied on\nevery outbound record request email. Optional; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryEmailSignature"],"properties":{"deliveryEmailSignature":{"type":"string","description":"Signature block appended to outbound record request emails. Part of\nthe delivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["deliveryEmailSmtpHost"],"properties":{"deliveryEmailSmtpHost":{"type":"string","description":"Host name of the SMTP server outbound record request emails are\nsent through. Part of the delivery profile; null when not set.","enum":["asc","desc"]}}},{"type":"object","required":["userCount"],"properties":{"userCount":{"type":"string","description":"Number of users who belong to the company.","enum":["asc","desc"]}}},{"type":"object","required":["userLastLogin"],"properties":{"userLastLogin":{"type":"string","description":"When a user of this company last signed in, as reported by the identity\nprovider. Null when no user has signed in or the value is unavailable.","enum":["asc","desc"]}}},{"type":"object","required":["projectCount"],"properties":{"projectCount":{"type":"string","description":"Sandbox projects only. Live and Closed are excluded so the companies\ntable's Projects column reflects sandbox usage.","enum":["asc","desc"]}}},{"type":"object","required":["patientCount"],"properties":{"patientCount":{"type":"string","description":"Patients belonging to sandbox projects only.","enum":["asc","desc"]}}},{"type":"object","required":["patientActiveCount"],"properties":{"patientActiveCount":{"type":"string","description":"Number of the company's patients, across all projects, for whom a\nclinical-data search has been run: those whose search status is\n`Processing`, `Completed`, `NoHit` or `AmbiguousIdentity`.","enum":["asc","desc"]}}},{"type":"object","required":["requestCount"],"properties":{"requestCount":{"type":"string","description":"Record requests belonging to sandbox projects only.","enum":["asc","desc"]}}},{"type":"object","required":["visitCount"],"properties":{"visitCount":{"type":"string","description":"Number of visits on file across all of the company's patients.","enum":["asc","desc"]}}},{"type":"object","required":["feeUninvoicedAmount"],"properties":{"feeUninvoicedAmount":{"type":"string","description":"Total in US dollars of the company's fees that are not yet on an\ninvoice and are neither paid nor canceled.","enum":["asc","desc"]}}},{"type":"object","required":["feeTotalNonCanceledAmount"],"properties":{"feeTotalNonCanceledAmount":{"type":"string","description":"Total in US dollars of all of the company's fees except canceled ones.","enum":["asc","desc"]}}},{"type":"object","required":["feeLastInvoiceDate"],"properties":{"feeLastInvoiceDate":{"type":"string","description":"Creation time of the company's most recent fee that has been placed on\nan invoice. Null when no fee has been invoiced.","enum":["asc","desc"]}}},{"type":"object","required":["creditBalance"],"properties":{"creditBalance":{"type":"string","description":"Pre-paid credit wallet balance (always >= 0). Credit is added by\ntop-ups and grants and drawn down when an invoice is confirmed against\nthe wallet.","enum":["asc","desc"]}}},{"type":"object","required":["billingEmail"],"properties":{"billingEmail":{"type":"string","description":"The email address invoices are sent to, from the billing system. Null\nwhen no billing email is on file or the value is unavailable.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"ConditioningNotice":{"type":"object","description":"LLM-extracted conditioning-of-authorization notice per 45 CFR §\n164.508(c)(2)(ii). When the notice is null or absent the form carries\nneither statement and the check fails; when it is present the statement\nwas found and the check passes.","required":["statement","kind"],"properties":{"statement":{"type":"string","description":"Short paraphrase (trimmed) of the notice — not a verbatim copy of the\nform's wording."},"kind":{"$ref":"#/components/schemas/ConditioningNoticeKind","description":"Whether the statement is non-conditioning or consequence-based."}}},"ConditioningNoticeKind":{"type":"string","description":"Which 45 CFR § 164.508(c)(2)(ii) statement the form uses. Either kind\nsatisfies the conditioning-of-authorization notice requirement.","enum":["NonConditioning","Consequence"]},"Count_Patient":{"type":"object","description":"A count of related records of one kind.","required":["count"],"properties":{"count":{"type":"integer","format":"int64","description":"Number of related records; zero when there are none."}}},"Count_Request":{"type":"object","description":"A count of related records of one kind.","required":["count"],"properties":{"count":{"type":"integer","format":"int64","description":"Number of related records; zero when there are none."}}},"Count_Visit":{"type":"object","description":"A count of related records of one kind.","required":["count"],"properties":{"count":{"type":"integer","format":"int64","description":"Number of related records; zero when there are none."}}},"CreateNoteRequest":{"type":"object","required":["content"],"properties":{"content":{"$ref":"#/components/schemas/TrimString","description":"The text of the note."},"email":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"Optional email to impersonate another user when creating the note.\nRequires ImpersonateUser permission and the target user must be in the same company."}]}}},"DateOfBirth":{"type":"string","format":"date","description":"A date of birth. Must not lie in the future; today (in UTC) is allowed. A future or invalid date is rejected.","examples":["1990-04-12"]},"DeathCertificateDoc":{"type":"object","required":["nextOfKinNames"],"properties":{"decedentName":{"type":["string","null"],"description":"The name of the decedent on the death certificate"},"dateOfBirth":{"type":["string","null"],"format":"date","description":"The date of birth of the decedent on the death certificate"},"dateOfDeath":{"type":["string","null"],"format":"date","description":"The date of death of the decedent on the death certificate"},"placeOfDeath":{"type":["string","null"],"description":"The place of death of the decedent on the death certificate"},"certificateNumber":{"type":["string","null"],"description":"The certificate number of the death certificate"},"issuanceDate":{"type":["string","null"],"format":"date","description":"The date of issuance of the death certificate"},"informantName":{"type":["string","null"],"description":"The name of the informant (person who reported the death, often next of kin)"},"nextOfKinNames":{"type":"array","items":{"type":"string"},"description":"The next of kin listed on the death certificate. A certificate may list multiple surviving relatives."},"survivingSpouse":{"type":["string","null"],"description":"The surviving spouse listed on the death certificate"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"DeliverableUploadedBy":{"oneOf":[{"type":"object","required":["userId","type"],"properties":{"userId":{"type":"string"},"type":{"type":"string","enum":["user"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["uploadCode"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["fax"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["mro"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["healthmark"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["sharecare"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["verisma"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["veradigm"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["certificate"]}}},{"type":"object","description":"A combined chart PDF Hermes generated for a record request: a contents\npage followed by the chart's attachment PDFs.","required":["type"],"properties":{"type":{"type":"string","enum":["combinedChart"]}}},{"type":"object","description":"A human-readable PDF Hermes rendered from a C-CDA XML document received\nfor the request.","required":["type"],"properties":{"type":{"type":"string","enum":["hermesCcda"]}}}],"description":"Who or what placed a file in a request's deliverables folder.\n\nInternally tagged so a future source cannot be added as a silent string —\nevery consumer's `match` must handle the new variant. `User` carries the\nuploader's id; machine sources are unit variants with fixed display tags."},"DeliveryMethod":{"type":"string","description":"How a record request was (or will be) sent / received.\n\nLives in `hermes-shared` so deliverable sidecars (and the lambdas that write\nthem) can stamp a typed value that serializes to the same PascalCase wire\nstring the domain projections already use.","enum":["Fax","Email","Mail","RoiPortal","EhrPortal","RoiApi","EhrApi","SitePortal","EmailReminder","HermesPortal","Call"]},"Department":{"allOf":[{"$ref":"#/components/schemas/UsAddressForm"},{"type":"object","required":["id","editable","inNetwork","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Direct department identity for mutations. Inherited-only views use a\nnon-persisted synthetic id and set `editable` false, so an ancestor's\nglobal id is never exposed as the child's mutation target."},"editable":{"type":"boolean","description":"Whether this department can be edited through this site. False when\nevery value shown is inherited from a department of the managing\norganization's parent; edit that department instead."},"phone":{"type":["string","null"],"description":"Telephone number for the department. Null when none is on file.","example":"+12025550142"},"fax":{"type":["string","null"],"description":"Fax number record requests are sent to. Null when none is on file.","example":"+12025550143"},"email":{"type":["string","null"],"description":"Email address record requests are sent to. Null when none is on file.","example":"records@example.com"},"website":{"type":["string","null"],"description":"Website for the department, such as its records-request page. Null when\nnone is on file.","example":"https://www.example.com"},"patientPortal":{"type":["string","null"],"description":"Web address of the facility's patient portal. Recorded on the medical\nrecords department. Blank when no portal address is on file."},"formattedAddress":{"type":["string","null"],"description":"Complete mailing address of the department on one line. Null when no\naddress is on file.","example":"123 Example Street, Springfield, CA 94110"},"fee":{"type":["string","null"],"description":"Fee the department charges to fulfil a records request, in US dollars.\nNull when no fee is on file."},"attentionTo":{"type":["string","null"],"description":"Name or office to address a record request to, printed on the\nattention line of the request. Null when none is on file.","example":"Health Information Management"},"payableTo":{"type":["string","null"],"description":"Name a fee payment should be made payable to. Null when none is on\nfile.","example":"Example Health System"},"requestMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"Channel the department accepts record requests through, such as fax,\nemail, mail or a portal. Null when not yet known."}]},"roi":{"type":["string","null"],"description":"Name of the release-of-information company that fulfils record requests\nfor this department. Null when none is on file, or when it is withheld\nfrom the viewer; `knownRoi` then says whether one is on file."},"roiId":{"type":["string","null"],"description":"Current ROI roster identifier. Derived in memory from the site's\nreference link; never read from or written to department events."},"knownRoi":{"type":["boolean","null"],"description":"Whether this department has an ROI vendor on file, shown when the vendor\nitself is withheld from the viewer. `true` means a vendor is on file and\n`false` means none is. Present *only* when `roi` has been concealed --\nthe caller lacks the `ViewDepartmentRoi` permission, or their company's\nROI vendor differs from this department's. Absent whenever the real\n`roi` is returned, so a consumer shows this indicator exactly when it is\npresent."},"ehr":{"type":["string","null"],"description":"Name of the electronic health record system the department uses. Null\nwhen not known."},"ehrId":{"type":["string","null"],"description":"Identifier of this department's facility in its electronic health\nrecord system. Null when the facility is not linked to one."},"inNetwork":{"type":"boolean","description":"Whether this department is in-network: its ROI vendor has a BAA / SFTP\narrangement, or its EHR can be queried directly. Returned even when the\nROI vendor is withheld from the viewer, since the flag does not reveal\nwhich vendor is on file."},"createdAt":{"type":"string","format":"date-time","description":"When the department was created, as an RFC 3339 timestamp in UTC. On a\ndepartment returned with a site, this is the time the response was\nbuilt rather than the original creation time.","example":"2026-01-15T12:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the department was last updated, as an RFC 3339 timestamp in UTC.\nOn a department returned with a site, this is the time the response was\nbuilt rather than the time of the last edit.","example":"2026-01-15T12:00:00Z"},"evidence":{"$ref":"#/components/schemas/DepartmentEvidence","description":"Per-field research provenance. Sits alongside the flat scalars; empty\nfor manually-entered, ingested, or pre-evidence-replayed values."},"fieldSources":{"type":"object","description":"Read-time origin of each direct or inherited field. This deliberately\nlives on the view, not `DepartmentEvidence`, because evidence is carried\nby journal events.","additionalProperties":{"$ref":"#/components/schemas/DepartmentFieldSource"},"propertyNames":{"type":"string"}}}}]},"DepartmentAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"DepartmentAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DepartmentNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"DepartmentEvidence":{"type":"object","description":"Per-field evidence for a department, keyed by the same field names as the\ndepartment's own values. Each entry is empty when the corresponding value\nhas no recorded provenance (manually entered, imported, or recorded before\nevidence was tracked).","properties":{"phone":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `phone`."},"fax":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `fax`."},"email":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `email`."},"website":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `website`."},"patientPortal":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `patientPortal`."},"addressLine1":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `addressLine1`."},"addressLine2":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `addressLine2`."},"city":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `city`."},"state":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `state`."},"zip":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `zip`."},"fee":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `fee`."},"attentionTo":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `attentionTo`."},"payableTo":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the department's `payableTo`. Never carries research\ncitations."},"requestMethod":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `requestMethod`."},"roi":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `roi`."},"roiId":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `roiId`."},"ehr":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the department's `ehr`."},"researchDocuments":{"type":"array","items":{"$ref":"#/components/schemas/ResearchDocument"},"description":"Source PDFs the AI researcher downloaded and archived for this department\n(the public forms whose `pdf` citations back the fields above). Empty\nfor departments that were never researched or whose research surfaced no\ndocument sources. Department-level rather than per-field: one form\nusually backs several fields, so listing it once per department avoids\nrepeating the same file under phone/fax/address/etc."}}},"DepartmentFieldSource":{"type":"object","description":"Read-time origin of one resolved department field.","required":["organizationId","departmentId","inherited"],"properties":{"organizationId":{"type":"string","description":"Identifier of the organization whose department supplied the value."},"departmentId":{"type":"string","description":"Identifier of the department the value was taken from."},"inherited":{"type":"boolean","description":"Whether the value was inherited from a parent organization's department\nrather than set on this site's own department."}}},"DepartmentFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Unique identifier of the department."},"phone":{"type":"boolean","description":"Telephone number for the department. Blank when none is on file."},"fax":{"type":"boolean","description":"Fax number record requests are sent to. Blank when none is on file."},"email":{"type":"boolean","description":"Email address record requests are sent to. Blank when none is on file."},"website":{"type":"boolean","description":"Website for the department, such as its records-request page. Blank\nwhen none is on file."},"patientPortal":{"type":"boolean","description":"Web address of the facility's patient portal. Recorded on the medical\nrecords department. Blank when no portal address is on file."},"formattedAddress":{"type":"boolean","description":"Complete mailing address of the department on one line. Blank when no\naddress is on file."},"fee":{"type":"boolean","description":"Fee the department charges to fulfil a records request, in US dollars.\nBlank when no fee is on file."},"attentionTo":{"type":"boolean","description":"Name or office to address a record request to, printed on the\nattention line of the request. Blank when none is on file."},"payableTo":{"type":"boolean","description":"Name a fee payment should be made payable to. Blank when none is on\nfile."},"requestMethod":{"type":"boolean","description":"Channel the department accepts record requests through, such as fax,\nemail, mail or a portal. Blank when not yet known."},"roi":{"type":"boolean","description":"Name of the release-of-information company that fulfils record requests\nfor this department. Blank when none is on file or when it is withheld\nfrom the viewer."},"roiId":{"type":"boolean","description":"Projection-only identifier derived from the current ROI roster link."},"ehr":{"type":"boolean","description":"Name of the electronic health record system the department uses. Blank\nwhen not known."},"ehrId":{"type":"boolean","description":"Identifier of this department's facility in its electronic health\nrecord system. Blank when the facility is not linked to one."},"addressLine1":{"type":"boolean","description":"The primary delivery line: street number and street, or a PO Box. Null\nwhen not known."},"addressLine2":{"type":"boolean","description":"The secondary line, such as a suite, apartment, or floor, or a Puerto\nRico urbanization. Null when there is none."},"city":{"type":"boolean","description":"The city. Null when not known."},"state":{"type":"boolean","description":"The state, as written; usually the two-letter USPS code. Null when not\nknown."},"zip":{"type":"boolean","description":"The ZIP code, as written. Null when not known."}}},"DepartmentFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Unique identifier of the department."},"phone":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Telephone number for the department. Blank when none is on file."},"fax":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Fax number record requests are sent to. Blank when none is on file."},"email":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Email address record requests are sent to. Blank when none is on file."},"website":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Website for the department, such as its records-request page. Blank\nwhen none is on file."},"patientPortal":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Web address of the facility's patient portal. Recorded on the medical\nrecords department. Blank when no portal address is on file."},"formattedAddress":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Complete mailing address of the department on one line. Blank when no\naddress is on file."},"fee":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Fee the department charges to fulfil a records request, in US dollars.\nBlank when no fee is on file."},"attentionTo":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name or office to address a record request to, printed on the\nattention line of the request. Blank when none is on file."},"payableTo":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name a fee payment should be made payable to. Blank when none is on\nfile."},"requestMethod":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["Fax","Email","Mail","RoiPortal","EhrPortal","RoiApi","EhrApi","SitePortal","EmailReminder","HermesPortal","Call"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["Fax","Email","Mail","RoiPortal","EhrPortal","RoiApi","EhrApi","SitePortal","EmailReminder","HermesPortal","Call"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["Fax","Email","Mail","RoiPortal","EhrPortal","RoiApi","EhrApi","SitePortal","EmailReminder","HermesPortal","Call"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["Fax","Email","Mail","RoiPortal","EhrPortal","RoiApi","EhrApi","SitePortal","EmailReminder","HermesPortal","Call"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Channel the department accepts record requests through, such as fax,\nemail, mail or a portal. Blank when not yet known."},"roi":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the release-of-information company that fulfils record requests\nfor this department. Blank when none is on file or when it is withheld\nfrom the viewer."},"roiId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Projection-only identifier derived from the current ROI roster link."},"ehr":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the electronic health record system the department uses. Blank\nwhen not known."},"ehrId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of this department's facility in its electronic health\nrecord system. Blank when the facility is not linked to one."},"addressLine1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The primary delivery line: street number and street, or a PO Box. Null\nwhen not known."},"addressLine2":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The secondary line, such as a suite, apartment, or floor, or a Puerto\nRico urbanization. Null when there is none."},"city":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The city. Null when not known."},"state":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The state, as written; usually the two-letter USPS code. Null when not\nknown."},"zip":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The ZIP code, as written. Null when not known."}}},"DepartmentNumericAggregates":{"type":"object","properties":{"fee":{"type":["string","null"],"description":"Fee the department charges to fulfil a records request, in US dollars.\nBlank when no fee is on file."}}},"DepartmentNumericFields":{"type":"object","properties":{"fee":{"type":"boolean","description":"Fee the department charges to fulfil a records request, in US dollars.\nBlank when no fee is on file.","default":false}},"additionalProperties":false},"DepartmentSelected":{"allOf":[{"$ref":"#/components/schemas/UsAddressFormFlattenSelected"},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Unique identifier of the department."},"phone":{"type":["string","null"],"description":"Telephone number for the department. Blank when none is on file."},"fax":{"type":["string","null"],"description":"Fax number record requests are sent to. Blank when none is on file."},"email":{"type":["string","null"],"description":"Email address record requests are sent to. Blank when none is on file."},"website":{"type":["string","null"],"description":"Website for the department, such as its records-request page. Blank\nwhen none is on file."},"patientPortal":{"type":["string","null"],"description":"Web address of the facility's patient portal. Recorded on the medical\nrecords department. Blank when no portal address is on file."},"formattedAddress":{"type":["string","null"],"description":"Complete mailing address of the department on one line. Blank when no\naddress is on file."},"fee":{"type":["string","null"],"description":"Fee the department charges to fulfil a records request, in US dollars.\nBlank when no fee is on file."},"attentionTo":{"type":["string","null"],"description":"Name or office to address a record request to, printed on the\nattention line of the request. Blank when none is on file."},"payableTo":{"type":["string","null"],"description":"Name a fee payment should be made payable to. Blank when none is on\nfile."},"requestMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"Channel the department accepts record requests through, such as fax,\nemail, mail or a portal. Blank when not yet known."}]},"roi":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RoiVendor","description":"Name of the release-of-information company that fulfils record requests\nfor this department. Blank when none is on file or when it is withheld\nfrom the viewer."}]},"roiId":{"type":["string","null"],"description":"Projection-only identifier derived from the current ROI roster link."},"ehr":{"type":["string","null"],"description":"Name of the electronic health record system the department uses. Blank\nwhen not known."},"ehrId":{"type":["string","null"],"description":"Identifier of this department's facility in its electronic health\nrecord system. Blank when the facility is not linked to one."}}}]},"DepartmentSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier of the department.","enum":["asc","desc"]}}},{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","description":"Telephone number for the department. Blank when none is on file.","enum":["asc","desc"]}}},{"type":"object","required":["fax"],"properties":{"fax":{"type":"string","description":"Fax number record requests are sent to. Blank when none is on file.","enum":["asc","desc"]}}},{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Email address record requests are sent to. Blank when none is on file.","enum":["asc","desc"]}}},{"type":"object","required":["website"],"properties":{"website":{"type":"string","description":"Website for the department, such as its records-request page. Blank\nwhen none is on file.","enum":["asc","desc"]}}},{"type":"object","required":["patientPortal"],"properties":{"patientPortal":{"type":"string","description":"Web address of the facility's patient portal. Recorded on the medical\nrecords department. Blank when no portal address is on file.","enum":["asc","desc"]}}},{"type":"object","required":["formattedAddress"],"properties":{"formattedAddress":{"type":"string","description":"Complete mailing address of the department on one line. Blank when no\naddress is on file.","enum":["asc","desc"]}}},{"type":"object","required":["fee"],"properties":{"fee":{"type":"string","description":"Fee the department charges to fulfil a records request, in US dollars.\nBlank when no fee is on file.","enum":["asc","desc"]}}},{"type":"object","required":["attentionTo"],"properties":{"attentionTo":{"type":"string","description":"Name or office to address a record request to, printed on the\nattention line of the request. Blank when none is on file.","enum":["asc","desc"]}}},{"type":"object","required":["payableTo"],"properties":{"payableTo":{"type":"string","description":"Name a fee payment should be made payable to. Blank when none is on\nfile.","enum":["asc","desc"]}}},{"type":"object","required":["requestMethod"],"properties":{"requestMethod":{"type":"string","description":"Channel the department accepts record requests through, such as fax,\nemail, mail or a portal. Blank when not yet known.","enum":["asc","desc"]}}},{"type":"object","required":["roi"],"properties":{"roi":{"type":"string","description":"Name of the release-of-information company that fulfils record requests\nfor this department. Blank when none is on file or when it is withheld\nfrom the viewer.","enum":["asc","desc"]}}},{"type":"object","required":["roiId"],"properties":{"roiId":{"type":"string","description":"Projection-only identifier derived from the current ROI roster link.","enum":["asc","desc"]}}},{"type":"object","required":["ehr"],"properties":{"ehr":{"type":"string","description":"Name of the electronic health record system the department uses. Blank\nwhen not known.","enum":["asc","desc"]}}},{"type":"object","required":["ehrId"],"properties":{"ehrId":{"type":"string","description":"Identifier of this department's facility in its electronic health\nrecord system. Blank when the facility is not linked to one.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine1"],"properties":{"addressLine1":{"type":"string","description":"The primary delivery line: street number and street, or a PO Box. Null\nwhen not known.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine2"],"properties":{"addressLine2":{"type":"string","description":"The secondary line, such as a suite, apartment, or floor, or a Puerto\nRico urbanization. Null when there is none.","enum":["asc","desc"]}}},{"type":"object","required":["city"],"properties":{"city":{"type":"string","description":"The city. Null when not known.","enum":["asc","desc"]}}},{"type":"object","required":["state"],"properties":{"state":{"type":"string","description":"The state, as written; usually the two-letter USPS code. Null when not\nknown.","enum":["asc","desc"]}}},{"type":"object","required":["zip"],"properties":{"zip":{"type":"string","description":"The ZIP code, as written. Null when not known.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"DiagnosisAggregateDataFlattenSelected":{"type":"object","properties":{"procedureCount":{"type":["integer","null"],"format":"int64","description":"Number of procedure records linked to the diagnosis."}}},"DiagnosisAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"DiagnosisAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"DiagnosisBrowseAggregate":{"type":"object","properties":{"diagnosis":{"$ref":"#/components/schemas/DiagnosisAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"visit":{"$ref":"#/components/schemas/VisitJoinAggregates"},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinAggregates"},"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeJoinAggregates"},"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryJoinAggregates"}}},"DiagnosisBrowseAggregateRequest":{"type":"object","properties":{"diagnosis":{"$ref":"#/components/schemas/DiagnosisAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"visit":{"$ref":"#/components/schemas/VisitJoinAggregatesRequest"},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinAggregatesRequest"},"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeJoinAggregatesRequest"},"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryJoinAggregatesRequest"}}},"DiagnosisBrowseFilter":{"type":"object","properties":{"diagnosis":{"$ref":"#/components/schemas/DiagnosisFilter","description":"Filters on the diagnosis's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"visit":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/VisitJoinFilter"}],"description":"Filters on the joined visit's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a visit."},"labAccession":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/LabAccessionJoinFilter"}],"description":"Filters on the joined lab accession's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a lab accession."},"diagnosisCode":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DiagnosisCodeJoinFilter"}],"description":"Filters on the joined diagnosis code's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a diagnosis code."},"diagnosisCategory":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DiagnosisCategoryJoinFilter"}],"description":"Filters on the joined diagnosis category's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a diagnosis category."}}},"DiagnosisBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/DiagnosisBrowseSelect"},"where":{"$ref":"#/components/schemas/DiagnosisBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/DiagnosisBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosisBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"DiagnosisBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosisBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/DiagnosisBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"DiagnosisBrowseRow":{"type":"object","properties":{"diagnosis":{"$ref":"#/components/schemas/DiagnosisSelected","description":"The diagnosis's columns, as selected by the request."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"visit":{"$ref":"#/components/schemas/VisitJoinSelected","description":"The joined visit's columns, as selected by the request. Absent when the row has no visit."},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinSelected","description":"The joined lab accession's columns, as selected by the request. Absent when the row has no lab accession."},"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeJoinSelected","description":"The joined diagnosis code's columns, as selected by the request. Absent when the row has no diagnosis code."},"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryJoinSelected","description":"The joined diagnosis category's columns, as selected by the request. Absent when the row has no diagnosis category."}}},"DiagnosisBrowseSelect":{"type":"object","properties":{"diagnosis":{"$ref":"#/components/schemas/DiagnosisFields","description":"Which of the diagnosis's columns to return."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"visit":{"$ref":"#/components/schemas/VisitJoinFields","description":"Which of the joined visit's columns to return. Absent when the row has no visit."},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinFields","description":"Which of the joined lab accession's columns to return. Absent when the row has no lab accession."},"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeJoinFields","description":"Which of the joined diagnosis code's columns to return. Absent when the row has no diagnosis code."},"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryJoinFields","description":"Which of the joined diagnosis category's columns to return. Absent when the row has no diagnosis category."}}},"DiagnosisBrowseSort":{"oneOf":[{"type":"object","required":["diagnosis"],"properties":{"diagnosis":{"$ref":"#/components/schemas/DiagnosisSort","description":"Sorts on one of the diagnosis's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["visit"],"properties":{"visit":{"$ref":"#/components/schemas/VisitJoinSort","description":"Sorts on one of the joined visit's columns."}}},{"type":"object","required":["labAccession"],"properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinSort","description":"Sorts on one of the joined lab accession's columns."}}},{"type":"object","required":["diagnosisCode"],"properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeSort","description":"Sorts on one of the joined diagnosis code's columns."}}},{"type":"object","required":["diagnosisCategory"],"properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategorySort","description":"Sorts on one of the joined diagnosis category's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"DiagnosisCategoryAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"DiagnosisCategoryAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCategoryNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"DiagnosisCategoryBrowseAggregate":{"type":"object","properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryAggregates"}}},"DiagnosisCategoryBrowseAggregateRequest":{"type":"object","properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryAggregatesRequest"}}},"DiagnosisCategoryBrowseFilter":{"type":"object","properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryFilter","description":"Filters on the diagnosis category's columns."}}},"DiagnosisCategoryBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseSelect"},"where":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"DiagnosisCategoryBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/DiagnosisCategoryBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"DiagnosisCategoryBrowseRow":{"type":"object","properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategorySelected","description":"The diagnosis category's columns, as selected by the request."}}},"DiagnosisCategoryBrowseSelect":{"type":"object","properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategoryFields","description":"Which of the diagnosis category's columns to return."}}},"DiagnosisCategoryBrowseSort":{"oneOf":[{"type":"object","required":["diagnosisCategory"],"properties":{"diagnosisCategory":{"$ref":"#/components/schemas/DiagnosisCategorySort","description":"Sorts on one of the diagnosis category's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"DiagnosisCategoryFields":{"type":"object","properties":{"id":{"type":"boolean","description":"ICD-10 category code resolved from the diagnosis."},"description":{"type":"boolean","description":"Description of the ICD-10 category associated with the diagnosis."}}},"DiagnosisCategoryFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ICD-10 category code resolved from the diagnosis."},"description":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Description of the ICD-10 category associated with the diagnosis."}}},"DiagnosisCategoryJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCategoryAggregates"},{"type":"object"}]},"DiagnosisCategoryJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCategoryAggregatesRequest"},{"type":"object"}]},"DiagnosisCategoryJoinFields":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCategoryFields"},{"type":"object"}]},"DiagnosisCategoryJoinFilter":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCategoryFilter"},{"type":"object"}]},"DiagnosisCategoryJoinSelected":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCategorySelected"},{"type":"object"}]},"DiagnosisCategoryNumericAggregates":{"type":"object"},"DiagnosisCategoryNumericFields":{"type":"object","additionalProperties":false},"DiagnosisCategorySelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"ICD-10 category code resolved from the diagnosis."},"description":{"type":["string","null"],"description":"Description of the ICD-10 category associated with the diagnosis."}}},"DiagnosisCategorySort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"ICD-10 category code resolved from the diagnosis.","enum":["asc","desc"]}}},{"type":"object","required":["description"],"properties":{"description":{"type":"string","description":"Description of the ICD-10 category associated with the diagnosis.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"DiagnosisCodeAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"DiagnosisCodeAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DiagnosisCodeNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"DiagnosisCodeBrowseAggregate":{"type":"object","properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeAggregates"}}},"DiagnosisCodeBrowseAggregateRequest":{"type":"object","properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeAggregatesRequest"}}},"DiagnosisCodeBrowseFilter":{"type":"object","properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeFilter","description":"Filters on the diagnosis code's columns."}}},"DiagnosisCodeBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/DiagnosisCodeBrowseSelect"},"where":{"$ref":"#/components/schemas/DiagnosisCodeBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/DiagnosisCodeBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosisCodeBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"DiagnosisCodeBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/DiagnosisCodeBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/DiagnosisCodeBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"DiagnosisCodeBrowseRow":{"type":"object","properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeSelected","description":"The diagnosis code's columns, as selected by the request."}}},"DiagnosisCodeBrowseSelect":{"type":"object","properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeFields","description":"Which of the diagnosis code's columns to return."}}},"DiagnosisCodeBrowseSort":{"oneOf":[{"type":"object","required":["diagnosisCode"],"properties":{"diagnosisCode":{"$ref":"#/components/schemas/DiagnosisCodeSort","description":"Sorts on one of the diagnosis code's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"DiagnosisCodeFields":{"type":"object","properties":{"id":{"type":"boolean","description":"ICD-10-CM diagnosis code, written without the dot (for example E119)."},"diagnosisCategoryId":{"type":"boolean","description":"ICD-10-CM category code the diagnosis code falls under: the longest\ncategory code that prefixes it (for example E11). May be empty when no\nmatching category is available."},"shortDescription":{"type":"boolean","description":"Short diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists."},"longDescription":{"type":"boolean","description":"Full diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists."}}},"DiagnosisCodeFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ICD-10-CM diagnosis code, written without the dot (for example E119)."},"diagnosisCategoryId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ICD-10-CM category code the diagnosis code falls under: the longest\ncategory code that prefixes it (for example E11). May be empty when no\nmatching category is available."},"shortDescription":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Short diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists."},"longDescription":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Full diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists."}}},"DiagnosisCodeJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCodeAggregates"},{"type":"object"}]},"DiagnosisCodeJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCodeAggregatesRequest"},{"type":"object"}]},"DiagnosisCodeJoinFields":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCodeFields"},{"type":"object"}]},"DiagnosisCodeJoinFilter":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCodeFilter"},{"type":"object"}]},"DiagnosisCodeJoinSelected":{"allOf":[{"$ref":"#/components/schemas/DiagnosisCodeSelected"},{"type":"object"}]},"DiagnosisCodeNumericAggregates":{"type":"object"},"DiagnosisCodeNumericFields":{"type":"object","additionalProperties":false},"DiagnosisCodeSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"ICD-10-CM diagnosis code, written without the dot (for example E119)."},"diagnosisCategoryId":{"type":["string","null"],"description":"ICD-10-CM category code the diagnosis code falls under: the longest\ncategory code that prefixes it (for example E11). May be empty when no\nmatching category is available."},"shortDescription":{"type":["string","null"],"description":"Short diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists."},"longDescription":{"type":["string","null"],"description":"Full diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists."}}},"DiagnosisCodeSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"ICD-10-CM diagnosis code, written without the dot (for example E119).","enum":["asc","desc"]}}},{"type":"object","required":["diagnosisCategoryId"],"properties":{"diagnosisCategoryId":{"type":"string","description":"ICD-10-CM category code the diagnosis code falls under: the longest\ncategory code that prefixes it (for example E11). May be empty when no\nmatching category is available.","enum":["asc","desc"]}}},{"type":"object","required":["shortDescription"],"properties":{"shortDescription":{"type":"string","description":"Short diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists.","enum":["asc","desc"]}}},{"type":"object","required":["longDescription"],"properties":{"longDescription":{"type":"string","description":"Full diagnosis description resolved from the diagnosis-code reference\ndata, when a match exists.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"DiagnosisFields":{"type":"object","properties":{"ref":{"type":"boolean","description":"Reference for the diagnosis record in the current output. It can change\nwhen clinical data is reprocessed."},"sequence":{"type":"boolean","description":"Sequence number of the diagnosis within its visit, claim, or lab\naccession. Sequence alone does not establish clinical priority."},"createdAt":{"type":"boolean","description":"Timestamp associated with the diagnosis data in the platform. For\ndiagnoses derived from a merged visit, this is the newest contributing\nvisit-data timestamp."},"dataSources":{"type":"boolean"},"codeSystem":{"type":"boolean","description":"Code system reported by the source for the diagnosis, when supplied.\nCurrently populated for some lab-accession diagnoses."},"description":{"type":"boolean","description":"Diagnosis description supplied by the source, when available. Separate\nfrom the reference-data short and long descriptions."},"score":{"type":"boolean","description":"Source-supplied score associated with the diagnosis, when available. The\nexport does not define a universal scoring scale."},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"boolean","description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"boolean","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":"boolean","description":"Reference to the parent visit. Blank for a diagnosis attached directly\nto a lab accession. This reference can change when the data is\nreprocessed."},"labAccessionRef":{"type":"boolean","description":"Platform reference to the parent lab accession. Blank for a diagnosis\nattached to a visit. This is different from the source accession\nidentifier."},"diagnosisCodeId":{"type":"boolean","description":"Diagnosis code associated with the record. Reference-data descriptions\nare provided when a matching code is available."},"diagnosisCategoryId":{"type":"boolean","description":"Derived ICD-10 category code associated with the diagnosis. May be empty\nwhen no matching category is available."},"procedureCount":{"type":"boolean","description":"Number of procedure records linked to the diagnosis."}}},"DiagnosisFilter":{"type":"object","properties":{"ref":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference for the diagnosis record in the current output. It can change\nwhen clinical data is reprocessed."},"sequence":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Sequence number of the diagnosis within its visit, claim, or lab\naccession. Sequence alone does not establish clinical priority."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp associated with the diagnosis data in the platform. For\ndiagnoses derived from a merged visit, this is the newest contributing\nvisit-data timestamp."},"dataSources":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"codeSystem":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Code system reported by the source for the diagnosis, when supplied.\nCurrently populated for some lab-accession diagnoses."},"description":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Diagnosis description supplied by the source, when available. Separate\nfrom the reference-data short and long descriptions."},"score":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-supplied score associated with the diagnosis, when available. The\nexport does not define a universal scoring scale."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference to the parent visit. Blank for a diagnosis attached directly\nto a lab accession. This reference can change when the data is\nreprocessed."},"labAccessionRef":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform reference to the parent lab accession. Blank for a diagnosis\nattached to a visit. This is different from the source accession\nidentifier."},"diagnosisCodeId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Diagnosis code associated with the record. Reference-data descriptions\nare provided when a matching code is available."},"diagnosisCategoryId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Derived ICD-10 category code associated with the diagnosis. May be empty\nwhen no matching category is available."},"procedureCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of procedure records linked to the diagnosis."}}},"DiagnosisNumericAggregates":{"type":"object","properties":{"sequence":{"type":["string","null"],"description":"Sequence number of the diagnosis within its visit, claim, or lab\naccession. Sequence alone does not establish clinical priority."},"score":{"type":["string","null"],"description":"Source-supplied score associated with the diagnosis, when available. The\nexport does not define a universal scoring scale."},"companyId":{"type":["string","null"],"description":"Platform identifier for the customer organization associated with the\nrecord."}}},"DiagnosisNumericFields":{"type":"object","properties":{"sequence":{"type":"boolean","description":"Sequence number of the diagnosis within its visit, claim, or lab\naccession. Sequence alone does not establish clinical priority.","default":false},"score":{"type":"boolean","description":"Source-supplied score associated with the diagnosis, when available. The\nexport does not define a universal scoring scale.","default":false},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord.","default":false}},"additionalProperties":false},"DiagnosisSelected":{"allOf":[{"$ref":"#/components/schemas/DiagnosisAggregateDataFlattenSelected"},{"type":"object","properties":{"ref":{"type":["string","null"],"description":"Reference for the diagnosis record in the current output. It can change\nwhen clinical data is reprocessed."},"id":{"type":["string","null"],"description":"Legacy alias of `ref`; prefer `ref`.","deprecated":true},"sequence":{"type":["integer","null"],"format":"int32","description":"Sequence number of the diagnosis within its visit, claim, or lab\naccession. Sequence alone does not establish clinical priority."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp associated with the diagnosis data in the platform. For\ndiagnoses derived from a merged visit, this is the newest contributing\nvisit-data timestamp."},"dataSources":{"type":["array","null"],"items":{"type":"string"}},"codeSystem":{"type":["string","null"],"description":"Code system reported by the source for the diagnosis, when supplied.\nCurrently populated for some lab-accession diagnoses."},"description":{"type":["string","null"],"description":"Diagnosis description supplied by the source, when available. Separate\nfrom the reference-data short and long descriptions."},"score":{"type":["integer","null"],"format":"int32","description":"Source-supplied score associated with the diagnosis, when available. The\nexport does not define a universal scoring scale."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Platform identifier for the customer organization associated with the\nrecord."}]},"projectId":{"type":["string","null"],"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":["string","null"],"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":["string","null"],"description":"Reference to the parent visit. Blank for a diagnosis attached directly\nto a lab accession. This reference can change when the data is\nreprocessed."},"visitId":{"type":["string","null"],"description":"Legacy alias of `visitRef`; prefer `visitRef`.","deprecated":true},"labAccessionRef":{"type":["string","null"],"description":"Platform reference to the parent lab accession. Blank for a diagnosis\nattached to a visit. This is different from the source accession\nidentifier."},"labAccessionId":{"type":["string","null"],"description":"Legacy alias of `labAccessionRef`; prefer `labAccessionRef`.","deprecated":true},"diagnosisCodeId":{"type":["string","null"],"description":"Diagnosis code associated with the record. Reference-data descriptions\nare provided when a matching code is available."},"diagnosisCategoryId":{"type":["string","null"],"description":"Derived ICD-10 category code associated with the diagnosis. May be empty\nwhen no matching category is available."}}}]},"DiagnosisSort":{"oneOf":[{"type":"object","required":["ref"],"properties":{"ref":{"type":"string","description":"Reference for the diagnosis record in the current output. It can change\nwhen clinical data is reprocessed.","enum":["asc","desc"]}}},{"type":"object","required":["sequence"],"properties":{"sequence":{"type":"string","description":"Sequence number of the diagnosis within its visit, claim, or lab\naccession. Sequence alone does not establish clinical priority.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp associated with the diagnosis data in the platform. For\ndiagnoses derived from a merged visit, this is the newest contributing\nvisit-data timestamp.","enum":["asc","desc"]}}},{"type":"object","required":["codeSystem"],"properties":{"codeSystem":{"type":"string","description":"Code system reported by the source for the diagnosis, when supplied.\nCurrently populated for some lab-accession diagnoses.","enum":["asc","desc"]}}},{"type":"object","required":["description"],"properties":{"description":{"type":"string","description":"Diagnosis description supplied by the source, when available. Separate\nfrom the reference-data short and long descriptions.","enum":["asc","desc"]}}},{"type":"object","required":["score"],"properties":{"score":{"type":"string","description":"Source-supplied score associated with the diagnosis, when available. The\nexport does not define a universal scoring scale.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Platform identifier for the customer organization associated with the\nrecord.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Platform identifier for the project containing the patient and record.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope.","enum":["asc","desc"]}}},{"type":"object","required":["visitRef"],"properties":{"visitRef":{"type":"string","description":"Reference to the parent visit. Blank for a diagnosis attached directly\nto a lab accession. This reference can change when the data is\nreprocessed.","enum":["asc","desc"]}}},{"type":"object","required":["labAccessionRef"],"properties":{"labAccessionRef":{"type":"string","description":"Platform reference to the parent lab accession. Blank for a diagnosis\nattached to a visit. This is different from the source accession\nidentifier.","enum":["asc","desc"]}}},{"type":"object","required":["diagnosisCodeId"],"properties":{"diagnosisCodeId":{"type":"string","description":"Diagnosis code associated with the record. Reference-data descriptions\nare provided when a matching code is available.","enum":["asc","desc"]}}},{"type":"object","required":["diagnosisCategoryId"],"properties":{"diagnosisCategoryId":{"type":"string","description":"Derived ICD-10 category code associated with the diagnosis. May be empty\nwhen no matching category is available.","enum":["asc","desc"]}}},{"type":"object","required":["procedureCount"],"properties":{"procedureCount":{"type":"string","description":"Number of procedure records linked to the diagnosis.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"DisclosingEntity":{"oneOf":[{"type":"object","required":["text","kind"],"properties":{"text":{"$ref":"#/components/schemas/ExpectedText"},"kind":{"type":"string","enum":["Broad"]}}},{"type":"object","required":["text","kind"],"properties":{"text":{"$ref":"#/components/schemas/ExpectedText"},"kind":{"type":"string","enum":["Facility"]}}}],"description":"The entity the form authorizes to disclose records, classified by what the\nform grants: `Broad` when the grant covers a class of record holders (\"any\nand all healthcare providers\"), `Facility` when it names one specific\nfacility or organization. The text carries a short description of the class\n(Broad) or the entity's name as written (Facility)."},"DriversLicenseDoc":{"type":"object","properties":{"holderName":{"type":["string","null"],"description":"The name of the license holder"},"dateOfBirth":{"type":["string","null"],"format":"date","description":"The date of birth on the license"},"licenseNumber":{"type":["string","null"],"description":"The driver's license number"},"stateOfIssuance":{"type":["string","null"],"description":"The state that issued the license"},"expirationDate":{"type":["string","null"],"format":"date","description":"The expiration date of the license"},"address":{"type":["string","null"],"description":"The address on the license"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"DrugAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"DrugAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DrugNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"DrugFields":{"type":"object","properties":{"ndc":{"type":"boolean","description":"11-digit normalized NDC (5-4-2 format, no dashes)."},"rxCui":{"type":"boolean","description":"RxNorm concept unique identifier (RxCUI) for the drug, the stable\nidentifier shared by every NDC of the same drug. Blank when no RxCUI is\nknown for the NDC."},"name":{"type":"boolean","description":"RxNorm name of the drug, typically including ingredient, strength and\ndose form."},"doseForm":{"type":"boolean","description":"Dose form (e.g. \"Tablet\", \"Solution\")."},"ingredient":{"type":"boolean","description":"Active ingredient(s) — comma-joined for display."},"therapeuticClass":{"type":"boolean","description":"First-level therapeutic class for filtering / aggregation. Empty\nwhen the RxNorm snapshot doesn't carry a class for the RxCUI."},"strength":{"type":"boolean","description":"Canonical RxNorm strength, distinct from the source fill's strength."},"suppress":{"type":"boolean","description":"RxNorm suppression flag. Suppressed rows remain available so historical\nand obsolete NDCs continue to resolve."}}},"DrugFilter":{"type":"object","properties":{"ndc":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"11-digit normalized NDC (5-4-2 format, no dashes)."},"rxCui":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"RxNorm concept unique identifier (RxCUI) for the drug, the stable\nidentifier shared by every NDC of the same drug. Blank when no RxCUI is\nknown for the NDC."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"RxNorm name of the drug, typically including ingredient, strength and\ndose form."},"doseForm":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Dose form (e.g. \"Tablet\", \"Solution\")."},"ingredient":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Active ingredient(s) — comma-joined for display."},"therapeuticClass":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First-level therapeutic class for filtering / aggregation. Empty\nwhen the RxNorm snapshot doesn't carry a class for the RxCUI."},"strength":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Canonical RxNorm strength, distinct from the source fill's strength."},"suppress":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"RxNorm suppression flag. Suppressed rows remain available so historical\nand obsolete NDCs continue to resolve."}}},"DrugJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/DrugAggregates"},{"type":"object"}]},"DrugJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/DrugAggregatesRequest"},{"type":"object"}]},"DrugJoinFields":{"allOf":[{"$ref":"#/components/schemas/DrugFields"},{"type":"object"}]},"DrugJoinFilter":{"allOf":[{"$ref":"#/components/schemas/DrugFilter"},{"type":"object"}]},"DrugJoinSelected":{"allOf":[{"$ref":"#/components/schemas/DrugSelected"},{"type":"object"}]},"DrugNumericAggregates":{"type":"object"},"DrugNumericFields":{"type":"object","additionalProperties":false},"DrugSelected":{"type":"object","properties":{"ndc":{"type":["string","null"],"description":"11-digit normalized NDC (5-4-2 format, no dashes)."},"rxCui":{"type":["string","null"],"description":"RxNorm concept unique identifier (RxCUI) for the drug, the stable\nidentifier shared by every NDC of the same drug. Blank when no RxCUI is\nknown for the NDC."},"name":{"type":["string","null"],"description":"RxNorm name of the drug, typically including ingredient, strength and\ndose form."},"doseForm":{"type":["string","null"],"description":"Dose form (e.g. \"Tablet\", \"Solution\")."},"ingredient":{"type":["string","null"],"description":"Active ingredient(s) — comma-joined for display."},"therapeuticClass":{"type":["string","null"],"description":"First-level therapeutic class for filtering / aggregation. Empty\nwhen the RxNorm snapshot doesn't carry a class for the RxCUI."},"strength":{"type":["string","null"],"description":"Canonical RxNorm strength, distinct from the source fill's strength."},"suppress":{"type":["string","null"],"description":"RxNorm suppression flag. Suppressed rows remain available so historical\nand obsolete NDCs continue to resolve."}}},"DrugSort":{"oneOf":[{"type":"object","required":["ndc"],"properties":{"ndc":{"type":"string","description":"11-digit normalized NDC (5-4-2 format, no dashes).","enum":["asc","desc"]}}},{"type":"object","required":["rxCui"],"properties":{"rxCui":{"type":"string","description":"RxNorm concept unique identifier (RxCUI) for the drug, the stable\nidentifier shared by every NDC of the same drug. Blank when no RxCUI is\nknown for the NDC.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"RxNorm name of the drug, typically including ingredient, strength and\ndose form.","enum":["asc","desc"]}}},{"type":"object","required":["doseForm"],"properties":{"doseForm":{"type":"string","description":"Dose form (e.g. \"Tablet\", \"Solution\").","enum":["asc","desc"]}}},{"type":"object","required":["ingredient"],"properties":{"ingredient":{"type":"string","description":"Active ingredient(s) — comma-joined for display.","enum":["asc","desc"]}}},{"type":"object","required":["therapeuticClass"],"properties":{"therapeuticClass":{"type":"string","description":"First-level therapeutic class for filtering / aggregation. Empty\nwhen the RxNorm snapshot doesn't carry a class for the RxCUI.","enum":["asc","desc"]}}},{"type":"object","required":["strength"],"properties":{"strength":{"type":"string","description":"Canonical RxNorm strength, distinct from the source fill's strength.","enum":["asc","desc"]}}},{"type":"object","required":["suppress"],"properties":{"suppress":{"type":"string","description":"RxNorm suppression flag. Suppressed rows remain available so historical\nand obsolete NDCs continue to resolve.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"E164PhoneNumber":{"type":"string","description":"A phone number, returned in E.164 form (+12025550142). Any common spelling is accepted on input, such as (202) 555-0142 or 202-555-0142; a number without a country code is read as a US number, and other countries need the + and their country code. A number that is not valid for its country is rejected.","examples":["+12025550142"]},"EhrStatus":{"type":"string","description":"The customer-facing EHR retrieval outcome for a record request.","enum":["FileReturned","RecordsDelivered","PatientLocated","NoRecordsInRange","NoRecordsReturned","ApprovalExpired","ManuallyRejected","ConsentNotOnFile","RequestRejected","RetrievalFailed","MultipleLocations","PatientNotLocated"]},"EmailStatus":{"type":"string","description":"Status of an email submission","enum":["success","failure"]},"EmbedOriginRequest":{"type":"object","description":"Optional request body for an embed token that communicates with or permits\nwrites from a parent page.","properties":{"parentOrigin":{"type":["string","null"],"description":"The origin of the page that will frame the embed, as\n`https://host[:port]` with no path, query, fragment, credentials or\nwildcard. It must be on the deployment's approved browser-origin\nallowlist, or the call fails with `400`. When supplied, only that exact\norigin may frame the embed, and any messages the embed posts to its\nparent go only to it.\n\nDeprecated when absent: omitting it still mints a token that any parent\npage may frame, but a later release will require it. Send it now.","example":"https://www.example.com"}}},"EmbedTokenResponse":{"type":"object","description":"Response returned by an embed-token minting endpoint.","required":["token"],"properties":{"token":{"type":"string","description":"The embed token: an opaque encrypted string to pass to the embed as its\n`token` query parameter. It grants access to what it was minted for\nuntil it expires, so mint a fresh one rather than storing it."}}},"ExpectedText":{"type":"string","description":"What the authorization check found on the form for this item, either quoted from the document or summarized from it. Absent, or blank, when it was not found."},"ExtractedAuthorization":{"type":"object","description":"LLM-extracted authorization form data — the *non-derived* half of the\nauth-check: the fields a model reads off the uploaded authorization form.\n\nThe pass/fail verdicts derived from this data are served separately, as\n`verdicts`.\n\nThis schema changes frequently as we expand document-type coverage, legal\nrequirements, and edge cases (additional document types, sensitive-info\nhandling, minor/deceased representative rules, etc.). Consumers that marshal\nthis payload themselves accept ongoing maintenance cost.\n\nFor any surface that displays auth-check results to end users, prefer the\niframe embed over consuming this schema directly — see\n[Embedding the auth-check UI](#embedding-the-auth-check-ui).","required":["authorizedRecipientInformation","authorizationExecution"],"properties":{"patientIdentity":{"$ref":"#/components/schemas/PatientIdentity","description":"Patient-identity fields extracted from the form"},"serviceDates":{"$ref":"#/components/schemas/ServiceDates","description":"Date range of service covered by the authorization"},"authorizationExpiration":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthorizationExpiration","description":"The authorization expiration (may be a date or an event description)"}]},"sensitiveInformationRequests":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SensitiveInformationRequests","description":"Sensitive information authorization requests extracted from the form"}]},"disclosingEntity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DisclosingEntity","description":"The entity the form authorizes to disclose PHI, classified by what the\nform grants (a broad class of record holders vs one named facility)"}]},"authorizedRecipientInformation":{"$ref":"#/components/schemas/AuthorizedRecipientInformation","description":"Company/firm information for the authorized recipient"},"authorizationExecution":{"$ref":"#/components/schemas/AuthorizationExecution","description":"Signature, date, and printed name from the authorization form"},"additionalDocuments":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AdditionalDocuments","description":"Additional supporting documents (POA, birth cert, death cert, etc.)\nattached to the authorization. Null or absent when none were found."}]},"readability":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible the main authorization form is to a human reviewer at a\nmedical facility (not whether a machine can read it)."}]},"phiDescription":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExpectedText","description":"Short summary, in the model's own words, of the categories of PHI /\nrecords to be disclosed — not a verbatim copy of the form's wording."}]},"purposeOfDisclosure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExpectedText","description":"Reason for disclosure (insurance, legal case, personal use, etc.)"}]},"authorizationPurpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthorizationPurpose","description":"The purpose of disclosure classified: `General` for an unrestricted,\nunstated, or multi-purpose grant, otherwise the one project purpose\nthe form names."}]},"potentialForRedisclosure":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExpectedText","description":"Short paraphrase of any redisclosure statement — not a verbatim copy of\nthe form's wording."}]},"conditioningNotice":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ConditioningNotice","description":"Conditioning-of-authorization notice per 45 CFR § 164.508(c)(2)(ii).\nEither a non-conditioning statement (treatment/payment/enrollment/eligibility\nwill NOT be conditioned on signing) or a consequence statement (signing IS\nrequired for a specific permitted purpose, with the consequence of refusing).\nNull when the form carries neither."}]},"authorizationType":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthorizationType","description":"Authorization type detected from the form itself (HIPAA standard\nrelease vs HITECH 45 CFR §164.524 patient direct-access). Null when\nthe document is ambiguous; the detection check warns rather than\nfails so the auditor can resolve manually."}]},"rightToRevoke":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RightToRevoke","description":"Right-to-revoke (statement + contact info)"}]}}},"Extraction":{"type":"object","description":"The result of processing an uploaded document: the fields common to every\nprocessed document (extracted text, page count) plus a `data` payload that\nvaries by document type.\n\n`data` holds either the extracted authorization form or a single supporting\ndocument split out of an authorization packet. `data` is absent when the\ndocument hasn't been analyzed (e.g. text-only processing, or a split-out\ndocument in which no supporting document was found).","properties":{"text":{"type":"string","description":"OCR-extracted text from all pages."},"numberOfPages":{"type":"integer","format":"u-int32","description":"Number of pages in the processed document.","minimum":0},"data":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ExtractionData","description":"The document-type-specific payload. Absent when the document hasn't\nbeen analyzed."}]}}},"ExtractionData":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/ExtractedAuthorization","description":"An uploaded HIPAA authorization form analyzed by the `auth-check` step."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["authorization"]}}}],"description":"An uploaded HIPAA authorization form analyzed by the `auth-check` step."},{"allOf":[{"$ref":"#/components/schemas/AdditionalDocument","description":"One supporting document carved out of an authorization packet by the\ndocument splitter and analyzed by its kind's own extraction module.\nWritten only on a carved child's sidecar; the read side folds these\nback into the assembled form's `additionalDocuments`."},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["supportingDocument"]}}}],"description":"One supporting document carved out of an authorization packet by the\ndocument splitter and analyzed by its kind's own extraction module.\nWritten only on a carved child's sidecar; the read side folds these\nback into the assembled form's `additionalDocuments`."}],"description":"The document-type-specific payload of a sidecar extraction. Internally\ntagged on `type` so the kind is explicit on disk (`\"authorization\"`); the\nvariant payload *is* the extracted data, sitting directly under `data`\nalongside the tag. Modeled as an enum so further document types can be added\nas variants without changing the `Extraction` envelope."},"FieldEvidence":{"type":"object","description":"Provenance for a single researched value, plus its human sign-off state.\n\n`sources` is the citation list the AI researcher emitted. `confirmedBy` is\nnull while the value is still system-authored (unconfirmed); confirming\nsets it to the confirming user's id and stamps `confirmedAt`, **keeping**\n`sources` so the provenance stays visible after sign-off.","properties":{"authored":{"type":"boolean","description":"Whether the backing value was explicitly authored by a user or the AI\nresearcher. Catalog ingestion and historical evidence serialized before\nthis marker was introduced default to `false`."},"sources":{"type":"array","items":{"$ref":"#/components/schemas/FieldSource"},"description":"Citations backing the value. Empty for manually-entered, ingested, or\npre-evidence-replayed values; `authored` distinguishes the first case."},"confirmedBy":{"type":["string","null"],"description":"User id that confirmed this researched value, or null while it is\nstill system-authored (unconfirmed)."},"confirmedAt":{"type":["string","null"],"format":"date-time","description":"When the value was confirmed."},"unverified":{"type":"boolean","description":"AI-authored value whose citation could not be kept: the researcher read\nit from a source we could not verify or store (a dead/blocked link, or a\nshort-lived search-grounding redirect). The value is retained rather than\ndiscarded, but flagged so the UI shows the AI badge with an \"unverified\"\nsource instead of a link. Distinct from `sources.is_empty()` alone, which\nmeans \"manually entered\"."}}},"FieldSource":{"type":"object","description":"A single piece of provenance backing a researched value: the page or\ndocument the value was read from, what kind of source it was, and an\noptional observed timestamp.","required":["sourceUrl","sourceType"],"properties":{"sourceUrl":{"type":"string","description":"Address of the page or document the value was read from.","example":"https://www.example.com/medical-records"},"sourceType":{"type":"string","description":"Kind of source, such as `webpage`, `pdf` or `web_search`. Free text,\nso other values may appear.","example":"webpage"},"extractedAt":{"type":["string","null"],"description":"Date or date-time observed on or for the source, as ISO 8601 text.\nNull when the source carried none.","example":"2026-01-15"}}},"FileInfo":{"type":"object","required":["url","fileName","key","size","lastModified"],"properties":{"url":{"type":"string","description":"Short-lived presigned URL to download the file.","example":"https://files.example.com/presigned/discharge-summary.pdf"},"fileName":{"type":"string","description":"The name a reader sees. For a record request's deliverables this is the\nunique name the shared presentation assigned (see `DeliverableView`), so\nit can differ from the object's own basename when two returns brought the\nsame file name; everywhere else it IS the basename.","example":"discharge-summary.pdf"},"key":{"type":"string","description":"The file's full storage path, `/`-separated.","example":"companies/115/projects/q7m2x9k4tb/patients/k3f9x2m7qa/record-requests/r8t2w6n4yc/deliverables/discharge-summary.pdf"},"folder":{"type":["string","null"],"description":"The display folder this file sits in, `/`-joined, relative to the listing\nroot. Populated only where a listing presents a tree — a record request's\ndeliverables — and omitted from the payload otherwise.","example":"Discharge Records"},"size":{"type":"integer","format":"u-int32","description":"The file's size in bytes.","example":248310,"minimum":0},"lastModified":{"type":"string","format":"date-time","description":"When the file was last written.","example":"2026-01-20T16:30:00Z"},"uploadedBy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliverableUploadedBy","description":"Who or what placed this file. Absent for older files recorded without\nattribution."}]}}},"FileListResponse":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"},"description":"The files stored at the listed location, each with its own short-lived\ndownload URL. Empty when there are none."}}},"FileResponse":{"type":"object","description":"Unified file response covering both read (downloadUrl, extraction, verdicts,\nloose files) and write (uploadUrl, uploadHeaders) halves. Fields are\npopulated based on the S3 helper invoked: `presigned_read` leaves the write\nfields empty, `presigned_write` leaves the read fields empty, and\n`presigned_read_write` populates both.","required":["uploadHeaders","expiresIn","looseFiles"],"properties":{"downloadUrl":{"type":["string","null"],"description":"Short-lived presigned URL to download the file. Null when no file is\nstored yet, or when this response only offers an upload.","example":"https://files.example.com/presigned/discharge-summary.pdf"},"uploadUrl":{"type":["string","null"],"description":"Short-lived presigned URL to upload the file: `PUT` the raw bytes to it\nexactly as issued, with no `Authorization` header. Uploading again\nreplaces the file. Null when this response only offers a download.","example":"https://files.example.com/presigned-upload/discharge-summary.pdf"},"uploadHeaders":{"type":"object","description":"Extra headers to send with the upload. Normally empty.","additionalProperties":{"type":"string"},"propertyNames":{"type":"string"}},"expiresIn":{"type":"integer","format":"u-int64","description":"How long the URLs in this object stay valid, in seconds from when they\nwere issued. Fetch a fresh object rather than caching one.","example":360,"minimum":0},"extraction":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Extraction","description":"The document's extraction (form data under `data`, plus text and page\ncount). Null for non-auth-check files."}]},"verdicts":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckVerdicts","description":"The auth-check verdicts derived from `extraction`. Null for\nnon-auth-check files or when the document hasn't been analyzed."}]},"verdictCounts":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthCheckVerdictCounts","description":"Tally of `verdicts` by status, a readability convenience for API\nconsumers. Null exactly when `verdicts` is null."}]},"embedToken":{"type":["string","null"],"description":"Standalone auth-check embed token, pre-minted on the upload path when the\ncaller supplies patient context alongside the request for an upload URL.\nEquivalent to the token from `POST /v0/auth-check/<filename>/embed-token`,\nsaving that round-trip. Null when no patient context was supplied.","example":"ZXhhbXBsZS1lbWJlZC10b2tlbg"},"looseFiles":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"},"description":"Other files stored under this file's location that are not part of its\nown document set, such as separately uploaded scans, each with its own\nshort-lived download URL. Empty when there are none or when this\nresponse only offers an upload."},"uploadedBy":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliverableUploadedBy","description":"Who or what placed this file. Absent when no attribution was recorded\nor when this endpoint does not report it."}]}}},"FoundSite":{"type":"object","required":["site","reason","distanceFeet","similarityScore"],"properties":{"site":{"$ref":"#/components/schemas/Site","description":"The matched site."},"reason":{"type":"string","description":"Human-readable explanation of why this site was judged a match.","example":"Identical address with highly correlated facility name"},"distanceFeet":{"type":"integer","format":"u-int32","description":"Straight-line distance in feet from the submitted address. 0 when the\nsite was matched by identifier or the distance is unknown.","example":420,"minimum":0},"similarityScore":{"type":"integer","format":"u-int32","description":"Match score from 0 to 100; 100 when the site was matched by\nidentifier.","example":92,"minimum":0},"compositeScore":{"type":["integer","null"],"format":"u-int32","description":"Score from 0 to 100 combining name similarity with proximity (name\nsimilarity alone when distance is unknown); null when not computed for\nthis match.","example":82,"minimum":0},"campus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CampusLabel","description":"The campus this site belongs to, when it is grouped with other sites\non one campus. Absent from site-finder job results."}]},"medicalDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's medical-records department; absent when it has none or the\ndepartments were not loaded."}]},"facilityBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's facility-billing department; absent when it has none or the\ndepartments were not loaded."}]},"physicianBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's physician-billing department; absent when it has none or the\ndepartments were not loaded."}]},"imagingBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's imaging-billing department; absent when it has none or the\ndepartments were not loaded."}]},"emergencyRoomBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's emergency-room billing department; absent when it has none\nor the departments were not loaded."}]},"anesthesiologyBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's anesthesiology billing department; absent when it has none\nor the departments were not loaded."}]},"imagingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's imaging-records department; absent when it has none or the\ndepartments were not loaded."}]}}},"GuardianshipPapersDoc":{"type":"object","required":["guardianNames","guardianshipType"],"properties":{"wardName":{"type":["string","null"],"description":"The name of the ward (protected person)"},"guardianNames":{"type":"array","items":{"type":"string"},"description":"The names of the guardians. Guardianship orders may appoint co-guardians."},"wardDateOfBirth":{"type":["string","null"],"format":"date","description":"The date of birth of the ward"},"guardianshipType":{"$ref":"#/components/schemas/GuardianshipType","description":"The type of guardianship"},"courtName":{"type":["string","null"],"description":"The name of the court on the guardianship papers"},"caseNumber":{"type":["string","null"],"description":"The number of the case on the guardianship papers"},"dateGranted":{"type":["string","null"],"format":"date","description":"The date the guardianship was granted"},"expirationDate":{"type":["string","null"],"format":"date","description":"The expiration date of the guardianship"},"hasGuardianSignature":{"type":"boolean","description":"Is the guardian's signature present?"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"GuardianshipType":{"type":"string","description":"The kind of guardianship the guardianship papers grant.\n\n- `Minor`: guardianship of a child under the age of majority.\n- `Adult`: guardianship of an adult the court found unable to manage their own affairs.\n- `Limited`: guardianship confined to the specific powers the order lists.\n- `Full`: guardianship with full authority over the ward.","enum":["Minor","Adult","Limited","Full"]},"LabAccessionAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"LabAccessionAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabAccessionNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"LabAccessionBrowseAggregate":{"type":"object","properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteJoinAggregates"}}},"LabAccessionBrowseAggregateRequest":{"type":"object","properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteJoinAggregatesRequest"}}},"LabAccessionBrowseFilter":{"type":"object","properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionFilter","description":"Filters on the lab accession's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"orderingPhysicianSite":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/SiteJoinFilter"}],"description":"Filters on the joined ordering physician site's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a ordering physician site."}}},"LabAccessionBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/LabAccessionBrowseSelect"},"where":{"$ref":"#/components/schemas/LabAccessionBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/LabAccessionBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/LabAccessionBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"LabAccessionBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/LabAccessionBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/LabAccessionBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"LabAccessionBrowseRow":{"type":"object","properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionSelected","description":"The lab accession's columns, as selected by the request."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteJoinSelected","description":"The joined ordering physician site's columns, as selected by the request. Absent when the row has no ordering physician site."}}},"LabAccessionBrowseSelect":{"type":"object","properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionFields","description":"Which of the lab accession's columns to return."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteJoinFields","description":"Which of the joined ordering physician site's columns to return. Absent when the row has no ordering physician site."}}},"LabAccessionBrowseSort":{"oneOf":[{"type":"object","required":["labAccession"],"properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionSort","description":"Sorts on one of the lab accession's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["orderingPhysicianSite"],"properties":{"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteJoinSort","description":"Sorts on one of the joined ordering physician site's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"LabAccessionFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Platform identifier for the lab accession: a group of lab results\nordered and reported together."},"sourceAccessionId":{"type":"boolean","description":"Accession identifier assigned by the source laboratory or data provider.\nMultiple test results can share an accession."},"testDate":{"type":"boolean","description":"Test date reported for the parent laboratory accession."},"orderingFacilityClinum":{"type":"boolean","description":"Source-reported client number of the facility that ordered the tests.\nBlank when none was supplied."},"orderingFacilityName":{"type":"boolean","description":"Name of the facility that ordered the tests. Blank when the source did\nnot identify one."},"annotation":{"type":"boolean","description":"Source-supplied comments about the accession as a whole. Multiple\ncomments are separated by line breaks. Blank when none were supplied."},"fcraDispute":{"type":"boolean","description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the accession. Blank means no flag was supplied."},"dataSource":{"type":"boolean"},"createdAt":{"type":"boolean","description":"Timestamp when the accession was recorded in the platform. This is\nseparate from the test date."},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\naccession."},"projectId":{"type":"boolean","description":"Platform identifier for the project containing the patient and\naccession."},"patientId":{"type":"boolean","description":"Platform identifier for the patient associated with the accession. Use\nwith the company and project identifiers to identify the patient scope."},"orderingPhysicianSiteId":{"type":"boolean","description":"Identifier of the site record for the physician who ordered the tests.\nBlank when the ordering physician could not be matched to a site."}}},"LabAccessionFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the lab accession: a group of lab results\nordered and reported together."},"sourceAccessionId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Accession identifier assigned by the source laboratory or data provider.\nMultiple test results can share an accession."},"testDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Test date reported for the parent laboratory accession."},"orderingFacilityClinum":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported client number of the facility that ordered the tests.\nBlank when none was supplied."},"orderingFacilityName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the facility that ordered the tests. Blank when the source did\nnot identify one."},"annotation":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-supplied comments about the accession as a whole. Multiple\ncomments are separated by line breaks. Blank when none were supplied."},"fcraDispute":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the accession. Blank means no flag was supplied."},"dataSource":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp when the accession was recorded in the platform. This is\nseparate from the test date."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the customer organization associated with the\naccession."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the project containing the patient and\naccession."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the patient associated with the accession. Use\nwith the company and project identifiers to identify the patient scope."},"orderingPhysicianSiteId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the site record for the physician who ordered the tests.\nBlank when the ordering physician could not be matched to a site."}}},"LabAccessionJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/LabAccessionAggregates"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregates"},"project":{"$ref":"#/components/schemas/ProjectAggregates"},"patient":{"$ref":"#/components/schemas/PatientAggregates"},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteAggregates"}}}]},"LabAccessionJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/LabAccessionAggregatesRequest"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientAggregatesRequest"},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteAggregatesRequest"}}}]},"LabAccessionJoinFields":{"allOf":[{"$ref":"#/components/schemas/LabAccessionFields"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteFields","description":"Which of the joined ordering physician site's columns to return. Absent when the row has no ordering physician site."}}}]},"LabAccessionJoinFilter":{"allOf":[{"$ref":"#/components/schemas/LabAccessionFilter"},{"type":"object","properties":{"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"orderingPhysicianSite":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/SiteFilter"}],"description":"Filters on the joined ordering physician site's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a ordering physician site."}}}]},"LabAccessionJoinSelected":{"allOf":[{"$ref":"#/components/schemas/LabAccessionSelected"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanySelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteSelected","description":"The joined ordering physician site's columns, as selected by the request. Absent when the row has no ordering physician site."}}}]},"LabAccessionJoinSort":{"oneOf":[{"$ref":"#/components/schemas/LabAccessionSort"},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["orderingPhysicianSite"],"properties":{"orderingPhysicianSite":{"$ref":"#/components/schemas/SiteSort","description":"Sorts on one of the joined ordering physician site's columns."}}}],"description":"Sort on one of this entity's columns, or on a column of an entity it joins to, keyed by that entity: a single column mapped to `asc` or `desc`."},"LabAccessionNumericAggregates":{"type":"object","properties":{"companyId":{"type":["string","null"],"description":"Platform identifier for the customer organization associated with the\naccession."}}},"LabAccessionNumericFields":{"type":"object","properties":{"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\naccession.","default":false}},"additionalProperties":false},"LabAccessionSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Platform identifier for the lab accession: a group of lab results\nordered and reported together."},"sourceAccessionId":{"type":["string","null"],"description":"Accession identifier assigned by the source laboratory or data provider.\nMultiple test results can share an accession."},"testDate":{"type":["string","null"],"format":"date","description":"Test date reported for the parent laboratory accession."},"orderingFacilityClinum":{"type":["string","null"],"description":"Source-reported client number of the facility that ordered the tests.\nBlank when none was supplied."},"orderingFacilityName":{"type":["string","null"],"description":"Name of the facility that ordered the tests. Blank when the source did\nnot identify one."},"annotation":{"type":["string","null"],"description":"Source-supplied comments about the accession as a whole. Multiple\ncomments are separated by line breaks. Blank when none were supplied."},"fcraDispute":{"type":["boolean","null"],"description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the accession. Blank means no flag was supplied."},"dataSource":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the accession was recorded in the platform. This is\nseparate from the test date."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Platform identifier for the customer organization associated with the\naccession."}]},"projectId":{"type":["string","null"],"description":"Platform identifier for the project containing the patient and\naccession."},"patientId":{"type":["string","null"],"description":"Platform identifier for the patient associated with the accession. Use\nwith the company and project identifiers to identify the patient scope."},"orderingPhysicianSiteId":{"type":["string","null"],"description":"Identifier of the site record for the physician who ordered the tests.\nBlank when the ordering physician could not be matched to a site."}}},"LabAccessionSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Platform identifier for the lab accession: a group of lab results\nordered and reported together.","enum":["asc","desc"]}}},{"type":"object","required":["sourceAccessionId"],"properties":{"sourceAccessionId":{"type":"string","description":"Accession identifier assigned by the source laboratory or data provider.\nMultiple test results can share an accession.","enum":["asc","desc"]}}},{"type":"object","required":["testDate"],"properties":{"testDate":{"type":"string","description":"Test date reported for the parent laboratory accession.","enum":["asc","desc"]}}},{"type":"object","required":["orderingFacilityClinum"],"properties":{"orderingFacilityClinum":{"type":"string","description":"Source-reported client number of the facility that ordered the tests.\nBlank when none was supplied.","enum":["asc","desc"]}}},{"type":"object","required":["orderingFacilityName"],"properties":{"orderingFacilityName":{"type":"string","description":"Name of the facility that ordered the tests. Blank when the source did\nnot identify one.","enum":["asc","desc"]}}},{"type":"object","required":["annotation"],"properties":{"annotation":{"type":"string","description":"Source-supplied comments about the accession as a whole. Multiple\ncomments are separated by line breaks. Blank when none were supplied.","enum":["asc","desc"]}}},{"type":"object","required":["fcraDispute"],"properties":{"fcraDispute":{"type":"string","description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the accession. Blank means no flag was supplied.","enum":["asc","desc"]}}},{"type":"object","required":["dataSource"],"properties":{"dataSource":{"type":"string","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp when the accession was recorded in the platform. This is\nseparate from the test date.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Platform identifier for the customer organization associated with the\naccession.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Platform identifier for the project containing the patient and\naccession.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Platform identifier for the patient associated with the accession. Use\nwith the company and project identifiers to identify the patient scope.","enum":["asc","desc"]}}},{"type":"object","required":["orderingPhysicianSiteId"],"properties":{"orderingPhysicianSiteId":{"type":"string","description":"Identifier of the site record for the physician who ordered the tests.\nBlank when the ordering physician could not be matched to a site.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"LabPerformingSiteKind":{"type":"string","description":"Distinguishes Clinical vs. Risk Assessment laboratories per ACORD\n`<LabTestRemark RemarkCode=\"PerformingSite\">` — `LAB_CLIN` vs.\n`LAB_RA`. The ACORD PerformingSite party itself carries only a\nFullName, so it can't be sited through our NPI-keyed pipeline; this\nenum is the per-row distinction we retain instead.","enum":["clinical","riskAssessment"]},"LabResultAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"LabResultAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"LabResultBrowseAggregate":{"type":"object","properties":{"labResult":{"$ref":"#/components/schemas/LabResultAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinAggregates"}}},"LabResultBrowseAggregateRequest":{"type":"object","properties":{"labResult":{"$ref":"#/components/schemas/LabResultAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinAggregatesRequest"}}},"LabResultBrowseFilter":{"type":"object","properties":{"labResult":{"$ref":"#/components/schemas/LabResultFilter","description":"Filters on the lab result's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"labAccession":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/LabAccessionJoinFilter"}],"description":"Filters on the joined lab accession's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a lab accession."}}},"LabResultBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/LabResultBrowseSelect"},"where":{"$ref":"#/components/schemas/LabResultBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/LabResultBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/LabResultBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"LabResultBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/LabResultBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/LabResultBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"LabResultBrowseRow":{"type":"object","properties":{"labResult":{"$ref":"#/components/schemas/LabResultSelected","description":"The lab result's columns, as selected by the request."},"loinc":{"$ref":"#/components/schemas/LoincJoinSelected","description":"The joined loinc's columns, as selected by the request. Absent when the row has no loinc."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinSelected","description":"The joined lab accession's columns, as selected by the request. Absent when the row has no lab accession."}}},"LabResultBrowseSelect":{"type":"object","properties":{"labResult":{"$ref":"#/components/schemas/LabResultFields","description":"Which of the lab result's columns to return."},"loinc":{"$ref":"#/components/schemas/LoincJoinFields","description":"Which of the joined loinc's columns to return. Absent when the row has no loinc."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinFields","description":"Which of the joined lab accession's columns to return. Absent when the row has no lab accession."}}},"LabResultBrowseSort":{"oneOf":[{"type":"object","required":["labResult"],"properties":{"labResult":{"$ref":"#/components/schemas/LabResultSort","description":"Sorts on one of the lab result's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["labAccession"],"properties":{"labAccession":{"$ref":"#/components/schemas/LabAccessionJoinSort","description":"Sorts on one of the joined lab accession's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"LabResultFields":{"type":"object","properties":{"ref":{"type":"boolean"},"testCode":{"type":"boolean","description":"Source test identifier or test name. This field is not guaranteed to be\na LOINC code."},"providerTestCode":{"type":"boolean","description":"Provider-supplied laboratory test code, commonly a LOINC code when\nsupplied by the source."},"batteryEventGroupName":{"type":"boolean","description":"Name of the laboratory panel or battery grouping the test result."},"batteryEventTestName":{"type":"boolean","description":"Source-reported name of the test within a laboratory panel or battery."},"interpretation":{"type":"boolean","description":"Source-reported interpretation flag. XLSX values are normal, high, low,\nabnormal, or other. The flag is supplied with the data rather than\nrecalculated from the reference range."},"performingSiteKind":{"type":"boolean","description":"Type of performing laboratory reported by the source. XLSX values are\nclinical or riskAssessment."},"qualitativeResult":{"type":"boolean","description":"Textual laboratory result, such as Positive, Negative, or Trace, when\nreported."},"quantitativeResult":{"type":"boolean","description":"Numeric laboratory result. Interpret together with unitsOfMeasure and\nthe source-provided reference range."},"unitsOfMeasure":{"type":"boolean","description":"Units associated with the numeric laboratory result, as reported by the\nsource."},"referenceMin":{"type":"boolean","description":"Lower bound of the source-reported reference range. Interpret using\nreferenceUnits. This XLSX field is separate from referenceMax."},"referenceMax":{"type":"boolean","description":"Upper bound of the source-reported reference range. Interpret using\nreferenceUnits."},"referenceUnits":{"type":"boolean","description":"Units associated with the source-reported reference range. These may\ndiffer from the result units."},"score":{"type":"boolean","description":"Source-supplied score associated with this lab result. No universal\nscoring scale is defined."},"annotation":{"type":"boolean","description":"Additional source-supplied comments about the lab result. Multiple\nannotations may be separated by line breaks."},"createdAt":{"type":"boolean","description":"Timestamp when the lab-result data was recorded in the platform. This is\nseparate from the accession test date."},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"boolean","description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"boolean","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"labAccessionId":{"type":"boolean"}}},"LabResultFilter":{"type":"object","properties":{"ref":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"testCode":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source test identifier or test name. This field is not guaranteed to be\na LOINC code."},"providerTestCode":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Provider-supplied laboratory test code, commonly a LOINC code when\nsupplied by the source."},"batteryEventGroupName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the laboratory panel or battery grouping the test result."},"batteryEventTestName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported name of the test within a laboratory panel or battery."},"interpretation":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["normal","high","low","abnormal","other"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["normal","high","low","abnormal","other"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["normal","high","low","abnormal","other"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["normal","high","low","abnormal","other"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported interpretation flag. XLSX values are normal, high, low,\nabnormal, or other. The flag is supplied with the data rather than\nrecalculated from the reference range."},"performingSiteKind":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["clinical","riskAssessment"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["clinical","riskAssessment"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["clinical","riskAssessment"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["clinical","riskAssessment"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Type of performing laboratory reported by the source. XLSX values are\nclinical or riskAssessment."},"qualitativeResult":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Textual laboratory result, such as Positive, Negative, or Trace, when\nreported."},"quantitativeResult":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Numeric laboratory result. Interpret together with unitsOfMeasure and\nthe source-provided reference range."},"unitsOfMeasure":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Units associated with the numeric laboratory result, as reported by the\nsource."},"referenceMin":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Lower bound of the source-reported reference range. Interpret using\nreferenceUnits. This XLSX field is separate from referenceMax."},"referenceMax":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Upper bound of the source-reported reference range. Interpret using\nreferenceUnits."},"referenceUnits":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Units associated with the source-reported reference range. These may\ndiffer from the result units."},"score":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-supplied score associated with this lab result. No universal\nscoring scale is defined."},"annotation":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Additional source-supplied comments about the lab result. Multiple\nannotations may be separated by line breaks."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp when the lab-result data was recorded in the platform. This is\nseparate from the accession test date."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"labAccessionId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}}}},"LabResultInterpretation":{"type":"string","description":"Qualitative interpretation flag from ACORD `<ValueCode tc=\"...\">`.\nDistinct from the quantitative numeric result and reference range —\npreserved verbatim so downstream consumers can apply their own logic\nwithout re-parsing the source XML.","enum":["normal","high","low","abnormal","other"]},"LabResultNumericAggregates":{"type":"object","properties":{"quantitativeResult":{"type":["string","null"],"description":"Numeric laboratory result. Interpret together with unitsOfMeasure and\nthe source-provided reference range."},"referenceMin":{"type":["string","null"],"description":"Lower bound of the source-reported reference range. Interpret using\nreferenceUnits. This XLSX field is separate from referenceMax."},"referenceMax":{"type":["string","null"],"description":"Upper bound of the source-reported reference range. Interpret using\nreferenceUnits."},"score":{"type":["string","null"],"description":"Source-supplied score associated with this lab result. No universal\nscoring scale is defined."},"companyId":{"type":["string","null"],"description":"Platform identifier for the customer organization associated with the\nrecord."}}},"LabResultNumericFields":{"type":"object","properties":{"quantitativeResult":{"type":"boolean","description":"Numeric laboratory result. Interpret together with unitsOfMeasure and\nthe source-provided reference range.","default":false},"referenceMin":{"type":"boolean","description":"Lower bound of the source-reported reference range. Interpret using\nreferenceUnits. This XLSX field is separate from referenceMax.","default":false},"referenceMax":{"type":"boolean","description":"Upper bound of the source-reported reference range. Interpret using\nreferenceUnits.","default":false},"score":{"type":"boolean","description":"Source-supplied score associated with this lab result. No universal\nscoring scale is defined.","default":false},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord.","default":false}},"additionalProperties":false},"LabResultSelected":{"type":"object","properties":{"ref":{"type":["string","null"]},"id":{"type":["string","null"],"description":"Legacy alias of `ref`; prefer `ref`.","deprecated":true},"testCode":{"type":["string","null"],"description":"Source test identifier or test name. This field is not guaranteed to be\na LOINC code."},"providerTestCode":{"type":["string","null"],"description":"Provider-supplied laboratory test code, commonly a LOINC code when\nsupplied by the source."},"batteryEventGroupName":{"type":["string","null"],"description":"Name of the laboratory panel or battery grouping the test result."},"batteryEventTestName":{"type":["string","null"],"description":"Source-reported name of the test within a laboratory panel or battery."},"interpretation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabResultInterpretation","description":"Source-reported interpretation flag. XLSX values are normal, high, low,\nabnormal, or other. The flag is supplied with the data rather than\nrecalculated from the reference range."}]},"performingSiteKind":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LabPerformingSiteKind","description":"Type of performing laboratory reported by the source. XLSX values are\nclinical or riskAssessment."}]},"qualitativeResult":{"type":["string","null"],"description":"Textual laboratory result, such as Positive, Negative, or Trace, when\nreported."},"quantitativeResult":{"type":["string","null"],"description":"Numeric laboratory result. Interpret together with unitsOfMeasure and\nthe source-provided reference range."},"unitsOfMeasure":{"type":["string","null"],"description":"Units associated with the numeric laboratory result, as reported by the\nsource."},"referenceMin":{"type":["string","null"],"description":"Lower bound of the source-reported reference range. Interpret using\nreferenceUnits. This XLSX field is separate from referenceMax."},"referenceMax":{"type":["string","null"],"description":"Upper bound of the source-reported reference range. Interpret using\nreferenceUnits."},"referenceUnits":{"type":["string","null"],"description":"Units associated with the source-reported reference range. These may\ndiffer from the result units."},"score":{"type":["integer","null"],"format":"int32","description":"Source-supplied score associated with this lab result. No universal\nscoring scale is defined."},"annotation":{"type":["string","null"],"description":"Additional source-supplied comments about the lab result. Multiple\nannotations may be separated by line breaks."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the lab-result data was recorded in the platform. This is\nseparate from the accession test date."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Platform identifier for the customer organization associated with the\nrecord."}]},"projectId":{"type":["string","null"],"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":["string","null"],"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"labAccessionId":{"type":["string","null"]}}},"LabResultSort":{"oneOf":[{"type":"object","required":["ref"],"properties":{"ref":{"type":"string","enum":["asc","desc"]}}},{"type":"object","required":["testCode"],"properties":{"testCode":{"type":"string","description":"Source test identifier or test name. This field is not guaranteed to be\na LOINC code.","enum":["asc","desc"]}}},{"type":"object","required":["providerTestCode"],"properties":{"providerTestCode":{"type":"string","description":"Provider-supplied laboratory test code, commonly a LOINC code when\nsupplied by the source.","enum":["asc","desc"]}}},{"type":"object","required":["batteryEventGroupName"],"properties":{"batteryEventGroupName":{"type":"string","description":"Name of the laboratory panel or battery grouping the test result.","enum":["asc","desc"]}}},{"type":"object","required":["batteryEventTestName"],"properties":{"batteryEventTestName":{"type":"string","description":"Source-reported name of the test within a laboratory panel or battery.","enum":["asc","desc"]}}},{"type":"object","required":["interpretation"],"properties":{"interpretation":{"type":"string","description":"Source-reported interpretation flag. XLSX values are normal, high, low,\nabnormal, or other. The flag is supplied with the data rather than\nrecalculated from the reference range.","enum":["asc","desc"]}}},{"type":"object","required":["performingSiteKind"],"properties":{"performingSiteKind":{"type":"string","description":"Type of performing laboratory reported by the source. XLSX values are\nclinical or riskAssessment.","enum":["asc","desc"]}}},{"type":"object","required":["qualitativeResult"],"properties":{"qualitativeResult":{"type":"string","description":"Textual laboratory result, such as Positive, Negative, or Trace, when\nreported.","enum":["asc","desc"]}}},{"type":"object","required":["quantitativeResult"],"properties":{"quantitativeResult":{"type":"string","description":"Numeric laboratory result. Interpret together with unitsOfMeasure and\nthe source-provided reference range.","enum":["asc","desc"]}}},{"type":"object","required":["unitsOfMeasure"],"properties":{"unitsOfMeasure":{"type":"string","description":"Units associated with the numeric laboratory result, as reported by the\nsource.","enum":["asc","desc"]}}},{"type":"object","required":["referenceMin"],"properties":{"referenceMin":{"type":"string","description":"Lower bound of the source-reported reference range. Interpret using\nreferenceUnits. This XLSX field is separate from referenceMax.","enum":["asc","desc"]}}},{"type":"object","required":["referenceMax"],"properties":{"referenceMax":{"type":"string","description":"Upper bound of the source-reported reference range. Interpret using\nreferenceUnits.","enum":["asc","desc"]}}},{"type":"object","required":["referenceUnits"],"properties":{"referenceUnits":{"type":"string","description":"Units associated with the source-reported reference range. These may\ndiffer from the result units.","enum":["asc","desc"]}}},{"type":"object","required":["score"],"properties":{"score":{"type":"string","description":"Source-supplied score associated with this lab result. No universal\nscoring scale is defined.","enum":["asc","desc"]}}},{"type":"object","required":["annotation"],"properties":{"annotation":{"type":"string","description":"Additional source-supplied comments about the lab result. Multiple\nannotations may be separated by line breaks.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp when the lab-result data was recorded in the platform. This is\nseparate from the accession test date.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Platform identifier for the customer organization associated with the\nrecord.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Platform identifier for the project containing the patient and record.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope.","enum":["asc","desc"]}}},{"type":"object","required":["labAccessionId"],"properties":{"labAccessionId":{"type":"string","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"LastWillAndTestamentDoc":{"type":"object","required":["executorNames","beneficiaryNames","attestationType"],"properties":{"testatorName":{"type":["string","null"],"description":"The name of the testator (the deceased person whose will this is)"},"dateExecuted":{"type":["string","null"],"format":"date","description":"The date the will was signed/executed"},"executorNames":{"type":"array","items":{"type":"string"},"description":"The names of all executors nominated in the will, including alternate or successor executors"},"beneficiaryNames":{"type":"array","items":{"type":"string"},"description":"The names of the beneficiaries (legatees / devisees) named in the will"},"hasTestatorSignature":{"type":"boolean","description":"Did the testator sign the will?"},"attestationType":{"$ref":"#/components/schemas/AttestationType","description":"How the will's execution is attested"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"LettersOfAdministrationDoc":{"type":"object","required":["administratorNames","authorityScope"],"properties":{"decedentName":{"type":["string","null"],"description":"The name of the decedent (deceased person)"},"administratorNames":{"type":"array","items":{"type":"string"},"description":"The names of the administrators or personal representatives appointed by the court when there is no will; letters of administration may appoint co-administrators. On a judgment of possession or an order recognizing heirs, which appoints no administrator, these are the heirs put in possession."},"courtName":{"type":["string","null"],"description":"The name of the court that issued the letters"},"caseNumber":{"type":["string","null"],"description":"The case or docket number"},"dateIssued":{"type":["string","null"],"format":"date","description":"The date the letters were issued"},"authorityScope":{"$ref":"#/components/schemas/LettersOfAdministrationScope","description":"The scope of authority granted"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"LettersOfAdministrationScope":{"type":"string","description":"The scope of authority the letters of administration grant the administrators.\n\n- `Full`: authority over the whole estate.\n- `Limited`: authority restricted to the specific powers or purposes the letters list.\n- `Temporary`: interim authority granted for a limited period, for example pending a full appointment.","enum":["Full","Limited","Temporary"]},"LettersTestamentaryDoc":{"type":"object","required":["executorNames","authorityScope"],"properties":{"decedentName":{"type":["string","null"],"description":"The name of the decedent (deceased person)"},"executorNames":{"type":"array","items":{"type":"string"},"description":"The names of the executors (persons granted authority under the will). A will may name co-executors."},"courtName":{"type":["string","null"],"description":"The name of the court that issued the letters"},"caseNumber":{"type":["string","null"],"description":"The case or docket number"},"dateIssued":{"type":["string","null"],"format":"date","description":"The date the letters were issued"},"authorityScope":{"$ref":"#/components/schemas/LettersTestamentaryScope","description":"The scope of authority granted"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"LettersTestamentaryScope":{"type":"string","description":"The scope of authority the letters testamentary grant the executors.\n\n- `Full`: authority over the whole estate.\n- `Limited`: authority restricted to the specific powers or purposes the letters list.","enum":["Full","Limited"]},"LoincFields":{"type":"object","properties":{"code":{"type":"boolean","description":"The LOINC code, such as \"2345-7\"."},"longCommonName":{"type":"boolean","description":"The LOINC long common name: the full, human-readable name of the test or\nobservation."},"shortName":{"type":"boolean","description":"The LOINC short name, an abbreviated name for column headings and\nreports. Null when LOINC defines none."},"displayName":{"type":"boolean","description":"The LOINC display name, a concise name for showing to people. Null when\nLOINC defines none."},"component":{"type":"boolean","description":"The LOINC component axis: what is measured or observed, such as\n\"Glucose\". Null when not defined."},"property":{"type":"boolean","description":"The LOINC property axis: the kind of quantity measured, such as \"MCnc\"\nfor mass concentration. Null when not defined."},"system":{"type":"boolean","description":"The LOINC system axis: the specimen or body system the observation is\nmade on, such as \"Ser/Plas\". Null when not defined."},"scale":{"type":"boolean","description":"The LOINC scale axis: how the result is expressed, such as \"Qn\" for\nquantitative or \"Ord\" for ordinal. Null when not defined."},"method":{"type":"boolean","description":"The LOINC method axis: how the observation was made, when the code\nspecifies one. Null when the code is method-independent."},"class":{"type":"boolean","description":"The LOINC class the code is grouped under, such as \"CHEM\" for chemistry.\nNull when not defined."},"classType":{"type":"boolean","description":"The LOINC class type: \"1\" laboratory, \"2\" clinical, \"3\" claims\nattachments, \"4\" surveys. Null when not defined."},"status":{"type":"boolean","description":"The LOINC status of the code, such as \"ACTIVE\", \"TRIAL\", \"DISCOURAGED\" or\n\"DEPRECATED\". Null when not defined."},"exampleUcumUnits":{"type":"boolean","description":"Example units for results of this code, in UCUM notation, such as\n\"mg/dL\". Null when LOINC gives no example."},"mappedTo":{"type":"boolean","description":"For a deprecated or discouraged code, the LOINC codes recommended in its\nplace, separated by commas. Null when LOINC names no replacement."},"mapComment":{"type":"boolean","description":"LOINC's comments on each recommended replacement code, each written as the\nreplacement code followed by its comment, separated by semicolons.\nNull when LOINC names no replacement."}}},"LoincJoinFields":{"allOf":[{"$ref":"#/components/schemas/LoincFields"},{"type":"object"}]},"LoincJoinSelected":{"allOf":[{"$ref":"#/components/schemas/LoincSelected"},{"type":"object"}]},"LoincSelected":{"type":"object","properties":{"code":{"type":["string","null"],"description":"The LOINC code, such as \"2345-7\"."},"longCommonName":{"type":["string","null"],"description":"The LOINC long common name: the full, human-readable name of the test or\nobservation."},"shortName":{"type":["string","null"],"description":"The LOINC short name, an abbreviated name for column headings and\nreports. Null when LOINC defines none."},"displayName":{"type":["string","null"],"description":"The LOINC display name, a concise name for showing to people. Null when\nLOINC defines none."},"component":{"type":["string","null"],"description":"The LOINC component axis: what is measured or observed, such as\n\"Glucose\". Null when not defined."},"property":{"type":["string","null"],"description":"The LOINC property axis: the kind of quantity measured, such as \"MCnc\"\nfor mass concentration. Null when not defined."},"system":{"type":["string","null"],"description":"The LOINC system axis: the specimen or body system the observation is\nmade on, such as \"Ser/Plas\". Null when not defined."},"scale":{"type":["string","null"],"description":"The LOINC scale axis: how the result is expressed, such as \"Qn\" for\nquantitative or \"Ord\" for ordinal. Null when not defined."},"method":{"type":["string","null"],"description":"The LOINC method axis: how the observation was made, when the code\nspecifies one. Null when the code is method-independent."},"class":{"type":["string","null"],"description":"The LOINC class the code is grouped under, such as \"CHEM\" for chemistry.\nNull when not defined."},"classType":{"type":["string","null"],"description":"The LOINC class type: \"1\" laboratory, \"2\" clinical, \"3\" claims\nattachments, \"4\" surveys. Null when not defined."},"status":{"type":["string","null"],"description":"The LOINC status of the code, such as \"ACTIVE\", \"TRIAL\", \"DISCOURAGED\" or\n\"DEPRECATED\". Null when not defined."},"exampleUcumUnits":{"type":["string","null"],"description":"Example units for results of this code, in UCUM notation, such as\n\"mg/dL\". Null when LOINC gives no example."},"mappedTo":{"type":["string","null"],"description":"For a deprecated or discouraged code, the LOINC codes recommended in its\nplace, separated by commas. Null when LOINC names no replacement."},"mapComment":{"type":["string","null"],"description":"LOINC's comments on each recommended replacement code, each written as the\nreplacement code followed by its comment, separated by semicolons.\nNull when LOINC names no replacement."}}},"MatchMethod":{"type":"string","description":"How an *inbound* record was matched to its patient/request. Null on outbound\nrows (the concept only applies to receipts). `Id` covers the API inbound\npaths (ROI vendor reference and the unique upload code); `QrCode` covers an\ninbound fax matched off a signed QR code on the page; `Manual` covers a\nhand-uploaded record; `ManualSort` covers an unmatched fax an operator read\nand filed onto a request by hand; `Unsorted` covers an inbound fax we\nreceived but could not match to a request (formerly the \"Inbound Faxes\"\npile, now surfaced as request-less activity rows).\n\nLives in `hermes-shared` so deliverable sidecars (and the lambdas that write\nthem) can stamp a typed value that serializes to the same PascalCase wire\nstring the domain projections already use.","enum":["Id","Manual","QrCode","ManualSort","Unsorted"]},"MintIntakeTokenRequest":{"type":"object","description":"Body for the new-patient mint route (#1). `demographics` optionally pre-fills\nthe intake form; `siteId` makes the authorization site-specific — a record\nrequest is created for that site (attributed to the minting user) when the\npatient signs.","properties":{"parentOrigin":{"type":["string","null"],"description":"The origin of the page that will frame the signing form, as\n`https://host[:port]` with no path, query, fragment, credentials or\nwildcard. It must be on the deployment's approved browser-origin\nallowlist, or the call fails with `400`. When supplied, only that exact\norigin may frame the form.\n\nDeprecated when absent: omitting it still mints a token that any parent\npage may frame, but a later release will require it. Send it now.","example":"https://www.example.com"},"demographics":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrefillDemographics","description":"Patient details to pre-fill the intake form with. The patient can edit\nevery one of them before signing. Absent to start from an empty form."}]},"siteId":{"type":["string","null"],"description":"The site the authorization is for, which makes it site-specific: when\nthe patient signs, a record request for this site is created and\nattributed to the user who minted the token. The site must exist and be\nvisible to the caller, or the call fails with `404`. Absent for an\nauthorization covering all facilities.","example":"site_example123"}}},"NameResolution":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["facility"]}}},{"type":"object","required":["facilityName","type"],"properties":{"facilityName":{"type":"string"},"type":{"type":"string","enum":["resolvedProvider"]}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["unresolvedProvider"]}}}],"description":"Whether the submitted name was a facility or an individual provider, and\nwhich facility a provider was tied to. An object whose `type` is one of:\n\n- `facility`: the name was treated as a facility and searched as given.\n- `resolvedProvider`: the name is an individual provider, and the search\n  used the facility they practice at, given in `facilityName`.\n- `unresolvedProvider`: the name is an individual provider whose facility\n  could not be determined, so no new-site proposal is offered."},"NearbySite":{"type":"object","required":["site","distanceFeet","linkedRequestCount"],"properties":{"site":{"$ref":"#/components/schemas/Site","description":"The nearby site."},"distanceFeet":{"type":"integer","format":"u-int32","description":"Straight-line distance in feet from the submitted address. 0 when the\naddress has no coordinates, so distance is unknown.","example":420,"minimum":0},"semanticScore":{"type":["integer","null"],"format":"u-int32","description":"How closely this site's name matches the submitted name, from 0 to\n100; null when the site could not be compared by name.","example":87,"minimum":0},"similarityScore":{"type":["integer","null"],"format":"u-int32","description":"Match score from 0 to 100 from comparing this site in detail against\nthe submitted name and address; null when it was not compared that\nway.","example":92,"minimum":0},"compositeScore":{"type":["integer","null"],"format":"u-int32","description":"Score from 0 to 100 combining name similarity with proximity (name\nsimilarity alone when distance is unknown); null when the name could\nnot be compared.","example":82,"minimum":0},"linkedRequestCount":{"type":"integer","format":"int64","description":"Number of record requests currently linked to this site.","example":3},"campus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CampusLabel","description":"The campus this site belongs to, when it is grouped with other sites\non one campus. Absent from site-finder job results."}]},"medicalDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's medical-records department; absent when it has none or the\ndepartments were not loaded."}]},"facilityBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's facility-billing department; absent when it has none or the\ndepartments were not loaded."}]},"physicianBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's physician-billing department; absent when it has none or the\ndepartments were not loaded."}]},"imagingBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's imaging-billing department; absent when it has none or the\ndepartments were not loaded."}]},"emergencyRoomBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's emergency-room billing department; absent when it has none\nor the departments were not loaded."}]},"anesthesiologyBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's anesthesiology billing department; absent when it has none\nor the departments were not loaded."}]},"imagingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The site's imaging-records department; absent when it has none or the\ndepartments were not loaded."}]}}},"NewProject":{"type":"object","required":["name","medicalInformationRequested"],"properties":{"Id":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StringId","description":"Ignored. Hermes generates the ID on create, and an upsert takes it from\nthe URL."}]},"name":{"$ref":"#/components/schemas/TrimString","description":"The project's name."},"description":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"A free-text description of the project. Omit it or send null for none."}]},"medicalInformationRequested":{"type":"array","items":{"$ref":"#/components/schemas/TrimString"},"description":"The kinds of medical information the project requests, one free-text\nentry each, such as `Medication history`."},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectStatus","description":"The project's status. Omitted or null means `Live` on create and\nunchanged on upsert. Only Hermes can change the status of an existing\nproject, except that a customer admin may move a `Sandbox` project to\n`Closed`. The sandbox API key can only create `Sandbox` projects."}]},"isSandbox":{"type":["boolean","null"],"description":"Legacy spelling of `status`: `true` creates a `Sandbox` project and\noverrides `status`. Prefer `status` in new code.","deprecated":true,"example":false},"purpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectPurpose","description":"Why the project requests records; must be one of the purposes enabled\nfor the company. Omitted or null means the company's default purpose\non create (the request is rejected when there is none) and unchanged\non upsert. Only Hermes can change the purpose of an existing project."}]},"authorizationMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectAuthorizationMethod","description":"Omitted / null means \"Authorization PDF on create\" or \"preserve on upsert\"."}]},"selfServe":{"type":["boolean","null"],"description":"Omitted / null means \"default false on create\" or \"preserve on upsert\".","example":false}}},"NewSiteInfo":{"type":"object","required":["name","addressLine1"],"properties":{"taxId":{"type":["string","null"],"description":"Federal tax identification number of the organization; null when\nunknown.","example":"12-3456789"},"name":{"type":"string","description":"Name of the site.","example":"Riverside Community Hospital"},"addressLine1":{"type":"string","description":"First street address line of the site.","example":"123 Example Street"},"city":{"type":["string","null"],"description":"City of the site; null when unknown.","example":"Springfield"},"state":{"type":["string","null"],"description":"Two-letter US state code of the site; null when unknown.","example":"CA"},"zip":{"type":["string","null"],"description":"ZIP code of the site; null when unknown.","example":"94110"},"isFacility":{"type":["boolean","null"],"description":"Whether the site is a facility (true) or an individual provider\n(false). Defaults to true when omitted or null."},"phone":{"type":["string","null"],"description":"Main phone number of the site; null when unknown.","example":"+12025550142"},"systemName":{"type":["string","null"],"description":"Name of the health system the site belongs to; null when unknown.","example":"Example Health System"},"primarySpecialty":{"type":["string","null"],"description":"Primary specialty of the site, as free text; null when unknown.","example":"Internal Medicine"},"acceptsEsignature":{"type":["boolean","null"],"description":"Whether the site accepts electronically signed authorizations; null\nwhen unknown."},"addressLine2":{"type":["string","null"],"description":"Accepted but ignored: the secondary address line is taken from the\nsite-finder token, or found by geocoding the address."},"formattedAddress":{"type":["string","null"],"description":"Accepted but ignored: the full address is taken from the site-finder\ntoken, or found by geocoding the address."},"latitude":{"type":["number","null"],"format":"double","description":"Accepted but ignored: the latitude is taken from the site-finder\ntoken, or found by geocoding the address."},"longitude":{"type":["number","null"],"format":"double","description":"Accepted but ignored: the longitude is taken from the site-finder\ntoken, or found by geocoding the address."},"placeId":{"type":["string","null"],"description":"Accepted but ignored: the map place identifier is taken from the\nsite-finder token, or found by geocoding the address."},"website":{"type":["string","null"],"description":"Accepted but ignored: the website is taken from the site-finder token,\nor found by geocoding the address."},"googlePlacesName":{"type":["string","null"],"description":"Accepted but ignored: the map place name is taken from the site-finder\ntoken, or found by geocoding the address."},"operationalStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteOperationalStatus","description":"Operational status to stamp on the created site (closed-facility path).\nOn the token path this is recovered from the verified token instead."}]},"operationalStatusNote":{"type":["string","null"],"description":"Generated explanation of the closure/transfer, stored on the created\nsite. On the token path this is recovered from the verified token."},"medicalRecordsCustodian":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecordsCustodian","description":"Records custodians (where to submit record requests) for a closed\nfacility; persisted as the new site's medical / billing / imaging\ndepartments. On the token path these are recovered from the verified\ntoken instead."}]},"billingRecordsCustodian":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecordsCustodian","description":"Where to submit billing-records requests for a closed facility; saved\nas the new site's billing departments. Omit it for an operating site.\nWhen `siteFinderToken` is present, the value in the token is used\ninstead."}]},"imagingRecordsCustodian":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecordsCustodian","description":"Where to submit imaging-records requests for a closed facility; saved\nas the new site's imaging department. Omit it for an operating site.\nWhen `siteFinderToken` is present, the value in the token is used\ninstead."}]},"siteFinderToken":{"type":["string","null"],"description":"When present, this request came from a site-finder proposal."}}},"NextOfKinAffidavitDoc":{"type":"object","required":["nextOfKinNames"],"properties":{"decedentName":{"type":["string","null"],"description":"The name of the decedent as stated on the affidavit"},"dateOfDeath":{"type":["string","null"],"format":"date","description":"The date of death as stated on the affidavit"},"affiantName":{"type":["string","null"],"description":"The name of the affiant (person swearing the affidavit, typically the claimed next of kin)"},"affiantRelationship":{"type":["string","null"],"description":"The affiant's stated relationship to the decedent (e.g. spouse, child, parent, sibling)"},"nextOfKinNames":{"type":"array","items":{"type":"string"},"description":"The next of kin named on the affidavit. Often just the affiant, but some affidavits enumerate multiple heirs."},"swornDate":{"type":["string","null"],"format":"date","description":"The date the affidavit was sworn or signed"},"isNotarized":{"type":"boolean","description":"Whether the affidavit bears a notary seal, notary block, or commission expiration"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"Note":{"type":"object","required":["id","createdAt","userEmail","content","authoredByAi"],"properties":{"id":{"type":"string","description":"The note's ID.","example":"2Hb9mQ4tVx8Kc1RpZ7nLw3YsDfA"},"createdAt":{"type":"string","format":"date-time","description":"When the note was written.","example":"2026-01-15T12:00:00Z"},"updatedAt":{"type":["string","null"],"format":"date-time","description":"When the note was last edited. Null when it has never been edited.","example":"2026-01-16T09:30:00Z"},"userEmail":{"type":"string","description":"Email address of the user who wrote the note. Empty when that user can\nno longer be found.","example":"analyst@example.com"},"content":{"type":"string","description":"The note's text.","example":"Called the records department; they expect to fax the records by Friday."},"authoredByAi":{"type":"boolean","description":"True when the note was authored by the Hermes AI voice agent rather\nthan a human user. Renderers show an automated \"AI\" badge and skip the\nhuman user lookup.","example":false}}},"NoteListResponse":{"type":"object","required":["notes"],"properties":{"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"description":"The notes, newest first."}}},"Npi":{"type":"string","description":"A validated National Provider Identifier.\n\nValid values are 1–9,999,999,999 (up to 10 digits). Returned as a\n10-digit string padded with leading zeros; accepted as either a JSON number\nor a numeric string."},"PassportDoc":{"type":"object","properties":{"holderName":{"type":["string","null"],"description":"The name of the passport holder"},"dateOfBirth":{"type":["string","null"],"format":"date","description":"The date of birth on the passport"},"passportNumber":{"type":["string","null"],"description":"The passport number"},"issuingCountry":{"type":["string","null"],"description":"The country that issued the passport"},"expirationDate":{"type":["string","null"],"format":"date","description":"The expiration date of the passport"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"Patient":{"type":"object","required":["companyId","id","projectId","firstName","lastName","alternateLastNames","dateOfBirth","sex","zipCodes","createdAt","authorizationStatus","searchLevel","searchStatus"],"properties":{"companyId":{"$ref":"#/components/schemas/CompanyId","description":"ID of the company that owns the patient."},"id":{"type":"string","description":"The patient's ID, unique within the project.","example":"k3f9x2m7qa"},"projectId":{"$ref":"#/components/schemas/StringId","description":"ID of the project the patient belongs to."},"firstName":{"type":"string","description":"The patient's first name, including any additional first names.","example":"Jane"},"lastName":{"type":"string","description":"The patient's primary (current) last name.","example":"Doe"},"alternateLastNames":{"type":"array","items":{"type":"string"},"description":"The patient's other last names, such as maiden or prior married\nnames. Empty when there are none.","example":["Smith"]},"dateOfBirth":{"type":"string","format":"date","description":"The patient's date of birth, as `YYYY-MM-DD`.","example":"1980-04-12"},"sex":{"type":"string","description":"The patient's sex: `male`, `female`, or `unknown`.","example":"female"},"zipCodes":{"type":"array","items":{"type":"string"},"description":"The ZIP codes where the patient lived at the time of each visit, not\nnecessarily their current ZIP code. Empty when none are on file.","example":["94110","02139"]},"mobile":{"type":["string","null"],"description":"The patient's mobile phone number in E.164 form, such as\n`+12025550142`. Null when none is on file.","example":"+12025550142"},"socialSecurityNumber":{"type":["string","null"],"description":"The patient's Social Security number. Null when none is on file or\nwhen it is withheld from the response."},"email":{"type":["string","null"],"description":"The patient's email address. Null when none is on file.","example":"jane.doe@example.com"},"createdAt":{"type":"string","format":"date-time","description":"When the patient was created.","example":"2026-01-15T12:00:00Z"},"authorizationStatus":{"$ref":"#/components/schemas/AuthorizationStatus","description":"Where the review of the patient's authorization stands."},"searchLevel":{"$ref":"#/components/schemas/SearchLevel","description":"The legacy combined search level, kept for backward compatibility."},"searchStatus":{"$ref":"#/components/schemas/SearchStatus","description":"Where the patient's clinical-data searches stand."},"userId":{"type":["string","null"],"description":"ID of the user who created the patient. Null when not recorded.","example":"2Hb8kTQ1zXrN4pLm9VwYc3EaJfD"}}},"PatientAggregateDataFlattenSelected":{"type":"object","properties":{"visitCount":{"type":["integer","null"],"format":"int64","description":"Number of visit records currently associated with the patient."},"requestCount":{"type":["integer","null"],"format":"int64","description":"Number of record requests associated with the patient, including C-CDA\nrequests."},"recordRequestCount":{"type":["integer","null"],"format":"int64","description":"Number of medical, imaging, and billing requests associated with the\npatient. Excludes C-CDA requests."},"ccdaRequestCount":{"type":["integer","null"],"format":"int64","description":"Number of C-CDA requests associated with the patient."},"requestCompletedOrCanceledCount":{"type":["integer","null"],"format":"int64","description":"Number of patient requests with status Completed, Canceled, or Void."},"feeTotal":{"type":["string","null"],"description":"Sum of non-canceled fees associated with the patient, excluding fees\nclassified as record-request fees. Monetary amount; the field does not\ncarry a currency code."},"lastSonarRunAt":{"type":["string","null"],"format":"date-time","description":"Creation timestamp of the most recent non-canceled facility-discovery\nfee. It marks billed search activity, not necessarily when results\narrived."},"lastHistoriesRunAt":{"type":["string","null"],"format":"date-time","description":"Creation timestamp of the most recent non-canceled clinical-history fee.\nIt marks billed search activity, not necessarily when results arrived."},"lastEhrRunAt":{"type":["string","null"],"format":"date-time","description":"Most recent outbound electronic health record search timestamp across\nthe patient search submissions."},"diagnosisCount":{"type":["integer","null"],"format":"int64","description":"Number of diagnosis records currently associated with the patient."},"procedureCount":{"type":["integer","null"],"format":"int64","description":"Number of procedure records currently associated with the patient."},"prescriptionFillCount":{"type":["integer","null"],"format":"int64","description":"Number of prescription dispensing records currently associated with the\npatient."},"labResultCount":{"type":["integer","null"],"format":"int64","description":"Number of laboratory result records currently associated with the\npatient."},"authorizationExists":{"type":["boolean","null"],"description":"Populated per request from S3 listings by the patient enricher."},"authorizationDownloadUrl":{"type":["string","null"],"description":"Download URL for the patient's HIPAA authorization file. Present\nonly when an authorization file exists for the patient; null\notherwise."}}},"PatientAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"PatientAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"PatientBrowseAggregate":{"type":"object","properties":{"patient":{"$ref":"#/components/schemas/PatientAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"user":{"$ref":"#/components/schemas/UserJoinAggregates"},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowAggregates"}}},"PatientBrowseAggregateRequest":{"type":"object","properties":{"patient":{"$ref":"#/components/schemas/PatientAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"user":{"$ref":"#/components/schemas/UserJoinAggregatesRequest"},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowAggregatesRequest"}}},"PatientBrowseFilter":{"type":"object","properties":{"patient":{"$ref":"#/components/schemas/PatientFilter","description":"Filters on the patient's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"user":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/UserJoinFilter"}],"description":"Filters on the joined user's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a user."},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowFilter","description":"Filters on the auth check's columns. A row with no auth check matches none of these filters."}}},"PatientBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/PatientBrowseSelect"},"where":{"$ref":"#/components/schemas/PatientBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/PatientBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/PatientBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"PatientBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/PatientBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/PatientBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"PatientBrowseRow":{"type":"object","properties":{"patient":{"$ref":"#/components/schemas/PatientSelected","description":"The patient's columns, as selected by the request."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"user":{"$ref":"#/components/schemas/UserJoinSelected","description":"The joined user's columns, as selected by the request. Absent when the row has no user."},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowSelected","description":"The auth check's columns, as selected by the request. Absent when the row has no auth check."}}},"PatientBrowseSelect":{"type":"object","properties":{"patient":{"$ref":"#/components/schemas/PatientFields","description":"Which of the patient's columns to return."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"user":{"$ref":"#/components/schemas/UserJoinFields","description":"Which of the joined user's columns to return. Absent when the row has no user."},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowFields","description":"Which of the auth check's columns to return. Absent when the row has no auth check."}}},"PatientBrowseSort":{"oneOf":[{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientSort","description":"Sorts on one of the patient's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["user"],"properties":{"user":{"$ref":"#/components/schemas/UserJoinSort","description":"Sorts on one of the joined user's columns."}}},{"type":"object","required":["authCheck"],"properties":{"authCheck":{"$ref":"#/components/schemas/AuthCheckRowSort","description":"Sorts on one of the auth check's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"PatientCheck":{"type":"object","description":"Patient-level readiness signal. Covered-purpose projects are ready without\nan authorization PDF; other projects require one.","required":["ready","authorizationUploaded"],"properties":{"ready":{"type":"boolean","description":"Whether the patient has the authorization the project requires: always\ntrue on a project with a covered purpose (`CoveredOperations`,\n`CoveredPayment`, `CoveredTreatment`), otherwise true once an\nauthorization document is uploaded. It does not mean the authorization\nis approved; see `authorizationStatus`.","example":true},"authorizationUploaded":{"type":"boolean","description":"Whether an authorization document has been uploaded for the patient.","example":true}}},"PatientClinicalDataAdded":{"type":"object","description":"One patient's new clinical content.","required":["patient","project","source","counts"],"properties":{"patient":{"$ref":"#/components/schemas/PatientResponse","description":"The patient."},"project":{"$ref":"#/components/schemas/ProjectName","description":"The project the patient is in."},"source":{"$ref":"#/components/schemas/ClinicalDataProduct","description":"Which run produced these counts."},"counts":{"$ref":"#/components/schemas/ClinicalDataCounts","description":"How much new content of each type the run added."}}},"PatientFieldPatch":{"oneOf":[{"type":"object","required":["firstName"],"properties":{"firstName":{"$ref":"#/components/schemas/PatientName"}}},{"type":"object","description":"Set the primary last name, preserving any alternate last names.","required":["lastName"],"properties":{"lastName":{"$ref":"#/components/schemas/PatientName","description":"Set the primary last name, preserving any alternate last names."}}},{"type":"object","description":"Replace the patient's full last-name list.","required":["lastNames"],"properties":{"lastNames":{"$ref":"#/components/schemas/PatientLastNames","description":"Replace the patient's full last-name list."}}},{"type":"object","required":["dateOfBirth"],"properties":{"dateOfBirth":{"$ref":"#/components/schemas/DateOfBirth"}}},{"type":"object","required":["sex"],"properties":{"sex":{"$ref":"#/components/schemas/Sex"}}},{"type":"object","required":["zipCodes"],"properties":{"zipCodes":{"type":"array","items":{"$ref":"#/components/schemas/Zip"}}}},{"type":"object","description":"Replace the full list of city/state pairs. Each entry carries both\nhalves — a city without its state is rejected at deserialization.","required":["cityStates"],"properties":{"cityStates":{"type":"array","items":{"$ref":"#/components/schemas/CityState"},"description":"Replace the full list of city/state pairs. Each entry carries both\nhalves — a city without its state is rejected at deserialization."}}},{"type":"object","description":"Set or clear the insurance / member id. `null` clears the field.","required":["payerInsuranceId"],"properties":{"payerInsuranceId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayerInsuranceId","description":"Set or clear the insurance / member id. `null` clears the field."}]}}},{"type":"object","description":"Set or clear the mobile number. `null` clears the field.","required":["mobile"],"properties":{"mobile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/E164PhoneNumber","description":"Set or clear the mobile number. `null` clears the field."}]}}},{"type":"object","required":["socialSecurityNumber"],"properties":{"socialSecurityNumber":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString"}]}}},{"type":"object","required":["email"],"properties":{"email":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString"}]}}},{"type":"object","required":["siteSonar"],"properties":{"siteSonar":{"type":"boolean"}}},{"type":"object","required":["patientHistories"],"properties":{"patientHistories":{"type":"boolean"}}},{"type":"object","description":"Toggle the Veradigm EHR enrollment (\"ehrSearch\") opt-in.","required":["ehrSearch"],"properties":{"ehrSearch":{"type":"boolean","description":"Toggle the Veradigm EHR enrollment (\"ehrSearch\") opt-in."}}},{"type":"object","description":"Assign or clear the patient owner. `null` clears the owner; a user id\nassigns that user. Requires the edit-owner permission rather than the\nusual edit-patient permissions.","required":["owner"],"properties":{"owner":{"type":["string","null"],"description":"Assign or clear the patient owner. `null` clears the owner; a user id\nassigns that user. Requires the edit-owner permission rather than the\nusual edit-patient permissions."}}}],"description":"Mirrors the `SitePatch` enum pattern for single-field patient updates."},"PatientFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Identifier of the patient within the customer organization and project.\nMatch child-sheet patientId values together with companyId and\nprojectId."},"firstName":{"type":"boolean","description":"Patient first name from the patient profile."},"lastName":{"type":"boolean","description":"Patient primary last name from the patient profile."},"alternateLastNames":{"type":"boolean","description":"Alternate last names on file, excluding the primary lastName. Exported\nas a JSON array in one cell."},"dateOfBirth":{"type":"boolean","description":"Patient date of birth."},"sex":{"type":"boolean","description":"Patient sex as stored. Exported values are male, female, or unknown."},"zipCodes":{"type":"boolean","description":"Postal codes on the patient profile in stored order. Exported as a JSON\narray. Preserve leading zeros."},"mobile":{"type":"boolean","description":"Patient mobile telephone number, when supplied."},"email":{"type":"boolean","description":"Patient email address, when supplied."},"createdAt":{"type":"boolean","description":"Timestamp when the patient record was created."},"updatedAt":{"type":"boolean","description":"Timestamp of the most recent patient creation, replacement, or profile\nupdate. Not the timestamp of every clinical result."},"authorizationStatus":{"type":"boolean","description":"Current authorization-validation status for the patient. This is a\nworkflow status, not an authorization document."},"searchLevel":{"type":"boolean","description":"Legacy combined search setting derived from the independent search\nflags. Values are None, SiteSonar, or PatientHistory. Use the individual\nflags for current intent."},"siteSonar":{"type":"boolean","description":"Whether facility discovery is currently requested. This request flag can\nclear when processing completes. False does not mean no historical\nresults exist."},"patientHistories":{"type":"boolean","description":"Whether clinical-history retrieval is currently requested. This request\nflag can clear when processing completes. False does not mean no\nhistorical results exist."},"ehrSearch":{"type":"boolean","description":"Whether electronic health record discovery is currently requested. A\nrequest flag, not a result-availability indicator."},"searchStatus":{"type":"boolean","description":"Current overall search-processing status. See the Reading guide for the\nexported status tokens."},"latestSubmissionErrored":{"type":"boolean"},"ownerUserId":{"type":"boolean","description":"Identifier of the user assigned to manage the patient. Distinct from the\ncreator userId."},"companyId":{"type":"boolean","description":"Identifier of the customer organization associated with the record."},"projectId":{"type":"boolean","description":"Identifier of the project containing the record."},"userId":{"type":"boolean","description":"Identifier of the user who created the patient record."},"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."},"visitCount":{"type":"boolean","description":"Number of visit records currently associated with the patient."},"requestCount":{"type":"boolean","description":"Number of record requests associated with the patient, including C-CDA\nrequests."},"recordRequestCount":{"type":"boolean","description":"Number of medical, imaging, and billing requests associated with the\npatient. Excludes C-CDA requests."},"ccdaRequestCount":{"type":"boolean","description":"Number of C-CDA requests associated with the patient."},"requestCompletedOrCanceledCount":{"type":"boolean","description":"Number of patient requests with status Completed, Canceled, or Void."},"feeTotal":{"type":"boolean","description":"Sum of non-canceled fees associated with the patient, excluding fees\nclassified as record-request fees. Monetary amount; the field does not\ncarry a currency code."},"lastSonarRunAt":{"type":"boolean","description":"Creation timestamp of the most recent non-canceled facility-discovery\nfee. It marks billed search activity, not necessarily when results\narrived."},"lastHistoriesRunAt":{"type":"boolean","description":"Creation timestamp of the most recent non-canceled clinical-history fee.\nIt marks billed search activity, not necessarily when results arrived."},"lastEhrRunAt":{"type":"boolean","description":"Most recent outbound electronic health record search timestamp across\nthe patient search submissions."},"diagnosisCount":{"type":"boolean","description":"Number of diagnosis records currently associated with the patient."},"procedureCount":{"type":"boolean","description":"Number of procedure records currently associated with the patient."},"prescriptionFillCount":{"type":"boolean","description":"Number of prescription dispensing records currently associated with the\npatient."},"labResultCount":{"type":"boolean","description":"Number of laboratory result records currently associated with the\npatient."},"authorizationExists":{"type":"boolean","description":"Populated per request from S3 listings by the patient enricher."},"authorizationDownloadUrl":{"type":"boolean","description":"Download URL for the patient's HIPAA authorization file. Present\nonly when an authorization file exists for the patient; null\notherwise."}}},"PatientFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the patient within the customer organization and project.\nMatch child-sheet patientId values together with companyId and\nprojectId."},"firstName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patient first name from the patient profile."},"lastName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patient primary last name from the patient profile."},"alternateLastNames":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Alternate last names on file, excluding the primary lastName. Exported\nas a JSON array in one cell."},"dateOfBirth":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patient date of birth."},"sex":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["male","female","unknown"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["male","female","unknown"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["male","female","unknown"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["male","female","unknown"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patient sex as stored. Exported values are male, female, or unknown."},"zipCodes":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Postal codes on the patient profile in stored order. Exported as a JSON\narray. Preserve leading zeros."},"mobile":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patient mobile telephone number, when supplied."},"email":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Patient email address, when supplied."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp when the patient record was created."},"updatedAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp of the most recent patient creation, replacement, or profile\nupdate. Not the timestamp of every clinical result."},"authorizationStatus":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["NeedsApproval","Approved","AwaitingAuthorization","WrongPatientName","WrongDateOfBirth","WrongDateOfService","MissingSignature","MissingPowerOfAttorney","MissingProofOfGuardianship","MissingRedisclosureSmt","MissingZip","MissingGender","OtherIssue","Missing","WaitingForContract"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["NeedsApproval","Approved","AwaitingAuthorization","WrongPatientName","WrongDateOfBirth","WrongDateOfService","MissingSignature","MissingPowerOfAttorney","MissingProofOfGuardianship","MissingRedisclosureSmt","MissingZip","MissingGender","OtherIssue","Missing","WaitingForContract"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["NeedsApproval","Approved","AwaitingAuthorization","WrongPatientName","WrongDateOfBirth","WrongDateOfService","MissingSignature","MissingPowerOfAttorney","MissingProofOfGuardianship","MissingRedisclosureSmt","MissingZip","MissingGender","OtherIssue","Missing","WaitingForContract"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["NeedsApproval","Approved","AwaitingAuthorization","WrongPatientName","WrongDateOfBirth","WrongDateOfService","MissingSignature","MissingPowerOfAttorney","MissingProofOfGuardianship","MissingRedisclosureSmt","MissingZip","MissingGender","OtherIssue","Missing","WaitingForContract"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Current authorization-validation status for the patient. This is a\nworkflow status, not an authorization document."},"searchLevel":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["None","SiteSonar","PatientHistory"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["None","SiteSonar","PatientHistory"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["None","SiteSonar","PatientHistory"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["None","SiteSonar","PatientHistory"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Legacy combined search setting derived from the independent search\nflags. Values are None, SiteSonar, or PatientHistory. Use the individual\nflags for current intent."},"siteSonar":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether facility discovery is currently requested. This request flag can\nclear when processing completes. False does not mean no historical\nresults exist."},"patientHistories":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether clinical-history retrieval is currently requested. This request\nflag can clear when processing completes. False does not mean no\nhistorical results exist."},"ehrSearch":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether electronic health record discovery is currently requested. A\nrequest flag, not a result-availability indicator."},"searchStatus":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["Inactive","Processing","Completed","NoHit","AmbiguousIdentity","MissingZipCode","RequestRejected","DeceasedBeforeClinicalData"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["Inactive","Processing","Completed","NoHit","AmbiguousIdentity","MissingZipCode","RequestRejected","DeceasedBeforeClinicalData"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["Inactive","Processing","Completed","NoHit","AmbiguousIdentity","MissingZipCode","RequestRejected","DeceasedBeforeClinicalData"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["Inactive","Processing","Completed","NoHit","AmbiguousIdentity","MissingZipCode","RequestRejected","DeceasedBeforeClinicalData"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Current overall search-processing status. See the Reading guide for the\nexported status tokens."},"latestSubmissionErrored":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"ownerUserId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the user assigned to manage the patient. Distinct from the\ncreator userId."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the customer organization associated with the record."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the project containing the record."},"userId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the user who created the patient record."},"visitCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of visit records currently associated with the patient."},"requestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of record requests associated with the patient, including C-CDA\nrequests."},"recordRequestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of medical, imaging, and billing requests associated with the\npatient. Excludes C-CDA requests."},"ccdaRequestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of C-CDA requests associated with the patient."},"requestCompletedOrCanceledCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of patient requests with status Completed, Canceled, or Void."},"feeTotal":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Sum of non-canceled fees associated with the patient, excluding fees\nclassified as record-request fees. Monetary amount; the field does not\ncarry a currency code."},"lastSonarRunAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Creation timestamp of the most recent non-canceled facility-discovery\nfee. It marks billed search activity, not necessarily when results\narrived."},"lastHistoriesRunAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Creation timestamp of the most recent non-canceled clinical-history fee.\nIt marks billed search activity, not necessarily when results arrived."},"lastEhrRunAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Most recent outbound electronic health record search timestamp across\nthe patient search submissions."},"diagnosisCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of diagnosis records currently associated with the patient."},"procedureCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of procedure records currently associated with the patient."},"prescriptionFillCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of prescription dispensing records currently associated with the\npatient."},"labResultCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of laboratory result records currently associated with the\npatient."},"authorizationExists":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Populated per request from S3 listings by the patient enricher."},"authorizationDownloadUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Download URL for the patient's HIPAA authorization file. Present\nonly when an authorization file exists for the patient; null\notherwise."}}},"PatientForm":{"type":"object","required":["firstName","dateOfBirth","sex"],"properties":{"firstName":{"$ref":"#/components/schemas/PatientName","description":"The patient's first name. Put additional first names here, separated\nby spaces (`Mary Anne`). Omit middle names."},"lastName":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientName","description":"Legacy single last name, kept for backward compatibility. Send\n`lastNames` instead; this is ignored when `lastNames` is also sent."}],"deprecated":true},"lastNames":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PatientLastNames","description":"Every last name for the patient. Each last name is searched separately\nagainst the clinical data sources, and the Site Sonar / Patient\nHistories fee is charged as a multiple of the name count.\n\nPut a suffix after the last name, separated by a space (`Smith Jr.`),\nand omit middle names entirely."}]},"dateOfBirth":{"$ref":"#/components/schemas/DateOfBirth","description":"The patient's date of birth, as `YYYY-MM-DD`."},"sex":{"$ref":"#/components/schemas/Sex","description":"The patient's sex: `male`, `female`, or `unknown`. Set it whenever it\nis known: when it is `unknown` and records are found under both sexes,\n`searchStatus` becomes `AmbiguousIdentity` and the records are\nwithheld until it is set."},"zipCode":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Zip","description":"Legacy single ZIP code, kept for backward compatibility. Send\n`zipCodes` instead; this is ignored when `zipCodes` is also sent."}],"deprecated":true},"zipCodes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Zip"},"description":"The ZIP codes where the patient lived at the time of each visit, not\ntheir current ZIP code. Pass every one you know; they widen the\nclinical-data search. On a live project a patient without one has a\nrequested EHR Search held until a ZIP code is added, and Patient\nHistories too unless the project's purpose is `InsuranceLife`.","example":["94110","02139"]},"cityStates":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CityState"},"description":"City and state pairs for locations where the patient received care —\none entry per address, each carrying both halves.\n\nCity and state are always sent together: the clinical data sources match\non the pair, and a city without its state matches nothing. A two-letter\nUSPS code or the full state name is accepted and stored as the code; an\nunrecognized state is rejected with a 422 during deserialization.\n\nValues are taken as supplied and are not required to be verified\nagainst any external record."},"mobile":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/E164PhoneNumber","description":"The patient's mobile number. Omit the field or send `null` to clear it."}]},"socialSecurityNumber":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"The patient's Social Security number. Omit the field or send null for\nnone.\nPatient responses report only whether one is on file."}]},"payerInsuranceId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayerInsuranceId","description":"The patient's insurance or member id. Omit the field or send null for\nnone."}]},"email":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"The patient's email address. Omit the field or send null for none."}]},"siteSonar":{"type":["boolean","null"],"description":"Request Site Sonar, which finds the facilities where the patient was\ntreated. Omitted means off."},"patientHistories":{"type":["boolean","null"],"description":"Request Patient Histories, which retrieves the patient's diagnoses,\nprocedures, prescription fills and lab results. Omitted means off.\nIndependent of `siteSonar`."},"ehrSearch":{"type":["boolean","null"],"description":"Request EHR Search, which searches connected EHR networks for the\npatient's records. Omitted means off. Independent of the other flags."}}},"PatientIdentity":{"type":"object","description":"Patient-identity fields extracted from the authorization form.","properties":{"fullName":{"type":["string","null"],"description":"The full name of the patient"},"dateOfBirth":{"type":["string","null"],"format":"date","description":"The date of birth of the patient"},"sex":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Sex","description":"The sex of the patient"}]},"mobile":{"type":["string","null"],"description":"The mobile phone of the patient"},"socialSecurityNumber":{"type":["string","null"],"description":"The Social Security number of the patient"},"email":{"type":["string","null"],"description":"The email address of the patient"}}},"PatientJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/PatientAggregates"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregates"},"project":{"$ref":"#/components/schemas/ProjectAggregates"},"user":{"$ref":"#/components/schemas/UserAggregates"}}}]},"PatientJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/PatientAggregatesRequest"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectAggregatesRequest"},"user":{"$ref":"#/components/schemas/UserAggregatesRequest"}}}]},"PatientJoinFields":{"allOf":[{"$ref":"#/components/schemas/PatientFields"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"user":{"$ref":"#/components/schemas/UserFields","description":"Which of the joined user's columns to return. Absent when the row has no user."}}}]},"PatientJoinFilter":{"allOf":[{"$ref":"#/components/schemas/PatientFilter"},{"type":"object","properties":{"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"user":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/UserFilter"}],"description":"Filters on the joined user's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a user."}}}]},"PatientJoinSelected":{"allOf":[{"$ref":"#/components/schemas/PatientSelected"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanySelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"user":{"$ref":"#/components/schemas/UserSelected","description":"The joined user's columns, as selected by the request. Absent when the row has no user."}}}]},"PatientJoinSort":{"oneOf":[{"$ref":"#/components/schemas/PatientSort"},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["user"],"properties":{"user":{"$ref":"#/components/schemas/UserSort","description":"Sorts on one of the joined user's columns."}}}],"description":"Sort on one of this entity's columns, or on a column of an entity it joins to, keyed by that entity: a single column mapped to `asc` or `desc`."},"PatientLastNames":{"type":"array","items":{"type":"string","description":"A person's name: letters in any script, spaces, hyphens, apostrophes and periods, with no digits. A hyphen or apostrophe must sit between two letters (Smith-Jones, O'Brien), a period only right after a letter (Smith Jr.), and never two spaces in a row. Surrounding whitespace is trimmed, the text is Unicode-normalized (NFC), and curly apostrophes, Unicode hyphens and no-break spaces become their plain forms. A blank or invalid name is rejected, with a message saying what to fix.","examples":["Jane"]},"description":"A patient's last names: the primary last name first, then any alternates such as maiden or prior married names. At least one entry, and every entry follows the person-name rules. A hyphenated name is one entry (Smith-Jones), not two. An empty list or an invalid entry is rejected.","examples":[["Doe","Smith"]],"minItems":1},"PatientName":{"type":"string","description":"A person's name: letters in any script, spaces, hyphens, apostrophes and periods, with no digits. A hyphen or apostrophe must sit between two letters (Smith-Jones, O'Brien), a period only right after a letter (Smith Jr.), and never two spaces in a row. Surrounding whitespace is trimmed, the text is Unicode-normalized (NFC), and curly apostrophes, Unicode hyphens and no-break spaces become their plain forms. A blank or invalid name is rejected, with a message saying what to fix.","examples":["Jane"]},"PatientNumericAggregates":{"type":"object","properties":{"companyId":{"type":["string","null"],"description":"Identifier of the customer organization associated with the record."}}},"PatientNumericFields":{"type":"object","properties":{"companyId":{"type":"boolean","description":"Identifier of the customer organization associated with the record.","default":false}},"additionalProperties":false},"PatientOutput":{"type":"object","required":["patient","link","projectJoin","authorization","hipaaAuthorization","visitCount","completedRecordRequestCount","recordRequestCount","check","siteSonarAvailable","patientHistoriesAvailable","ehrSearchAvailable","notes"],"properties":{"patient":{"$ref":"#/components/schemas/PatientResponse","description":"The patient record."},"link":{"type":"string","description":"Canonical `/companies/{companyId}/projects/{projectId}/patients/{id}` URL.","example":"/companies/115/projects/q7m2x9k4tb/patients/k3f9x2m7qa"},"projectJoin":{"$ref":"#/components/schemas/ProjectJoin","description":"The project the patient belongs to, with its company, its record\nrequest, patient and visit counts, and its letters."},"authorization":{"$ref":"#/components/schemas/FileResponse","description":"The patient's authorization document: a short-lived download URL when\none is on file, and a short-lived upload URL for sending a new one."},"hipaaAuthorization":{"allOf":[{"$ref":"#/components/schemas/FileResponse","description":"Deprecated copy of `authorization`, always the same value. Read\n`authorization` in new code; this field will be removed."}],"deprecated":true},"visitCount":{"type":"integer","format":"int64","description":"Number of visits on file for the patient.","example":3},"completedRecordRequestCount":{"type":"integer","format":"int64","description":"Number of the patient's record requests in a finished status:\n`Completed`, `Partial`, `PatientNotFound`, `ServiceDatesNotFound`,\n`SiteClosed`, `Canceled`, `DuplicateRequest`, or `Resubmitted`.","example":2},"recordRequestCount":{"type":"integer","format":"int64","description":"Number of the patient's record requests, in any status.","example":4},"check":{"$ref":"#/components/schemas/PatientCheck","description":"Whether the patient has the authorization the project requires."},"siteSonarAvailable":{"type":"boolean","description":"Whether Site Sonar is available for this patient — i.e. the company has\nbeen approved for the feature (`site_sonar_enabled`). Always `true` on a\nSandbox project, whose searches are simulated and need no approval.","example":true},"patientHistoriesAvailable":{"type":"boolean","description":"Whether patient histories are available for this patient — i.e. the\ncompany has been approved for the feature (`patient_histories_enabled`).\nAlways `true` on a Sandbox project, whose searches are simulated and\nneed no approval.","example":true},"ehrSearchAvailable":{"type":"boolean","description":"Whether EHR Search is available for this patient — i.e. the company has\nbeen approved for the feature (`ehr_search_enabled`). Always `true` on a\nSandbox project, whose searches are simulated and need no approval.","example":false},"ehrSearchBlockedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchBlockedReason","description":"Why the EHR Search this patient has requested will not actually run, or\nnull when nothing is holding it back.\n\nAvailability and runnability are different questions: `ehrSearchAvailable`\nsays the company is approved for the feature, this says whether the\nrequest as submitted can reach the vendor at all. Only ever set when\n`ehrSearch` is requested — the requestor is being told about the run they\nasked for. `MissingZipCode` means the submission is armed and waiting:\nadd a ZIP code and it goes out on its own, with no further call."}]},"patientHistoriesBlockedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchBlockedReason","description":"Why the Patient Histories run this patient has requested will not\nactually run, or null when nothing is holding it back.\n\nScoped to what will actually run: an `InsuranceLife` project does not\nrequire a ZIP code for its histories run, so a zip-less patient there is\nnever reported as blocked. See `ehrSearchBlockedReason` for the\navailability-vs-runnability distinction."}]},"siteSonarBlockedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchBlockedReason","description":"Why the Site Sonar run this patient has requested will not actually run,\nor null when nothing is holding it back.\n\nA ZIP code is never the reason here — Site Sonar searches a zip-less\npatient fine — so the only value this takes is `DeceasedBeforeClinicalData`, for\na patient whose authorization documents date their death before any\nclearinghouse still holds records. Unlike `MissingZipCode` that is not a\nwait: nothing an operator supplies will make the search find something,\nand the capability is finished rather than armed."}]},"latestSiteSonarFeeAt":{"type":["string","null"],"format":"date-time","description":"Created-at of this patient's latest non-canceled Site Sonar fee\n(`SiteSonarHit` / `SiteSonarNoHit`) — the same fees shown in Clinical\nData Activity. Null when Site Sonar has never billed a run.","example":"2026-01-15T12:00:00Z"},"latestPatientHistoriesFeeAt":{"type":["string","null"],"format":"date-time","description":"Created-at of this patient's latest non-canceled Patient Histories fee\n(`PatientHistoryHit` / `PatientHistoryNoHit` / `PatientHistoriesPlus`) —\nthe same fees shown in Clinical Data Activity. Null when Patient\nHistories has never billed a run.","example":"2026-01-16T09:30:00Z"},"latestEhrSearchSentAt":{"type":["string","null"],"format":"date-time","description":"When this patient's latest EHR Search request was sent — the Clinical\nData Activity outbound timestamp. Null when no EHR Search request has\nbeen recorded.","example":"2026-01-17T14:45:00Z"},"createdByEmail":{"type":["string","null"],"description":"Email of the user who created this patient.","example":"analyst@example.com"},"ownerEmail":{"type":["string","null"],"description":"Email of the user currently assigned as the owner. Null when the\npatient is unowned or when the owner record can no longer be\nresolved.","example":"reviewer@example.com"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"description":"Notes left on the patient, newest first."},"embedToken":{"type":["string","null"],"description":"Pre-minted embed token for iframing a read-only auth-check view.\n\nPass the token to `GET /ui/auth-check/embed?token=...` to render the\nanalysis UI inside your own page without proxying the raw analysis\nschema. Null when the authorization PDF has not yet been uploaded.\nExpiry is one hour from fetch time — re-fetch the patient for a fresh\ntoken. See [Embedding the auth-check UI](#embedding-the-auth-check-ui).","example":"ZXhhbXBsZS1lbWJlZC10b2tlbg"}}},"PatientResponse":{"type":"object","description":"A patient, as the single-patient endpoints return it.","required":["companyId","id","projectId","firstName","lastName","lastNames","dateOfBirth","sex","zipCodes","hasSocialSecurityNumber","createdAt","authorizationStatus","searchLevel","siteSonar","patientHistories","ehrSearch","searchStatus","siteSonarStatus"],"properties":{"companyId":{"$ref":"#/components/schemas/CompanyId","description":"ID of the company that owns the patient."},"id":{"type":"string","description":"The patient's ID, unique within the project.","example":"k3f9x2m7qa"},"projectId":{"$ref":"#/components/schemas/StringId","description":"ID of the project the patient belongs to."},"firstName":{"type":"string","description":"The patient's first name, including any additional first names.","example":"Jane"},"lastName":{"type":"string","description":"The primary last name.","example":"Doe"},"lastNames":{"type":"array","items":{"type":"string"},"description":"Every last name for the patient — primary first, then any alternate\nlast names (maiden/prior names). Always contains at least one entry.","example":["Doe","Smith"]},"dateOfBirth":{"type":"string","format":"date","description":"The patient's date of birth, as `YYYY-MM-DD`.","example":"1980-04-12"},"sex":{"$ref":"#/components/schemas/Sex","description":"The patient's sex."},"zipCode":{"type":["string","null"],"description":"Deprecated: the first entry of `zipCodes`, or null when there is none.\nRead `zipCodes` in new code.","deprecated":true,"example":"94110"},"zipCodes":{"type":"array","items":{"type":"string"},"description":"The ZIP codes where the patient lived at the time of each visit, not\nnecessarily their current ZIP code. Empty when none are on file.","example":["94110","02139"]},"mobile":{"type":["string","null"],"description":"The patient's mobile phone number in E.164 form, such as\n`+12025550142`. Null when none is on file.","example":"+12025550142"},"hasSocialSecurityNumber":{"type":"boolean","description":"Whether an SSN is on file, without exposing its value. Lets the frontend\nrender the censored value + reveal control when present, or \"Not\nprovided\" (and no reveal button) when absent — instead of always\nassuming one might exist and forcing a wasted reveal click.","example":true},"email":{"type":["string","null"],"description":"The patient's email address. Null when none is on file.","example":"jane.doe@example.com"},"createdAt":{"type":"string","format":"date-time","description":"When the patient was created.","example":"2026-01-15T12:00:00Z"},"authorizationStatus":{"$ref":"#/components/schemas/AuthorizationStatus","description":"Where the review of the patient's authorization stands. Searches are\nnot submitted until it is `Approved`."},"searchLevel":{"$ref":"#/components/schemas/SearchLevel","description":"Legacy coupled search level, derived from the `siteSonar` /\n`patientHistories` flags below — read those in new code."},"siteSonar":{"type":"boolean","description":"Whether site sonar (facility discovery) is requested.","example":true},"patientHistories":{"type":"boolean","description":"Whether patient histories (diagnosis/treatment data) are requested.","example":true},"ehrSearch":{"type":"boolean","description":"Whether EHR Search is requested for this patient.","example":false},"searchStatus":{"$ref":"#/components/schemas/SearchStatus","description":"Where the patient's clinical-data searches stand. Watch this field, or\nsubscribe a webhook to it, to learn when a search finishes."},"siteSonarStatus":{"allOf":[{"$ref":"#/components/schemas/SearchStatus","description":"Deprecated alias of `searchStatus`, always the same value. Read\n`searchStatus` in new code; this field will be removed."}],"deprecated":true},"userId":{"type":["string","null"],"description":"ID of the user who created the patient. Null when not recorded.","example":"2Hb8kTQ1zXrN4pLm9VwYc3EaJfD"},"ownerUserId":{"type":["string","null"],"description":"Assignee for queue-based work distribution. Distinct from `user_id`,\nwhich is the creator. Cleared/set via the patient queue endpoint.","example":"2Hb8kZ7rPq4sWn1Lx6VmTc9EyGh"}}},"PatientSearchLevelForm":{"type":"object","description":"Body for `PATCH .../patients/{patientId}/search-level`.\n\nPatch semantics: an **absent field leaves the patient's current setting\nunchanged**; a present field is applied. Note this differs from the same\nfield names on the patient create body, where an omitted flag means *off*\n(a new patient has no prior state to preserve).\n\nA body containing none of the three capability fields is rejected with a\n400.","properties":{"siteSonar":{"type":["boolean","null"],"description":"Request (`true`) or withdraw (`false`) site sonar — claims-based\ndiscovery of the facilities the patient visited. Absent: leave the\npatient's current setting unchanged."},"patientHistories":{"type":["boolean","null"],"description":"Request (`true`) or withdraw (`false`) patient histories — diagnosis\nand treatment data retrieval, independent of site sonar. Absent:\nleave the patient's current setting unchanged."},"ehrSearch":{"type":["boolean","null"],"description":"Request (`true`) or withdraw (`false`) the Veradigm EHR enrollment\n(\"ehrSearch\"), independent of the other flags. Absent: leave the\npatient's current setting unchanged. Records intent only."}}},"PatientSearchLevelResponse":{"type":"object","description":"Body of `PATCH .../patients/{id}/search-level`.\n\nThe route used to answer 200 with no body. It now says whether the\ncapabilities this request just armed can actually run, because arming a\ncapability on a patient with no ZIP code is the same hole as creating one that\nway -- and after a bulk import it is the more common way in.\n\nAll three capabilities are reported. A ZIP code can only ever block the two\nwhose vendors demand one -- Site Sonar searches a zip-less patient fine --\nbut the clinical-data horizon blocks Site Sonar and Patient Histories alike.","properties":{"ehrSearchBlockedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchBlockedReason","description":"Why the patient's EHR Search will not run, or null when nothing is\nholding it back. Same value as `ehrSearchBlockedReason` on the patient."}]},"patientHistoriesBlockedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchBlockedReason","description":"Why the patient's Patient Histories run will not run, or null when\nnothing is holding it back. Same value as\n`patientHistoriesBlockedReason` on the patient."}]},"siteSonarBlockedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchBlockedReason","description":"Why the patient's Site Sonar run will not run, or null when nothing is\nholding it back. Same value as `siteSonarBlockedReason` on the patient."}]}}},"PatientSelected":{"allOf":[{"$ref":"#/components/schemas/PatientAggregateDataFlattenSelected"},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Identifier of the patient within the customer organization and project.\nMatch child-sheet patientId values together with companyId and\nprojectId."},"firstName":{"type":["string","null"],"description":"Patient first name from the patient profile."},"lastName":{"type":["string","null"],"description":"Patient primary last name from the patient profile."},"alternateLastNames":{"type":["array","null"],"items":{"type":"string"},"description":"Alternate last names on file, excluding the primary lastName. Exported\nas a JSON array in one cell."},"dateOfBirth":{"type":["string","null"],"format":"date","description":"Patient date of birth."},"sex":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Sex","description":"Patient sex as stored. Exported values are male, female, or unknown."}]},"zipCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Postal codes on the patient profile in stored order. Exported as a JSON\narray. Preserve leading zeros."},"mobile":{"type":["string","null"],"description":"Patient mobile telephone number, when supplied."},"email":{"type":["string","null"],"description":"Patient email address, when supplied."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the patient record was created."},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp of the most recent patient creation, replacement, or profile\nupdate. Not the timestamp of every clinical result."},"authorizationStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AuthorizationStatus","description":"Current authorization-validation status for the patient. This is a\nworkflow status, not an authorization document."}]},"searchLevel":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchLevel","description":"Legacy combined search setting derived from the independent search\nflags. Values are None, SiteSonar, or PatientHistory. Use the individual\nflags for current intent."}]},"siteSonar":{"type":["boolean","null"],"description":"Whether facility discovery is currently requested. This request flag can\nclear when processing completes. False does not mean no historical\nresults exist."},"patientHistories":{"type":["boolean","null"],"description":"Whether clinical-history retrieval is currently requested. This request\nflag can clear when processing completes. False does not mean no\nhistorical results exist."},"ehrSearch":{"type":["boolean","null"],"description":"Whether electronic health record discovery is currently requested. A\nrequest flag, not a result-availability indicator."},"searchStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SearchStatus","description":"Current overall search-processing status. See the Reading guide for the\nexported status tokens."}]},"latestSubmissionErrored":{"type":["boolean","null"]},"ownerUserId":{"type":["string","null"],"description":"Identifier of the user assigned to manage the patient. Distinct from the\ncreator userId."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Identifier of the customer organization associated with the record."}]},"projectId":{"type":["string","null"],"description":"Identifier of the project containing the record."},"userId":{"type":["string","null"],"description":"Identifier of the user who created the patient record."},"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}}]},"PatientSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Identifier of the patient within the customer organization and project.\nMatch child-sheet patientId values together with companyId and\nprojectId.","enum":["asc","desc"]}}},{"type":"object","required":["firstName"],"properties":{"firstName":{"type":"string","description":"Patient first name from the patient profile.","enum":["asc","desc"]}}},{"type":"object","required":["lastName"],"properties":{"lastName":{"type":"string","description":"Patient primary last name from the patient profile.","enum":["asc","desc"]}}},{"type":"object","required":["dateOfBirth"],"properties":{"dateOfBirth":{"type":"string","description":"Patient date of birth.","enum":["asc","desc"]}}},{"type":"object","required":["sex"],"properties":{"sex":{"type":"string","description":"Patient sex as stored. Exported values are male, female, or unknown.","enum":["asc","desc"]}}},{"type":"object","required":["zipCodes"],"properties":{"zipCodes":{"type":"string","description":"Postal codes on the patient profile in stored order. Exported as a JSON\narray. Preserve leading zeros.","enum":["asc","desc"]}}},{"type":"object","required":["mobile"],"properties":{"mobile":{"type":"string","description":"Patient mobile telephone number, when supplied.","enum":["asc","desc"]}}},{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Patient email address, when supplied.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp when the patient record was created.","enum":["asc","desc"]}}},{"type":"object","required":["updatedAt"],"properties":{"updatedAt":{"type":"string","description":"Timestamp of the most recent patient creation, replacement, or profile\nupdate. Not the timestamp of every clinical result.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationStatus"],"properties":{"authorizationStatus":{"type":"string","description":"Current authorization-validation status for the patient. This is a\nworkflow status, not an authorization document.","enum":["asc","desc"]}}},{"type":"object","required":["searchLevel"],"properties":{"searchLevel":{"type":"string","description":"Legacy combined search setting derived from the independent search\nflags. Values are None, SiteSonar, or PatientHistory. Use the individual\nflags for current intent.","enum":["asc","desc"]}}},{"type":"object","required":["siteSonar"],"properties":{"siteSonar":{"type":"string","description":"Whether facility discovery is currently requested. This request flag can\nclear when processing completes. False does not mean no historical\nresults exist.","enum":["asc","desc"]}}},{"type":"object","required":["patientHistories"],"properties":{"patientHistories":{"type":"string","description":"Whether clinical-history retrieval is currently requested. This request\nflag can clear when processing completes. False does not mean no\nhistorical results exist.","enum":["asc","desc"]}}},{"type":"object","required":["ehrSearch"],"properties":{"ehrSearch":{"type":"string","description":"Whether electronic health record discovery is currently requested. A\nrequest flag, not a result-availability indicator.","enum":["asc","desc"]}}},{"type":"object","required":["searchStatus"],"properties":{"searchStatus":{"type":"string","description":"Current overall search-processing status. See the Reading guide for the\nexported status tokens.","enum":["asc","desc"]}}},{"type":"object","required":["latestSubmissionErrored"],"properties":{"latestSubmissionErrored":{"type":"string","enum":["asc","desc"]}}},{"type":"object","required":["ownerUserId"],"properties":{"ownerUserId":{"type":"string","description":"Identifier of the user assigned to manage the patient. Distinct from the\ncreator userId.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Identifier of the customer organization associated with the record.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Identifier of the project containing the record.","enum":["asc","desc"]}}},{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"Identifier of the user who created the patient record.","enum":["asc","desc"]}}},{"type":"object","required":["visitCount"],"properties":{"visitCount":{"type":"string","description":"Number of visit records currently associated with the patient.","enum":["asc","desc"]}}},{"type":"object","required":["requestCount"],"properties":{"requestCount":{"type":"string","description":"Number of record requests associated with the patient, including C-CDA\nrequests.","enum":["asc","desc"]}}},{"type":"object","required":["recordRequestCount"],"properties":{"recordRequestCount":{"type":"string","description":"Number of medical, imaging, and billing requests associated with the\npatient. Excludes C-CDA requests.","enum":["asc","desc"]}}},{"type":"object","required":["ccdaRequestCount"],"properties":{"ccdaRequestCount":{"type":"string","description":"Number of C-CDA requests associated with the patient.","enum":["asc","desc"]}}},{"type":"object","required":["requestCompletedOrCanceledCount"],"properties":{"requestCompletedOrCanceledCount":{"type":"string","description":"Number of patient requests with status Completed, Canceled, or Void.","enum":["asc","desc"]}}},{"type":"object","required":["feeTotal"],"properties":{"feeTotal":{"type":"string","description":"Sum of non-canceled fees associated with the patient, excluding fees\nclassified as record-request fees. Monetary amount; the field does not\ncarry a currency code.","enum":["asc","desc"]}}},{"type":"object","required":["lastSonarRunAt"],"properties":{"lastSonarRunAt":{"type":"string","description":"Creation timestamp of the most recent non-canceled facility-discovery\nfee. It marks billed search activity, not necessarily when results\narrived.","enum":["asc","desc"]}}},{"type":"object","required":["lastHistoriesRunAt"],"properties":{"lastHistoriesRunAt":{"type":"string","description":"Creation timestamp of the most recent non-canceled clinical-history fee.\nIt marks billed search activity, not necessarily when results arrived.","enum":["asc","desc"]}}},{"type":"object","required":["lastEhrRunAt"],"properties":{"lastEhrRunAt":{"type":"string","description":"Most recent outbound electronic health record search timestamp across\nthe patient search submissions.","enum":["asc","desc"]}}},{"type":"object","required":["diagnosisCount"],"properties":{"diagnosisCount":{"type":"string","description":"Number of diagnosis records currently associated with the patient.","enum":["asc","desc"]}}},{"type":"object","required":["procedureCount"],"properties":{"procedureCount":{"type":"string","description":"Number of procedure records currently associated with the patient.","enum":["asc","desc"]}}},{"type":"object","required":["prescriptionFillCount"],"properties":{"prescriptionFillCount":{"type":"string","description":"Number of prescription dispensing records currently associated with the\npatient.","enum":["asc","desc"]}}},{"type":"object","required":["labResultCount"],"properties":{"labResultCount":{"type":"string","description":"Number of laboratory result records currently associated with the\npatient.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationExists"],"properties":{"authorizationExists":{"type":"string","description":"Populated per request from S3 listings by the patient enricher.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationDownloadUrl"],"properties":{"authorizationDownloadUrl":{"type":"string","description":"Download URL for the patient's HIPAA authorization file. Present\nonly when an authorization file exists for the patient; null\notherwise.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"PayerInsuranceId":{"type":"string","description":"An insurance or member id, as the patient's provider records it. Surrounding whitespace is trimmed; it must not be blank and may be at most 80 characters, or it is rejected.","examples":["MEMBER-EXAMPLE-0001"]},"PayorAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"PayorAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PayorNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"PayorFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Reference identifier for the payer associated with the visit."},"name":{"type":"boolean","description":"Name of the payer associated with the visit, resolved from payer\nreference data."}}},"PayorFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference identifier for the payer associated with the visit."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the payer associated with the visit, resolved from payer\nreference data."}}},"PayorJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/PayorAggregates"},{"type":"object"}]},"PayorJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/PayorAggregatesRequest"},{"type":"object"}]},"PayorJoinFields":{"allOf":[{"$ref":"#/components/schemas/PayorFields"},{"type":"object"}]},"PayorJoinFilter":{"allOf":[{"$ref":"#/components/schemas/PayorFilter"},{"type":"object"}]},"PayorJoinSelected":{"allOf":[{"$ref":"#/components/schemas/PayorSelected"},{"type":"object"}]},"PayorNumericAggregates":{"type":"object"},"PayorNumericFields":{"type":"object","additionalProperties":false},"PayorSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Reference identifier for the payer associated with the visit."},"name":{"type":["string","null"],"description":"Name of the payer associated with the visit, resolved from payer\nreference data."}}},"PayorSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Reference identifier for the payer associated with the visit.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the payer associated with the visit, resolved from payer\nreference data.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"PoaType":{"type":"string","description":"The kind of power of attorney the instrument grants.\n\n- `Medical`: authority over the principal's health care decisions, such as a health care power of attorney or health care proxy.\n- `Durable`: a power of attorney that stays in effect if the principal becomes incapacitated.\n- `General`: broad authority to act for the principal in most matters.\n- `Limited`: authority restricted to the specific acts or purposes the instrument lists.\n- `Financial`: authority over the principal's financial and property matters.","enum":["Medical","Durable","General","Limited","Financial"]},"PowerOfAttorneyDoc":{"type":"object","required":["agentNames","poaType","attestationType"],"properties":{"principalName":{"type":["string","null"],"description":"The name of the principal, as written: the person or organization granting the power (typically the patient). For a letter or assignment that passes on or grants a power of attorney, the party issuing it."},"principalAuthorityFrom":{"type":["string","null"],"description":"When the principal grants this power not in their own right but as the assignee, successor, or agent of another party, that other party's name as written (e.g. a fund granting power after buying a company's power of attorney names that company). Null when the principal acts in their own right."},"agentNames":{"type":"array","items":{"type":"string"},"description":"The names of every agent (attorney-in-fact) receiving power under this instrument, as written. Agents may be organizations as well as individuals: list each named organization and each named individual, including co-agents and successor agents."},"agentsMayDelegate":{"type":"boolean","description":"Does the instrument let its agents assign, transfer, or delegate their powers to others? True when it says so, e.g. \"together with its successors or assigns\", \"with full powers of substitution\", or \"may appoint a substitute or successor agent\"; false when it is silent or forbids it."},"hasPrincipalSignature":{"type":"boolean","description":"Is the principal's signature present? For an organization principal, a signature by its authorized officer, partner or representative in its signature block (\"By: … Name: … Title: …\") counts as the principal's signature. A typed or printed name with no signature or mark, or a blank signature line, does not."},"poaType":{"$ref":"#/components/schemas/PoaType","description":"The type of power of attorney"},"effectiveDate":{"type":["string","null"],"format":"date","description":"The effective date of the power of attorney"},"expirationDate":{"type":["string","null"],"format":"date","description":"The expiration date of the power of attorney"},"attestationType":{"$ref":"#/components/schemas/AttestationType","description":"The method of attestation of the power of attorney"},"isVoid":{"type":"boolean","description":"Is the document marked as VOID, CANCELLED, or REVOKED?"},"readability":{"$ref":"#/components/schemas/ReadabilityScore","description":"How legible this document is to a human reviewer at a medical facility."}}},"PractitionerAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"PractitionerAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PractitionerNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"PractitionerFields":{"type":"object","properties":{"id":{"type":"boolean","description":"The practitioner's id, in the form `practitioner-<token>`."},"name":{"type":"boolean","description":"Name of the attending provider associated with the visit or procedure,\nwhen the source identifies that provider."},"primarySpecialty":{"type":"boolean","description":"Populated by the NPPES overlay at read time for CMS NDH and claims\npractitioners. The NDH export carries no specialty of its own; claims\nmay have sidecar specialty/name/address that NPPES overwrites on a\nmatch."},"addressLine1":{"type":"boolean","description":"First line of the practitioner's street address. Blank when no address\nis known."},"city":{"type":"boolean","description":"City of the practitioner's address. Blank when not known."},"state":{"type":"boolean","description":"State of the practitioner's address. Blank when not known."},"zip":{"type":"boolean","description":"ZIP code of the practitioner's address. Blank when not known."},"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."}}},"PractitionerFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The practitioner's id, in the form `practitioner-<token>`."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the attending provider associated with the visit or procedure,\nwhen the source identifies that provider."},"primarySpecialty":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Populated by the NPPES overlay at read time for CMS NDH and claims\npractitioners. The NDH export carries no specialty of its own; claims\nmay have sidecar specialty/name/address that NPPES overwrites on a\nmatch."},"addressLine1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First line of the practitioner's street address. Blank when no address\nis known."},"city":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"City of the practitioner's address. Blank when not known."},"state":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"State of the practitioner's address. Blank when not known."},"zip":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ZIP code of the practitioner's address. Blank when not known."}}},"PractitionerJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/PractitionerAggregates"},{"type":"object"}]},"PractitionerJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/PractitionerAggregatesRequest"},{"type":"object"}]},"PractitionerJoinFields":{"allOf":[{"$ref":"#/components/schemas/PractitionerFields"},{"type":"object"}]},"PractitionerJoinFilter":{"allOf":[{"$ref":"#/components/schemas/PractitionerFilter"},{"type":"object"}]},"PractitionerJoinSelected":{"allOf":[{"$ref":"#/components/schemas/PractitionerSelected"},{"type":"object"}]},"PractitionerNumericAggregates":{"type":"object"},"PractitionerNumericFields":{"type":"object","additionalProperties":false},"PractitionerSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"The practitioner's id, in the form `practitioner-<token>`."},"name":{"type":["string","null"],"description":"Name of the attending provider associated with the visit or procedure,\nwhen the source identifies that provider."},"primarySpecialty":{"type":["string","null"],"description":"Populated by the NPPES overlay at read time for CMS NDH and claims\npractitioners. The NDH export carries no specialty of its own; claims\nmay have sidecar specialty/name/address that NPPES overwrites on a\nmatch."},"addressLine1":{"type":["string","null"],"description":"First line of the practitioner's street address. Blank when no address\nis known."},"city":{"type":["string","null"],"description":"City of the practitioner's address. Blank when not known."},"state":{"type":["string","null"],"description":"State of the practitioner's address. Blank when not known."},"zip":{"type":["string","null"],"description":"ZIP code of the practitioner's address. Blank when not known."},"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}},"PractitionerSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The practitioner's id, in the form `practitioner-<token>`.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the attending provider associated with the visit or procedure,\nwhen the source identifies that provider.","enum":["asc","desc"]}}},{"type":"object","required":["primarySpecialty"],"properties":{"primarySpecialty":{"type":"string","description":"Populated by the NPPES overlay at read time for CMS NDH and claims\npractitioners. The NDH export carries no specialty of its own; claims\nmay have sidecar specialty/name/address that NPPES overwrites on a\nmatch.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine1"],"properties":{"addressLine1":{"type":"string","description":"First line of the practitioner's street address. Blank when no address\nis known.","enum":["asc","desc"]}}},{"type":"object","required":["city"],"properties":{"city":{"type":"string","description":"City of the practitioner's address. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["state"],"properties":{"state":{"type":"string","description":"State of the practitioner's address. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["zip"],"properties":{"zip":{"type":"string","description":"ZIP code of the practitioner's address. Blank when not known.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"PrefillDemographics":{"type":"object","description":"Optional demographics the customer may supply to pre-fill the intake form\nwhen minting a token for a brand-new patient (route #1). Every field is\noptional and editable, so the patient's input stays authoritative. Unlike\nthe ids in the payload this IS patient data, so it is only ever present on\nthe new-patient route — existing patients (#2/#3) are pre-filled server-side\nfrom the patient record, keeping their tokens PHI-free.","properties":{"firstName":{"type":["string","null"],"description":"The patient's first name. Absent to leave the field empty.","example":"Jane"},"lastName":{"type":["string","null"],"description":"The patient's last name. Absent to leave the field empty.","example":"Doe"},"dateOfBirth":{"type":["string","null"],"description":"ISO-8601 (`YYYY-MM-DD`), matching the form's date input.","example":"1990-04-12"},"sex":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Sex","description":"The patient's sex. Absent to leave the field unselected."}]},"zipCodes":{"type":"array","items":{"type":"string"},"description":"ZIP codes where the patient has lived, as five-digit codes. Empty to\nleave the field empty; the patient must enter at least one before\nsigning."},"ssn":{"type":["string","null"],"description":"The patient's nine-digit Social Security number. Absent to leave the\nfield empty."},"email":{"type":["string","null"],"description":"The patient's email address. Absent to leave the field empty.","example":"jane.doe@example.com"},"mobile":{"type":["string","null"],"description":"The patient's mobile phone number, in E.164 format or as a US number\nwith or without punctuation. Absent to leave the field empty.","example":"+12025550142"}}},"PrescriptionFillAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"PrescriptionFillAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PrescriptionFillNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"PrescriptionFillBrowseAggregate":{"type":"object","properties":{"prescriptionFill":{"$ref":"#/components/schemas/PrescriptionFillAggregates"},"drug":{"$ref":"#/components/schemas/DrugJoinAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"visit":{"$ref":"#/components/schemas/VisitJoinAggregates"},"site":{"$ref":"#/components/schemas/SiteJoinAggregates"},"prescriber":{"$ref":"#/components/schemas/PractitionerJoinAggregates"}}},"PrescriptionFillBrowseAggregateRequest":{"type":"object","properties":{"prescriptionFill":{"$ref":"#/components/schemas/PrescriptionFillAggregatesRequest"},"drug":{"$ref":"#/components/schemas/DrugJoinAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"visit":{"$ref":"#/components/schemas/VisitJoinAggregatesRequest"},"site":{"$ref":"#/components/schemas/SiteJoinAggregatesRequest"},"prescriber":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"}}},"PrescriptionFillBrowseFilter":{"type":"object","properties":{"prescriptionFill":{"$ref":"#/components/schemas/PrescriptionFillFilter","description":"Filters on the prescription fill's columns."},"drug":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DrugJoinFilter"}],"description":"Filters on the joined drug's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a drug."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"visit":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/VisitJoinFilter"}],"description":"Filters on the joined visit's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a visit."},"site":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/SiteJoinFilter"}],"description":"Filters on the joined site's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a site."},"prescriber":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined prescriber's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a prescriber."}}},"PrescriptionFillBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/PrescriptionFillBrowseSelect"},"where":{"$ref":"#/components/schemas/PrescriptionFillBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/PrescriptionFillBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/PrescriptionFillBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"PrescriptionFillBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/PrescriptionFillBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/PrescriptionFillBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"PrescriptionFillBrowseRow":{"type":"object","properties":{"prescriptionFill":{"$ref":"#/components/schemas/PrescriptionFillSelected","description":"The prescription fill's columns, as selected by the request."},"drug":{"$ref":"#/components/schemas/DrugJoinSelected","description":"The joined drug's columns, as selected by the request. Absent when the row has no drug."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"visit":{"$ref":"#/components/schemas/VisitJoinSelected","description":"The joined visit's columns, as selected by the request. Absent when the row has no visit."},"site":{"$ref":"#/components/schemas/SiteJoinSelected","description":"The joined site's columns, as selected by the request. Absent when the row has no site."},"prescriber":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined prescriber's columns, as selected by the request. Absent when the row has no prescriber."}}},"PrescriptionFillBrowseSelect":{"type":"object","properties":{"prescriptionFill":{"$ref":"#/components/schemas/PrescriptionFillFields","description":"Which of the prescription fill's columns to return."},"drug":{"$ref":"#/components/schemas/DrugJoinFields","description":"Which of the joined drug's columns to return. Absent when the row has no drug."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"visit":{"$ref":"#/components/schemas/VisitJoinFields","description":"Which of the joined visit's columns to return. Absent when the row has no visit."},"site":{"$ref":"#/components/schemas/SiteJoinFields","description":"Which of the joined site's columns to return. Absent when the row has no site."},"prescriber":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined prescriber's columns to return. Absent when the row has no prescriber."}}},"PrescriptionFillBrowseSort":{"oneOf":[{"type":"object","required":["prescriptionFill"],"properties":{"prescriptionFill":{"$ref":"#/components/schemas/PrescriptionFillSort","description":"Sorts on one of the prescription fill's columns."}}},{"type":"object","required":["drug"],"properties":{"drug":{"$ref":"#/components/schemas/DrugSort","description":"Sorts on one of the joined drug's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["visit"],"properties":{"visit":{"$ref":"#/components/schemas/VisitJoinSort","description":"Sorts on one of the joined visit's columns."}}},{"type":"object","required":["site"],"properties":{"site":{"$ref":"#/components/schemas/SiteJoinSort","description":"Sorts on one of the joined site's columns."}}},{"type":"object","required":["prescriber"],"properties":{"prescriber":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined prescriber's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"PrescriptionFillFields":{"type":"object","properties":{"ref":{"type":"boolean","description":"Reference for this prescription dispensing record in the current output.\nIt can change when clinical data is reprocessed."},"ndc":{"type":"boolean","description":"National Drug Code identifying the dispensed product. Stored as an\n11-digit normalized code without dashes. Preserve as text."},"rxCui":{"type":"boolean","description":"RxNorm concept identifier associated with the drug, when the product can\nbe resolved in the reference data."},"drugLabel":{"type":"boolean","description":"Drug label supplied with the prescription data."},"prescriptionNumber":{"type":"boolean","description":"Prescription number assigned by the source pharmacy or prescription\nsystem. Preserve as text."},"fillNumber":{"type":"boolean","description":"Fill sequence for the prescription. Zero means the original fill; one or\ngreater means a refill."},"daysSupply":{"type":"boolean","description":"Number of days the dispensed quantity is expected to cover, as reported\nby the source."},"quantityDispensed":{"type":"boolean","description":"Quantity dispensed for this fill. The unit depends on the drug or\nproduct; there is no separate quantity-unit field."},"strength":{"type":"boolean","description":"Drug strength or dosage text supplied with the prescription record."},"totalRefillsAllowed":{"type":"boolean","description":"Total number of refills authorized for the prescription, as reported by\nthe source."},"fcraDispute":{"type":"boolean","description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the prescription record. Blank means no flag was supplied."},"fillDate":{"type":"boolean","description":"Date the prescription was filled or refilled."},"createdAt":{"type":"boolean","description":"Timestamp when the prescription-fill data was recorded in the platform.\nThis is separate from the fill date."},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"boolean","description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"boolean","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":"boolean","description":"Reference to the visit associated with this dispensing event. The\nreference may change when the data is reprocessed."},"siteId":{"type":"boolean","description":"Platform reference for the dispensing pharmacy associated with the\nprescription fill."},"prescriberPractitionerId":{"type":"boolean","description":"Platform practitioner reference for the prescribing provider, when\nthat provider is resolved."}}},"PrescriptionFillFilter":{"type":"object","properties":{"ref":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference for this prescription dispensing record in the current output.\nIt can change when clinical data is reprocessed."},"ndc":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"National Drug Code identifying the dispensed product. Stored as an\n11-digit normalized code without dashes. Preserve as text."},"rxCui":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"RxNorm concept identifier associated with the drug, when the product can\nbe resolved in the reference data."},"drugLabel":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Drug label supplied with the prescription data."},"prescriptionNumber":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Prescription number assigned by the source pharmacy or prescription\nsystem. Preserve as text."},"fillNumber":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Fill sequence for the prescription. Zero means the original fill; one or\ngreater means a refill."},"daysSupply":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of days the dispensed quantity is expected to cover, as reported\nby the source."},"quantityDispensed":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Quantity dispensed for this fill. The unit depends on the drug or\nproduct; there is no separate quantity-unit field."},"strength":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Drug strength or dosage text supplied with the prescription record."},"totalRefillsAllowed":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Total number of refills authorized for the prescription, as reported by\nthe source."},"fcraDispute":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the prescription record. Blank means no flag was supplied."},"fillDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Date the prescription was filled or refilled."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp when the prescription-fill data was recorded in the platform.\nThis is separate from the fill date."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference to the visit associated with this dispensing event. The\nreference may change when the data is reprocessed."},"siteId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform reference for the dispensing pharmacy associated with the\nprescription fill."},"prescriberPractitionerId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the prescribing provider, when\nthat provider is resolved."}}},"PrescriptionFillNumericAggregates":{"type":"object","properties":{"fillNumber":{"type":["string","null"],"description":"Fill sequence for the prescription. Zero means the original fill; one or\ngreater means a refill."},"daysSupply":{"type":["string","null"],"description":"Number of days the dispensed quantity is expected to cover, as reported\nby the source."},"quantityDispensed":{"type":["string","null"],"description":"Quantity dispensed for this fill. The unit depends on the drug or\nproduct; there is no separate quantity-unit field."},"totalRefillsAllowed":{"type":["string","null"],"description":"Total number of refills authorized for the prescription, as reported by\nthe source."},"companyId":{"type":["string","null"],"description":"Platform identifier for the customer organization associated with the\nrecord."}}},"PrescriptionFillNumericFields":{"type":"object","properties":{"fillNumber":{"type":"boolean","description":"Fill sequence for the prescription. Zero means the original fill; one or\ngreater means a refill.","default":false},"daysSupply":{"type":"boolean","description":"Number of days the dispensed quantity is expected to cover, as reported\nby the source.","default":false},"quantityDispensed":{"type":"boolean","description":"Quantity dispensed for this fill. The unit depends on the drug or\nproduct; there is no separate quantity-unit field.","default":false},"totalRefillsAllowed":{"type":"boolean","description":"Total number of refills authorized for the prescription, as reported by\nthe source.","default":false},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord.","default":false}},"additionalProperties":false},"PrescriptionFillSelected":{"type":"object","properties":{"ref":{"type":["string","null"],"description":"Reference for this prescription dispensing record in the current output.\nIt can change when clinical data is reprocessed."},"id":{"type":["string","null"],"description":"Legacy alias of `ref`; prefer `ref`.","deprecated":true},"ndc":{"type":["string","null"],"description":"National Drug Code identifying the dispensed product. Stored as an\n11-digit normalized code without dashes. Preserve as text."},"rxCui":{"type":["string","null"],"description":"RxNorm concept identifier associated with the drug, when the product can\nbe resolved in the reference data."},"drugLabel":{"type":["string","null"],"description":"Drug label supplied with the prescription data."},"prescriptionNumber":{"type":["string","null"],"description":"Prescription number assigned by the source pharmacy or prescription\nsystem. Preserve as text."},"fillNumber":{"type":["integer","null"],"format":"int32","description":"Fill sequence for the prescription. Zero means the original fill; one or\ngreater means a refill."},"daysSupply":{"type":["integer","null"],"format":"int32","description":"Number of days the dispensed quantity is expected to cover, as reported\nby the source."},"quantityDispensed":{"type":["string","null"],"description":"Quantity dispensed for this fill. The unit depends on the drug or\nproduct; there is no separate quantity-unit field."},"strength":{"type":["string","null"],"description":"Drug strength or dosage text supplied with the prescription record."},"totalRefillsAllowed":{"type":["integer","null"],"format":"int32","description":"Total number of refills authorized for the prescription, as reported by\nthe source."},"fcraDispute":{"type":["boolean","null"],"description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the prescription record. Blank means no flag was supplied."},"fillDate":{"type":["string","null"],"format":"date","description":"Date the prescription was filled or refilled."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the prescription-fill data was recorded in the platform.\nThis is separate from the fill date."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Platform identifier for the customer organization associated with the\nrecord."}]},"projectId":{"type":["string","null"],"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":["string","null"],"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":["string","null"],"description":"Reference to the visit associated with this dispensing event. The\nreference may change when the data is reprocessed."},"visitId":{"type":["string","null"],"description":"Legacy alias of `visitRef`; prefer `visitRef`.","deprecated":true},"siteId":{"type":["string","null"],"description":"Platform reference for the dispensing pharmacy associated with the\nprescription fill."},"prescriberPractitionerId":{"type":["string","null"],"description":"Platform practitioner reference for the prescribing provider, when\nthat provider is resolved."}}},"PrescriptionFillSort":{"oneOf":[{"type":"object","required":["ref"],"properties":{"ref":{"type":"string","description":"Reference for this prescription dispensing record in the current output.\nIt can change when clinical data is reprocessed.","enum":["asc","desc"]}}},{"type":"object","required":["ndc"],"properties":{"ndc":{"type":"string","description":"National Drug Code identifying the dispensed product. Stored as an\n11-digit normalized code without dashes. Preserve as text.","enum":["asc","desc"]}}},{"type":"object","required":["rxCui"],"properties":{"rxCui":{"type":"string","description":"RxNorm concept identifier associated with the drug, when the product can\nbe resolved in the reference data.","enum":["asc","desc"]}}},{"type":"object","required":["drugLabel"],"properties":{"drugLabel":{"type":"string","description":"Drug label supplied with the prescription data.","enum":["asc","desc"]}}},{"type":"object","required":["prescriptionNumber"],"properties":{"prescriptionNumber":{"type":"string","description":"Prescription number assigned by the source pharmacy or prescription\nsystem. Preserve as text.","enum":["asc","desc"]}}},{"type":"object","required":["fillNumber"],"properties":{"fillNumber":{"type":"string","description":"Fill sequence for the prescription. Zero means the original fill; one or\ngreater means a refill.","enum":["asc","desc"]}}},{"type":"object","required":["daysSupply"],"properties":{"daysSupply":{"type":"string","description":"Number of days the dispensed quantity is expected to cover, as reported\nby the source.","enum":["asc","desc"]}}},{"type":"object","required":["quantityDispensed"],"properties":{"quantityDispensed":{"type":"string","description":"Quantity dispensed for this fill. The unit depends on the drug or\nproduct; there is no separate quantity-unit field.","enum":["asc","desc"]}}},{"type":"object","required":["strength"],"properties":{"strength":{"type":"string","description":"Drug strength or dosage text supplied with the prescription record.","enum":["asc","desc"]}}},{"type":"object","required":["totalRefillsAllowed"],"properties":{"totalRefillsAllowed":{"type":"string","description":"Total number of refills authorized for the prescription, as reported by\nthe source.","enum":["asc","desc"]}}},{"type":"object","required":["fcraDispute"],"properties":{"fcraDispute":{"type":"string","description":"Source-reported Fair Credit Reporting Act (FCRA) dispute flag associated\nwith the prescription record. Blank means no flag was supplied.","enum":["asc","desc"]}}},{"type":"object","required":["fillDate"],"properties":{"fillDate":{"type":"string","description":"Date the prescription was filled or refilled.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp when the prescription-fill data was recorded in the platform.\nThis is separate from the fill date.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Platform identifier for the customer organization associated with the\nrecord.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Platform identifier for the project containing the patient and record.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope.","enum":["asc","desc"]}}},{"type":"object","required":["visitRef"],"properties":{"visitRef":{"type":"string","description":"Reference to the visit associated with this dispensing event. The\nreference may change when the data is reprocessed.","enum":["asc","desc"]}}},{"type":"object","required":["siteId"],"properties":{"siteId":{"type":"string","description":"Platform reference for the dispensing pharmacy associated with the\nprescription fill.","enum":["asc","desc"]}}},{"type":"object","required":["prescriberPractitionerId"],"properties":{"prescriberPractitionerId":{"type":"string","description":"Platform practitioner reference for the prescribing provider, when\nthat provider is resolved.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"ProcedureAggregateDataFlattenSelected":{"type":"object","properties":{"diagnosisCount":{"type":["integer","null"],"format":"int64","description":"Number of diagnoses linked to this procedure line."}}},"ProcedureAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"ProcedureAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"ProcedureBrowseAggregate":{"type":"object","properties":{"procedure":{"$ref":"#/components/schemas/ProcedureAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"visit":{"$ref":"#/components/schemas/VisitJoinAggregates"},"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeJoinAggregates"},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregates"},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregates"},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregates"}}},"ProcedureBrowseAggregateRequest":{"type":"object","properties":{"procedure":{"$ref":"#/components/schemas/ProcedureAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"visit":{"$ref":"#/components/schemas/VisitJoinAggregatesRequest"},"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeJoinAggregatesRequest"},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"}}},"ProcedureBrowseFilter":{"type":"object","properties":{"procedure":{"$ref":"#/components/schemas/ProcedureFilter","description":"Filters on the procedure's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"visit":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/VisitJoinFilter"}],"description":"Filters on the joined visit's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a visit."},"procedureCode":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProcedureCodeJoinFilter"}],"description":"Filters on the joined procedure code's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a procedure code."},"attendingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined attending provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a attending provider."},"renderingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined rendering provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a rendering provider."},"operatingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined operating provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a operating provider."}}},"ProcedureBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/ProcedureBrowseSelect"},"where":{"$ref":"#/components/schemas/ProcedureBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/ProcedureBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/ProcedureBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"ProcedureBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/ProcedureBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/ProcedureBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"ProcedureBrowseRow":{"type":"object","properties":{"procedure":{"$ref":"#/components/schemas/ProcedureSelected","description":"The procedure's columns, as selected by the request."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"visit":{"$ref":"#/components/schemas/VisitJoinSelected","description":"The joined visit's columns, as selected by the request. Absent when the row has no visit."},"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeJoinSelected","description":"The joined procedure code's columns, as selected by the request. Absent when the row has no procedure code."},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined attending provider's columns, as selected by the request. Absent when the row has no attending provider."},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined rendering provider's columns, as selected by the request. Absent when the row has no rendering provider."},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined operating provider's columns, as selected by the request. Absent when the row has no operating provider."}}},"ProcedureBrowseSelect":{"type":"object","properties":{"procedure":{"$ref":"#/components/schemas/ProcedureFields","description":"Which of the procedure's columns to return."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"visit":{"$ref":"#/components/schemas/VisitJoinFields","description":"Which of the joined visit's columns to return. Absent when the row has no visit."},"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeJoinFields","description":"Which of the joined procedure code's columns to return. Absent when the row has no procedure code."},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined attending provider's columns to return. Absent when the row has no attending provider."},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined rendering provider's columns to return. Absent when the row has no rendering provider."},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined operating provider's columns to return. Absent when the row has no operating provider."}}},"ProcedureBrowseSort":{"oneOf":[{"type":"object","required":["procedure"],"properties":{"procedure":{"$ref":"#/components/schemas/ProcedureSort","description":"Sorts on one of the procedure's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["visit"],"properties":{"visit":{"$ref":"#/components/schemas/VisitJoinSort","description":"Sorts on one of the joined visit's columns."}}},{"type":"object","required":["procedureCode"],"properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeSort","description":"Sorts on one of the joined procedure code's columns."}}},{"type":"object","required":["attendingProvider"],"properties":{"attendingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined attending provider's columns."}}},{"type":"object","required":["renderingProvider"],"properties":{"renderingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined rendering provider's columns."}}},{"type":"object","required":["operatingProvider"],"properties":{"operatingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined operating provider's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"ProcedureCodeAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"ProcedureCodeAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProcedureCodeNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"ProcedureCodeBrowseAggregate":{"type":"object","properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeAggregates"}}},"ProcedureCodeBrowseAggregateRequest":{"type":"object","properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeAggregatesRequest"}}},"ProcedureCodeBrowseFilter":{"type":"object","properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeFilter","description":"Filters on the procedure code's columns."}}},"ProcedureCodeBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/ProcedureCodeBrowseSelect"},"where":{"$ref":"#/components/schemas/ProcedureCodeBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/ProcedureCodeBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/ProcedureCodeBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"ProcedureCodeBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/ProcedureCodeBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/ProcedureCodeBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"ProcedureCodeBrowseRow":{"type":"object","properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeSelected","description":"The procedure code's columns, as selected by the request."}}},"ProcedureCodeBrowseSelect":{"type":"object","properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeFields","description":"Which of the procedure code's columns to return."}}},"ProcedureCodeBrowseSort":{"oneOf":[{"type":"object","required":["procedureCode"],"properties":{"procedureCode":{"$ref":"#/components/schemas/ProcedureCodeSort","description":"Sorts on one of the procedure code's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"ProcedureCodeFields":{"type":"object","properties":{"id":{"type":"boolean","description":"CPT or HCPCS procedure code (for example 99213)."},"shortDescription":{"type":"boolean","description":"Short procedure description resolved from the procedure-code reference\ndata."}}},"ProcedureCodeFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"CPT or HCPCS procedure code (for example 99213)."},"shortDescription":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Short procedure description resolved from the procedure-code reference\ndata."}}},"ProcedureCodeJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/ProcedureCodeAggregates"},{"type":"object"}]},"ProcedureCodeJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/ProcedureCodeAggregatesRequest"},{"type":"object"}]},"ProcedureCodeJoinFields":{"allOf":[{"$ref":"#/components/schemas/ProcedureCodeFields"},{"type":"object"}]},"ProcedureCodeJoinFilter":{"allOf":[{"$ref":"#/components/schemas/ProcedureCodeFilter"},{"type":"object"}]},"ProcedureCodeJoinSelected":{"allOf":[{"$ref":"#/components/schemas/ProcedureCodeSelected"},{"type":"object"}]},"ProcedureCodeNumericAggregates":{"type":"object"},"ProcedureCodeNumericFields":{"type":"object","additionalProperties":false},"ProcedureCodeSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"CPT or HCPCS procedure code (for example 99213)."},"shortDescription":{"type":["string","null"],"description":"Short procedure description resolved from the procedure-code reference\ndata."}}},"ProcedureCodeSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"CPT or HCPCS procedure code (for example 99213).","enum":["asc","desc"]}}},{"type":"object","required":["shortDescription"],"properties":{"shortDescription":{"type":"string","description":"Short procedure description resolved from the procedure-code reference\ndata.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"ProcedureFields":{"type":"object","properties":{"ref":{"type":"boolean","description":"Reference for the procedure record in the current output. It can change\nwhen clinical data is reprocessed."},"lineSequence":{"type":"boolean","description":"Sequence number of the procedure line within its source visit or claim."},"lineItemControlNumber":{"type":"boolean","description":"Source control or tracking number for the procedure line."},"revenueCode":{"type":"boolean","description":"Revenue code reported for the procedure line. Preserve as text,\nincluding leading zeros."},"modifier1":{"type":"boolean","description":"First modifier reported for the procedure code. Qualifies the service\ndescribed by that code."},"modifier2":{"type":"boolean","description":"Second modifier reported for the procedure code."},"modifier3":{"type":"boolean","description":"Third modifier reported for the procedure code."},"modifier4":{"type":"boolean","description":"Fourth modifier reported for the procedure code."},"unitCount":{"type":"boolean","description":"Number of service units reported for the procedure line. Units depend on\nthe procedure and source and may be fractional."},"procedureCodeDescription":{"type":"boolean","description":"Description stored with the procedure when the source data was ingested.\nIt may differ from the current reference-data description."},"createdAt":{"type":"boolean","description":"Timestamp associated with the procedure data in the platform. For\nprocedures derived from a merged visit, this is the newest contributing\nvisit-data timestamp."},"dataSources":{"type":"boolean"},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"boolean","description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"boolean","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":"boolean","description":"Reference to the parent visit in the current clinical output. This\nreference can change when the data is reprocessed."},"procedureCode":{"type":"boolean","description":"Procedure code reported for the service, such as a CPT or HCPCS code.\nPreserve as text."},"attendingProviderId":{"type":"boolean","description":"Platform practitioner reference for the attending provider\nassociated with the procedure."},"renderingProviderId":{"type":"boolean","description":"Platform practitioner reference for the rendering provider\nassociated with the procedure."},"operatingProviderId":{"type":"boolean","description":"Platform practitioner reference for the operating provider\nassociated with the procedure."},"diagnosisCount":{"type":"boolean","description":"Number of diagnoses linked to this procedure line."}}},"ProcedureFilter":{"type":"object","properties":{"ref":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference for the procedure record in the current output. It can change\nwhen clinical data is reprocessed."},"lineSequence":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Sequence number of the procedure line within its source visit or claim."},"lineItemControlNumber":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source control or tracking number for the procedure line."},"revenueCode":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Revenue code reported for the procedure line. Preserve as text,\nincluding leading zeros."},"modifier1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First modifier reported for the procedure code. Qualifies the service\ndescribed by that code."},"modifier2":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Second modifier reported for the procedure code."},"modifier3":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Third modifier reported for the procedure code."},"modifier4":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Fourth modifier reported for the procedure code."},"unitCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of service units reported for the procedure line. Units depend on\nthe procedure and source and may be fractional."},"procedureCodeDescription":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Description stored with the procedure when the source data was ingested.\nIt may differ from the current reference-data description."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp associated with the procedure data in the platform. For\nprocedures derived from a merged visit, this is the newest contributing\nvisit-data timestamp."},"dataSources":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference to the parent visit in the current clinical output. This\nreference can change when the data is reprocessed."},"procedureCode":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Procedure code reported for the service, such as a CPT or HCPCS code.\nPreserve as text."},"attendingProviderId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the attending provider\nassociated with the procedure."},"renderingProviderId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the rendering provider\nassociated with the procedure."},"operatingProviderId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the operating provider\nassociated with the procedure."},"diagnosisCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of diagnoses linked to this procedure line."}}},"ProcedureNumericAggregates":{"type":"object","properties":{"lineSequence":{"type":["string","null"],"description":"Sequence number of the procedure line within its source visit or claim."},"unitCount":{"type":["string","null"],"description":"Number of service units reported for the procedure line. Units depend on\nthe procedure and source and may be fractional."},"companyId":{"type":["string","null"],"description":"Platform identifier for the customer organization associated with the\nrecord."}}},"ProcedureNumericFields":{"type":"object","properties":{"lineSequence":{"type":"boolean","description":"Sequence number of the procedure line within its source visit or claim.","default":false},"unitCount":{"type":"boolean","description":"Number of service units reported for the procedure line. Units depend on\nthe procedure and source and may be fractional.","default":false},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord.","default":false}},"additionalProperties":false},"ProcedureSelected":{"allOf":[{"$ref":"#/components/schemas/ProcedureAggregateDataFlattenSelected"},{"type":"object","properties":{"ref":{"type":["string","null"],"description":"Reference for the procedure record in the current output. It can change\nwhen clinical data is reprocessed."},"id":{"type":["string","null"],"description":"Legacy alias of `ref`; prefer `ref`.","deprecated":true},"lineSequence":{"type":["integer","null"],"format":"int32","description":"Sequence number of the procedure line within its source visit or claim."},"lineItemControlNumber":{"type":["string","null"],"description":"Source control or tracking number for the procedure line."},"revenueCode":{"type":["string","null"],"description":"Revenue code reported for the procedure line. Preserve as text,\nincluding leading zeros."},"modifier1":{"type":["string","null"],"description":"First modifier reported for the procedure code. Qualifies the service\ndescribed by that code."},"modifier2":{"type":["string","null"],"description":"Second modifier reported for the procedure code."},"modifier3":{"type":["string","null"],"description":"Third modifier reported for the procedure code."},"modifier4":{"type":["string","null"],"description":"Fourth modifier reported for the procedure code."},"unitCount":{"type":["string","null"],"description":"Number of service units reported for the procedure line. Units depend on\nthe procedure and source and may be fractional."},"procedureCodeDescription":{"type":["string","null"],"description":"Description stored with the procedure when the source data was ingested.\nIt may differ from the current reference-data description."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp associated with the procedure data in the platform. For\nprocedures derived from a merged visit, this is the newest contributing\nvisit-data timestamp."},"dataSources":{"type":["array","null"],"items":{"type":"string"}},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Platform identifier for the customer organization associated with the\nrecord."}]},"projectId":{"type":["string","null"],"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":["string","null"],"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"visitRef":{"type":["string","null"],"description":"Reference to the parent visit in the current clinical output. This\nreference can change when the data is reprocessed."},"visitId":{"type":["string","null"],"description":"Legacy alias of `visitRef`; prefer `visitRef`.","deprecated":true},"procedureCode":{"type":["string","null"],"description":"Procedure code reported for the service, such as a CPT or HCPCS code.\nPreserve as text."},"attendingProviderId":{"type":["string","null"],"description":"Platform practitioner reference for the attending provider\nassociated with the procedure."},"renderingProviderId":{"type":["string","null"],"description":"Platform practitioner reference for the rendering provider\nassociated with the procedure."},"operatingProviderId":{"type":["string","null"],"description":"Platform practitioner reference for the operating provider\nassociated with the procedure."}}}]},"ProcedureSort":{"oneOf":[{"type":"object","required":["ref"],"properties":{"ref":{"type":"string","description":"Reference for the procedure record in the current output. It can change\nwhen clinical data is reprocessed.","enum":["asc","desc"]}}},{"type":"object","required":["lineSequence"],"properties":{"lineSequence":{"type":"string","description":"Sequence number of the procedure line within its source visit or claim.","enum":["asc","desc"]}}},{"type":"object","required":["lineItemControlNumber"],"properties":{"lineItemControlNumber":{"type":"string","description":"Source control or tracking number for the procedure line.","enum":["asc","desc"]}}},{"type":"object","required":["revenueCode"],"properties":{"revenueCode":{"type":"string","description":"Revenue code reported for the procedure line. Preserve as text,\nincluding leading zeros.","enum":["asc","desc"]}}},{"type":"object","required":["modifier1"],"properties":{"modifier1":{"type":"string","description":"First modifier reported for the procedure code. Qualifies the service\ndescribed by that code.","enum":["asc","desc"]}}},{"type":"object","required":["modifier2"],"properties":{"modifier2":{"type":"string","description":"Second modifier reported for the procedure code.","enum":["asc","desc"]}}},{"type":"object","required":["modifier3"],"properties":{"modifier3":{"type":"string","description":"Third modifier reported for the procedure code.","enum":["asc","desc"]}}},{"type":"object","required":["modifier4"],"properties":{"modifier4":{"type":"string","description":"Fourth modifier reported for the procedure code.","enum":["asc","desc"]}}},{"type":"object","required":["unitCount"],"properties":{"unitCount":{"type":"string","description":"Number of service units reported for the procedure line. Units depend on\nthe procedure and source and may be fractional.","enum":["asc","desc"]}}},{"type":"object","required":["procedureCodeDescription"],"properties":{"procedureCodeDescription":{"type":"string","description":"Description stored with the procedure when the source data was ingested.\nIt may differ from the current reference-data description.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp associated with the procedure data in the platform. For\nprocedures derived from a merged visit, this is the newest contributing\nvisit-data timestamp.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Platform identifier for the customer organization associated with the\nrecord.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Platform identifier for the project containing the patient and record.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope.","enum":["asc","desc"]}}},{"type":"object","required":["visitRef"],"properties":{"visitRef":{"type":"string","description":"Reference to the parent visit in the current clinical output. This\nreference can change when the data is reprocessed.","enum":["asc","desc"]}}},{"type":"object","required":["procedureCode"],"properties":{"procedureCode":{"type":"string","description":"Procedure code reported for the service, such as a CPT or HCPCS code.\nPreserve as text.","enum":["asc","desc"]}}},{"type":"object","required":["attendingProviderId"],"properties":{"attendingProviderId":{"type":"string","description":"Platform practitioner reference for the attending provider\nassociated with the procedure.","enum":["asc","desc"]}}},{"type":"object","required":["renderingProviderId"],"properties":{"renderingProviderId":{"type":"string","description":"Platform practitioner reference for the rendering provider\nassociated with the procedure.","enum":["asc","desc"]}}},{"type":"object","required":["operatingProviderId"],"properties":{"operatingProviderId":{"type":"string","description":"Platform practitioner reference for the operating provider\nassociated with the procedure.","enum":["asc","desc"]}}},{"type":"object","required":["diagnosisCount"],"properties":{"diagnosisCount":{"type":"string","description":"Number of diagnoses linked to this procedure line.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"Project":{"type":"object","required":["id","companyId","name","description","createdAt","updatedAt","medicalInformationRequested","status","authorizationMethod","selfServe"],"properties":{"id":{"type":"string","description":"The project's ID.","example":"q7m2x9k4tb"},"companyId":{"$ref":"#/components/schemas/CompanyId","description":"ID of the company that owns the project."},"name":{"type":"string","description":"The project's name.","example":"Example underwriting project"},"description":{"type":"string","description":"A free-text description of the project. Empty when none was given.","example":"Medical records for 2026 life insurance applications"},"createdAt":{"type":"string","format":"date-time","description":"When the project was created.","example":"2026-01-15T12:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the project was last changed.","example":"2026-01-20T16:30:00Z"},"medicalInformationRequested":{"type":"array","items":{"type":"string"},"description":"The kinds of medical information the project requests, one\nfree-text entry each, such as `Medication history`."},"status":{"$ref":"#/components/schemas/ProjectStatus","description":"Where the project is in its lifecycle: `Sandbox`, `Live`, or\n`Closed`."},"purpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectPurpose","description":"Why the project requests records. Null when no purpose is set."}]},"authorizationMethod":{"$ref":"#/components/schemas/ProjectAuthorizationMethod","description":"How the project's patients authorize the release of their records."},"selfServe":{"type":"boolean","description":"Whether the project is configured for self-service operation. Only\nHermes can turn this on; false otherwise.","example":false}}},"ProjectAggregateDataFlattenSelected":{"type":"object","properties":{"patientCount":{"type":["integer","null"],"format":"int64","description":"Number of patients in the project."},"patientCompletedCount":{"type":["integer","null"],"format":"int64","description":"Number of the project's patients whose search status is Completed."},"requestCount":{"type":["integer","null"],"format":"int64","description":"Number of record requests in the project, C-CDA requests included."},"recordRequestCount":{"type":["integer","null"],"format":"int64","description":"Number of ordinary (medical / imaging / billing) requests. Together with\n`ccdaRequestCount` it adds up to `requestCount`."},"ccdaRequestCount":{"type":["integer","null"],"format":"int64","description":"Number of C-CDA requests. Together with `recordRequestCount` it adds up\nto `requestCount`."},"visitCount":{"type":["integer","null"],"format":"int64","description":"Number of visits on file across the project's patients."},"representationLetterExists":{"type":["boolean","null"],"description":"Whether a representation letter exists for the project (project-level\nfile, falling back to the company-level default). Populated per request\nfrom the cached `companies/` S3 listing by the project enricher."},"representationLetterDownloadUrl":{"type":["string","null"],"description":"Download URL for the representation letter. Present only when a\nrepresentation letter exists for the project; null otherwise."},"requestLetterExists":{"type":["boolean","null"],"description":"Whether a request letter exists for the project (project-level file,\nfalling back to the company-level default). Populated per request from\nthe cached `companies/` S3 listing by the project enricher."},"requestLetterDownloadUrl":{"type":["string","null"],"description":"Download URL for the request letter. Present only when a request\nletter exists for the project; null otherwise."}}},"ProjectAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"ProjectAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"ProjectAuthorizationMethod":{"type":"string","description":"How the project's patients authorize the release of their records. Each\nmethod must first be enabled for the company by Hermes.\n\n- `authorizationPdf` — a signed authorization PDF is uploaded for each\n  patient. The default.\n- `ial2Tokens` — authorization by IAL2 tokens. Patients and record\n  requests may be created without uploading an authorization PDF first.\n  This does not change the patient's initial `authorizationStatus`, which\n  still follows the project's `purpose`.","enum":["ial2Tokens","authorizationPdf"]},"ProjectFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Unique identifier of the project."},"companyId":{"type":"boolean","description":"Identifier of the company that owns the project."},"name":{"type":"boolean","description":"Name of the project containing the patient and record."},"description":{"type":"boolean","description":"Free-text description of the project. Blank when none was given."},"status":{"type":"boolean","description":"Current status of the associated project. Exported values are Sandbox,\nLive, or Closed."},"purpose":{"type":"boolean","description":"Why the project requests records, such as IndividualAccess or\nLegalPlaintiff. Blank when no purpose is set."},"createdAt":{"type":"boolean","description":"When the project was created."},"updatedAt":{"type":"boolean","description":"When the project was last changed."},"selfServe":{"type":"boolean","description":"Whether the project is configured for self-service operation."},"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."},"patientCount":{"type":"boolean","description":"Number of patients in the project."},"patientCompletedCount":{"type":"boolean","description":"Number of the project's patients whose search status is Completed."},"requestCount":{"type":"boolean","description":"Number of record requests in the project, C-CDA requests included."},"recordRequestCount":{"type":"boolean","description":"Number of ordinary (medical / imaging / billing) requests. Together with\n`ccdaRequestCount` it adds up to `requestCount`."},"ccdaRequestCount":{"type":"boolean","description":"Number of C-CDA requests. Together with `recordRequestCount` it adds up\nto `requestCount`."},"visitCount":{"type":"boolean","description":"Number of visits on file across the project's patients."},"representationLetterExists":{"type":"boolean","description":"Whether a representation letter exists for the project (project-level\nfile, falling back to the company-level default). Populated per request\nfrom the cached `companies/` S3 listing by the project enricher."},"representationLetterDownloadUrl":{"type":"boolean","description":"Download URL for the representation letter. Present only when a\nrepresentation letter exists for the project; null otherwise."},"requestLetterExists":{"type":"boolean","description":"Whether a request letter exists for the project (project-level file,\nfalling back to the company-level default). Populated per request from\nthe cached `companies/` S3 listing by the project enricher."},"requestLetterDownloadUrl":{"type":"boolean","description":"Download URL for the request letter. Present only when a request\nletter exists for the project; null otherwise."}}},"ProjectFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Unique identifier of the project."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the company that owns the project."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the project containing the patient and record."},"description":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Free-text description of the project. Blank when none was given."},"status":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["Sandbox","Live","Closed"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["Sandbox","Live","Closed"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["Sandbox","Live","Closed"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["Sandbox","Live","Closed"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Current status of the associated project. Exported values are Sandbox,\nLive, or Closed."},"purpose":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Why the project requests records, such as IndividualAccess or\nLegalPlaintiff. Blank when no purpose is set."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the project was created."},"updatedAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the project was last changed."},"selfServe":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the project is configured for self-service operation."},"patientCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of patients in the project."},"patientCompletedCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of the project's patients whose search status is Completed."},"requestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of record requests in the project, C-CDA requests included."},"recordRequestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of ordinary (medical / imaging / billing) requests. Together with\n`ccdaRequestCount` it adds up to `requestCount`."},"ccdaRequestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of C-CDA requests. Together with `recordRequestCount` it adds up\nto `requestCount`."},"visitCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of visits on file across the project's patients."},"representationLetterExists":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether a representation letter exists for the project (project-level\nfile, falling back to the company-level default). Populated per request\nfrom the cached `companies/` S3 listing by the project enricher."},"representationLetterDownloadUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Download URL for the representation letter. Present only when a\nrepresentation letter exists for the project; null otherwise."},"requestLetterExists":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether a request letter exists for the project (project-level file,\nfalling back to the company-level default). Populated per request from\nthe cached `companies/` S3 listing by the project enricher."},"requestLetterDownloadUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Download URL for the request letter. Present only when a request\nletter exists for the project; null otherwise."}}},"ProjectJoin":{"type":"object","required":["project","company","request","patient","visit","requestLetter","representationLetter"],"properties":{"project":{"$ref":"#/components/schemas/Project","description":"The project."},"company":{"$ref":"#/components/schemas/CompanyName","description":"The company that owns the project."},"request":{"$ref":"#/components/schemas/Count_Request","description":"Number of record requests in the project."},"patient":{"$ref":"#/components/schemas/Count_Patient","description":"Number of patients in the project."},"visit":{"$ref":"#/components/schemas/Count_Visit","description":"Number of visits on file across the project's patients."},"requestLetter":{"$ref":"#/components/schemas/FileResponse","description":"The project's request letter: the project's own when one is\nuploaded, otherwise the company's default. The download URL is\nnull when neither exists."},"representationLetter":{"$ref":"#/components/schemas/FileResponse","description":"The project's letter of representation: the project's own when one\nis uploaded, otherwise the company's default. The download URL is\nnull when neither exists."}}},"ProjectJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/ProjectAggregates"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregates"}}}]},"ProjectJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/ProjectAggregatesRequest"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregatesRequest"}}}]},"ProjectJoinFields":{"allOf":[{"$ref":"#/components/schemas/ProjectFields"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyFields","description":"Which of the joined company's columns to return. Absent when the row has no company."}}}]},"ProjectJoinFilter":{"allOf":[{"$ref":"#/components/schemas/ProjectFilter"},{"type":"object","properties":{"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."}}}]},"ProjectJoinSelected":{"allOf":[{"$ref":"#/components/schemas/ProjectSelected"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanySelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."}}}]},"ProjectJoinSort":{"oneOf":[{"$ref":"#/components/schemas/ProjectSort"},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}}],"description":"Sort on one of this entity's columns, or on a column of an entity it joins to, keyed by that entity: a single column mapped to `asc` or `desc`."},"ProjectName":{"type":"object","required":["id","companyId","name","status"],"properties":{"id":{"type":"string","description":"The project's ID.","example":"q7m2x9k4tb"},"companyId":{"$ref":"#/components/schemas/CompanyId","description":"ID of the company that owns the project."},"name":{"type":"string","description":"The project's name.","example":"Example underwriting project"},"status":{"$ref":"#/components/schemas/ProjectStatus","description":"Where the project is in its lifecycle: `Sandbox`, `Live`, or\n`Closed`."}}},"ProjectNumericAggregates":{"type":"object","properties":{"companyId":{"type":["string","null"],"description":"Identifier of the company that owns the project."}}},"ProjectNumericFields":{"type":"object","properties":{"companyId":{"type":"boolean","description":"Identifier of the company that owns the project.","default":false}},"additionalProperties":false},"ProjectPatch":{"oneOf":[{"type":"object","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/TrimString"}}},{"type":"object","description":"`null` clears the description.","required":["description"],"properties":{"description":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"`null` clears the description."}]}}},{"type":"object","required":["medicalInformationRequested"],"properties":{"medicalInformationRequested":{"type":"array","items":{"$ref":"#/components/schemas/TrimString"}}}},{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/ProjectStatus"}}},{"type":"object","required":["purpose"],"properties":{"purpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectPurpose"}]}}},{"type":"object","required":["authorizationMethod"],"properties":{"authorizationMethod":{"$ref":"#/components/schemas/ProjectAuthorizationMethod"}}},{"type":"object","required":["selfServe"],"properties":{"selfServe":{"type":"boolean"}}}],"description":"One-field-at-a-time patch for the project PATCH endpoint."},"ProjectPurpose":{"type":"string","description":"Why the project requests records: the purpose of disclosure its patient\nauthorizations name. The three covered purposes (treatment, payment, and\nhealth care operations under HIPAA) need no patient authorization\ndocument; on a project whose `authorizationMethod` is `authorizationPdf`,\nevery other purpose does. A project can use only the purposes Hermes has\nenabled for its company, and only Hermes can change its purpose once it\nis created.\n\n- `CoveredOperations` — health care operations (covered).\n- `CoveredPayment` — payment (covered).\n- `CoveredTreatment` — treatment (covered).\n- `IndividualAccess` — the patient's own right of access to their records.\n- `InsuranceLife` — life insurance underwriting.\n- `InsuranceOther` — other insurance underwriting: disability, workers'\n  compensation, or long-term care.\n- `LegalDefense` — use in a legal matter, for the defense.\n- `LegalMedicalMalpractice` — use in a medical malpractice matter.\n- `LegalPlaintiff` — use in the patient's own legal case.\n- `ResearchClinicalTrials` — clinical trial research.\n- `ResearchPatientRegistries` — inclusion in a patient registry.","enum":["CoveredOperations","CoveredPayment","CoveredTreatment","IndividualAccess","InsuranceLife","InsuranceOther","LegalDefense","LegalMedicalMalpractice","LegalPlaintiff","ResearchClinicalTrials","ResearchPatientRegistries"]},"ProjectSelected":{"allOf":[{"$ref":"#/components/schemas/ProjectAggregateDataFlattenSelected"},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Unique identifier of the project."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Identifier of the company that owns the project."}]},"name":{"type":["string","null"],"description":"Name of the project containing the patient and record."},"description":{"type":["string","null"],"description":"Free-text description of the project. Blank when none was given."},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectStatus","description":"Current status of the associated project. Exported values are Sandbox,\nLive, or Closed."}]},"purpose":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ProjectPurpose","description":"Why the project requests records, such as IndividualAccess or\nLegalPlaintiff. Blank when no purpose is set."}]},"createdAt":{"type":["string","null"],"format":"date-time","description":"When the project was created."},"updatedAt":{"type":["string","null"],"format":"date-time","description":"When the project was last changed."},"selfServe":{"type":["boolean","null"],"description":"Whether the project is configured for self-service operation."},"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}}]},"ProjectSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier of the project.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Identifier of the company that owns the project.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the project containing the patient and record.","enum":["asc","desc"]}}},{"type":"object","required":["description"],"properties":{"description":{"type":"string","description":"Free-text description of the project. Blank when none was given.","enum":["asc","desc"]}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","description":"Current status of the associated project. Exported values are Sandbox,\nLive, or Closed.","enum":["asc","desc"]}}},{"type":"object","required":["purpose"],"properties":{"purpose":{"type":"string","description":"Why the project requests records, such as IndividualAccess or\nLegalPlaintiff. Blank when no purpose is set.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"When the project was created.","enum":["asc","desc"]}}},{"type":"object","required":["updatedAt"],"properties":{"updatedAt":{"type":"string","description":"When the project was last changed.","enum":["asc","desc"]}}},{"type":"object","required":["selfServe"],"properties":{"selfServe":{"type":"string","description":"Whether the project is configured for self-service operation.","enum":["asc","desc"]}}},{"type":"object","required":["patientCount"],"properties":{"patientCount":{"type":"string","description":"Number of patients in the project.","enum":["asc","desc"]}}},{"type":"object","required":["patientCompletedCount"],"properties":{"patientCompletedCount":{"type":"string","description":"Number of the project's patients whose search status is Completed.","enum":["asc","desc"]}}},{"type":"object","required":["requestCount"],"properties":{"requestCount":{"type":"string","description":"Number of record requests in the project, C-CDA requests included.","enum":["asc","desc"]}}},{"type":"object","required":["recordRequestCount"],"properties":{"recordRequestCount":{"type":"string","description":"Number of ordinary (medical / imaging / billing) requests. Together with\n`ccdaRequestCount` it adds up to `requestCount`.","enum":["asc","desc"]}}},{"type":"object","required":["ccdaRequestCount"],"properties":{"ccdaRequestCount":{"type":"string","description":"Number of C-CDA requests. Together with `recordRequestCount` it adds up\nto `requestCount`.","enum":["asc","desc"]}}},{"type":"object","required":["visitCount"],"properties":{"visitCount":{"type":"string","description":"Number of visits on file across the project's patients.","enum":["asc","desc"]}}},{"type":"object","required":["representationLetterExists"],"properties":{"representationLetterExists":{"type":"string","description":"Whether a representation letter exists for the project (project-level\nfile, falling back to the company-level default). Populated per request\nfrom the cached `companies/` S3 listing by the project enricher.","enum":["asc","desc"]}}},{"type":"object","required":["representationLetterDownloadUrl"],"properties":{"representationLetterDownloadUrl":{"type":"string","description":"Download URL for the representation letter. Present only when a\nrepresentation letter exists for the project; null otherwise.","enum":["asc","desc"]}}},{"type":"object","required":["requestLetterExists"],"properties":{"requestLetterExists":{"type":"string","description":"Whether a request letter exists for the project (project-level file,\nfalling back to the company-level default). Populated per request from\nthe cached `companies/` S3 listing by the project enricher.","enum":["asc","desc"]}}},{"type":"object","required":["requestLetterDownloadUrl"],"properties":{"requestLetterDownloadUrl":{"type":"string","description":"Download URL for the request letter. Present only when a request\nletter exists for the project; null otherwise.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"ProjectStatus":{"type":"string","description":"Where a project is in its lifecycle. Chosen when the project is created;\nafter that only Hermes can move a project to another status, except that a\ncustomer admin may close a `Sandbox` project.\n\n- `Sandbox` — a test project. Searches and record requests complete on\n  their own against sample data, no facility or clinical-data source is\n  contacted, and it is the only kind of project the sandbox API key can\n  reach.\n- `Live` — a production project. The default when no status is given.\n- `Closed` — a finished project. Terminal: no new clinical data is\n  retrieved for its patients.","enum":["Sandbox","Live","Closed"]},"ReadabilityScore":{"type":"string","description":"How legible a document is to a HUMAN reviewer at a medical facility — not\nwhether a machine can read it. A scan can be perfectly machine-readable yet\ntoo faint, skewed, blurry, or cropped for a person to accept.","enum":["Clear","Legible","Marginal","Illegible"]},"RecordRequestAggregateDataFlattenSelected":{"type":"object","properties":{"currentAgeDays":{"type":["integer","null"],"format":"int64","description":"Age of the request in days since it was created, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export; derive elapsed age from createdAt there."},"priority":{"type":["string","null"],"description":"Bucketed `current_age_days` (`critical`/`high`/`medium`/`normal`)."},"submissionCount":{"type":["integer","null"],"format":"int64","description":"Number of submissions recorded for the request, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export, where it is not the actual submission count."},"submissions":{"type":["integer","null"],"format":"int64","description":"Presence marker for outbound submissions. Null when the request has no\noutbound submissions and present when it has at least one, so filter on\nnull / not null to find requests without or with submissions."},"statusCategory":{"type":["string","null"],"description":"Coarse status grouping, populated from `status.category()` so the\nStatus Category card can `in`-filter without expanding to statuses."},"ehrStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EhrStatus","description":"Customer-facing EHR retrieval outcome, the same decision the activity\ntable and sidebar chip share. Gated — resolving it reads the routed\ndepartment and the patient's enrollment."}]},"authCheckOutcome":{"type":["string","null"],"description":"Worst auth-check tally (`Passed` / `Warning` / `Failed`), populated\nfrom the scored sidecar so the Auth Check card can `in`-filter.\nGated — scoring the sidecar is the same S3 work as the `authCheck`\nslot, so it only runs when this field or the slot is referenced."},"roi":{"type":["string","null"],"description":"Release-of-information vendor resolved from the request type and routed\ndepartment. Blank for C-CDA requests."},"ehr":{"type":["string","null"],"description":"Electronic health record vendor resolved from the request type and\nrouted department, when available."},"feeTotal":{"type":["string","null"],"description":"Sum of non-canceled fees associated with this record request. Monetary\namount; the field does not carry a currency code."}}},"RecordRequestForm":{"type":"object","required":["medicalRecord","billing","imaging","startDateOfService","endDateOfService"],"properties":{"siteId":{"type":["string","null"],"description":"Identifier of a known facility (site), such as `site.id` from a visit\nbrowse row. The preferred way to identify the facility: Hermes already\nholds its address and submission preferences. When absent, `siteName`\nis required and the facility is resolved from the facility fields.","example":"site_example123"},"medicalRecord":{"type":"boolean","description":"Set to true to request the patient's medical records. Creates one\nrequest of type `MedicalRecord`. At least one of `medicalRecord`,\n`billing`, `imaging` and `ccda` must be true.","example":true},"billing":{"type":"boolean","description":"Set to true to request billing records. Creates one request of type\n`Billing`.","example":false},"imaging":{"type":"boolean","description":"Set to true to request imaging records. Creates one request of type\n`Imaging`. Requires permission to create imaging requests.","example":false},"ccda":{"type":"boolean","description":"Request records straight out of the site's EHR through its vendor API.\nSatisfied by a general (patient-level) authorization rather than a\nsite-specific one, and delivered as a C-CDA. Like the other type flags\nthis mints its OWN record request: `medicalRecord + ehr` creates two,\ngrouped under one order number with `-m` / `-e` suffixes.\n\nDefaults to `false` when omitted: EHR is an opt-in capability, so an\nabsent flag means \"not requested\" rather than forcing every caller to\nsend `\"ccda\": false`.","example":false},"startDateOfService":{"type":"string","format":"date","description":"Dates of service the request is asking for. Required at creation —\nthe auth-check uses these on the request page to validate against the\nextracted DOS on the authorization form.","example":"2024-01-15"},"endDateOfService":{"type":"string","format":"date","description":"Last date (YYYY-MM-DD) of the service-date window; with\n`startDateOfService` it bounds the visits whose records are requested.\nRequired.","example":"2024-02-20"},"siteName":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"Facility name, used to identify the facility when `siteId` is absent;\nrequired in that case. Send it with `siteAddressLine1`,\n`siteAddressLine2` (optional), `siteCity`, `siteState` and `siteZip` so\nHermes can resolve the facility."}]},"siteAddressLine1":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AddressString","description":"Primary delivery line (street number + street, or PO Box line). For\nPuerto Rico addresses with an urbanization, put `URB <name>` on this\nline. Leave `siteAddressLine2` for suite / unit / apartment."}]},"siteAddressLine2":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AddressString","description":"Optional secondary designator (suite, unit, apartment, floor). A blank,\nwhitespace-only or punctuation-only value becomes `null` instead of\nbeing rejected."}]},"siteAddress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AddressString","description":"**Backward compatibility only.** Retained so existing external\nintegrations that send a single `siteAddress` string keep working.\nNew integrations should send `siteAddressLine1` / `siteAddressLine2`\ninstead — if either of those is provided, this field is ignored.\n\nYou *may* pack an entire address into `siteAddressLine1` and we will\nattempt to resolve it, but resolution will be less accurate than a\nproperly structured two-line address. Puerto Rico urbanization in\nparticular is not reliably parseable from a single line."}],"deprecated":true},"siteCity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AddressString","description":"Facility city, used with `siteName` when `siteId` is absent. It is\nchecked by the same rules as an address line, not against a list of\nknown cities."}]},"siteState":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsState","description":"Facility state, used with `siteName` when `siteId` is absent."}]},"siteZip":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Zip","description":"Facility ZIP code, used with `siteName` when `siteId` is absent."}]}}},"RecordRequestMany":{"type":"object","required":["requests"],"properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/RecordRequestOutput"},"description":"The created record requests, one entry per request type turned on in\nthe form."}}},"RecordRequestOutput":{"type":"object","required":["request","user","providerPacket","deliverable","deliverables","siteFee","authorization","patientAuthorization","notes","submissions","warnings"],"properties":{"request":{"$ref":"#/components/schemas/Request","description":"The record request itself: identifiers, status, request type, dates and\nthe facility details it was submitted with."},"user":{"$ref":"#/components/schemas/UserEmail","description":"The user who created the request."},"owner":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserEmail","description":"The user the request is assigned to. Null when the request is\nunassigned."}]},"site":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Site","description":"The facility (site) the request is addressed to. Null when the request\nhas not been matched to a known site."}]},"medicalDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles medical-record requests. Null\nwhen the request has no site or the site has no such department."}]},"facilityBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles facility billing requests. Null\nwhen the request has no site or the site has no such department."}]},"physicianBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles physician billing requests. Null\nwhen the request has no site or the site has no such department."}]},"imagingBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles imaging billing requests. Null\nwhen the request has no site or the site has no such department."}]},"emergencyRoomBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles emergency room billing requests.\nNull when the request has no site or the site has no such department."}]},"anesthesiologyBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles anesthesiology billing requests.\nNull when the request has no site or the site has no such department."}]},"imagingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"The facility's department that handles imaging requests. Null when the\nrequest has no site or the site has no such department."}]},"providerPacket":{"$ref":"#/components/schemas/FileResponse","description":"The provider packet: the document package sent to the facility with\nthe request. Its download link is null until a packet has been\ngenerated. The upload link is returned only to Hermes staff."},"deliverable":{"$ref":"#/components/schemas/FileResponse","description":"The combined chart PDF Hermes generates from the returned records, when\none has been published. Its download link is null otherwise. This file\nis not listed in `deliverables`."},"deliverables":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"},"description":"The files returned for the request, each with a time-limited download\nlink that needs no Authorization header. Each file name is unique\nacross the request, and folder is a display grouping only. Empty until\nrecords have been returned."},"siteFee":{"$ref":"#/components/schemas/FileResponse","description":"The facility's fee document for releasing the records. Its download\nlink is null when none has been uploaded."},"authorization":{"$ref":"#/components/schemas/FileResponse","description":"The authorization that applies to this request alone, such as one that\nnames this facility. Its download link is null when the request has no\nauthorization of its own, in which case `patientAuthorization` applies."},"patientAuthorization":{"$ref":"#/components/schemas/FileResponse","description":"The patient-level authorization, which applies when the request has no\nauthorization of its own. Its download link is null when none has been\nuploaded."},"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"},"description":"Notes recorded on the request, with their author and timestamps. Empty\nwhen there are none."},"submissions":{"type":"array","items":{"$ref":"#/components/schemas/Submission"},"description":"The request's activity, oldest first: each time it was sent to the\nfacility and each time records were received for it. Empty when there\nhas been no activity yet."},"recommendedDeliveryMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"Default delivery method to use when the user hasn't picked an override.\nComputed from the department and site. Null when no method can be\nrecommended."}]},"embedToken":{"type":["string","null"],"description":"Pre-minted embed token for iframing a read-only auth-check view.\n\nPass the token to `GET /ui/auth-check/embed?token=...` to render the\nanalysis UI inside your own page without proxying the raw analysis\nschema. Null when the authorization PDF has not yet been uploaded.\nExpiry is one hour from fetch time — re-fetch the record request for a\nfresh token. See [Embedding the auth-check UI](#embedding-the-auth-check-ui).","example":"ZXhhbXBsZS1lbWJlZC10b2tlbg"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/ChaseWarning"},"description":"Advisories about what an EHR retrieval for this request will NOT return\n— dates of service reaching past the partner's 20-year lookback, an end\ndate in the future, a date of birth the partner will not match on.\n\nThe same array, from the same rules, that `POST .../send` returns, so a\nclient learns at CREATE time rather than after dispatch. Purely\nadvisory: none of these fails a create, an update or a send. Always\npresent, and EMPTY for a request with nothing to report — which is every\nrequest that is not a C-CDA one, since no other channel has a lookback."}}},"RecordRequestPatch":{"oneOf":[{"type":"object","required":["siteId"],"properties":{"siteId":{"type":["string","null"]}}},{"type":"object","required":["followUpDate"],"properties":{"followUpDate":{"type":["string","null"],"format":"date"}}},{"type":"object","required":["completionDate"],"properties":{"completionDate":{"type":["string","null"],"format":"date"}}},{"type":"object","required":["lastContactDate"],"properties":{"lastContactDate":{"type":["string","null"],"format":"date"}}},{"type":"object","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/RequestStatus"}}},{"type":"object","required":["recordReceiptRoute"],"properties":{"recordReceiptRoute":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString"}]}}},{"type":"string","enum":["confirmSite"]},{"type":"object","required":["startDateOfService"],"properties":{"startDateOfService":{"type":["string","null"],"format":"date"}}},{"type":"object","required":["endDateOfService"],"properties":{"endDateOfService":{"type":["string","null"],"format":"date"}}},{"type":"object","description":"Set the start and end dates of service together in one update.","required":["serviceDates"],"properties":{"serviceDates":{"$ref":"#/components/schemas/ServiceDatesPatch","description":"Set the start and end dates of service together in one update."}}},{"type":"object","required":["requestType"],"properties":{"requestType":{"$ref":"#/components/schemas/RequestType"}}},{"type":"object","description":"Assigns the owner/assignee of the request. Pass `null` to clear.","required":["owner"],"properties":{"owner":{"type":["string","null"],"description":"Assigns the owner/assignee of the request. Pass `null` to clear."}}},{"type":"object","required":["submittedSiteInformation"],"properties":{"submittedSiteInformation":{"$ref":"#/components/schemas/SubmittedSiteInformationPatch"}}}],"description":"One change to a record request. Send an object with exactly one key, the\nfield to change, holding its new value (`{\"followUpDate\": \"2026-02-01\"}`), or the\nbare string `\"confirmSite\"` to confirm the request's facility. Setting a\ndate of service moves the request to `Resubmitted`."},"RecordRequestTypeCounts":{"type":"object","description":"Existing request totals shown on visit create actions. Billing subtypes are\nintentionally folded into one family so the UI mirrors the create form.","required":["medical","imaging","billing","ccda"],"properties":{"medical":{"type":"integer","description":"Number of existing medical record requests for this patient at this\nfacility. This count is shared across visits at the same facility.","minimum":0},"imaging":{"type":"integer","description":"Number of existing imaging record requests for this patient at this\nfacility. This count is shared across visits at the same facility.","minimum":0},"billing":{"type":"integer","description":"Number of existing billing record requests for this patient at this\nfacility. This count is shared across visits at the same facility.","minimum":0},"ccda":{"type":"integer","description":"Number of existing C-CDA requests for this patient at this facility.\nThis count is shared across visits at the same facility.","minimum":0}}},"RecordsCustodian":{"type":"object","description":"Contact details for whoever now holds a closed facility's records (the\nacquiring health system, a successor site, an ROI vendor, or a dedicated\nrecords-custodian company). Captured separately per record type because the\nmedical, billing, and imaging records of a closed facility frequently end up\nwith *different* custodians.","properties":{"name":{"type":["string","null"],"description":"Name of the organization now holding the records. Absent when not\nfound.","example":"Example Health System"},"addressLine1":{"type":["string","null"],"description":"Street address of the custodian. Absent when not found.","example":"123 Example Street"},"city":{"type":["string","null"],"description":"City of the custodian's address. Absent when not found.","example":"Springfield"},"state":{"type":["string","null"],"description":"State of the custodian's address. Absent when not found.","example":"CA"},"zip":{"type":["string","null"],"description":"ZIP code of the custodian's address. Absent when not found.","example":"94110"},"phone":{"type":["string","null"],"description":"Telephone number of the custodian. Absent when not found.","example":"+12025550142"},"fax":{"type":["string","null"],"description":"Fax number of the custodian. Absent when not found.","example":"+12025550143"},"website":{"type":["string","null"],"description":"Website of the custodian. Absent when not found.","example":"https://www.example.com"}}},"RenameAttachmentRequest":{"type":"object","description":"Rename payload shared by the record-request document and deliverable rename\nroutes: the desired new leaf filename (sanitized server-side).","required":["newFilename"],"properties":{"newFilename":{"type":"string","description":"The new file name. Any directory part is dropped and surrounding\nwhitespace is trimmed. The name must not be empty, start with a dot,\ncontain `\"`, `;`, `\\` or control characters, or exceed 255 bytes,\nor the call fails with `400`.","example":"discharge-summary-2024-01-15.pdf"}}},"Request":{"type":"object","required":["id","companyId","projectId","patientId","status","requestType","createdAt","updatedAt","userId"],"properties":{"id":{"type":"string","description":"Identifier of the record request, unique within its customer,\nproject and patient. Together with `companyId`, `projectId` and\n`patientId` it addresses the request in every record-request route.","example":"r8t2w6n4yc"},"companyId":{"$ref":"#/components/schemas/CompanyId","description":"Numeric identifier of the customer organization that owns the\nrequest."},"projectId":{"$ref":"#/components/schemas/StringId","description":"Identifier of the project the request belongs to."},"patientId":{"type":"string","description":"Identifier of the patient whose records are requested, unique within\nthe project.","example":"k3f9x2m7qa"},"status":{"$ref":"#/components/schemas/RequestStatus","description":"Current workflow status of the request. See the status value list\nfor which values are terminal and which mean success or failure."},"requestType":{"$ref":"#/components/schemas/RequestType","description":"Category of records this request asks for. Each request carries\nexactly one type; a submission that asked for several types creates\none request per type."},"recordReceiptRoute":{"type":["string","null"],"description":"Free-text note of the route by which records for this request are\nreceived. No fixed value list. Null when none has been recorded.","example":"Fax"},"followUpDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) the request is next due for follow-up with the\nfacility. Null when no follow-up is scheduled.","example":"2026-01-29"},"lastContactDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) of the most recent contact with the facility about\nthis request. Null when no contact has been recorded.","example":"2026-01-20"},"createdAt":{"type":"string","format":"date-time","description":"When the request was created, as an RFC 3339 timestamp in UTC.","example":"2026-01-15T12:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the request was last changed, as an RFC 3339 timestamp in UTC.","example":"2026-01-20T16:30:00Z"},"completionDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) the request was closed out. Set automatically to\nthe current US Pacific date when the request first moves to a\nclosing status such as `Completed`, `NoRecordFound` or `Canceled`\nand no date is recorded yet; it can also be set or cleared directly.\nNull when no completion date has been recorded.","example":"2026-02-03"},"siteId":{"type":["string","null"],"description":"Identifier of the facility (site) the request is addressed to. Null\nwhen the request was submitted with facility details only and has\nnot yet been matched to a known site.","example":"site_example123"},"submittedSiteName":{"type":["string","null"],"description":"Facility name as submitted with the request. When the request was\ncreated from `siteId` alone, filled from that site's name as it read\nat creation. Null when neither is available.","example":"Riverside Community Hospital"},"submittedSiteAddressLine1":{"type":["string","null"],"description":"First street-address line of the facility as submitted with the\nrequest (street number and street, or PO Box). Null when not\nsupplied.","example":"123 Example Street"},"submittedSiteAddressLine2":{"type":["string","null"],"description":"Second street-address line of the facility as submitted with the\nrequest (suite, unit or floor). Null when not supplied.","example":"Suite 200"},"submittedSiteAddress":{"type":["string","null"],"description":"Legacy single-line address. Readers should prefer\n`submittedSiteAddressLine1` / `submittedSiteAddressLine2` when\neither is set; this field is retained for existing rows that\npredate the structured address-line fields and for the\n`siteAddress` backward-compat surface on `POST /record-requests`.","example":"123 Example Street, Suite 200"},"submittedSiteCity":{"type":["string","null"],"description":"Facility city as submitted with the request. Null when not supplied.","example":"Springfield"},"submittedSiteState":{"type":["string","null"],"description":"Facility state as submitted with the request, normally a two-letter\nUS state code. Null when not supplied.","example":"CA"},"submittedSiteZip":{"type":["string","null"],"description":"Facility ZIP code as submitted with the request. Treat as text, not\na number. Null when not supplied.","example":"94110"},"userId":{"type":"string","description":"Identifier of the user who created the request.","example":"2Hb8kTQ1zXrN4pLm9VwYc3EaJfD"},"ownerUserId":{"type":["string","null"],"description":"Identifier of the user the request is assigned to. Null when the\nrequest is unassigned.","example":"2Hb8kZ7rPq4sWn1Lx6VmTc9EyGh"},"uploadCode":{"type":["string","null"],"description":"Eight-character code printed on the request's provider packet. A\nfacility submits it to the upload-by-code endpoint to return records\nto this request. Null until a provider packet has been generated.","example":"K7MP4QXR"},"startDateOfService":{"type":["string","null"],"format":"date","description":"Dates of service the request is asking for. Required for new requests.","example":"2024-01-15"},"endDateOfService":{"type":["string","null"],"format":"date","description":"Last date (YYYY-MM-DD) of the service-date window the request asks\nfor; with `startDateOfService` it bounds the visits whose records\nare requested. Null only on requests created before dates of\nservice were required.","example":"2024-02-20"}}},"RequestAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"RequestAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"RequestBrowseAggregate":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/RequestAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"site":{"$ref":"#/components/schemas/SiteJoinAggregates"},"owner":{"$ref":"#/components/schemas/UserJoinAggregates"},"user":{"$ref":"#/components/schemas/UserJoinAggregates"},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowAggregates"}}},"RequestBrowseAggregateRequest":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/RequestAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"site":{"$ref":"#/components/schemas/SiteJoinAggregatesRequest"},"owner":{"$ref":"#/components/schemas/UserJoinAggregatesRequest"},"user":{"$ref":"#/components/schemas/UserJoinAggregatesRequest"},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowAggregatesRequest"}}},"RequestBrowseFilter":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/RequestFilter","description":"Filters on the request's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"site":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/SiteJoinFilter"}],"description":"Filters on the joined site's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a site."},"owner":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/UserJoinFilter"}],"description":"Filters on the joined owner's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a owner."},"user":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/UserJoinFilter"}],"description":"Filters on the joined user's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a user."},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowFilter","description":"Filters on the auth check's columns. A row with no auth check matches none of these filters."}}},"RequestBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/RequestBrowseSelect"},"where":{"$ref":"#/components/schemas/RequestBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/RequestBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/RequestBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"RequestBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/RequestBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/RequestBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"RequestBrowseRow":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/RequestSelected","description":"The request's columns, as selected by the request."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"site":{"$ref":"#/components/schemas/SiteJoinSelected","description":"The joined site's columns, as selected by the request. Absent when the row has no site."},"owner":{"$ref":"#/components/schemas/UserJoinSelected","description":"The joined owner's columns, as selected by the request. Absent when the row has no owner."},"user":{"$ref":"#/components/schemas/UserJoinSelected","description":"The joined user's columns, as selected by the request. Absent when the row has no user."},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowSelected","description":"The auth check's columns, as selected by the request. Absent when the row has no auth check."}}},"RequestBrowseSelect":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/RequestFields","description":"Which of the request's columns to return."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"site":{"$ref":"#/components/schemas/SiteJoinFields","description":"Which of the joined site's columns to return. Absent when the row has no site."},"owner":{"$ref":"#/components/schemas/UserJoinFields","description":"Which of the joined owner's columns to return. Absent when the row has no owner."},"user":{"$ref":"#/components/schemas/UserJoinFields","description":"Which of the joined user's columns to return. Absent when the row has no user."},"authCheck":{"$ref":"#/components/schemas/AuthCheckRowFields","description":"Which of the auth check's columns to return. Absent when the row has no auth check."}}},"RequestBrowseSort":{"oneOf":[{"type":"object","required":["request"],"properties":{"request":{"$ref":"#/components/schemas/RequestSort","description":"Sorts on one of the request's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["site"],"properties":{"site":{"$ref":"#/components/schemas/SiteJoinSort","description":"Sorts on one of the joined site's columns."}}},{"type":"object","required":["owner"],"properties":{"owner":{"$ref":"#/components/schemas/UserJoinSort","description":"Sorts on one of the joined owner's columns."}}},{"type":"object","required":["user"],"properties":{"user":{"$ref":"#/components/schemas/UserJoinSort","description":"Sorts on one of the joined user's columns."}}},{"type":"object","required":["authCheck"],"properties":{"authCheck":{"$ref":"#/components/schemas/AuthCheckRowSort","description":"Sorts on one of the auth check's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"RequestFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Identifier of the record request within its customer, project, and\npatient scope."},"status":{"type":"boolean","description":"Current record-request workflow status. See the Reading guide for the\nexported status tokens."},"requestType":{"type":"boolean","description":"Category of records requested. See the Reading guide for the exported\nrequest-type tokens."},"recordReceiptRoute":{"type":"boolean","description":"Stored route used for receiving records. Source-defined text; no fixed\nvalue list is enforced by this field."},"submittedSiteName":{"type":"boolean","description":"Site name supplied when the request was submitted. May differ from\nsite.name."},"submittedSiteAddressLine1":{"type":"boolean","description":"First street-address line supplied with the record request."},"submittedSiteAddressLine2":{"type":"boolean","description":"Second street-address line supplied with the record request."},"submittedSiteAddress":{"type":"boolean","description":"Combined address text supplied with the record request."},"submittedSiteCity":{"type":"boolean","description":"City supplied with the record request site address."},"submittedSiteState":{"type":"boolean","description":"State or region supplied with the record request site address."},"submittedSiteZip":{"type":"boolean","description":"Postal code supplied with the record request site address. Preserve as\ntext."},"followUpDate":{"type":"boolean","description":"Scheduled follow-up date for the record request."},"lastContactDate":{"type":"boolean","description":"Most recent contact date recorded for the request."},"completionDate":{"type":"boolean","description":"Completion date recorded for the request, when available."},"createdAt":{"type":"boolean","description":"Timestamp when the record request was created."},"updatedAt":{"type":"boolean","description":"Timestamp of the most recent recorded update to the request."},"uploadCode":{"type":"boolean","description":"Code associated with the request for secure record uploads. Treat as a\nsensitive workflow value."},"startDateOfService":{"type":"boolean","description":"Beginning of the service-date period requested. Not necessarily a date\non which care occurred."},"endDateOfService":{"type":"boolean","description":"End of the service-date period requested. Not necessarily a date on\nwhich care occurred."},"orderNumber":{"type":"boolean","description":"Short reference number assigned when the request was created,\nzero-padded to four digits, such as 0042. Requests created together\nshare one number and carry a type suffix: -m medical records, -b\nbilling, -i imaging, -c C-CDA. Numbers are reused some time after a\nrequest ends, so use the request id as the lasting identifier. Null\nfor sandbox requests."},"companyId":{"type":"boolean","description":"Identifier of the customer organization associated with the record."},"projectId":{"type":"boolean","description":"Identifier of the project containing the record."},"patientId":{"type":"boolean","description":"Identifier of the patient. Join to Patients patient.id using the same\ncompanyId and projectId."},"siteId":{"type":"boolean","description":"Identifier of the resolved site associated with the request. The Sites\nsheet only lists visit-linked sites and may not contain this site."},"ownerUserId":{"type":"boolean","description":"Identifier of the user assigned to the record request."},"userId":{"type":"boolean","description":"Identifier of the user who created the record request."},"providerPacketUrl":{"type":"boolean","description":"Time-limited link to download the request's provider packet, the\ndocument package sent to the facility. Null when no packet has been\ngenerated."},"siteFeeUrl":{"type":"boolean","description":"Time-limited link to download the facility's fee document for releasing\nthe records. Null when none has been uploaded."},"authorizationUrl":{"type":"boolean","description":"Time-limited link to download the patient's authorization on file, the\none shared by all of the patient's requests. Null when none has been\nuploaded."},"authorizationOverrideUrl":{"type":"boolean","description":"Time-limited link to download the authorization that applies to this\nrequest alone, which takes the place of the patient's authorization.\nNull when the request has no authorization of its own."},"deliverableUrl":{"type":"boolean","description":"Time-limited link to download the combined chart PDF generated from the\nrecords returned for the request. Null when none has been published."},"deliverableCount":{"type":"boolean","description":"Number of files received for the request, loaded when the live request\ntable enriches the row. Zero when no enrichment ran, as in the Master\nExport, where it is not the actual number of received files."},"aiMode":{"type":"boolean","description":"Path of the AI chat over the request's combined chart, ending in\n/deliverable/chat. Present once the combined chart has been analyzed and\nchat over it is available; null otherwise."},"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."},"currentAgeDays":{"type":"boolean","description":"Age of the request in days since it was created, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export; derive elapsed age from createdAt there."},"priority":{"type":"boolean","description":"Bucketed `current_age_days` (`critical`/`high`/`medium`/`normal`)."},"submissionCount":{"type":"boolean","description":"Number of submissions recorded for the request, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export, where it is not the actual submission count."},"submissions":{"type":"boolean","description":"Presence marker for outbound submissions. Null when the request has no\noutbound submissions and present when it has at least one, so filter on\nnull / not null to find requests without or with submissions."},"statusCategory":{"type":"boolean","description":"Coarse status grouping, populated from `status.category()` so the\nStatus Category card can `in`-filter without expanding to statuses."},"ehrStatus":{"type":"boolean","description":"Customer-facing EHR retrieval outcome, the same decision the activity\ntable and sidebar chip share. Gated — resolving it reads the routed\ndepartment and the patient's enrollment."},"authCheckOutcome":{"type":"boolean","description":"Worst auth-check tally (`Passed` / `Warning` / `Failed`), populated\nfrom the scored sidecar so the Auth Check card can `in`-filter.\nGated — scoring the sidecar is the same S3 work as the `authCheck`\nslot, so it only runs when this field or the slot is referenced."},"roi":{"type":"boolean","description":"Release-of-information vendor resolved from the request type and routed\ndepartment. Blank for C-CDA requests."},"ehr":{"type":"boolean","description":"Electronic health record vendor resolved from the request type and\nrouted department, when available."},"feeTotal":{"type":"boolean","description":"Sum of non-canceled fees associated with this record request. Monetary\namount; the field does not carry a currency code."}}},"RequestFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the record request within its customer, project, and\npatient scope."},"status":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["Pending","InfoConfirmed","SiteConfirmed","RequestSent","RequestConfirmed","MailOnly","AuthDenied","WrongSiteName","PaymentPending","NeedSiteSpecificAuth","PatientNotFound","ServiceDatesNotFound","SiteClosed","Canceled","Void","DuplicateRequest","Resubmitted","Partial","Completed","FacilityRefusal","NoRecordFound","NeedToReviewResults"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["Pending","InfoConfirmed","SiteConfirmed","RequestSent","RequestConfirmed","MailOnly","AuthDenied","WrongSiteName","PaymentPending","NeedSiteSpecificAuth","PatientNotFound","ServiceDatesNotFound","SiteClosed","Canceled","Void","DuplicateRequest","Resubmitted","Partial","Completed","FacilityRefusal","NoRecordFound","NeedToReviewResults"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["Pending","InfoConfirmed","SiteConfirmed","RequestSent","RequestConfirmed","MailOnly","AuthDenied","WrongSiteName","PaymentPending","NeedSiteSpecificAuth","PatientNotFound","ServiceDatesNotFound","SiteClosed","Canceled","Void","DuplicateRequest","Resubmitted","Partial","Completed","FacilityRefusal","NoRecordFound","NeedToReviewResults"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["Pending","InfoConfirmed","SiteConfirmed","RequestSent","RequestConfirmed","MailOnly","AuthDenied","WrongSiteName","PaymentPending","NeedSiteSpecificAuth","PatientNotFound","ServiceDatesNotFound","SiteClosed","Canceled","Void","DuplicateRequest","Resubmitted","Partial","Completed","FacilityRefusal","NoRecordFound","NeedToReviewResults"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Current record-request workflow status. See the Reading guide for the\nexported status tokens."},"requestType":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["MedicalRecord","Billing","FacilityBilling","PhysicianBilling","ImagingBilling","EmergencyRoomBilling","AnesthesiologyBilling","Imaging","Ccda"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["MedicalRecord","Billing","FacilityBilling","PhysicianBilling","ImagingBilling","EmergencyRoomBilling","AnesthesiologyBilling","Imaging","Ccda"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["MedicalRecord","Billing","FacilityBilling","PhysicianBilling","ImagingBilling","EmergencyRoomBilling","AnesthesiologyBilling","Imaging","Ccda"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["MedicalRecord","Billing","FacilityBilling","PhysicianBilling","ImagingBilling","EmergencyRoomBilling","AnesthesiologyBilling","Imaging","Ccda"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Category of records requested. See the Reading guide for the exported\nrequest-type tokens."},"recordReceiptRoute":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Stored route used for receiving records. Source-defined text; no fixed\nvalue list is enforced by this field."},"submittedSiteName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Site name supplied when the request was submitted. May differ from\nsite.name."},"submittedSiteAddressLine1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First street-address line supplied with the record request."},"submittedSiteAddressLine2":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Second street-address line supplied with the record request."},"submittedSiteAddress":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Combined address text supplied with the record request."},"submittedSiteCity":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"City supplied with the record request site address."},"submittedSiteState":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"State or region supplied with the record request site address."},"submittedSiteZip":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Postal code supplied with the record request site address. Preserve as\ntext."},"followUpDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Scheduled follow-up date for the record request."},"lastContactDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Most recent contact date recorded for the request."},"completionDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Completion date recorded for the request, when available."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp when the record request was created."},"updatedAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp of the most recent recorded update to the request."},"uploadCode":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Code associated with the request for secure record uploads. Treat as a\nsensitive workflow value."},"startDateOfService":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Beginning of the service-date period requested. Not necessarily a date\non which care occurred."},"endDateOfService":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"End of the service-date period requested. Not necessarily a date on\nwhich care occurred."},"orderNumber":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Short reference number assigned when the request was created,\nzero-padded to four digits, such as 0042. Requests created together\nshare one number and carry a type suffix: -m medical records, -b\nbilling, -i imaging, -c C-CDA. Numbers are reused some time after a\nrequest ends, so use the request id as the lasting identifier. Null\nfor sandbox requests."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the customer organization associated with the record."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the project containing the record."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the patient. Join to Patients patient.id using the same\ncompanyId and projectId."},"siteId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the resolved site associated with the request. The Sites\nsheet only lists visit-linked sites and may not contain this site."},"ownerUserId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the user assigned to the record request."},"userId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the user who created the record request."},"providerPacketUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Time-limited link to download the request's provider packet, the\ndocument package sent to the facility. Null when no packet has been\ngenerated."},"siteFeeUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Time-limited link to download the facility's fee document for releasing\nthe records. Null when none has been uploaded."},"authorizationUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Time-limited link to download the patient's authorization on file, the\none shared by all of the patient's requests. Null when none has been\nuploaded."},"authorizationOverrideUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Time-limited link to download the authorization that applies to this\nrequest alone, which takes the place of the patient's authorization.\nNull when the request has no authorization of its own."},"deliverableUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Time-limited link to download the combined chart PDF generated from the\nrecords returned for the request. Null when none has been published."},"deliverableCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of files received for the request, loaded when the live request\ntable enriches the row. Zero when no enrichment ran, as in the Master\nExport, where it is not the actual number of received files."},"aiMode":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Path of the AI chat over the request's combined chart, ending in\n/deliverable/chat. Present once the combined chart has been analyzed and\nchat over it is available; null otherwise."},"currentAgeDays":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Age of the request in days since it was created, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export; derive elapsed age from createdAt there."},"priority":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Bucketed `current_age_days` (`critical`/`high`/`medium`/`normal`)."},"submissionCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of submissions recorded for the request, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export, where it is not the actual submission count."},"submissions":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Presence marker for outbound submissions. Null when the request has no\noutbound submissions and present when it has at least one, so filter on\nnull / not null to find requests without or with submissions."},"statusCategory":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Coarse status grouping, populated from `status.category()` so the\nStatus Category card can `in`-filter without expanding to statuses."},"ehrStatus":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["FileReturned","RecordsDelivered","PatientLocated","NoRecordsInRange","NoRecordsReturned","ApprovalExpired","ManuallyRejected","ConsentNotOnFile","RequestRejected","RetrievalFailed","MultipleLocations","PatientNotLocated"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["FileReturned","RecordsDelivered","PatientLocated","NoRecordsInRange","NoRecordsReturned","ApprovalExpired","ManuallyRejected","ConsentNotOnFile","RequestRejected","RetrievalFailed","MultipleLocations","PatientNotLocated"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["FileReturned","RecordsDelivered","PatientLocated","NoRecordsInRange","NoRecordsReturned","ApprovalExpired","ManuallyRejected","ConsentNotOnFile","RequestRejected","RetrievalFailed","MultipleLocations","PatientNotLocated"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["FileReturned","RecordsDelivered","PatientLocated","NoRecordsInRange","NoRecordsReturned","ApprovalExpired","ManuallyRejected","ConsentNotOnFile","RequestRejected","RetrievalFailed","MultipleLocations","PatientNotLocated"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Customer-facing EHR retrieval outcome, the same decision the activity\ntable and sidebar chip share. Gated — resolving it reads the routed\ndepartment and the patient's enrollment."},"authCheckOutcome":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Worst auth-check tally (`Passed` / `Warning` / `Failed`), populated\nfrom the scored sidecar so the Auth Check card can `in`-filter.\nGated — scoring the sidecar is the same S3 work as the `authCheck`\nslot, so it only runs when this field or the slot is referenced."},"roi":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Release-of-information vendor resolved from the request type and routed\ndepartment. Blank for C-CDA requests."},"ehr":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Electronic health record vendor resolved from the request type and\nrouted department, when available."},"feeTotal":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"decimal","description":"Decimal-as-string for numeric precision."}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Sum of non-canceled fees associated with this record request. Monetary\namount; the field does not carry a currency code."}}},"RequestNumericAggregates":{"type":"object","properties":{"companyId":{"type":["string","null"],"description":"Identifier of the customer organization associated with the record."},"deliverableCount":{"type":["string","null"],"description":"Number of files received for the request, loaded when the live request\ntable enriches the row. Zero when no enrichment ran, as in the Master\nExport, where it is not the actual number of received files."}}},"RequestNumericFields":{"type":"object","properties":{"companyId":{"type":"boolean","description":"Identifier of the customer organization associated with the record.","default":false},"deliverableCount":{"type":"boolean","description":"Number of files received for the request, loaded when the live request\ntable enriches the row. Zero when no enrichment ran, as in the Master\nExport, where it is not the actual number of received files.","default":false}},"additionalProperties":false},"RequestSelected":{"allOf":[{"$ref":"#/components/schemas/RecordRequestAggregateDataFlattenSelected"},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Identifier of the record request within its customer, project, and\npatient scope."},"status":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestStatus","description":"Current record-request workflow status. See the Reading guide for the\nexported status tokens."}]},"requestType":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RequestType","description":"Category of records requested. See the Reading guide for the exported\nrequest-type tokens."}]},"recordReceiptRoute":{"type":["string","null"],"description":"Stored route used for receiving records. Source-defined text; no fixed\nvalue list is enforced by this field."},"submittedSiteName":{"type":["string","null"],"description":"Site name supplied when the request was submitted. May differ from\nsite.name."},"submittedSiteAddressLine1":{"type":["string","null"],"description":"First street-address line supplied with the record request."},"submittedSiteAddressLine2":{"type":["string","null"],"description":"Second street-address line supplied with the record request."},"submittedSiteAddress":{"type":["string","null"],"description":"Combined address text supplied with the record request."},"submittedSiteCity":{"type":["string","null"],"description":"City supplied with the record request site address."},"submittedSiteState":{"type":["string","null"],"description":"State or region supplied with the record request site address."},"submittedSiteZip":{"type":["string","null"],"description":"Postal code supplied with the record request site address. Preserve as\ntext."},"followUpDate":{"type":["string","null"],"format":"date","description":"Scheduled follow-up date for the record request."},"lastContactDate":{"type":["string","null"],"format":"date","description":"Most recent contact date recorded for the request."},"completionDate":{"type":["string","null"],"format":"date","description":"Completion date recorded for the request, when available."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp when the record request was created."},"updatedAt":{"type":["string","null"],"format":"date-time","description":"Timestamp of the most recent recorded update to the request."},"uploadCode":{"type":["string","null"],"description":"Code associated with the request for secure record uploads. Treat as a\nsensitive workflow value."},"startDateOfService":{"type":["string","null"],"format":"date","description":"Beginning of the service-date period requested. Not necessarily a date\non which care occurred."},"endDateOfService":{"type":["string","null"],"format":"date","description":"End of the service-date period requested. Not necessarily a date on\nwhich care occurred."},"orderNumber":{"type":["string","null"],"description":"Short reference number assigned when the request was created,\nzero-padded to four digits, such as 0042. Requests created together\nshare one number and carry a type suffix: -m medical records, -b\nbilling, -i imaging, -c C-CDA. Numbers are reused some time after a\nrequest ends, so use the request id as the lasting identifier. Null\nfor sandbox requests."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Identifier of the customer organization associated with the record."}]},"projectId":{"type":["string","null"],"description":"Identifier of the project containing the record."},"patientId":{"type":["string","null"],"description":"Identifier of the patient. Join to Patients patient.id using the same\ncompanyId and projectId."},"siteId":{"type":["string","null"],"description":"Identifier of the resolved site associated with the request. The Sites\nsheet only lists visit-linked sites and may not contain this site."},"ownerUserId":{"type":["string","null"],"description":"Identifier of the user assigned to the record request."},"userId":{"type":["string","null"],"description":"Identifier of the user who created the record request."},"providerPacketUrl":{"type":["string","null"],"description":"Time-limited link to download the request's provider packet, the\ndocument package sent to the facility. Null when no packet has been\ngenerated."},"siteFeeUrl":{"type":["string","null"],"description":"Time-limited link to download the facility's fee document for releasing\nthe records. Null when none has been uploaded."},"authorizationUrl":{"type":["string","null"],"description":"Time-limited link to download the patient's authorization on file, the\none shared by all of the patient's requests. Null when none has been\nuploaded."},"authorizationOverrideUrl":{"type":["string","null"],"description":"Time-limited link to download the authorization that applies to this\nrequest alone, which takes the place of the patient's authorization.\nNull when the request has no authorization of its own."},"deliverableUrl":{"type":["string","null"],"description":"Time-limited link to download the combined chart PDF generated from the\nrecords returned for the request. Null when none has been published."},"deliverableCount":{"type":["integer","null"],"format":"int64","description":"Number of files received for the request, loaded when the live request\ntable enriches the row. Zero when no enrichment ran, as in the Master\nExport, where it is not the actual number of received files."},"aiMode":{"type":["string","null"],"description":"Path of the AI chat over the request's combined chart, ending in\n/deliverable/chat. Present once the combined chart has been analyzed and\nchat over it is available; null otherwise."},"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}}]},"RequestSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Identifier of the record request within its customer, project, and\npatient scope.","enum":["asc","desc"]}}},{"type":"object","required":["status"],"properties":{"status":{"type":"string","description":"Current record-request workflow status. See the Reading guide for the\nexported status tokens.","enum":["asc","desc"]}}},{"type":"object","required":["requestType"],"properties":{"requestType":{"type":"string","description":"Category of records requested. See the Reading guide for the exported\nrequest-type tokens.","enum":["asc","desc"]}}},{"type":"object","required":["recordReceiptRoute"],"properties":{"recordReceiptRoute":{"type":"string","description":"Stored route used for receiving records. Source-defined text; no fixed\nvalue list is enforced by this field.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteName"],"properties":{"submittedSiteName":{"type":"string","description":"Site name supplied when the request was submitted. May differ from\nsite.name.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteAddressLine1"],"properties":{"submittedSiteAddressLine1":{"type":"string","description":"First street-address line supplied with the record request.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteAddressLine2"],"properties":{"submittedSiteAddressLine2":{"type":"string","description":"Second street-address line supplied with the record request.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteAddress"],"properties":{"submittedSiteAddress":{"type":"string","description":"Combined address text supplied with the record request.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteCity"],"properties":{"submittedSiteCity":{"type":"string","description":"City supplied with the record request site address.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteState"],"properties":{"submittedSiteState":{"type":"string","description":"State or region supplied with the record request site address.","enum":["asc","desc"]}}},{"type":"object","required":["submittedSiteZip"],"properties":{"submittedSiteZip":{"type":"string","description":"Postal code supplied with the record request site address. Preserve as\ntext.","enum":["asc","desc"]}}},{"type":"object","required":["followUpDate"],"properties":{"followUpDate":{"type":"string","description":"Scheduled follow-up date for the record request.","enum":["asc","desc"]}}},{"type":"object","required":["lastContactDate"],"properties":{"lastContactDate":{"type":"string","description":"Most recent contact date recorded for the request.","enum":["asc","desc"]}}},{"type":"object","required":["completionDate"],"properties":{"completionDate":{"type":"string","description":"Completion date recorded for the request, when available.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp when the record request was created.","enum":["asc","desc"]}}},{"type":"object","required":["updatedAt"],"properties":{"updatedAt":{"type":"string","description":"Timestamp of the most recent recorded update to the request.","enum":["asc","desc"]}}},{"type":"object","required":["uploadCode"],"properties":{"uploadCode":{"type":"string","description":"Code associated with the request for secure record uploads. Treat as a\nsensitive workflow value.","enum":["asc","desc"]}}},{"type":"object","required":["startDateOfService"],"properties":{"startDateOfService":{"type":"string","description":"Beginning of the service-date period requested. Not necessarily a date\non which care occurred.","enum":["asc","desc"]}}},{"type":"object","required":["endDateOfService"],"properties":{"endDateOfService":{"type":"string","description":"End of the service-date period requested. Not necessarily a date on\nwhich care occurred.","enum":["asc","desc"]}}},{"type":"object","required":["orderNumber"],"properties":{"orderNumber":{"type":"string","description":"Short reference number assigned when the request was created,\nzero-padded to four digits, such as 0042. Requests created together\nshare one number and carry a type suffix: -m medical records, -b\nbilling, -i imaging, -c C-CDA. Numbers are reused some time after a\nrequest ends, so use the request id as the lasting identifier. Null\nfor sandbox requests.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Identifier of the customer organization associated with the record.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Identifier of the project containing the record.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Identifier of the patient. Join to Patients patient.id using the same\ncompanyId and projectId.","enum":["asc","desc"]}}},{"type":"object","required":["siteId"],"properties":{"siteId":{"type":"string","description":"Identifier of the resolved site associated with the request. The Sites\nsheet only lists visit-linked sites and may not contain this site.","enum":["asc","desc"]}}},{"type":"object","required":["ownerUserId"],"properties":{"ownerUserId":{"type":"string","description":"Identifier of the user assigned to the record request.","enum":["asc","desc"]}}},{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"Identifier of the user who created the record request.","enum":["asc","desc"]}}},{"type":"object","required":["providerPacketUrl"],"properties":{"providerPacketUrl":{"type":"string","description":"Time-limited link to download the request's provider packet, the\ndocument package sent to the facility. Null when no packet has been\ngenerated.","enum":["asc","desc"]}}},{"type":"object","required":["siteFeeUrl"],"properties":{"siteFeeUrl":{"type":"string","description":"Time-limited link to download the facility's fee document for releasing\nthe records. Null when none has been uploaded.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationUrl"],"properties":{"authorizationUrl":{"type":"string","description":"Time-limited link to download the patient's authorization on file, the\none shared by all of the patient's requests. Null when none has been\nuploaded.","enum":["asc","desc"]}}},{"type":"object","required":["authorizationOverrideUrl"],"properties":{"authorizationOverrideUrl":{"type":"string","description":"Time-limited link to download the authorization that applies to this\nrequest alone, which takes the place of the patient's authorization.\nNull when the request has no authorization of its own.","enum":["asc","desc"]}}},{"type":"object","required":["deliverableUrl"],"properties":{"deliverableUrl":{"type":"string","description":"Time-limited link to download the combined chart PDF generated from the\nrecords returned for the request. Null when none has been published.","enum":["asc","desc"]}}},{"type":"object","required":["deliverableCount"],"properties":{"deliverableCount":{"type":"string","description":"Number of files received for the request, loaded when the live request\ntable enriches the row. Zero when no enrichment ran, as in the Master\nExport, where it is not the actual number of received files.","enum":["asc","desc"]}}},{"type":"object","required":["aiMode"],"properties":{"aiMode":{"type":"string","description":"Path of the AI chat over the request's combined chart, ending in\n/deliverable/chat. Present once the combined chart has been analyzed and\nchat over it is available; null otherwise.","enum":["asc","desc"]}}},{"type":"object","required":["currentAgeDays"],"properties":{"currentAgeDays":{"type":"string","description":"Age of the request in days since it was created, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export; derive elapsed age from createdAt there.","enum":["asc","desc"]}}},{"type":"object","required":["priority"],"properties":{"priority":{"type":"string","description":"Bucketed `current_age_days` (`critical`/`high`/`medium`/`normal`).","enum":["asc","desc"]}}},{"type":"object","required":["submissionCount"],"properties":{"submissionCount":{"type":"string","description":"Number of submissions recorded for the request, computed when the live\nrequest table enriches the row. Zero when no enrichment ran, as in the\nMaster Export, where it is not the actual submission count.","enum":["asc","desc"]}}},{"type":"object","required":["submissions"],"properties":{"submissions":{"type":"string","description":"Presence marker for outbound submissions. Null when the request has no\noutbound submissions and present when it has at least one, so filter on\nnull / not null to find requests without or with submissions.","enum":["asc","desc"]}}},{"type":"object","required":["statusCategory"],"properties":{"statusCategory":{"type":"string","description":"Coarse status grouping, populated from `status.category()` so the\nStatus Category card can `in`-filter without expanding to statuses.","enum":["asc","desc"]}}},{"type":"object","required":["ehrStatus"],"properties":{"ehrStatus":{"type":"string","description":"Customer-facing EHR retrieval outcome, the same decision the activity\ntable and sidebar chip share. Gated — resolving it reads the routed\ndepartment and the patient's enrollment.","enum":["asc","desc"]}}},{"type":"object","required":["authCheckOutcome"],"properties":{"authCheckOutcome":{"type":"string","description":"Worst auth-check tally (`Passed` / `Warning` / `Failed`), populated\nfrom the scored sidecar so the Auth Check card can `in`-filter.\nGated — scoring the sidecar is the same S3 work as the `authCheck`\nslot, so it only runs when this field or the slot is referenced.","enum":["asc","desc"]}}},{"type":"object","required":["roi"],"properties":{"roi":{"type":"string","description":"Release-of-information vendor resolved from the request type and routed\ndepartment. Blank for C-CDA requests.","enum":["asc","desc"]}}},{"type":"object","required":["ehr"],"properties":{"ehr":{"type":"string","description":"Electronic health record vendor resolved from the request type and\nrouted department, when available.","enum":["asc","desc"]}}},{"type":"object","required":["feeTotal"],"properties":{"feeTotal":{"type":"string","description":"Sum of non-canceled fees associated with this record request. Monetary\namount; the field does not carry a currency code.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"RequestStatus":{"type":"string","description":"Where a record request stands in its workflow. A terminal status is one the\nrequest is not expected to leave; only `Completed` and `Partial` come with\ndeliverables.\n\n- `Pending`: intermediate. The request has been created and work on it has\n  not started.\n- `InfoConfirmed`: intermediate. The request's patient and request details\n  have been confirmed.\n- `SiteConfirmed`: intermediate. The facility the request is addressed to\n  has been confirmed.\n- `RequestSent`: intermediate. The request has been sent to the facility.\n- `RequestConfirmed`: intermediate. The facility has confirmed it received\n  the request and is processing it.\n- `MailOnly`: intermediate. The facility accepts this request by mail only.\n- `AuthDenied`: failure. The facility rejected the patient authorization; no\n  deliverable is produced unless the authorization problem is resolved.\n- `WrongSiteName`: terminal failure. The facility named on the request was\n  wrong.\n- `PaymentPending`: intermediate, needs resolution. The facility requires a\n  fee to be paid before it releases the records.\n- `NeedSiteSpecificAuth`: intermediate, needs resolution. The facility\n  requires an authorization that names it specifically.\n- `PatientNotFound`: terminal failure. The facility could not locate the\n  patient.\n- `ServiceDatesNotFound`: terminal failure. The facility found the patient\n  but no visits within the requested dates of service.\n- `SiteClosed`: terminal failure. The facility has closed.\n- `Canceled`: terminal failure. The request was canceled.\n- `Void`: terminal failure. The request was voided.\n- `DuplicateRequest`: terminal failure. The request duplicates another\n  request.\n- `Resubmitted`: intermediate. The request was sent again, for example\n  after its dates of service were changed.\n- `Partial`: terminal, partial success. Some but not all of the requested\n  records were delivered.\n- `Completed`: terminal success. The records were delivered and are listed\n  in the request's deliverables.\n- `FacilityRefusal`: terminal failure. The facility refused to release the\n  records.\n- `NoRecordFound`: terminal failure. The facility searched and holds no\n  records for the request.\n- `NeedToReviewResults`: intermediate. Records have arrived and are awaiting\n  review before the request is closed out, usually as `Completed` or\n  `Partial`; some deliverables may already be present and more may follow.","enum":["Pending","InfoConfirmed","SiteConfirmed","RequestSent","RequestConfirmed","MailOnly","AuthDenied","WrongSiteName","PaymentPending","NeedSiteSpecificAuth","PatientNotFound","ServiceDatesNotFound","SiteClosed","Canceled","Void","DuplicateRequest","Resubmitted","Partial","Completed","FacilityRefusal","NoRecordFound","NeedToReviewResults"]},"RequestType":{"type":"string","description":"Category of records a record request asks for. Each request carries exactly\none type.\n\n- `MedicalRecord`: the patient's medical records from the facility. Created\n  by the `medicalRecord` flag on the create form.\n- `Billing`: billing records from the facility. Created by the `billing`\n  flag on the create form.\n- `FacilityBilling`: facility (hospital) billing records.\n- `PhysicianBilling`: physician billing records.\n- `ImagingBilling`: imaging billing records.\n- `EmergencyRoomBilling`: emergency room billing records.\n- `AnesthesiologyBilling`: anesthesiology billing records.\n- `Imaging`: imaging records, such as raw images and radiology reports.\n  Created by the `imaging` flag on the create form.\n- `Ccda`: a C-CDA clinical summary document retrieved directly from the\n  facility's electronic health record rather than from its records\n  department. Satisfied by the patient's general authorization and\n  delivered electronically only. Created by the `ccda` flag on the create\n  form.","enum":["MedicalRecord","Billing","FacilityBilling","PhysicianBilling","ImagingBilling","EmergencyRoomBilling","AnesthesiologyBilling","Imaging","Ccda"]},"RequirementBasis":{"type":"string","description":"Why a checklist item matters: the kind of requirement its verdict was reached under.\n\n- `legal`: required by law for a valid authorization. A failure means the document itself is defective.\n- `requestCoverage`: the document may be valid yet not authorize this particular request: this patient, these dates of service, this disclosing site.\n- `providerAcceptance`: not a legal defect, but a records office may still reject the request over it. Never worse than a warning.\n- `operational`: document quality and processing: readability, document validity, authorization-type detection and template review.","enum":["legal","requestCoverage","providerAcceptance","operational"]},"ResearchDocument":{"type":"object","description":"A source document (a PDF the AI researcher read to extract a department's\ncontact information) that has been downloaded and archived in our own object\nstore, so it stays viewable behind our auth even if the original public URL\nrots. Department-level provenance: it is listed once per department next to\nthe per-field citations, since the same form typically backs several fields.\n\n`s3Key` is the archived object's key; `sourceUrl` is the original public\nlocation it was fetched from (kept for reference / fallback).","required":["id","sourceUrl","s3Key","fetchedAt"],"properties":{"id":{"type":"string","description":"Stable identifier (a hash of the source URL) used in the download route\nand to dedupe the same document across re-research passes."},"sourceUrl":{"type":"string","description":"The original public URL the document was fetched from."},"s3Key":{"type":"string","description":"Key of the archived copy in our object store."},"contentType":{"type":["string","null"],"description":"MIME type recorded at fetch time (`application/pdf` in practice)."},"fetchedAt":{"type":"string","format":"date-time","description":"When the document was downloaded and archived."}}},"ResolutionOutcome":{"oneOf":[{"type":"string","enum":["vendorIdMatch"]},{"type":"string","enum":["placeIdMatch"]},{"type":"string","enum":["addressHashMatch"]},{"type":"object","required":["aiMatch"],"properties":{"aiMatch":{"type":"object","required":["similarity"],"properties":{"similarity":{"type":"integer","format":"u-int32","minimum":0}}}}},{"type":"string","enum":["created"]},{"type":"string","enum":["noGeocodingResults"]}],"description":"How the site finder settled on its result. Every value is a plain string\nexcept `aiMatch`, which is an object `{\"aiMatch\": {\"similarity\": 87}}`\ncarrying the match score from 0 to 100.\n\n- `vendorIdMatch`: an existing site was identified directly by an\n  identifier in the request (NCPDP, NPI or the medical-records vendor's\n  id), without an address search.\n- `placeIdMatch`: the geocoded address resolved to the same map place as\n  an existing site.\n- `addressHashMatch`: an existing site has the identical address and a\n  closely matching name.\n- `aiMatch`: an existing nearby site was judged to be the same place by\n  comparing names, addresses and distance.\n- `created`: no existing site matched. Nothing is created; the result may\n  include a proposal for creating the site.\n- `noGeocodingResults`: the submitted address could not be located, so no\n  search was run."},"RevocationContactInfo":{"type":"object","description":"Structured contact info for submitting a revocation. Each channel is optional;\nthe backend decides whether any contact method was provided based on whether\nat least one channel was extracted, and validates each channel's format.","properties":{"phone":{"type":["string","null"],"description":"Phone number to call to submit a revocation, as written on the form"},"fax":{"type":["string","null"],"description":"Fax number to submit a revocation, as written on the form"},"email":{"type":["string","null"],"description":"Email address to submit a revocation"},"mailingAddress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsAddressForm","description":"Mailing address to submit a revocation (any subset of fields may be present)"}]}}},"RightToRevoke":{"type":"object","description":"LLM-extracted right-to-revoke block. Both subfields nullable — the backend\ndecides pass/warn/fail based on what's present.","required":["contactInfo"],"properties":{"statement":{"type":["string","null"],"description":"Short paraphrase of the revocation statement — not a verbatim copy of\nthe form's wording."},"contactInfo":{"$ref":"#/components/schemas/RevocationContactInfo","description":"Contact channels the form specifies for submitting a revocation"}}},"RoiVendor":{"type":"string","description":"A release-of-information (ROI) vendor, written as one word of ASCII letters and digits (for example Sharecare or Verisma).","examples":["Sharecare"]},"Role":{"type":"string","description":" A user's role: the named bundle of permissions their account holds.\n Access is decided by the individual permissions, which a user\n profile lists, rather than by the role itself. One of:\n\n- `customer_admin`\n- `customer_standard`\n- `delivery`\n- `community`\n- `developer`\n- `owner`\n- `upload_processor`\n- `viewer`","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]},"SearchBlockedReason":{"type":"string","description":"Why a requested search capability will not run as submitted.\n\nTyped rather than free text so a consumer can branch on it, and additive so\nno existing consumer breaks. Deliberately not folded into the\n`*Available` entitlement flags: entitlement (\"is this company approved for\nthe feature\") and runnability (\"will this actually go out\") are different\nquestions, and customers key off the former.","enum":["MissingZipCode","DeceasedBeforeClinicalData"]},"SearchLevel":{"type":"string","description":"What level of search was requested for the patient.\nPatientHistory implies SiteSonar (you need WHERE before WHAT).\n\nLegacy/backwards-compatibility type. Site sonar and patient histories are\nnow requested independently via the `siteSonar` and `patientHistories`\nfields; this enum is retained for durable replay and derived read\nprojections. New write inputs accept only the independent flags.","enum":["None","SiteSonar","PatientHistory"]},"SearchStatus":{"type":"string","description":"Where the patient's clinical-data searches stand. One status covers every\nsearch requested for the patient, and it reaches a terminal value only\nonce all of them have finished. Requesting a search again starts the\ncycle over.\n\n- `Inactive` — no search has started: none was requested, or the request\n  is waiting on authorization approval. The default.\n- `Processing` — submitted and waiting for results.\n- `Completed` — terminal. The searches finished and found clinical data.\n- `NoHit` — terminal. The searches finished and found no records.\n- `AmbiguousIdentity` — terminal. The patient has no sex on file and\n  records were found under both sexes, so they are withheld as possibly\n  belonging to two people. Set the patient's `sex` to resolve it.\n- `MissingZipCode` — waiting, not failed. On a live project nothing has\n  been sent because a requested search needs a ZIP code and the patient\n  has none; it goes out on its own once a ZIP code is added.\n- `RequestRejected` — waiting, not failed, and not a no-hit. The partner\n  refused the request file itself, so nothing was searched. It is resent\n  on its own once the refused details are corrected; after repeated\n  refusals of an unchanged request it stops being resent until Hermes\n  re-arms the patient.\n- `DeceasedBeforeClinicalData` — terminal. The patient's authorization\n  documents date their death before 2016, earlier than any claims history\n  is retained, so the claims searches finished without being run. A\n  patient who also requested EHR Search reports that search's result\n  instead.","enum":["Inactive","Processing","Completed","NoHit","AmbiguousIdentity","MissingZipCode","RequestRejected","DeceasedBeforeClinicalData"]},"SensitiveInformationRequestStatus":{"type":"string","description":"Whether an authorization form asks to release one category of sensitive\ninformation, and whether the patient specifically authorized that release.\n\n- `NotRequested`: the form does not ask to release this category.\n- `RequestedWithoutAuthorization`: the form asks to release this category,\n  but the patient's specific authorization for it (for example, initials\n  beside the category) is missing.\n- `RequestedWithAuthorization`: the form asks to release this category and\n  the patient specifically authorized it.","enum":["NotRequested","RequestedWithoutAuthorization","RequestedWithAuthorization"]},"SensitiveInformationRequested":{"type":"object","required":["status","message"],"properties":{"status":{"$ref":"#/components/schemas/SensitiveInformationRequestStatus","description":"Status of the sensitive information request: not requested, requested without patient\nauthorization, or requested with patient authorization"},"message":{"type":"string","description":"Specific findings about what was found or missing"}}},"SensitiveInformationRequests":{"type":"object","required":["mentalHealthInformation","substanceUseDisorderRecords","hivAidsInformation","infectiousDiseaseInformation","geneticTestingInformation"],"properties":{"mentalHealthInformation":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release mental health information, and\nwhether the patient specifically authorized it."},"substanceUseDisorderRecords":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release substance use disorder treatment\nrecords, and whether the patient specifically authorized it."},"hivAidsInformation":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release HIV/AIDS information, and whether the\npatient specifically authorized it."},"infectiousDiseaseInformation":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release infectious disease information, and\nwhether the patient specifically authorized it."},"geneticTestingInformation":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release genetic testing information, and\nwhether the patient specifically authorized it."},"reproductiveHealthInformation":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release reproductive health and fertility\ninformation, and whether the patient specifically authorized it."},"sexuallyTransmittedDiseaseInformation":{"$ref":"#/components/schemas/SensitiveInformationRequested","description":"Whether the form asks to release sexually transmitted disease\ninformation, and whether the patient specifically authorized it."}}},"SensitiveInformationVerdicts":{"type":"object","description":"The sensitive-information verdicts for an auth-check: one per category\nthe authorization requests, or the single none-requested pass. Every field\nis `null` when the detected authorization type is HITECH, since\ndirect-access requests carry no sensitive-information section.","properties":{"mentalHealthInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when mental health information is not requested."}]},"substanceUseDisorderRecords":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when substance use disorder records are not requested."}]},"hivAidsInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when HIV/AIDS information is not requested."}]},"infectiousDiseaseInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when infectious disease information is not requested."}]},"geneticTestingInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when genetic testing information is not requested."}]},"reproductiveHealthInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when reproductive health and fertility information is not\nrequested."}]},"sexuallyTransmittedDiseaseInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"`null` when sexually transmitted disease information is not requested."}]},"noSensitiveInformationRequested":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CheckItem","description":"A pass set only when no category is requested; `null` whenever any\ncategory is."}]}}},"ServiceDates":{"type":"object","description":"Date range of service covered by the authorization, extracted from the\nform. Both sides optional: a form silent on dates of service is valid\n(nothing to validate against the request).","properties":{"startDateOfService":{"type":["string","null"],"format":"date","description":"The start date of service"},"endDateOfService":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ServiceEndDate","description":"The end date of service (may be a concrete date or \"Present\")"}]}}},"ServiceDatesPatch":{"type":"object","description":"Both dates of service in one update, so a date range is saved in a single\nchange.\n\nEach field may be absent, which leaves the stored date unchanged; null,\nwhich clears it; or a date, which sets it. Setting either date moves the\nrequest to `Resubmitted`.","properties":{"startDateOfService":{"type":["string","null"],"format":"date","description":"New first date (YYYY-MM-DD) of the service-date window. Absent leaves\nthe stored date unchanged; null clears it.","example":"2024-01-15"},"endDateOfService":{"type":["string","null"],"format":"date","description":"New last date (YYYY-MM-DD) of the service-date window. Absent leaves\nthe stored date unchanged; null clears it.","example":"2024-02-20"}}},"ServiceEndDate":{"oneOf":[{"type":"object","required":["Date"],"properties":{"Date":{"type":"string","format":"date"}}},{"type":"string","enum":["Present"]}],"description":"End date of service extracted from the authorization form.\nMay be a concrete date or \"Present\" (meaning ongoing/current)."},"Sex":{"type":"string","description":"The patient's sex. On input, `M`, `F` and `U` (either case) and the\ncapitalized words are accepted too; output always uses the lowercase word.\n\n- `male` — male.\n- `female` — female.\n- `unknown` — not known. The default.","enum":["male","female","unknown"]},"SignatureType":{"type":"string","description":"How the requester's signature appears on the form. Wet = handwritten ink\nor stylus (variable strokes, pressure, slant). TypedPrint = name typed in\na regular print typeface (Arial, Times, Helvetica, etc.) with no attempt\nto look like handwriting. TypedCursive = name rendered in a cursive/script\ntypeface that mimics handwriting but is clearly a font (uniform stroke\nwidth, perfectly consistent letterforms; e.g. Allura, Great Vibes). The\nEsign variants are signatures executed through an e-sign platform, judged\nby the execution artifacts visible on the page — a \"Docusigned by:\" stamp\nbox, an \"Envelope ID\" page header, a certificate-of-completion page —\nsplit by recognized provider, with EsignOther covering unbranded or\nunrecognized platforms. Platform variants take precedence over the generic\nappearance classes whenever such artifacts are present.","enum":["Wet","TypedPrint","TypedCursive","EsignDocuSign","EsignAdobeSign","EsignDropboxSign","EsignOther"]},"SignerRelationship":{"type":"string","description":"The signer's relationship to the patient, extracted from the form's\n\"Relationship to Patient\" field (and signature-line cues like\n\"Patient/Guardian Signature\" or a representative title under the signature).\nA blank or absent relationship means the patient signed for themselves and\nmaps to `Self`.","enum":["Self","Parent","Child","Spouse","LegalGuardian","PowerOfAttorney","Executor","Distributee","Beneficiary","Other"]},"Site":{"type":"object","required":["id","npis","isFacility","name","updatedAt"],"properties":{"id":{"type":"string","description":"Unique identifier of the site.","example":"2V5bq0w7Kx1sZcFhN3pLmT9yQaR"},"npis":{"type":"array","items":{"type":"string"},"description":"National Provider Identifiers registered to the site, each a\n10-digit number as text. Empty when none is known."},"isFacility":{"type":"boolean","description":"Whether the site is a facility, such as a hospital, clinic or\npharmacy, rather than an individual practitioner."},"taxId":{"type":["string","null"],"description":"Federal tax identification number of the organization operating the\nsite. Empty string when not known, and always empty for customer\naccounts."},"name":{"type":"string","description":"Name of the site.","example":"Riverside Community Hospital"},"addressLine1":{"type":["string","null"],"description":"First line of the street address. Empty string when not known.","example":"123 Example Street"},"addressLine2":{"type":["string","null"],"description":"Second line of the street address, such as a suite or building.\nEmpty string when there is none.","example":"Suite 200"},"city":{"type":["string","null"],"description":"City of the site's address. Empty string when not known.","example":"Springfield"},"zip":{"type":["string","null"],"description":"ZIP code of the site's address, as text so leading zeros are kept.\nEmpty string when not known.","example":"94110"},"phone":{"type":["string","null"],"description":"Main telephone number of the site. Empty string when not known.","example":"+12025550142"},"mainFax":{"type":["string","null"],"description":"Main fax number of the site in E.164 format. Separate from the\ndepartments' fax numbers. Null when not known.","example":"+12025550143"},"email":{"type":["string","null"],"description":"General email address of the site. Separate from the departments'\nemail addresses. Empty string when not known.","example":"info@example.com"},"state":{"type":["string","null"],"description":"State of the site's address, normally a two-letter code. Empty\nstring when not known.","example":"CA"},"updatedAt":{"type":"string","format":"date-time","description":"When the site was last updated, as an RFC 3339 timestamp in UTC.","example":"2026-01-15T12:00:00Z"},"systemName":{"type":["string","null"],"description":"Name of the health system the site belongs to. Empty string when\nnot known.","example":"Example Health System"},"primarySpecialty":{"type":["string","null"],"description":"Primary medical specialty of the site. Empty string when not known.","example":"General Acute Care Hospital"},"latitude":{"type":["number","null"],"format":"double","description":"Latitude of the site in decimal degrees. Null when the address has\nnot been located on a map, such as a PO box."},"longitude":{"type":["number","null"],"format":"double","description":"Longitude of the site in decimal degrees. Null when the address has\nnot been located on a map, such as a PO box."},"formattedAddress":{"type":["string","null"],"description":"Complete address of the site on one line. Empty string when not\nknown.","example":"123 Example Street, Suite 200, Springfield, CA 94110"},"researchFinished":{"type":["string","null"],"format":"date-time","description":"When the most recent full research run on the site's contact details\nfinished, as an RFC 3339 timestamp in UTC. Null when the site has\nnot been researched.","example":"2026-01-15T12:00:00Z"},"researchDurationMs":{"type":["integer","null"],"format":"u-int64","description":"Wall-clock duration of the most recently completed AI research run.","minimum":0},"operationalStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteOperationalStatus","description":"Operational status determined by AI research; null until a site\nhas been researched."}]},"operationalStatusNote":{"type":["string","null"],"description":"Generated explanation shown under the operational status (why the\nfacility is closed/acquired and where records were transferred)."},"placeId":{"type":["string","null"],"description":"Identifier of the map place the site's address and name were\nverified against. Empty string when the site has not been verified."},"addressHash":{"type":["integer","null"],"format":"int64","description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Null when the address has not been\nnormalized."},"fingerprintedAt":{"type":["string","null"],"format":"date-time","description":"When the site's address was last normalized and fingerprinted, as\nan RFC 3339 timestamp in UTC. Null when it never has been.","example":"2026-01-15T12:00:00Z"},"dedupConsideredAt":{"type":["string","null"],"format":"date-time","description":"When the site was last reviewed for duplicate records, as an RFC\n3339 timestamp in UTC. Null when it never has been."},"website":{"type":["string","null"],"description":"Website of the site. Empty string when not known.","example":"https://www.example.com"},"acceptsEsignature":{"type":["boolean","null"],"description":"Whether the site accepts electronically signed authorizations with\na record request. Null when not known."},"googlePlacesName":{"type":["string","null"],"description":"Name of the site as listed by the map place in `placeId`. Empty\nstring when the site has not been verified.","example":"Riverside Community Hospital"},"dataSources":{"type":"array","items":{"type":"string"},"description":"Internal provenance labels for the site's information. Omitted when\nempty, and always empty for customer accounts."},"npiEnumerationDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) the site's NPI was first issued in the national\nprovider registry. Null when not known.","example":"2024-01-15"},"npiDeactivationReason":{"type":["string","null"],"description":"Reason the national provider registry gives for deactivating the\nsite's NPI. Empty string when the NPI has not been deactivated."},"npiDeactivationDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) the site's NPI was deactivated. Null when it has\nnot been.","example":"2024-01-15"},"npiReactivationDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) a deactivated NPI was reactivated. Null when it\nhas not been.","example":"2024-01-15"},"medicalDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives medical records requests\nfor this site. Null when none is routed."},"facilityBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives facility billing\nrecords requests. Null when none is routed."},"physicianBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives physician billing\nrecords requests. Null when none is routed."},"imagingBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives imaging billing records\nrequests. Null when none is routed."},"emergencyRoomBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives emergency room billing\nrecords requests. Null when none is routed."},"anesthesiologyBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives anesthesiology billing\nrecords requests. Null when none is routed."},"imagingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives imaging records\nrequests. Null when none is routed."}}},"SiteAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"SiteAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"SiteCategory":{"type":"string","description":"What kind of place a looked-up name and address turned out to be. Only\nhealthcare sites can be created; `other` makes the address ineligible.\n\n- `medical_facility`: a hospital, clinic, practice or other medical facility.\n- `pharmacy`: a pharmacy.\n- `lab`: a laboratory.\n- `other`: not a healthcare site, such as a shop or restaurant, or a place\n  that could not be classified.","enum":["medical_facility","pharmacy","lab","other"]},"SiteEnrichment":{"type":"object","description":"Result of the web-search enrichment call. Surfaces enough information for\nboth the backend (to decide whether to build a `SiteFinderProposal`) and\nthe frontend (to render either a prepopulated Create-Site card or an\n\"ineligible\" notice with the model's reasoning).\n\n`operational_status` plus the per-record-type custodians let Facility Lens\nhandle facilities that were healthcare sites but have since closed,\nrelocated, merged, or had their records transferred: the site is still\ncreated (and marked with its status), and each custodian captures where the\ncorresponding record requests should now be routed.","required":["category","confidence","reason"],"properties":{"category":{"$ref":"#/components/schemas/SiteCategory","description":"What kind of place the name and address turned out to be. Only\nhealthcare categories can be created as a site."},"officialName":{"type":["string","null"],"description":"Official name of the place found by the web search. Absent when none\nwas found.","example":"Riverside Community Hospital"},"addressLine1":{"type":["string","null"],"description":"Street address found for the place. Absent when none was found.","example":"123 Example Street"},"city":{"type":["string","null"],"description":"City found for the place. Absent when none was found.","example":"Springfield"},"state":{"type":["string","null"],"description":"State found for the place. Absent when none was found.","example":"CA"},"zip":{"type":["string","null"],"description":"ZIP code found for the place. Absent when none was found.","example":"94110"},"phone":{"type":["string","null"],"description":"Telephone number found for the place. Absent when none was found.","example":"+12025550142"},"website":{"type":["string","null"],"description":"Website found for the place. Absent when none was found.","example":"https://www.example.com"},"operationalStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteOperationalStatus","description":"Whether the entity is still operating, and if not, why — drives the\n\"(Closed)\" marker and tells the retrieval workflow where to look.\nAbsent when the model could not determine it (treated as operational)."}]},"medicalRecordsCustodian":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecordsCustodian","description":"Custodian for the closed facility's **medical** records."}]},"billingRecordsCustodian":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecordsCustodian","description":"Custodian for the closed facility's **billing / financial** records\n(often the successor's patient-financial-services office, distinct from\nthe clinical custodian)."}]},"imagingRecordsCustodian":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RecordsCustodian","description":"Custodian for the closed facility's **imaging / radiology** records."}]},"confidence":{"type":"string","description":"How sure the lookup is of its result: `high`, `medium` or `low`.","example":"high"},"reason":{"type":"string","description":"Short explanation of the result, such as why the place is not a\nhealthcare site or what happened to a closed facility. May be empty.","example":"General acute care hospital operating at this address."}}},"SiteEvidence":{"type":"object","description":"Per-field evidence for the site-level fields a user can edit.\n\nThe AI researcher fills `systemName`, `phone`, `mainFax`, `website`, and\n`email` (the rest stay empty until confirmed). Every other slot exists so\na human sign-off can be recorded on a manually-entered value.","properties":{"systemName":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the site's `systemName`."},"phone":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the site's `phone`."},"mainFax":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the site's `mainFax`."},"website":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the site's `website`."},"operationalStatus":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the site's operational status (whether it\nis open, closed, merged or relocated)."},"name":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `name`."},"taxId":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `taxId`."},"isFacility":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `isFacility`."},"email":{"$ref":"#/components/schemas/FieldEvidence","description":"Provenance and sign-off for the site's `email`."},"primarySpecialty":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `primarySpecialty`."},"acceptsEsignature":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `acceptsEsignature`."},"addressLine1":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `addressLine1`."},"addressLine2":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `addressLine2`."},"city":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `city`."},"state":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `state`."},"zip":{"$ref":"#/components/schemas/FieldEvidence","description":"Sign-off for the site's `zip`."}}},"SiteFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Unique identifier of the site."},"name":{"type":"boolean","description":"Name of the resolved site."},"npis":{"type":"boolean","description":"National Provider Identifiers registered to the site. Each NPI is a\n10-digit text value. Exported as a JSON array in one cell."},"isFacility":{"type":"boolean","description":"Whether the site is a facility, such as a hospital, clinic or pharmacy,\nrather than an individual practitioner."},"inNetwork":{"type":"boolean","description":"Whether any routed department is in-network (Facility Lens / visits\nNetwork Status). NOT event-sourced — defaults false in projection and\nis populated per-request by the sites browse handler so the\ntyped-browse engine can filter/sort on it."},"hasEmbedding":{"type":"boolean","description":"Whether the site participates in embedding matching (has a vector in\nthe durable store, or is a CMS NDH phantom whose vector lives in the\nNDH cache). NOT event-sourced or stored columnar — defaults false in\nprojection and is populated per-request by the sites browse handler so\nthe typed-browse engine can filter/sort on it."},"recordRequestCount":{"type":"boolean","description":"How many record requests currently point at this site (`site_id`).\nNot event-sourced — defaults to 0 and is filled per-request by the\nsites browse handler so the typed-browse engine can filter/sort on it."},"visitCount":{"type":"boolean","description":"How many visits happened at this site (`site_id`, location subjects\nonly). Not event-sourced — defaults to 0 and is filled per-request by\nthe sites browse handler so the typed-browse engine can filter/sort on\nit."},"taxId":{"type":"boolean"},"updatedAt":{"type":"boolean","description":"When the site was last updated, as an RFC 3339 timestamp in UTC. Blank\nwhen not recorded."},"addressLine1":{"type":"boolean","description":"First line of the site's street address. Blank when not known."},"addressLine2":{"type":"boolean","description":"Second line of the site's street address, such as a suite or building.\nBlank when there is none."},"city":{"type":"boolean","description":"City of the site's address. Blank when not known."},"state":{"type":"boolean","description":"State of the site's address, normally a two-letter code. Blank when not\nknown."},"zip":{"type":"boolean","description":"ZIP code of the site's address. Preserve as text to retain leading\nzeros. Blank when not known."},"formattedAddress":{"type":"boolean","description":"Complete address of the site on one line. Blank when not known."},"latitude":{"type":"boolean","description":"Latitude of the site in decimal degrees. Blank when the address has not\nbeen located on a map, such as a PO box."},"longitude":{"type":"boolean","description":"Longitude of the site in decimal degrees. Blank when the address has\nnot been located on a map, such as a PO box."},"phone":{"type":"boolean","description":"Telephone number of the resolved site."},"mainFax":{"type":"boolean","description":"Main fax number of the site. Separate from the departments' fax\nnumbers. Blank when not known."},"email":{"type":"boolean","description":"Populated post-create via `SitePatch` (research or manual edit); the\n`SiteCreated` event does not carry it."},"systemName":{"type":"boolean","description":"Name of the health system the site belongs to. Blank when not known."},"primarySpecialty":{"type":"boolean","description":"Primary medical specialty of the site. Blank when not known."},"researchFinished":{"type":"boolean","description":"When the most recent full research run on the site's contact details\nfinished, as an RFC 3339 timestamp in UTC. Blank when the site has not\nbeen researched."},"liteResearchFinished":{"type":"boolean"},"placeId":{"type":"boolean","description":"Identifier of the map place the site's address and name were verified\nagainst. Blank when the site has not been verified."},"addressHash":{"type":"boolean","description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Blank when the address has not been\nnormalized."},"website":{"type":"boolean","description":"Website of the site. Blank when not known."},"acceptsEsignature":{"type":"boolean","description":"Whether the site accepts electronically signed authorizations with a\nrecord request. Blank when not known."},"googlePlacesName":{"type":"boolean","description":"Name of the site as listed by the map place it was verified against.\nBlank when the site has not been verified."},"fingerprintedAt":{"type":"boolean","description":"When the site's address was last normalized and fingerprinted, as an\nRFC 3339 timestamp in UTC. Blank when it never has been."},"dedupConsideredAt":{"type":"boolean","description":"When the site was last reviewed for duplicate records, as an RFC 3339\ntimestamp in UTC. Blank when it never has been."},"dataSources":{"type":"boolean"},"npiEnumerationDate":{"type":"boolean","description":"Date (YYYY-MM-DD) the site's NPI was first issued in the national\nprovider registry. Blank when not known."},"npiDeactivationReason":{"type":"boolean","description":"Reason the national provider registry gives for deactivating the site's\nNPI. Blank when the NPI has not been deactivated."},"npiDeactivationDate":{"type":"boolean","description":"Date (YYYY-MM-DD) the site's NPI was deactivated. Blank when it has not\nbeen."},"npiReactivationDate":{"type":"boolean","description":"Date (YYYY-MM-DD) a deactivated NPI was reactivated. Blank when it has\nnot been."},"googleMapsUrl":{"type":"boolean","description":"Google Maps link for the facility or dispensing pharmacy, when\navailable."},"medicalDepartmentId":{"type":"boolean","description":"Identifier of the department that receives medical records requests for\nthis site. Blank when none is routed."},"facilityBillingDepartmentId":{"type":"boolean","description":"Identifier of the department that receives facility billing records\nrequests for this site. Blank when none is routed."},"physicianBillingDepartmentId":{"type":"boolean","description":"Identifier of the department that receives physician billing records\nrequests for this site. Blank when none is routed."},"imagingBillingDepartmentId":{"type":"boolean","description":"Identifier of the department that receives imaging billing records\nrequests for this site. Blank when none is routed."},"emergencyRoomBillingDepartmentId":{"type":"boolean","description":"Identifier of the department that receives emergency room billing\nrecords requests for this site. Blank when none is routed."},"anesthesiologyBillingDepartmentId":{"type":"boolean","description":"Identifier of the department that receives anesthesiology billing\nrecords requests for this site. Blank when none is routed."},"imagingDepartmentId":{"type":"boolean","description":"Identifier of the department that receives imaging records requests for\nthis site. Blank when none is routed."},"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."}}},"SiteFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Unique identifier of the site."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the resolved site."},"npis":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"National Provider Identifiers registered to the site. Each NPI is a\n10-digit text value. Exported as a JSON array in one cell."},"isFacility":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the site is a facility, such as a hospital, clinic or pharmacy,\nrather than an individual practitioner."},"inNetwork":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether any routed department is in-network (Facility Lens / visits\nNetwork Status). NOT event-sourced — defaults false in projection and\nis populated per-request by the sites browse handler so the\ntyped-browse engine can filter/sort on it."},"hasEmbedding":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the site participates in embedding matching (has a vector in\nthe durable store, or is a CMS NDH phantom whose vector lives in the\nNDH cache). NOT event-sourced or stored columnar — defaults false in\nprojection and is populated per-request by the sites browse handler so\nthe typed-browse engine can filter/sort on it."},"recordRequestCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"How many record requests currently point at this site (`site_id`).\nNot event-sourced — defaults to 0 and is filled per-request by the\nsites browse handler so the typed-browse engine can filter/sort on it."},"visitCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"How many visits happened at this site (`site_id`, location subjects\nonly). Not event-sourced — defaults to 0 and is filled per-request by\nthe sites browse handler so the typed-browse engine can filter/sort on\nit."},"taxId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"updatedAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the site was last updated, as an RFC 3339 timestamp in UTC. Blank\nwhen not recorded."},"addressLine1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First line of the site's street address. Blank when not known."},"addressLine2":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Second line of the site's street address, such as a suite or building.\nBlank when there is none."},"city":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"City of the site's address. Blank when not known."},"state":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"State of the site's address, normally a two-letter code. Blank when not\nknown."},"zip":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ZIP code of the site's address. Preserve as text to retain leading\nzeros. Blank when not known."},"formattedAddress":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Complete address of the site on one line. Blank when not known."},"latitude":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"number","format":"double"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"number","format":"double"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"number","format":"double"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"number","format":"double"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"number","format":"double"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"number","format":"double"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Latitude of the site in decimal degrees. Blank when the address has not\nbeen located on a map, such as a PO box."},"longitude":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"number","format":"double"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"number","format":"double"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"number","format":"double"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"number","format":"double"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"number","format":"double"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"number","format":"double"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Longitude of the site in decimal degrees. Blank when the address has\nnot been located on a map, such as a PO box."},"phone":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Telephone number of the resolved site."},"mainFax":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Main fax number of the site. Separate from the departments' fax\nnumbers. Blank when not known."},"email":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Populated post-create via `SitePatch` (research or manual edit); the\n`SiteCreated` event does not carry it."},"systemName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the health system the site belongs to. Blank when not known."},"primarySpecialty":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Primary medical specialty of the site. Blank when not known."},"researchFinished":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the most recent full research run on the site's contact details\nfinished, as an RFC 3339 timestamp in UTC. Blank when the site has not\nbeen researched."},"liteResearchFinished":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"placeId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the map place the site's address and name were verified\nagainst. Blank when the site has not been verified."},"addressHash":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Blank when the address has not been\nnormalized."},"website":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Website of the site. Blank when not known."},"acceptsEsignature":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the site accepts electronically signed authorizations with a\nrecord request. Blank when not known."},"googlePlacesName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the site as listed by the map place it was verified against.\nBlank when the site has not been verified."},"fingerprintedAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the site's address was last normalized and fingerprinted, as an\nRFC 3339 timestamp in UTC. Blank when it never has been."},"dedupConsideredAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the site was last reviewed for duplicate records, as an RFC 3339\ntimestamp in UTC. Blank when it never has been."},"dataSources":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"npiEnumerationDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Date (YYYY-MM-DD) the site's NPI was first issued in the national\nprovider registry. Blank when not known."},"npiDeactivationReason":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reason the national provider registry gives for deactivating the site's\nNPI. Blank when the NPI has not been deactivated."},"npiDeactivationDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Date (YYYY-MM-DD) the site's NPI was deactivated. Blank when it has not\nbeen."},"npiReactivationDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Date (YYYY-MM-DD) a deactivated NPI was reactivated. Blank when it has\nnot been."},"googleMapsUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Google Maps link for the facility or dispensing pharmacy, when\navailable."},"medicalDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives medical records requests for\nthis site. Blank when none is routed."},"facilityBillingDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives facility billing records\nrequests for this site. Blank when none is routed."},"physicianBillingDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives physician billing records\nrequests for this site. Blank when none is routed."},"imagingBillingDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives imaging billing records\nrequests for this site. Blank when none is routed."},"emergencyRoomBillingDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives emergency room billing\nrecords requests for this site. Blank when none is routed."},"anesthesiologyBillingDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives anesthesiology billing\nrecords requests for this site. Blank when none is routed."},"imagingDepartmentId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Identifier of the department that receives imaging records requests for\nthis site. Blank when none is routed."}}},"SiteFinderDiagnostics":{"type":"object","required":["geocodingSucceeded","facilitiesInBoundingBox","facilitiesInRadius","candidatesAiCompared","matchesAboveThreshold","placeIdMatch","dedupMatch"],"properties":{"geocodingSucceeded":{"type":"boolean","description":"Whether the submitted address was located, so nearby sites could be\nsearched."},"facilitiesInBoundingBox":{"type":"integer","format":"u-int32","description":"Number of existing sites found in the search area around the located\naddress.","example":24,"minimum":0},"facilitiesInRadius":{"type":"integer","format":"u-int32","description":"Number of those sites ranked as candidates by distance from the\nlocated address.","example":24,"minimum":0},"candidatesAiCompared":{"type":"integer","format":"u-int32","description":"Number of candidates compared one by one against the submitted name\nand address. 0 when a shortcut match was found first.","example":5,"minimum":0},"matchesAboveThreshold":{"type":"integer","format":"u-int32","description":"Number of candidates whose match score reached the match threshold.","example":1,"minimum":0},"topSimilarityScore":{"type":["integer","null"],"format":"u-int32","description":"Highest match score, from 0 to 100, given to any candidate; null when\nno candidate was scored.","example":92,"minimum":0},"placeIdMatch":{"type":"boolean","description":"Whether a candidate matched because it is the same map place as the\nlocated address."},"dedupMatch":{"type":"boolean","description":"Whether a candidate matched because it has the identical address and a\nclosely matching name."}}},"SiteFinderInputSummary":{"type":"object","required":["name","address"],"properties":{"name":{"type":"string","description":"Facility or provider name the job was started with.","example":"Riverside Community Hospital"},"address":{"type":"string","description":"First street address line the job was started with.","example":"123 Example Street"},"city":{"type":["string","null"],"description":"City the job was started with; absent when none was given.","example":"Springfield"},"state":{"type":["string","null"],"description":"State the job was started with; absent when none was given.","example":"CA"},"zip":{"type":["string","null"],"description":"ZIP code the job was started with; absent when none was given.","example":"94110"}}},"SiteFinderJobResponse":{"type":"object","required":["id","status","inputSummary","createdAt"],"properties":{"id":{"type":"string","description":"Identifier of the job, as returned by `POST /v0/site-finder`.","example":"2nQe7Vb4kT1yXcP8sLmZ0aRfG3w"},"externalId":{"type":["string","null"],"description":"The caller's own reference for the row, taken from the `id` column of\na batch upload; absent for single lookups.","example":"row-0042"},"status":{"$ref":"#/components/schemas/SiteFinderJobStatus","description":"Where the job is in its lifecycle."},"inputSummary":{"$ref":"#/components/schemas/SiteFinderInputSummary","description":"The name and address the job was started with."},"siteFinder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteFinderOutput","description":"The search result: the matched site, other candidate matches, and\nnearby sites. Present only once `status` is `completed`."}]},"outcome":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ResolutionOutcome","description":"How the result was reached. Present only once `status` is `completed`."}]},"nameResolution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NameResolution","description":"Whether the submitted name was treated as a facility or a provider.\nAbsent until the job completes, and when an identifier in the request\nmatched a site directly."}]},"siteFinderProposal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteFinderProposal","description":"Signed proposal for creating the site when no existing site matched.\nAbsent when a site matched, when the name is a provider whose facility\ncould not be determined, when the entity is not a healthcare\norganization, or when the proposal could not be prepared."}]},"spellingCorrection":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SpellingCorrection","description":"The corrected name and/or city the search used, when the submitted\nspelling could not be located."}]},"siteEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteEnrichment","description":"Web-search check of an unmatched name and address. Present only when no\nexisting site matched and the check ran; a `category` of `other` means\nthe entity is not a medical facility, pharmacy or lab, and no\n`siteFinderProposal` is returned."}]},"error":{"type":["string","null"],"description":"Message describing why the job failed. Present only when `status` is\n`failed`."},"createdAt":{"type":"string","format":"date-time","description":"When the job was started (RFC 3339, UTC).","example":"2026-01-15T12:00:00Z"},"startedAt":{"type":["string","null"],"format":"date-time","description":"When the job began running (RFC 3339, UTC); absent while it is still\n`pending`.","example":"2026-01-15T12:00:01Z"},"finishedAt":{"type":["string","null"],"format":"date-time","description":"When the job reached `completed` or `failed` (RFC 3339, UTC); absent\nuntil then.","example":"2026-01-15T12:00:09Z"}}},"SiteFinderJobStatus":{"type":"string","description":"Where a site-finder job is in its lifecycle. `completed` and `failed` are\nterminal; poll until the job reaches one of them.\n\n- `pending`: the job is queued and has not started.\n- `running`: the search is in progress.\n- `completed`: the search finished; the result is on the job.\n- `failed`: the search stopped with an error, described in `error`.","enum":["pending","running","completed","failed"]},"SiteFinderOutput":{"type":"object","required":["allMatches","nearbySites"],"properties":{"foundSite":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FoundSite","description":"The existing site the search resolved to; null when nothing matched."}]},"allMatches":{"type":"array","items":{"$ref":"#/components/schemas/FoundSite"},"description":"Every candidate whose match score reached the match threshold, highest\nscore first. Empty when the result came from a shortcut match."},"nearbySites":{"type":"array","items":{"$ref":"#/components/schemas/NearbySite"},"description":"Existing sites near the submitted address that were considered,\nnearest first."},"researchEta":{"type":["integer","null"],"format":"u-int32","description":"Reserved for an estimate of when research on the found site will\nfinish. Currently always absent.","minimum":0},"diagnostics":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteFinderDiagnostics","description":"Counts and flags describing how the search ran. Absent from\nsite-finder job results."}]}}},"SiteFinderProposal":{"type":"object","description":"Proposal returned when site-finder finds no match.\nContains all fields that would be inserted plus an HMAC token.\nThe client submits this blob to POST /v0/sites to create the site.","required":["name","addressLine1"],"properties":{"npi":{"type":["string","null"],"description":"10-digit National Provider Identifier from the search request; null\nwhen none was supplied.","example":"1234567893"},"taxId":{"type":["string","null"],"description":"Federal tax identification number from the search request; null when\nnone was supplied.","example":"12-3456789"},"name":{"type":"string","description":"Name the new site would be created with: the submitted name, or the\nfacility name it was resolved or corrected to.","example":"Riverside Community Hospital"},"addressLine1":{"type":"string","description":"First street address line the new site would be created with.","example":"123 Example Street"},"city":{"type":["string","null"],"description":"City of the new site; null when unknown.","example":"Springfield"},"state":{"type":["string","null"],"description":"Two-letter US state code of the new site; null when unknown.","example":"CA"},"zip":{"type":["string","null"],"description":"ZIP code of the new site; null when unknown.","example":"94110"},"isFacility":{"type":["boolean","null"],"description":"Whether the new site is a facility (true) or an individual provider\n(false); null when not determined."},"phone":{"type":["string","null"],"description":"Main phone number of the new site; null when unknown.","example":"+12025550142"},"systemName":{"type":["string","null"],"description":"Name of the health system the new site belongs to; null when unknown.","example":"Example Health System"},"primarySpecialty":{"type":["string","null"],"description":"Primary specialty of the new site, as free text; null when unknown.","example":"Internal Medicine"},"acceptsEsignature":{"type":["boolean","null"],"description":"Whether the new site accepts electronically signed authorizations;\nnull when unknown."},"addressLine2":{"type":["string","null"],"description":"Secondary address line (suite, unit) found by geocoding the address;\nnull when there is none or the address could not be located.","example":"Suite 200"},"formattedAddress":{"type":["string","null"],"description":"Full single-line address found by geocoding; null when the address\ncould not be located.","example":"123 Example Street, Springfield, CA 94110, USA"},"latitude":{"type":["number","null"],"format":"double","description":"Latitude of the geocoded address in decimal degrees; null when the\naddress could not be located.","example":37.7749},"longitude":{"type":["number","null"],"format":"double","description":"Longitude of the geocoded address in decimal degrees; null when the\naddress could not be located."},"placeId":{"type":["string","null"],"description":"Identifier of the map place the address geocoded to; null when no\nplace was found."},"website":{"type":["string","null"],"description":"Website listed for the map place; null when none was found.","example":"https://www.example.com"},"googlePlacesName":{"type":["string","null"],"description":"Name the map place is listed under, which can differ from `name`;\nnull when no place was found.","example":"Riverside Community Hospital"},"operationalStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteOperationalStatus","description":"Operational status the created site will be stamped with (set for\nformer-healthcare facilities that have closed / merged / relocated), so\nthe UI can preview the \"(Closed)\" marker before the site is created."}]},"siteFinderToken":{"type":["string","null"],"description":"Signed token covering the geocoded and closed-facility details of this\nproposal. Send it as `siteFinderToken` to `POST /v0/sites` to create\nthe site from the proposal."}}},"SiteJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/SiteAggregates"},{"type":"object","properties":{"medical":{"$ref":"#/components/schemas/DepartmentAggregates"},"facilityBilling":{"$ref":"#/components/schemas/DepartmentAggregates"},"physicianBilling":{"$ref":"#/components/schemas/DepartmentAggregates"},"imagingBilling":{"$ref":"#/components/schemas/DepartmentAggregates"},"emergencyRoomBilling":{"$ref":"#/components/schemas/DepartmentAggregates"},"anesthesiologyBilling":{"$ref":"#/components/schemas/DepartmentAggregates"},"imaging":{"$ref":"#/components/schemas/DepartmentAggregates"}}}]},"SiteJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/SiteAggregatesRequest"},{"type":"object","properties":{"medical":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"},"facilityBilling":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"},"physicianBilling":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"},"imagingBilling":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"},"emergencyRoomBilling":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"},"anesthesiologyBilling":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"},"imaging":{"$ref":"#/components/schemas/DepartmentAggregatesRequest"}}}]},"SiteJoinFields":{"allOf":[{"$ref":"#/components/schemas/SiteFields"},{"type":"object","properties":{"medical":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined medical's columns to return. Absent when the row has no medical."},"facilityBilling":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined facility billing's columns to return. Absent when the row has no facility billing."},"physicianBilling":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined physician billing's columns to return. Absent when the row has no physician billing."},"imagingBilling":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined imaging billing's columns to return. Absent when the row has no imaging billing."},"emergencyRoomBilling":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined emergency room billing's columns to return. Absent when the row has no emergency room billing."},"anesthesiologyBilling":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined anesthesiology billing's columns to return. Absent when the row has no anesthesiology billing."},"imaging":{"$ref":"#/components/schemas/DepartmentFields","description":"Which of the joined imaging's columns to return. Absent when the row has no imaging."}}}]},"SiteJoinFilter":{"allOf":[{"$ref":"#/components/schemas/SiteFilter"},{"type":"object","properties":{"medical":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined medical's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a medical."},"facilityBilling":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined facility billing's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a facility billing."},"physicianBilling":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined physician billing's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a physician billing."},"imagingBilling":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined imaging billing's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a imaging billing."},"emergencyRoomBilling":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined emergency room billing's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a emergency room billing."},"anesthesiologyBilling":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined anesthesiology billing's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a anesthesiology billing."},"imaging":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/DepartmentFilter"}],"description":"Filters on the joined imaging's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a imaging."}}}]},"SiteJoinSelected":{"allOf":[{"$ref":"#/components/schemas/SiteSelected"},{"type":"object","properties":{"medical":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined medical's columns, as selected by the request. Absent when the row has no medical."},"facilityBilling":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined facility billing's columns, as selected by the request. Absent when the row has no facility billing."},"physicianBilling":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined physician billing's columns, as selected by the request. Absent when the row has no physician billing."},"imagingBilling":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined imaging billing's columns, as selected by the request. Absent when the row has no imaging billing."},"emergencyRoomBilling":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined emergency room billing's columns, as selected by the request. Absent when the row has no emergency room billing."},"anesthesiologyBilling":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined anesthesiology billing's columns, as selected by the request. Absent when the row has no anesthesiology billing."},"imaging":{"$ref":"#/components/schemas/DepartmentSelected","description":"The joined imaging's columns, as selected by the request. Absent when the row has no imaging."}}}]},"SiteJoinSort":{"oneOf":[{"$ref":"#/components/schemas/SiteSort"},{"type":"object","required":["medical"],"properties":{"medical":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined medical's columns."}}},{"type":"object","required":["facilityBilling"],"properties":{"facilityBilling":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined facility billing's columns."}}},{"type":"object","required":["physicianBilling"],"properties":{"physicianBilling":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined physician billing's columns."}}},{"type":"object","required":["imagingBilling"],"properties":{"imagingBilling":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined imaging billing's columns."}}},{"type":"object","required":["emergencyRoomBilling"],"properties":{"emergencyRoomBilling":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined emergency room billing's columns."}}},{"type":"object","required":["anesthesiologyBilling"],"properties":{"anesthesiologyBilling":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined anesthesiology billing's columns."}}},{"type":"object","required":["imaging"],"properties":{"imaging":{"$ref":"#/components/schemas/DepartmentSort","description":"Sorts on one of the joined imaging's columns."}}}],"description":"Sort on one of this entity's columns, or on a column of an entity it joins to, keyed by that entity: a single column mapped to `asc` or `desc`."},"SiteNumericAggregates":{"type":"object","properties":{"recordRequestCount":{"type":["string","null"],"description":"How many record requests currently point at this site (`site_id`).\nNot event-sourced — defaults to 0 and is filled per-request by the\nsites browse handler so the typed-browse engine can filter/sort on it."},"visitCount":{"type":["string","null"],"description":"How many visits happened at this site (`site_id`, location subjects\nonly). Not event-sourced — defaults to 0 and is filled per-request by\nthe sites browse handler so the typed-browse engine can filter/sort on\nit."},"addressHash":{"type":["string","null"],"description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Blank when the address has not been\nnormalized."}}},"SiteNumericFields":{"type":"object","properties":{"recordRequestCount":{"type":"boolean","description":"How many record requests currently point at this site (`site_id`).\nNot event-sourced — defaults to 0 and is filled per-request by the\nsites browse handler so the typed-browse engine can filter/sort on it.","default":false},"visitCount":{"type":"boolean","description":"How many visits happened at this site (`site_id`, location subjects\nonly). Not event-sourced — defaults to 0 and is filled per-request by\nthe sites browse handler so the typed-browse engine can filter/sort on\nit.","default":false},"addressHash":{"type":"boolean","description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Blank when the address has not been\nnormalized.","default":false}},"additionalProperties":false},"SiteOperationalStatus":{"type":"string","description":"Whether records can still be obtained from a facility, and if not, why.\n\nDetermined by AI research (and human-confirmable like the other researched\nsite fields). The variants answer \"can we still retrieve records here, and\nwhere from?\" rather than a plain open/closed flag: the closed/merged/\nrelocated variants tell the retrieval workflow to look elsewhere — a\ncustodian, the acquiring system, or the new address — instead of\ndead-ending the request. `unknown` is the explicit \"research could not\ndetermine\" state, kept distinct from \"not yet researched\" (a null\n`operationalStatus`).","enum":["operational","temporarilyClosed","permanentlyClosed","merged","relocated","recordsTransferred","unknown"]},"SiteOutput":{"type":"object","required":["site","siteEvidence","hasEmbedding","hasReferenceData"],"properties":{"site":{"$ref":"#/components/schemas/Site","description":"The site's own fields."},"managingOrganizationId":{"type":["string","null"],"description":"The Organization that manages this site's Location — the legacy\n`Org-{site_id}` for untouched rows, a minted `Org-mint-{ksuid}` once the\nsite has been through org dedup. Resolved from the projection because it\nis no longer derivable from the site id."},"siteEvidence":{"$ref":"#/components/schemas/SiteEvidence","description":"Per-field research provenance for the site-level scalars (system name,\nphone, main fax, website). Departments carry their own evidence inline\non each department's `evidence` field."},"googleMapsUrl":{"type":["string","null"],"description":"Map link for the site's verified place. Null when the site has no\n`placeId`."},"hasEmbedding":{"type":"boolean","description":"Whether the site is indexed for name-and-address similarity matching,\nso new submissions can be matched to it."},"medicalDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives medical records requests for this site,\nincluding values inherited from the managing organization. Null when\nnone is routed."}]},"facilityBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives facility billing records requests. Null when\nnone is routed."}]},"physicianBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives physician billing records requests. Null when\nnone is routed."}]},"imagingBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives imaging billing records requests. Null when\nnone is routed."}]},"emergencyRoomBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives emergency room billing records requests. Null\nwhen none is routed."}]},"anesthesiologyBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives anesthesiology billing records requests. Null\nwhen none is routed."}]},"imagingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Department that receives imaging records requests. Null when none is\nrouted."}]},"hasReferenceData":{"type":"boolean","description":"Whether there is a reference half to toggle to, i.e. whether the details\nReference control should render.\n\nWhen `reference` is included in the response, this is `true` exactly\nwhen `reference` is present. Otherwise it reflects whether the site has\nreference links at all, and may occasionally be `true` for a link that\nno longer resolves; the first Reference request corrects it."},"reference":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteReferenceView","description":"Catalog-union half for the site-details Reference toggle.\nAbsent when the site has no reference links, or when the viewer never\nasked for Reference mode and the union was not built. Details-only; not\na browse column."}]}}},"SiteReferenceView":{"type":"object","description":"The reference-catalog view of a site, shown when the site details toggle\nto Reference. It has the same department slots as the site details\nresponse; values that come only from research or user edits are cleared,\nso Reference mode shows catalog data (or empty dashes).","required":["site"],"properties":{"site":{"$ref":"#/components/schemas/Site","description":"The site's fields as the reference catalogs record them."},"medicalDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the medical records department. Null when\nthe catalogs supply none."}]},"facilityBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the facility billing department. Null when\nthe catalogs supply none."}]},"physicianBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the physician billing department. Null when\nthe catalogs supply none."}]},"imagingBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the imaging billing department. Null when\nthe catalogs supply none."}]},"emergencyRoomBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the emergency room billing department. Null\nwhen the catalogs supply none."}]},"anesthesiologyBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the anesthesiology billing department. Null\nwhen the catalogs supply none."}]},"imagingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Department","description":"Reference-catalog view of the imaging department. Null when the\ncatalogs supply none."}]}}},"SiteResolutionInput":{"type":"object","description":"Input for the unified site resolution pipeline.\n\nUsed by both the user-facing site finder and batch ingestion callers.\nOnly the identity fields are required; every other field may be omitted\nor null, and flags default to `false`.","required":["name","addressLine1"],"properties":{"name":{"type":"string","description":"Name of the facility or provider to find, as the caller knows it. A\nprovider's name is resolved to the facility they practice at when\npossible.","example":"Riverside Community Hospital"},"addressLine1":{"type":"string","description":"First street address line of the site.","example":"123 Example Street"},"addressLine2":{"type":["string","null"],"description":"Optional secondary address line — suite/unit/apt, or for Puerto Rico\naddresses the `URB <name>` urbanization line per USPS Publication 28."},"city":{"type":["string","null"],"description":"City of the site. May be omitted or null.","example":"Springfield"},"state":{"type":["string","null"],"description":"Two-letter US state code of the site. May be omitted or null.","example":"CA"},"zip":{"type":["string","null"],"description":"ZIP code of the site. May be omitted or null.","example":"94110"},"latitude":{"type":["number","null"],"format":"double","description":"Latitude of the site in decimal degrees. Optional: the submitted\naddress is geocoded, and these coordinates are used only when that\nlookup finds nothing. Supply it together with `longitude`.","example":37.7749},"longitude":{"type":["number","null"],"format":"double","description":"Longitude of the site in decimal degrees. Optional: the submitted\naddress is geocoded, and these coordinates are used only when that\nlookup finds nothing. Supply it together with `latitude`."},"npi":{"type":["string","null"],"description":"10-digit National Provider Identifier. When exactly one existing site\ncarries this NPI, that site is returned without an address search.","example":"1234567893"},"ncpdp":{"type":["string","null"],"description":"NCPDP Provider ID for pharmacy sites. Matched ahead of NPI in the\nshortcut pipeline because NCPDP uniquely identifies a dispensing\nlocation."},"taxId":{"type":["string","null"],"description":"Federal tax identification number of the organization. Carried into\nthe new-site proposal when no existing site matches.","example":"12-3456789"},"isFacility":{"type":["boolean","null"],"description":"Whether the name is a facility (true) or an individual provider\n(false). When omitted or null, it is inferred from the name."},"recordsPhone":{"type":["string","null"],"description":"Medical-records phone number. Informational: the site finder does not\nuse it to match or to build a new-site proposal.","example":"+12025550142"},"recordsFax":{"type":["string","null"],"description":"Medical-records fax number in E.164 format. Informational: the site\nfinder does not use it to match or to build a new-site proposal.","example":"+12025550143"},"recordsEmail":{"type":["string","null"],"description":"Medical-records email address. Informational: the site finder does not\nuse it to match or to build a new-site proposal.","example":"records@example.com"},"billingPhone":{"type":["string","null"],"description":"Billing-records phone number. Informational: the site finder does not\nuse it to match or to build a new-site proposal.","example":"+12025550142"},"billingFax":{"type":["string","null"],"description":"Billing-records fax number in E.164 format. Informational: the site\nfinder does not use it to match or to build a new-site proposal.","example":"+12025550143"},"billingEmail":{"type":["string","null"],"description":"Billing-records email address. Informational: the site finder does not\nuse it to match or to build a new-site proposal.","example":"records@example.com"},"billingWebsite":{"type":["string","null"],"description":"Website for billing-records requests. Informational: the site finder\ndoes not use it to match or to build a new-site proposal.","example":"https://www.example.com"},"imagingPhone":{"type":["string","null"],"description":"Imaging-records phone number. Informational: the site finder does not\nuse it to match or to build a new-site proposal.","example":"+12025550142"},"imagingFax":{"type":["string","null"],"description":"Imaging-records fax number in E.164 format. Informational: the site\nfinder does not use it to match or to build a new-site proposal.","example":"+12025550143"},"imagingEmail":{"type":["string","null"],"description":"Imaging-records email address. Informational: the site finder does not\nuse it to match or to build a new-site proposal.","example":"records@example.com"},"imagingWebsite":{"type":["string","null"],"description":"Website for imaging-records requests. Informational: the site finder\ndoes not use it to match or to build a new-site proposal.","example":"https://www.example.com"},"phone":{"type":["string","null"],"description":"Main phone number of the site. Carried into the new-site proposal when\nno existing site matches.","example":"+12025550142"},"mainFax":{"type":["string","null"],"description":"Main fax number of the site in E.164 format. Informational: the site\nfinder does not use it to match or to build a new-site proposal.","example":"+12025550143"},"recordWebsite":{"type":["string","null"],"description":"Website for records requests. Informational: the site finder\ndoes not use it to match or to build a new-site proposal.","example":"https://www.example.com"},"ehr":{"type":["string","null"],"description":"Name of the electronic health record system the site uses.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"systemName":{"type":["string","null"],"description":"Name of the health system the site belongs to. Carried into the\nnew-site proposal when no existing site matches.","example":"Example Health System"},"primarySpecialty":{"type":["string","null"],"description":"Primary specialty of the site or provider, as free text. Carried into\nthe new-site proposal when no existing site matches.","example":"Internal Medicine"},"acceptsEsignature":{"type":["boolean","null"],"description":"Whether the site accepts electronically signed authorizations. Carried\ninto the new-site proposal when no existing site matches."},"operationalStatus":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteOperationalStatus","description":"Operational status to stamp on a site created from this search's\nnew-site proposal. Omit it for an operating site."}]},"medicalRoi":{"type":["string","null"],"description":"Release-of-information vendor handling medical-records requests. With\n`authoritativeRoi` and `medicalRoiId`, it identifies an existing site\ndirectly."},"billingRoi":{"type":["string","null"],"description":"Release-of-information vendor handling billing-records requests.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"imagingRoi":{"type":["string","null"],"description":"Release-of-information vendor handling imaging-records requests.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"medicalRoiId":{"type":["string","null"],"description":"The medical-records vendor's own identifier for this site. With\n`authoritativeRoi` true and `medicalRoi` set, an existing site whose\ndepartment carries this identifier is returned without an address\nsearch."},"billingRoiId":{"type":["string","null"],"description":"The billing-records vendor's own identifier for this site.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"imagingRoiId":{"type":["string","null"],"description":"The imaging-records vendor's own identifier for this site.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"medicalRecordsRequestMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"How medical-records requests are delivered to the site. Informational:\nthe site finder does not use it to match or to build a new-site\nproposal."}]},"billingRequestMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"How billing-records requests are delivered to the site. Informational:\nthe site finder does not use it to match or to build a new-site\nproposal."}]},"imagingRequestMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"How imaging-records requests are delivered to the site. Informational:\nthe site finder does not use it to match or to build a new-site\nproposal."}]},"medicalRecordsAddress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsAddressForm","description":"Mailing address for medical-records requests. Informational: the site\nfinder does not use it to match or to build a new-site proposal."}]},"billingAddress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsAddressForm","description":"Mailing address for billing-records requests. Informational: the site\nfinder does not use it to match or to build a new-site proposal."}]},"imagingAddress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UsAddressForm","description":"Mailing address for imaging-records requests. Informational: the site\nfinder does not use it to match or to build a new-site proposal."}]},"medicalRecordsMailFee":{"type":["string","null"],"description":"Fee the site charges to mail medical records, as a decimal amount.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"billingMailFee":{"type":["string","null"],"description":"Fee the site charges to mail billing records, as a decimal amount.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"imagingMailFee":{"type":["string","null"],"description":"Fee the site charges to mail imaging records, as a decimal amount.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"authoritativeRoi":{"type":"boolean","description":"When true, `medicalRoiId` is treated as a stable unique identifier: an\nexisting site carrying it is returned without an address search.\nDefaults to false."},"dataSource":{"type":["string","null"],"description":"Free-text label for where the submitted site details came from.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal."},"authoritative":{"type":"boolean","description":"Whether the submitted identity fields should be trusted over the values\nalready stored on a matching site. Informational for the site finder,\nwhich never updates sites. Defaults to false."},"autoResearch":{"type":"boolean","description":"Accepted but ignored: the site finder never starts background research\non the site it finds."},"npiEnumerationDate":{"type":["string","null"],"format":"date","description":"Date the NPI was first issued (YYYY-MM-DD). Informational: the site\nfinder does not use it to match or to build a new-site proposal.","example":"2024-01-15"},"npiDeactivationReason":{"type":["string","null"],"description":"Reason code the NPI registry gives for deactivating the NPI, when it\nhas been deactivated. Informational: the site finder does not use it to\nmatch or to build a new-site proposal."},"npiDeactivationDate":{"type":["string","null"],"format":"date","description":"Date the NPI was deactivated (YYYY-MM-DD), when it has been.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal.","example":"2024-01-15"},"npiReactivationDate":{"type":["string","null"],"format":"date","description":"Date a deactivated NPI was reactivated (YYYY-MM-DD), when it has been.\nInformational: the site finder does not use it to match or to build a\nnew-site proposal.","example":"2024-01-15"}}},"SiteResolutionOutput":{"type":"object","required":["outcome","finderOutput"],"properties":{"site":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Site","description":"The existing site the search resolved to; null when nothing matched."}]},"outcome":{"$ref":"#/components/schemas/ResolutionOutcome","description":"How the result was reached."},"finderOutput":{"$ref":"#/components/schemas/SiteFinderOutput","description":"The matched site, the other candidate matches, and the nearby sites\nthat were considered."},"nameResolution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NameResolution","description":"Whether the submitted name was treated as a facility or a provider.\nAbsent when an identifier in the request matched a site directly."}]},"siteFinderProposal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SiteFinderProposal","description":"Signed proposal for creating the site when nothing matched; absent\notherwise."}]},"spellingCorrection":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SpellingCorrection","description":"The corrected name and/or city the run located the site with, when the\nsubmitted spelling could not be located."}]}}},"SiteSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Unique identifier of the site."},"name":{"type":["string","null"],"description":"Name of the resolved site."},"npis":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Npi"},"description":"National Provider Identifiers registered to the site. Each NPI is a\n10-digit text value. Exported as a JSON array in one cell."},"isFacility":{"type":["boolean","null"],"description":"Whether the site is a facility, such as a hospital, clinic or pharmacy,\nrather than an individual practitioner."},"inNetwork":{"type":["boolean","null"],"description":"Whether any routed department is in-network (Facility Lens / visits\nNetwork Status). NOT event-sourced — defaults false in projection and\nis populated per-request by the sites browse handler so the\ntyped-browse engine can filter/sort on it."},"hasEmbedding":{"type":["boolean","null"],"description":"Whether the site participates in embedding matching (has a vector in\nthe durable store, or is a CMS NDH phantom whose vector lives in the\nNDH cache). NOT event-sourced or stored columnar — defaults false in\nprojection and is populated per-request by the sites browse handler so\nthe typed-browse engine can filter/sort on it."},"recordRequestCount":{"type":["integer","null"],"format":"int64","description":"How many record requests currently point at this site (`site_id`).\nNot event-sourced — defaults to 0 and is filled per-request by the\nsites browse handler so the typed-browse engine can filter/sort on it."},"visitCount":{"type":["integer","null"],"format":"int64","description":"How many visits happened at this site (`site_id`, location subjects\nonly). Not event-sourced — defaults to 0 and is filled per-request by\nthe sites browse handler so the typed-browse engine can filter/sort on\nit."},"taxId":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time","description":"When the site was last updated, as an RFC 3339 timestamp in UTC. Blank\nwhen not recorded."},"addressLine1":{"type":["string","null"],"description":"First line of the site's street address. Blank when not known."},"addressLine2":{"type":["string","null"],"description":"Second line of the site's street address, such as a suite or building.\nBlank when there is none."},"city":{"type":["string","null"],"description":"City of the site's address. Blank when not known."},"state":{"type":["string","null"],"description":"State of the site's address, normally a two-letter code. Blank when not\nknown."},"zip":{"type":["string","null"],"description":"ZIP code of the site's address. Preserve as text to retain leading\nzeros. Blank when not known."},"formattedAddress":{"type":["string","null"],"description":"Complete address of the site on one line. Blank when not known."},"latitude":{"type":["number","null"],"format":"double","description":"Latitude of the site in decimal degrees. Blank when the address has not\nbeen located on a map, such as a PO box."},"longitude":{"type":["number","null"],"format":"double","description":"Longitude of the site in decimal degrees. Blank when the address has\nnot been located on a map, such as a PO box."},"phone":{"type":["string","null"],"description":"Telephone number of the resolved site."},"mainFax":{"type":["string","null"],"description":"Main fax number of the site. Separate from the departments' fax\nnumbers. Blank when not known."},"email":{"type":["string","null"],"description":"Populated post-create via `SitePatch` (research or manual edit); the\n`SiteCreated` event does not carry it."},"systemName":{"type":["string","null"],"description":"Name of the health system the site belongs to. Blank when not known."},"primarySpecialty":{"type":["string","null"],"description":"Primary medical specialty of the site. Blank when not known."},"researchFinished":{"type":["string","null"],"format":"date-time","description":"When the most recent full research run on the site's contact details\nfinished, as an RFC 3339 timestamp in UTC. Blank when the site has not\nbeen researched."},"liteResearchFinished":{"type":["string","null"],"format":"date-time"},"placeId":{"type":["string","null"],"description":"Identifier of the map place the site's address and name were verified\nagainst. Blank when the site has not been verified."},"addressHash":{"type":["integer","null"],"format":"int64","description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Blank when the address has not been\nnormalized."},"website":{"type":["string","null"],"description":"Website of the site. Blank when not known."},"acceptsEsignature":{"type":["boolean","null"],"description":"Whether the site accepts electronically signed authorizations with a\nrecord request. Blank when not known."},"googlePlacesName":{"type":["string","null"],"description":"Name of the site as listed by the map place it was verified against.\nBlank when the site has not been verified."},"fingerprintedAt":{"type":["string","null"],"format":"date-time","description":"When the site's address was last normalized and fingerprinted, as an\nRFC 3339 timestamp in UTC. Blank when it never has been."},"dedupConsideredAt":{"type":["string","null"],"format":"date-time","description":"When the site was last reviewed for duplicate records, as an RFC 3339\ntimestamp in UTC. Blank when it never has been."},"dataSources":{"type":["array","null"],"items":{"type":"string"}},"npiEnumerationDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) the site's NPI was first issued in the national\nprovider registry. Blank when not known."},"npiDeactivationReason":{"type":["string","null"],"description":"Reason the national provider registry gives for deactivating the site's\nNPI. Blank when the NPI has not been deactivated."},"npiDeactivationDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) the site's NPI was deactivated. Blank when it has not\nbeen."},"npiReactivationDate":{"type":["string","null"],"format":"date","description":"Date (YYYY-MM-DD) a deactivated NPI was reactivated. Blank when it has\nnot been."},"googleMapsUrl":{"type":["string","null"],"description":"Google Maps link for the facility or dispensing pharmacy, when\navailable."},"medicalDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives medical records requests for\nthis site. Blank when none is routed."},"facilityBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives facility billing records\nrequests for this site. Blank when none is routed."},"physicianBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives physician billing records\nrequests for this site. Blank when none is routed."},"imagingBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives imaging billing records\nrequests for this site. Blank when none is routed."},"emergencyRoomBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives emergency room billing\nrecords requests for this site. Blank when none is routed."},"anesthesiologyBillingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives anesthesiology billing\nrecords requests for this site. Blank when none is routed."},"imagingDepartmentId":{"type":["string","null"],"description":"Identifier of the department that receives imaging records requests for\nthis site. Blank when none is routed."},"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}},"SiteSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier of the site.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the resolved site.","enum":["asc","desc"]}}},{"type":"object","required":["isFacility"],"properties":{"isFacility":{"type":"string","description":"Whether the site is a facility, such as a hospital, clinic or pharmacy,\nrather than an individual practitioner.","enum":["asc","desc"]}}},{"type":"object","required":["inNetwork"],"properties":{"inNetwork":{"type":"string","description":"Whether any routed department is in-network (Facility Lens / visits\nNetwork Status). NOT event-sourced — defaults false in projection and\nis populated per-request by the sites browse handler so the\ntyped-browse engine can filter/sort on it.","enum":["asc","desc"]}}},{"type":"object","required":["hasEmbedding"],"properties":{"hasEmbedding":{"type":"string","description":"Whether the site participates in embedding matching (has a vector in\nthe durable store, or is a CMS NDH phantom whose vector lives in the\nNDH cache). NOT event-sourced or stored columnar — defaults false in\nprojection and is populated per-request by the sites browse handler so\nthe typed-browse engine can filter/sort on it.","enum":["asc","desc"]}}},{"type":"object","required":["recordRequestCount"],"properties":{"recordRequestCount":{"type":"string","description":"How many record requests currently point at this site (`site_id`).\nNot event-sourced — defaults to 0 and is filled per-request by the\nsites browse handler so the typed-browse engine can filter/sort on it.","enum":["asc","desc"]}}},{"type":"object","required":["visitCount"],"properties":{"visitCount":{"type":"string","description":"How many visits happened at this site (`site_id`, location subjects\nonly). Not event-sourced — defaults to 0 and is filled per-request by\nthe sites browse handler so the typed-browse engine can filter/sort on\nit.","enum":["asc","desc"]}}},{"type":"object","required":["taxId"],"properties":{"taxId":{"type":"string","enum":["asc","desc"]}}},{"type":"object","required":["updatedAt"],"properties":{"updatedAt":{"type":"string","description":"When the site was last updated, as an RFC 3339 timestamp in UTC. Blank\nwhen not recorded.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine1"],"properties":{"addressLine1":{"type":"string","description":"First line of the site's street address. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine2"],"properties":{"addressLine2":{"type":"string","description":"Second line of the site's street address, such as a suite or building.\nBlank when there is none.","enum":["asc","desc"]}}},{"type":"object","required":["city"],"properties":{"city":{"type":"string","description":"City of the site's address. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["state"],"properties":{"state":{"type":"string","description":"State of the site's address, normally a two-letter code. Blank when not\nknown.","enum":["asc","desc"]}}},{"type":"object","required":["zip"],"properties":{"zip":{"type":"string","description":"ZIP code of the site's address. Preserve as text to retain leading\nzeros. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["formattedAddress"],"properties":{"formattedAddress":{"type":"string","description":"Complete address of the site on one line. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["latitude"],"properties":{"latitude":{"type":"string","description":"Latitude of the site in decimal degrees. Blank when the address has not\nbeen located on a map, such as a PO box.","enum":["asc","desc"]}}},{"type":"object","required":["longitude"],"properties":{"longitude":{"type":"string","description":"Longitude of the site in decimal degrees. Blank when the address has\nnot been located on a map, such as a PO box.","enum":["asc","desc"]}}},{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","description":"Telephone number of the resolved site.","enum":["asc","desc"]}}},{"type":"object","required":["mainFax"],"properties":{"mainFax":{"type":"string","description":"Main fax number of the site. Separate from the departments' fax\nnumbers. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Populated post-create via `SitePatch` (research or manual edit); the\n`SiteCreated` event does not carry it.","enum":["asc","desc"]}}},{"type":"object","required":["systemName"],"properties":{"systemName":{"type":"string","description":"Name of the health system the site belongs to. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["primarySpecialty"],"properties":{"primarySpecialty":{"type":"string","description":"Primary medical specialty of the site. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["researchFinished"],"properties":{"researchFinished":{"type":"string","description":"When the most recent full research run on the site's contact details\nfinished, as an RFC 3339 timestamp in UTC. Blank when the site has not\nbeen researched.","enum":["asc","desc"]}}},{"type":"object","required":["liteResearchFinished"],"properties":{"liteResearchFinished":{"type":"string","enum":["asc","desc"]}}},{"type":"object","required":["placeId"],"properties":{"placeId":{"type":"string","description":"Identifier of the map place the site's address and name were verified\nagainst. Blank when the site has not been verified.","enum":["asc","desc"]}}},{"type":"object","required":["addressHash"],"properties":{"addressHash":{"type":"string","description":"Numeric fingerprint of the site's normalized address, used to find\nsites at the same address. Blank when the address has not been\nnormalized.","enum":["asc","desc"]}}},{"type":"object","required":["website"],"properties":{"website":{"type":"string","description":"Website of the site. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["acceptsEsignature"],"properties":{"acceptsEsignature":{"type":"string","description":"Whether the site accepts electronically signed authorizations with a\nrecord request. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["googlePlacesName"],"properties":{"googlePlacesName":{"type":"string","description":"Name of the site as listed by the map place it was verified against.\nBlank when the site has not been verified.","enum":["asc","desc"]}}},{"type":"object","required":["fingerprintedAt"],"properties":{"fingerprintedAt":{"type":"string","description":"When the site's address was last normalized and fingerprinted, as an\nRFC 3339 timestamp in UTC. Blank when it never has been.","enum":["asc","desc"]}}},{"type":"object","required":["dedupConsideredAt"],"properties":{"dedupConsideredAt":{"type":"string","description":"When the site was last reviewed for duplicate records, as an RFC 3339\ntimestamp in UTC. Blank when it never has been.","enum":["asc","desc"]}}},{"type":"object","required":["npiEnumerationDate"],"properties":{"npiEnumerationDate":{"type":"string","description":"Date (YYYY-MM-DD) the site's NPI was first issued in the national\nprovider registry. Blank when not known.","enum":["asc","desc"]}}},{"type":"object","required":["npiDeactivationReason"],"properties":{"npiDeactivationReason":{"type":"string","description":"Reason the national provider registry gives for deactivating the site's\nNPI. Blank when the NPI has not been deactivated.","enum":["asc","desc"]}}},{"type":"object","required":["npiDeactivationDate"],"properties":{"npiDeactivationDate":{"type":"string","description":"Date (YYYY-MM-DD) the site's NPI was deactivated. Blank when it has not\nbeen.","enum":["asc","desc"]}}},{"type":"object","required":["npiReactivationDate"],"properties":{"npiReactivationDate":{"type":"string","description":"Date (YYYY-MM-DD) a deactivated NPI was reactivated. Blank when it has\nnot been.","enum":["asc","desc"]}}},{"type":"object","required":["googleMapsUrl"],"properties":{"googleMapsUrl":{"type":"string","description":"Google Maps link for the facility or dispensing pharmacy, when\navailable.","enum":["asc","desc"]}}},{"type":"object","required":["medicalDepartmentId"],"properties":{"medicalDepartmentId":{"type":"string","description":"Identifier of the department that receives medical records requests for\nthis site. Blank when none is routed.","enum":["asc","desc"]}}},{"type":"object","required":["facilityBillingDepartmentId"],"properties":{"facilityBillingDepartmentId":{"type":"string","description":"Identifier of the department that receives facility billing records\nrequests for this site. Blank when none is routed.","enum":["asc","desc"]}}},{"type":"object","required":["physicianBillingDepartmentId"],"properties":{"physicianBillingDepartmentId":{"type":"string","description":"Identifier of the department that receives physician billing records\nrequests for this site. Blank when none is routed.","enum":["asc","desc"]}}},{"type":"object","required":["imagingBillingDepartmentId"],"properties":{"imagingBillingDepartmentId":{"type":"string","description":"Identifier of the department that receives imaging billing records\nrequests for this site. Blank when none is routed.","enum":["asc","desc"]}}},{"type":"object","required":["emergencyRoomBillingDepartmentId"],"properties":{"emergencyRoomBillingDepartmentId":{"type":"string","description":"Identifier of the department that receives emergency room billing\nrecords requests for this site. Blank when none is routed.","enum":["asc","desc"]}}},{"type":"object","required":["anesthesiologyBillingDepartmentId"],"properties":{"anesthesiologyBillingDepartmentId":{"type":"string","description":"Identifier of the department that receives anesthesiology billing\nrecords requests for this site. Blank when none is routed.","enum":["asc","desc"]}}},{"type":"object","required":["imagingDepartmentId"],"properties":{"imagingDepartmentId":{"type":"string","description":"Identifier of the department that receives imaging records requests for\nthis site. Blank when none is routed.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"SpellingCorrection":{"type":"object","description":"The spelling Site Finder substituted after the submitted name and address\ncould not be located at all. Carried on the resolution output and the stored\njob result so the results page can say what was searched instead of what was\ntyped. At least one of the two corrections is always present.","required":["submittedName"],"properties":{"submittedName":{"type":"string","description":"The name as it was submitted.","example":"Riverside Comunity Hospitl"},"correctedName":{"type":["string","null"],"description":"The corrected name the search used; absent when the name was not\nchanged.","example":"Riverside Community Hospital"},"submittedCity":{"type":["string","null"],"description":"The city as it was submitted; absent when no city was given.","example":"Springfeild"},"correctedCity":{"type":["string","null"],"description":"The corrected city the search used; absent when the city was not\nchanged.","example":"Springfield"}}},"StandaloneAuthCheckBody":{"allOf":[{"$ref":"#/components/schemas/AuthCheckPatientData"},{"type":"object","properties":{"referenceId":{"type":["string","null"],"description":"Your own identifier for this patient, such as an MRN or account\nnumber. Optional free text, trimmed, at most 255 characters; a blank\nvalue is treated as absent. Shown in the auth-checker's Submissions\ntab so a submission can be matched back to your patient."}}}],"description":"Patient context for a standalone auth-check submission."},"StartSiteFinderJobResponse":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string","description":"Identifier of the started job. Poll\n`GET /v0/site-finder/jobs/<job_id>` with it for the result.","example":"2nQe7Vb4kT1yXcP8sLmZ0aRfG3w"}}},"StringId":{"type":"string","description":"An identifier of 1 to 32 ASCII letters, digits, hyphens or underscores.","example":"proj_abc123"},"Submission":{"type":"object","required":["requestMethod","sentAt"],"properties":{"requestMethod":{"$ref":"#/components/schemas/DeliveryMethod","description":"Channel this activity went through, such as fax, email, mail or a\nportal."},"requestMethodId":{"type":["string","null"],"description":"Identifier the channel assigned to this activity, such as a fax job\nnumber, an email message id or a reference number. Format depends on\nthe channel. Null when the channel issued none.","example":"48213906"},"sentAt":{"type":"string","format":"date-time","description":"When the activity was recorded, as an RFC 3339 timestamp in UTC.","example":"2026-01-15T12:00:00Z"},"deliveryStatus":{"type":["object","null"],"description":"Current delivery status reported by the channel, looked up when the\nrequest is read. Its shape depends on the channel. Null when the\nchannel reports no status or the status could not be retrieved."}}},"SubmissionDirection":{"type":"string","description":"Whether an activity-table row records us *sending* a request out (`Outbound`)\nor *receiving* records back (`Inbound`). Outbound is the historical default;\ninbound rows are produced by `RecordRequestReceived` events.","enum":["Outbound","Inbound"]},"SubmittedSiteInformationPatch":{"type":"object","properties":{"submittedSiteName":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New facility name as submitted with the request. Absent leaves it\nunchanged; null clears it."}]},"submittedSiteAddressLine1":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New first line of the submitted facility street address. Absent leaves\nit unchanged; null clears it."}]},"submittedSiteAddressLine2":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New second line of the submitted facility street address, such as a\nsuite. Absent leaves it unchanged; null clears it."}]},"submittedSiteAddress":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New single-line submitted facility street address, used only when\nneither `submittedSiteAddressLine1` nor `submittedSiteAddressLine2` is\nset. Prefer the separate address lines. Absent leaves it unchanged;\nnull clears it."}]},"submittedSiteCity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New city of the submitted facility address. Absent leaves it\nunchanged; null clears it."}]},"submittedSiteState":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New state of the submitted facility address, normally a two-letter\ncode. Absent leaves it unchanged; null clears it."}]},"submittedSiteZip":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrimString","description":"New ZIP code of the submitted facility address. Absent leaves it\nunchanged; null clears it."}]}}},"TrimString":{"type":"string","description":"Free text. Surrounding whitespace is trimmed, and an empty or whitespace-only value is rejected.","minLength":1},"UpdateNoteRequest":{"type":"object","required":["content"],"properties":{"content":{"$ref":"#/components/schemas/TrimString","description":"The new text of the note, replacing the old text."}}},"UsAddressForm":{"type":"object","description":"Partial/form US address — all fields optional (for inputs, DB rows, patches,\nand LLM-extracted addresses where any component may be missing).","properties":{"addressLine1":{"type":["string","null"],"description":"The primary delivery line: street number and street, or a PO Box. Null\nwhen not known."},"addressLine2":{"type":["string","null"],"description":"The secondary line, such as a suite, apartment, or floor, or a Puerto\nRico urbanization. Null when there is none."},"city":{"type":["string","null"],"description":"The city. Null when not known."},"state":{"type":["string","null"],"description":"The state, as written; usually the two-letter USPS code. Null when not\nknown."},"zip":{"type":["string","null"],"description":"The ZIP code, as written. Null when not known."}}},"UsAddressFormFlattenSelected":{"type":"object","properties":{"addressLine1":{"type":["string","null"],"description":"The primary delivery line: street number and street, or a PO Box. Null\nwhen not known."},"addressLine2":{"type":["string","null"],"description":"The secondary line, such as a suite, apartment, or floor, or a Puerto\nRico urbanization. Null when there is none."},"city":{"type":["string","null"],"description":"The city. Null when not known."},"state":{"type":["string","null"],"description":"The state, as written; usually the two-letter USPS code. Null when not\nknown."},"zip":{"type":["string","null"],"description":"The ZIP code, as written. Null when not known."}}},"UsState":{"type":"string","description":"A US state, district or territory: its two-letter USPS code, or its full name in any letter case. Washington DC, Washington D.C., US Virgin Islands, U.S. Virgin Islands, United States Virgin Islands and Virgin Islands are also accepted. Surrounding whitespace is trimmed, and any other value is rejected. Returned as the uppercase code.","examples":["CA"]},"UserAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"UserAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UserNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"UserEmail":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string","description":"Unique identifier of the user.","example":"2Xk9fQm3Tb7LpR4sVw8YzN1cHdE"},"email":{"type":"string","description":"Email address of the user.","example":"user@example.com"}}},"UserFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Unique identifier of the user."},"email":{"type":"boolean","description":"Email address of the user."},"firstName":{"type":"boolean","description":"The user's first name. Null when not provided."},"lastName":{"type":"boolean","description":"The user's last name. Null when not provided."},"role":{"type":"boolean","description":"The user's role, which decides what they may see and do. Null when the\nuser signed up but was not matched to a company; such a user cannot\nuse the API."},"companyId":{"type":"boolean","description":"Numeric identifier of the company the user belongs to. Null when the\nuser belongs to no company."},"signupAttemptCount":{"type":"boolean","description":"Count of signup webhook deliveries seen for this user. `1` for a\nregular signup; bumped when a disabled (`role.is_none()`) user\nretries. Powers the \"attempts\" column on the Find Leads page."},"lastSignupAttemptAt":{"type":"boolean","description":"Timestamp of the most recent signup webhook. Powers the \"last seen\"\ncolumn on the Find Leads page."},"termsAcceptedDate":{"type":"boolean","description":"When the user accepted the terms of service. Null when they have not\naccepted them."},"createdAt":{"type":"boolean","description":"When the user account was created. Null when not recorded."},"updatedAt":{"type":"boolean","description":"When the user's name, role or company was last changed. Null when none\nhas changed since the account was created."},"lastLogin":{"type":"boolean","description":"When the user last signed in, as reported by the identity provider.\nNull when the user has never signed in or the value is unavailable."},"link":{"type":"boolean","description":"Relative application path to this record. Requires the application host and appropriate access to open."}}},"UserFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Unique identifier of the user."},"email":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Email address of the user."},"firstName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The user's first name. Null when not provided."},"lastName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The user's last name. Null when not provided."},"role":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","enum":["customer_admin","customer_standard","delivery","community","developer","owner","upload_processor","viewer"]}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"The user's role, which decides what they may see and do. Null when the\nuser signed up but was not matched to a company; such a user cannot\nuse the API."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Numeric identifier of the company the user belongs to. Null when the\nuser belongs to no company."},"signupAttemptCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Count of signup webhook deliveries seen for this user. `1` for a\nregular signup; bumped when a disabled (`role.is_none()`) user\nretries. Powers the \"attempts\" column on the Find Leads page."},"lastSignupAttemptAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp of the most recent signup webhook. Powers the \"last seen\"\ncolumn on the Find Leads page."},"termsAcceptedDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the user accepted the terms of service. Null when they have not\naccepted them."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the user account was created. Null when not recorded."},"updatedAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the user's name, role or company was last changed. Null when none\nhas changed since the account was created."},"lastLogin":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"When the user last signed in, as reported by the identity provider.\nNull when the user has never signed in or the value is unavailable."}}},"UserJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/UserAggregates"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregates"}}}]},"UserJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/UserAggregatesRequest"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregatesRequest"}}}]},"UserJoinFields":{"allOf":[{"$ref":"#/components/schemas/UserFields"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyFields","description":"Which of the joined company's columns to return. Absent when the row has no company."}}}]},"UserJoinFilter":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":"object","properties":{"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."}}}]},"UserJoinSelected":{"allOf":[{"$ref":"#/components/schemas/UserSelected"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanySelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."}}}]},"UserJoinSort":{"oneOf":[{"$ref":"#/components/schemas/UserSort"},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}}],"description":"Sort on one of this entity's columns, or on a column of an entity it joins to, keyed by that entity: a single column mapped to `asc` or `desc`."},"UserNumericAggregates":{"type":"object","properties":{"companyId":{"type":["string","null"],"description":"Numeric identifier of the company the user belongs to. Null when the\nuser belongs to no company."},"signupAttemptCount":{"type":["string","null"],"description":"Count of signup webhook deliveries seen for this user. `1` for a\nregular signup; bumped when a disabled (`role.is_none()`) user\nretries. Powers the \"attempts\" column on the Find Leads page."}}},"UserNumericFields":{"type":"object","properties":{"companyId":{"type":"boolean","description":"Numeric identifier of the company the user belongs to. Null when the\nuser belongs to no company.","default":false},"signupAttemptCount":{"type":"boolean","description":"Count of signup webhook deliveries seen for this user. `1` for a\nregular signup; bumped when a disabled (`role.is_none()`) user\nretries. Powers the \"attempts\" column on the Find Leads page.","default":false}},"additionalProperties":false},"UserProfileResponse":{"type":"object","required":["id","email","permissions"],"properties":{"id":{"type":"string","description":"Your user ID."},"email":{"type":"string","description":"The email address you sign in with.","example":"jane@example.com"},"firstName":{"type":["string","null"],"description":"Your first name. Null when not set."},"lastName":{"type":["string","null"],"description":"Your last name. Null when not set."},"lastLogin":{"type":["string","null"],"format":"date-time","description":"Reserved for the time of your last sign-in. Currently always null."},"createdAt":{"type":["string","null"],"format":"date-time","description":"When your account was created, as an RFC 3339 timestamp. Null when not\nrecorded."},"updatedAt":{"type":["string","null"],"format":"date-time","description":"When your account was last changed, as an RFC 3339 timestamp. Null when\nnot recorded."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Your company's ID: the `{companyId}` in every\n`/v0/companies/{companyId}/...` route."}]},"companyName":{"type":["string","null"],"description":"Your company's name. Null when your account belongs to no company."},"permissions":{"type":"array","items":{"type":"string"},"description":"What your account may do, such as `ViewPatients` or `ManageWebhooks`."}}},"UserSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Unique identifier of the user."},"email":{"type":["string","null"],"description":"Email address of the user."},"firstName":{"type":["string","null"],"description":"The user's first name. Null when not provided."},"lastName":{"type":["string","null"],"description":"The user's last name. Null when not provided."},"role":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Role","description":"The user's role, which decides what they may see and do. Null when the\nuser signed up but was not matched to a company; such a user cannot\nuse the API."}]},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Numeric identifier of the company the user belongs to. Null when the\nuser belongs to no company."}]},"signupAttemptCount":{"type":["integer","null"],"format":"int32","description":"Count of signup webhook deliveries seen for this user. `1` for a\nregular signup; bumped when a disabled (`role.is_none()`) user\nretries. Powers the \"attempts\" column on the Find Leads page."},"lastSignupAttemptAt":{"type":["string","null"],"format":"date-time","description":"Timestamp of the most recent signup webhook. Powers the \"last seen\"\ncolumn on the Find Leads page."},"termsAcceptedDate":{"type":["string","null"],"format":"date-time","description":"When the user accepted the terms of service. Null when they have not\naccepted them."},"createdAt":{"type":["string","null"],"format":"date-time","description":"When the user account was created. Null when not recorded."},"updatedAt":{"type":["string","null"],"format":"date-time","description":"When the user's name, role or company was last changed. Null when none\nhas changed since the account was created."},"lastLogin":{"type":["string","null"],"format":"date-time","description":"When the user last signed in, as reported by the identity provider.\nNull when the user has never signed in or the value is unavailable."},"link":{"type":["string","null"],"description":"Relative application path to this record. Requires the application host and appropriate access to open."}}},"UserSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier of the user.","enum":["asc","desc"]}}},{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Email address of the user.","enum":["asc","desc"]}}},{"type":"object","required":["firstName"],"properties":{"firstName":{"type":"string","description":"The user's first name. Null when not provided.","enum":["asc","desc"]}}},{"type":"object","required":["lastName"],"properties":{"lastName":{"type":"string","description":"The user's last name. Null when not provided.","enum":["asc","desc"]}}},{"type":"object","required":["role"],"properties":{"role":{"type":"string","description":"The user's role, which decides what they may see and do. Null when the\nuser signed up but was not matched to a company; such a user cannot\nuse the API.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Numeric identifier of the company the user belongs to. Null when the\nuser belongs to no company.","enum":["asc","desc"]}}},{"type":"object","required":["signupAttemptCount"],"properties":{"signupAttemptCount":{"type":"string","description":"Count of signup webhook deliveries seen for this user. `1` for a\nregular signup; bumped when a disabled (`role.is_none()`) user\nretries. Powers the \"attempts\" column on the Find Leads page.","enum":["asc","desc"]}}},{"type":"object","required":["lastSignupAttemptAt"],"properties":{"lastSignupAttemptAt":{"type":"string","description":"Timestamp of the most recent signup webhook. Powers the \"last seen\"\ncolumn on the Find Leads page.","enum":["asc","desc"]}}},{"type":"object","required":["termsAcceptedDate"],"properties":{"termsAcceptedDate":{"type":"string","description":"When the user accepted the terms of service. Null when they have not\naccepted them.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"When the user account was created. Null when not recorded.","enum":["asc","desc"]}}},{"type":"object","required":["updatedAt"],"properties":{"updatedAt":{"type":"string","description":"When the user's name, role or company was last changed. Null when none\nhas changed since the account was created.","enum":["asc","desc"]}}},{"type":"object","required":["lastLogin"],"properties":{"lastLogin":{"type":"string","description":"When the user last signed in, as reported by the identity provider.\nNull when the user has never signed in or the value is unavailable.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"VisitActions":{"type":"object","description":"Computed per-row actions for a visit. The `actions` slot carries\nready-to-use application links a client would otherwise have to assemble\nitself.","required":["existingRequestCounts","recordRequestCount","ccdaRequestCount"],"properties":{"createRecordRequest":{"type":["string","null"],"description":"Relative application link that opens a new record request for the\npatient and facility. Blank when the visit has no facility subject."},"createCcdaRequest":{"type":["string","null"],"description":"Relative application link that opens a C-CDA request. Available when the\nvisit has a facility reference, EHR discovery contributed, and the\nviewer can create C-CDA requests."},"existingRequestCounts":{"$ref":"#/components/schemas/RecordRequestTypeCounts","description":"Existing record requests for this patient at this facility, counted by\nrequest type. All zero when the visit has no facility. Shared by every\nvisit at the same facility, so do not sum across visits."},"recordRequestCount":{"type":"integer","description":"Total existing medical, imaging, and billing requests for this patient\nat this facility. Excludes C-CDA requests. Do not sum across visits at\nthe same facility.","minimum":0},"ccdaRequestCount":{"type":"integer","description":"Number of existing C-CDA requests for this patient at this facility. Do\nnot sum across visits at the same facility.","minimum":0}}},"VisitAggregateDataFlattenSelected":{"type":"object","properties":{"procedureCount":{"type":["integer","null"],"format":"int64","description":"Number of procedure records linked to the visit."},"diagnosisCount":{"type":["integer","null"],"format":"int64","description":"Number of diagnosis records linked to the visit."},"prescriptionFillCount":{"type":["integer","null"],"format":"int64","description":"Number of prescription dispensing records linked to the visit."}}},"VisitAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"VisitAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"VisitBrowseAggregate":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitAggregates"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregates"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregates"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregates"},"site":{"$ref":"#/components/schemas/VisitSubjectSiteJoinAggregates"},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregates"},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregates"},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregates"},"payor":{"$ref":"#/components/schemas/PayorJoinAggregates"}}},"VisitBrowseAggregateRequest":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitAggregatesRequest"},"company":{"$ref":"#/components/schemas/CompanyJoinAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectJoinAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientJoinAggregatesRequest"},"site":{"$ref":"#/components/schemas/VisitSubjectSiteJoinAggregatesRequest"},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinAggregatesRequest"},"payor":{"$ref":"#/components/schemas/PayorJoinAggregatesRequest"}}},"VisitBrowseFilter":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitFilter","description":"Filters on the visit's columns."},"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyJoinFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectJoinFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientJoinFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"site":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/VisitSubjectSiteJoinFilter"}],"description":"Filters on the joined site's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a site."},"attendingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined attending provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a attending provider."},"renderingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined rendering provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a rendering provider."},"operatingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerJoinFilter"}],"description":"Filters on the joined operating provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a operating provider."},"payor":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PayorJoinFilter"}],"description":"Filters on the joined payor's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a payor."}}},"VisitBrowseRequest":{"type":"object","properties":{"select":{"$ref":"#/components/schemas/VisitBrowseSelect"},"where":{"$ref":"#/components/schemas/VisitBrowseFilter"},"aggregate":{"$ref":"#/components/schemas/VisitBrowseAggregateRequest"},"orderBy":{"type":"array","items":{"$ref":"#/components/schemas/VisitBrowseSort"}},"search":{"type":"string"},"take":{"type":"integer","format":"int64"},"skip":{"type":"integer","format":"int64"}}},"VisitBrowseResponse":{"type":"object","properties":{"table":{"type":"array","items":{"$ref":"#/components/schemas/VisitBrowseRow"}},"aggregate":{"$ref":"#/components/schemas/VisitBrowseAggregate"},"total":{"type":"integer","format":"int64"}}},"VisitBrowseRow":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitSelected","description":"The visit's columns, as selected by the request."},"company":{"$ref":"#/components/schemas/CompanyJoinSelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"site":{"$ref":"#/components/schemas/VisitSubjectSiteJoinSelected","description":"The joined site's columns, as selected by the request. Absent when the row has no site."},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined attending provider's columns, as selected by the request. Absent when the row has no attending provider."},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined rendering provider's columns, as selected by the request. Absent when the row has no rendering provider."},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinSelected","description":"The joined operating provider's columns, as selected by the request. Absent when the row has no operating provider."},"payor":{"$ref":"#/components/schemas/PayorJoinSelected","description":"The joined payor's columns, as selected by the request. Absent when the row has no payor."},"actions":{"$ref":"#/components/schemas/VisitActions","description":"Computed for every row; it is not selected, filtered or sorted on."}}},"VisitBrowseSelect":{"type":"object","properties":{"visit":{"$ref":"#/components/schemas/VisitFields","description":"Which of the visit's columns to return."},"company":{"$ref":"#/components/schemas/CompanyJoinFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectJoinFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientJoinFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"site":{"$ref":"#/components/schemas/VisitSubjectSiteJoinFields","description":"Which of the joined site's columns to return. Absent when the row has no site."},"attendingProvider":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined attending provider's columns to return. Absent when the row has no attending provider."},"renderingProvider":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined rendering provider's columns to return. Absent when the row has no rendering provider."},"operatingProvider":{"$ref":"#/components/schemas/PractitionerJoinFields","description":"Which of the joined operating provider's columns to return. Absent when the row has no operating provider."},"payor":{"$ref":"#/components/schemas/PayorJoinFields","description":"Which of the joined payor's columns to return. Absent when the row has no payor."}}},"VisitBrowseSort":{"oneOf":[{"type":"object","required":["visit"],"properties":{"visit":{"$ref":"#/components/schemas/VisitSort","description":"Sorts on one of the visit's columns."}}},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectJoinSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientJoinSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["site"],"properties":{"site":{"$ref":"#/components/schemas/VisitSubjectSiteSort","description":"Sorts on one of the joined site's columns."}}},{"type":"object","required":["attendingProvider"],"properties":{"attendingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined attending provider's columns."}}},{"type":"object","required":["renderingProvider"],"properties":{"renderingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined rendering provider's columns."}}},{"type":"object","required":["operatingProvider"],"properties":{"operatingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined operating provider's columns."}}},{"type":"object","required":["payor"],"properties":{"payor":{"$ref":"#/components/schemas/PayorSort","description":"Sorts on one of the joined payor's columns."}}}],"description":"One sort key, keyed by the entity it sorts on: an object naming that entity, whose value names a single column mapped to `asc` or `desc`. List several in `orderBy` to break ties; see [Browsing tables](#browsing-tables)."},"VisitFields":{"type":"object","properties":{"ref":{"type":"boolean","description":"Reference for the visit in the current data output. This reference can\nchange when data is reprocessed and should not be used as a permanent\nidentifier."},"encounterType":{"type":"boolean","description":"Source-reported encounter category, such as inpatient or outpatient.\nValues depend on the contributing source and are not a fixed enumerated\nlist."},"claimType":{"type":"boolean","description":"Source-reported numeric claim-type code. Source-specific and may be\nblank."},"earliestServiceDate":{"type":"boolean","description":"Earliest service date reported for the visit. This describes the care\nevent, not the date of the search."},"latestServiceDate":{"type":"boolean","description":"Latest service date reported for the visit. It may equal the earliest\nservice date for a single-day encounter."},"memberId":{"type":"boolean","description":"Insurance member identifier reported in the source claims data. Preserve\nas text, including any leading zeros."},"createdAt":{"type":"boolean","description":"Timestamp associated with the visit data in the platform. For merged\nvisits, this is the newest contributing data timestamp and can change\nwhen newer data contributes."},"dataSources":{"type":"boolean"},"ehrDiscovered":{"type":"boolean","description":"Whether an electronic health record discovery source contributed to this\nvisit. A true value indicates EHR discovery, subject to the account\npermissions needed to request records."},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"boolean","description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"boolean","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"subjectSiteKey":{"type":"boolean","description":"Reference token for the facility or practitioner associated with the\nvisit. Use the resolved site.id, not this token, to identify the site."},"attendingProviderId":{"type":"boolean","description":"Platform practitioner reference for the attending provider\nassociated with the visit."},"renderingProviderId":{"type":"boolean","description":"Platform practitioner reference for the rendering provider\nassociated with the visit."},"operatingProviderId":{"type":"boolean","description":"Platform practitioner reference for the operating provider\nassociated with the visit."},"payorId":{"type":"boolean","description":"Reference identifier for the payer associated with the visit. The payor\njoin supplies the payer name when available."},"procedureCount":{"type":"boolean","description":"Number of procedure records linked to the visit."},"diagnosisCount":{"type":"boolean","description":"Number of diagnosis records linked to the visit."},"prescriptionFillCount":{"type":"boolean","description":"Number of prescription dispensing records linked to the visit."}}},"VisitFilter":{"type":"object","properties":{"ref":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference for the visit in the current data output. This reference can\nchange when data is reprocessed and should not be used as a permanent\nidentifier."},"encounterType":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported encounter category, such as inpatient or outpatient.\nValues depend on the contributing source and are not a fixed enumerated\nlist."},"claimType":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Source-reported numeric claim-type code. Source-specific and may be\nblank."},"earliestServiceDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Earliest service date reported for the visit. This describes the care\nevent, not the date of the search."},"latestServiceDate":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Latest service date reported for the visit. It may equal the earliest\nservice date for a single-day encounter."},"memberId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Insurance member identifier reported in the source claims data. Preserve\nas text, including any leading zeros."},"createdAt":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string","format":"date-time"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string","format":"date-time"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"string","format":"date-time"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"string","format":"date-time"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"string","format":"date-time"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"string","format":"date-time"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string","format":"date-time"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Timestamp associated with the visit data in the platform. For merged\nvisits, this is the newest contributing data timestamp and can change\nwhen newer data contributes."},"dataSources":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]}},"ehrDiscovered":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether an electronic health record discovery source contributed to this\nvisit. A true value indicates EHR discovery, subject to the account\npermissions needed to request records."},"companyId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the customer organization associated with the\nrecord."},"projectId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"subjectSiteKey":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference token for the facility or practitioner associated with the\nvisit. Use the resolved site.id, not this token, to identify the site."},"attendingProviderId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the attending provider\nassociated with the visit."},"renderingProviderId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the rendering provider\nassociated with the visit."},"operatingProviderId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Platform practitioner reference for the operating provider\nassociated with the visit."},"payorId":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Reference identifier for the payer associated with the visit. The payor\njoin supplies the payer name when available."},"procedureCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of procedure records linked to the visit."},"diagnosisCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of diagnosis records linked to the visit."},"prescriptionFillCount":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"integer","format":"int64"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"integer","format":"int64"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"integer","format":"int64"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"integer","format":"int64"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"integer","format":"int64"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"integer","format":"int64"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"integer","format":"int64"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Number of prescription dispensing records linked to the visit."}}},"VisitJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/VisitAggregates"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregates"},"project":{"$ref":"#/components/schemas/ProjectAggregates"},"patient":{"$ref":"#/components/schemas/PatientAggregates"},"site":{"$ref":"#/components/schemas/VisitSubjectSiteAggregates"},"attendingProvider":{"$ref":"#/components/schemas/PractitionerAggregates"},"renderingProvider":{"$ref":"#/components/schemas/PractitionerAggregates"},"operatingProvider":{"$ref":"#/components/schemas/PractitionerAggregates"},"payor":{"$ref":"#/components/schemas/PayorAggregates"}}}]},"VisitJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/VisitAggregatesRequest"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyAggregatesRequest"},"project":{"$ref":"#/components/schemas/ProjectAggregatesRequest"},"patient":{"$ref":"#/components/schemas/PatientAggregatesRequest"},"site":{"$ref":"#/components/schemas/VisitSubjectSiteAggregatesRequest"},"attendingProvider":{"$ref":"#/components/schemas/PractitionerAggregatesRequest"},"renderingProvider":{"$ref":"#/components/schemas/PractitionerAggregatesRequest"},"operatingProvider":{"$ref":"#/components/schemas/PractitionerAggregatesRequest"},"payor":{"$ref":"#/components/schemas/PayorAggregatesRequest"}}}]},"VisitJoinFields":{"allOf":[{"$ref":"#/components/schemas/VisitFields"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyFields","description":"Which of the joined company's columns to return. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectFields","description":"Which of the joined project's columns to return. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientFields","description":"Which of the joined patient's columns to return. Absent when the row has no patient."},"site":{"$ref":"#/components/schemas/VisitSubjectSiteFields","description":"Which of the joined site's columns to return. Absent when the row has no site."},"attendingProvider":{"$ref":"#/components/schemas/PractitionerFields","description":"Which of the joined attending provider's columns to return. Absent when the row has no attending provider."},"renderingProvider":{"$ref":"#/components/schemas/PractitionerFields","description":"Which of the joined rendering provider's columns to return. Absent when the row has no rendering provider."},"operatingProvider":{"$ref":"#/components/schemas/PractitionerFields","description":"Which of the joined operating provider's columns to return. Absent when the row has no operating provider."},"payor":{"$ref":"#/components/schemas/PayorFields","description":"Which of the joined payor's columns to return. Absent when the row has no payor."}}}]},"VisitJoinFilter":{"allOf":[{"$ref":"#/components/schemas/VisitFilter"},{"type":"object","properties":{"company":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/CompanyFilter"}],"description":"Filters on the joined company's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a company."},"project":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/ProjectFilter"}],"description":"Filters on the joined project's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a project."},"patient":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PatientFilter"}],"description":"Filters on the joined patient's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a patient."},"site":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/VisitSubjectSiteFilter"}],"description":"Filters on the joined site's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a site."},"attendingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerFilter"}],"description":"Filters on the joined attending provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a attending provider."},"renderingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerFilter"}],"description":"Filters on the joined rendering provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a rendering provider."},"operatingProvider":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PractitionerFilter"}],"description":"Filters on the joined operating provider's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a operating provider."},"payor":{"oneOf":[{"type":"string","enum":["isNull","isNotNull"]},{"$ref":"#/components/schemas/PayorFilter"}],"description":"Filters on the joined payor's columns. `isNull` or `isNotNull` in place of the filters matches the rows without or with a payor."}}}]},"VisitJoinSelected":{"allOf":[{"$ref":"#/components/schemas/VisitSelected"},{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanySelected","description":"The joined company's columns, as selected by the request. Absent when the row has no company."},"project":{"$ref":"#/components/schemas/ProjectSelected","description":"The joined project's columns, as selected by the request. Absent when the row has no project."},"patient":{"$ref":"#/components/schemas/PatientSelected","description":"The joined patient's columns, as selected by the request. Absent when the row has no patient."},"site":{"$ref":"#/components/schemas/VisitSubjectSiteSelected","description":"The joined site's columns, as selected by the request. Absent when the row has no site."},"attendingProvider":{"$ref":"#/components/schemas/PractitionerSelected","description":"The joined attending provider's columns, as selected by the request. Absent when the row has no attending provider."},"renderingProvider":{"$ref":"#/components/schemas/PractitionerSelected","description":"The joined rendering provider's columns, as selected by the request. Absent when the row has no rendering provider."},"operatingProvider":{"$ref":"#/components/schemas/PractitionerSelected","description":"The joined operating provider's columns, as selected by the request. Absent when the row has no operating provider."},"payor":{"$ref":"#/components/schemas/PayorSelected","description":"The joined payor's columns, as selected by the request. Absent when the row has no payor."}}}]},"VisitJoinSort":{"oneOf":[{"$ref":"#/components/schemas/VisitSort"},{"type":"object","required":["company"],"properties":{"company":{"$ref":"#/components/schemas/CompanySort","description":"Sorts on one of the joined company's columns."}}},{"type":"object","required":["project"],"properties":{"project":{"$ref":"#/components/schemas/ProjectSort","description":"Sorts on one of the joined project's columns."}}},{"type":"object","required":["patient"],"properties":{"patient":{"$ref":"#/components/schemas/PatientSort","description":"Sorts on one of the joined patient's columns."}}},{"type":"object","required":["site"],"properties":{"site":{"$ref":"#/components/schemas/VisitSubjectSiteSort","description":"Sorts on one of the joined site's columns."}}},{"type":"object","required":["attendingProvider"],"properties":{"attendingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined attending provider's columns."}}},{"type":"object","required":["renderingProvider"],"properties":{"renderingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined rendering provider's columns."}}},{"type":"object","required":["operatingProvider"],"properties":{"operatingProvider":{"$ref":"#/components/schemas/PractitionerSort","description":"Sorts on one of the joined operating provider's columns."}}},{"type":"object","required":["payor"],"properties":{"payor":{"$ref":"#/components/schemas/PayorSort","description":"Sorts on one of the joined payor's columns."}}}],"description":"Sort on one of this entity's columns, or on a column of an entity it joins to, keyed by that entity: a single column mapped to `asc` or `desc`."},"VisitNumericAggregates":{"type":"object","properties":{"claimType":{"type":["string","null"],"description":"Source-reported numeric claim-type code. Source-specific and may be\nblank."},"companyId":{"type":["string","null"],"description":"Platform identifier for the customer organization associated with the\nrecord."}}},"VisitNumericFields":{"type":"object","properties":{"claimType":{"type":"boolean","description":"Source-reported numeric claim-type code. Source-specific and may be\nblank.","default":false},"companyId":{"type":"boolean","description":"Platform identifier for the customer organization associated with the\nrecord.","default":false}},"additionalProperties":false},"VisitSelected":{"allOf":[{"$ref":"#/components/schemas/VisitAggregateDataFlattenSelected"},{"type":"object","properties":{"ref":{"type":["string","null"],"description":"Reference for the visit in the current data output. This reference can\nchange when data is reprocessed and should not be used as a permanent\nidentifier."},"id":{"type":["string","null"],"description":"Legacy alias of `ref`; prefer `ref`.","deprecated":true},"encounterType":{"type":["string","null"],"description":"Source-reported encounter category, such as inpatient or outpatient.\nValues depend on the contributing source and are not a fixed enumerated\nlist."},"claimType":{"type":["integer","null"],"format":"int32","description":"Source-reported numeric claim-type code. Source-specific and may be\nblank."},"earliestServiceDate":{"type":["string","null"],"format":"date","description":"Earliest service date reported for the visit. This describes the care\nevent, not the date of the search."},"latestServiceDate":{"type":["string","null"],"format":"date","description":"Latest service date reported for the visit. It may equal the earliest\nservice date for a single-day encounter."},"memberId":{"type":["string","null"],"description":"Insurance member identifier reported in the source claims data. Preserve\nas text, including any leading zeros."},"createdAt":{"type":["string","null"],"format":"date-time","description":"Timestamp associated with the visit data in the platform. For merged\nvisits, this is the newest contributing data timestamp and can change\nwhen newer data contributes."},"dataSources":{"type":["array","null"],"items":{"type":"string"}},"ehrDiscovered":{"type":["boolean","null"],"description":"Whether an electronic health record discovery source contributed to this\nvisit. A true value indicates EHR discovery, subject to the account\npermissions needed to request records."},"companyId":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CompanyId","description":"Platform identifier for the customer organization associated with the\nrecord."}]},"projectId":{"type":["string","null"],"description":"Platform identifier for the project containing the patient and record."},"patientId":{"type":["string","null"],"description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope."},"subjectSiteKey":{"type":["string","null"],"description":"Reference token for the facility or practitioner associated with the\nvisit. Use the resolved site.id, not this token, to identify the site."},"attendingProviderId":{"type":["string","null"],"description":"Platform practitioner reference for the attending provider\nassociated with the visit."},"renderingProviderId":{"type":["string","null"],"description":"Platform practitioner reference for the rendering provider\nassociated with the visit."},"operatingProviderId":{"type":["string","null"],"description":"Platform practitioner reference for the operating provider\nassociated with the visit."},"payorId":{"type":["string","null"],"description":"Reference identifier for the payer associated with the visit. The payor\njoin supplies the payer name when available."}}}]},"VisitSort":{"oneOf":[{"type":"object","required":["ref"],"properties":{"ref":{"type":"string","description":"Reference for the visit in the current data output. This reference can\nchange when data is reprocessed and should not be used as a permanent\nidentifier.","enum":["asc","desc"]}}},{"type":"object","required":["encounterType"],"properties":{"encounterType":{"type":"string","description":"Source-reported encounter category, such as inpatient or outpatient.\nValues depend on the contributing source and are not a fixed enumerated\nlist.","enum":["asc","desc"]}}},{"type":"object","required":["claimType"],"properties":{"claimType":{"type":"string","description":"Source-reported numeric claim-type code. Source-specific and may be\nblank.","enum":["asc","desc"]}}},{"type":"object","required":["earliestServiceDate"],"properties":{"earliestServiceDate":{"type":"string","description":"Earliest service date reported for the visit. This describes the care\nevent, not the date of the search.","enum":["asc","desc"]}}},{"type":"object","required":["latestServiceDate"],"properties":{"latestServiceDate":{"type":"string","description":"Latest service date reported for the visit. It may equal the earliest\nservice date for a single-day encounter.","enum":["asc","desc"]}}},{"type":"object","required":["memberId"],"properties":{"memberId":{"type":"string","description":"Insurance member identifier reported in the source claims data. Preserve\nas text, including any leading zeros.","enum":["asc","desc"]}}},{"type":"object","required":["createdAt"],"properties":{"createdAt":{"type":"string","description":"Timestamp associated with the visit data in the platform. For merged\nvisits, this is the newest contributing data timestamp and can change\nwhen newer data contributes.","enum":["asc","desc"]}}},{"type":"object","required":["ehrDiscovered"],"properties":{"ehrDiscovered":{"type":"string","description":"Whether an electronic health record discovery source contributed to this\nvisit. A true value indicates EHR discovery, subject to the account\npermissions needed to request records.","enum":["asc","desc"]}}},{"type":"object","required":["companyId"],"properties":{"companyId":{"type":"string","description":"Platform identifier for the customer organization associated with the\nrecord.","enum":["asc","desc"]}}},{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","description":"Platform identifier for the project containing the patient and record.","enum":["asc","desc"]}}},{"type":"object","required":["patientId"],"properties":{"patientId":{"type":"string","description":"Platform identifier for the patient associated with the record. Use with\nthe company and project identifiers to identify the patient scope.","enum":["asc","desc"]}}},{"type":"object","required":["subjectSiteKey"],"properties":{"subjectSiteKey":{"type":"string","description":"Reference token for the facility or practitioner associated with the\nvisit. Use the resolved site.id, not this token, to identify the site.","enum":["asc","desc"]}}},{"type":"object","required":["attendingProviderId"],"properties":{"attendingProviderId":{"type":"string","description":"Platform practitioner reference for the attending provider\nassociated with the visit.","enum":["asc","desc"]}}},{"type":"object","required":["renderingProviderId"],"properties":{"renderingProviderId":{"type":"string","description":"Platform practitioner reference for the rendering provider\nassociated with the visit.","enum":["asc","desc"]}}},{"type":"object","required":["operatingProviderId"],"properties":{"operatingProviderId":{"type":"string","description":"Platform practitioner reference for the operating provider\nassociated with the visit.","enum":["asc","desc"]}}},{"type":"object","required":["payorId"],"properties":{"payorId":{"type":"string","description":"Reference identifier for the payer associated with the visit. The payor\njoin supplies the payer name when available.","enum":["asc","desc"]}}},{"type":"object","required":["procedureCount"],"properties":{"procedureCount":{"type":"string","description":"Number of procedure records linked to the visit.","enum":["asc","desc"]}}},{"type":"object","required":["diagnosisCount"],"properties":{"diagnosisCount":{"type":"string","description":"Number of diagnosis records linked to the visit.","enum":["asc","desc"]}}},{"type":"object","required":["prescriptionFillCount"],"properties":{"prescriptionFillCount":{"type":"string","description":"Number of prescription dispensing records linked to the visit.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"VisitSubjectDepartment":{"type":"object","description":"Routed-department fields exposed beneath a visit's polymorphic `site` join.\n\nThe parent holds one of these per canonical slot as a\n`#[browse(select_only)]` column, so the whole snapshot rides the selected\nrow — and flattens to `site.<slot>Department.<field>` columns in the CSV and\nxlsx exports — while filter, sort, search, and aggregate surfaces skip it.\nThat is the point: a sortable department column would re-resolve routing\nonce per row per slot, whereas these values are read off the one canonical,\nROI-redacted resolution done while the site row is materialized.\n\nPlain projection type, not a `Browse` target: a `select_only` column is\ncarried by value, never joined or looked up, so it needs serialization and\na schema rather than the browse field traits.","required":["id"],"properties":{"id":{"type":"string","description":"Identifier of the routed department. Routing may resolve to a department\ninherited from another site. Blank when this department is not\navailable."},"phone":{"type":["string","null"],"description":"Telephone number for the routed department. Blank when this department\nis not available."},"fax":{"type":["string","null"],"description":"Fax number for the routed department. Blank when this department is not\navailable."},"email":{"type":["string","null"],"description":"Email address for the routed department. Blank when this department is\nnot available."},"website":{"type":["string","null"],"description":"Website or portal URL for the routed department. Blank when this\ndepartment is not available."},"formattedAddress":{"type":["string","null"],"description":"Complete formatted mailing address for the routed department. Blank when\nthis department is not available."},"addressLine1":{"type":["string","null"],"description":"First line of the routed department mailing address. Blank when this\ndepartment is not available."},"addressLine2":{"type":["string","null"],"description":"Second line of the routed department mailing address. Blank when this\ndepartment is not available."},"city":{"type":["string","null"],"description":"City in the routed department mailing address. Blank when this\ndepartment is not available."},"state":{"type":["string","null"],"description":"State or region in the routed department mailing address. Blank when\nthis department is not available."},"zip":{"type":["string","null"],"description":"Postal code in the routed department mailing address. Preserve leading\nzeros. Blank when this department is not available."},"fee":{"type":["string","null"],"description":"Fee recorded for the routed department. Monetary amount, not a\ncalculated invoice or guaranteed final charge. Blank when this\ndepartment is not available."},"attentionTo":{"type":["string","null"],"description":"Person or department to name on correspondence. Blank when this\ndepartment is not available."},"payableTo":{"type":["string","null"],"description":"Payee name recorded for payments to the department. Blank when this\ndepartment is not available."},"requestMethod":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DeliveryMethod","description":"Configured request delivery method for the routed department. Stored as\na text code for fax, email, mail, API, or portal delivery. Blank when\nthis department is not available."}]},"roi":{"type":["string","null"],"description":"Release-of-information vendor for the routed department. May be\nconcealed when the account is associated with a different vendor. Blank\nwhen this department is not available."},"roiId":{"type":["string","null"],"description":"Department identifier assigned by the release-of-information vendor.\nVisible only when the account is associated with the same vendor;\notherwise blank. Blank when this department is not available."},"ehr":{"type":["string","null"],"description":"Electronic health record vendor associated with the routed department.\nBlank when this department is not available."},"ehrId":{"type":["string","null"],"description":"Department or client identifier assigned by the electronic health record\nvendor. Blank when this department is not available."}}},"VisitSubjectSiteAggregates":{"type":"object","properties":{"count":{"type":["integer","null"],"format":"u-int64","description":"Number of rows that match the filter. Present when `count` was requested.","minimum":0},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericAggregates"}],"description":"Total of each requested numeric column across the rows that match the filter."},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericAggregates"}],"description":"Average of each requested numeric column across the rows that match the filter."},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericAggregates"}],"description":"Smallest value of each requested numeric column across the rows that match the filter."},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericAggregates"}],"description":"Largest value of each requested numeric column across the rows that match the filter."}}},"VisitSubjectSiteAggregatesRequest":{"type":"object","properties":{"count":{"type":"boolean","description":"When true, return the number of rows that match the filter.","default":false},"sum":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericFields"}],"description":"Numeric columns to total across the rows that match the filter.","default":null},"avg":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericFields"}],"description":"Numeric columns to average across the rows that match the filter.","default":null},"min":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericFields"}],"description":"Numeric columns to find the smallest value of across the rows that match the filter.","default":null},"max":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectSiteNumericFields"}],"description":"Numeric columns to find the largest value of across the rows that match the filter.","default":null}},"additionalProperties":false},"VisitSubjectSiteFields":{"type":"object","properties":{"id":{"type":"boolean","description":"Resolved identifier of the facility or practitioner. Site redirects can\nmake this differ from the visit's own subject site key."},"name":{"type":"boolean","description":"Name of the resolved facility or practitioner. One Sites row per\ndistinct resolved visit subject in the project."},"npis":{"type":"boolean","description":"National Provider Identifiers associated with the facility or\npractitioner. Each NPI is a 10-digit text value. Exported as a JSON\narray in one cell."},"isFacility":{"type":"boolean","description":"Whether the visit subject is classified as a facility. Practitioner\nsubjects return false."},"inNetwork":{"type":"boolean","description":"Whether any linked facility department is in the record-retrieval\nnetwork. Practitioner subjects return false. This is not the patient\ninsurance network status."},"roiVendor":{"type":"boolean","description":"Release-of-information vendor associated with the facility medical\ndepartment. May be blank when unavailable or concealed by account access\nsettings."},"ehrVendor":{"type":"boolean","description":"Electronic health record vendor associated with the facility medical\ndepartment, when known."},"addressLine1":{"type":"boolean","description":"First line of the facility or practitioner street address."},"addressLine2":{"type":"boolean","description":"Second line of the facility address, such as a suite or building. Blank\nfor practitioner subjects in the visit-site view."},"city":{"type":"boolean","description":"City in the facility or practitioner address."},"state":{"type":"boolean","description":"State or region in the facility or practitioner address, as stored."},"zip":{"type":"boolean","description":"ZIP or postal code in the facility or practitioner address. Preserve as\ntext to retain leading zeros."},"primarySpecialty":{"type":"boolean","description":"Primary medical specialty associated with the facility or practitioner."},"systemName":{"type":"boolean","description":"Healthcare system associated with the facility, when known. Typically\nblank for individual practitioners."},"formattedAddress":{"type":"boolean","description":"Complete formatted facility address, when available. This joined field\nis currently blank for practitioner subjects."},"googleMapsUrl":{"type":"boolean","description":"Google Maps link for the facility or dispensing pharmacy, when\navailable."},"latitude":{"type":"boolean","description":"Facility latitude in decimal degrees. This joined field is currently\nblank for practitioner subjects."},"longitude":{"type":"boolean","description":"Facility longitude in decimal degrees. This joined field is currently\nblank for practitioner subjects."},"phone":{"type":"boolean","description":"Telephone number for the site. In the Visits and Sites views, blank for\npractitioner subjects."},"mainFax":{"type":"boolean","description":"Main fax number for the facility. Separate from routed-department fax\nnumbers."},"email":{"type":"boolean","description":"General facility email address. Separate from routed-department email\naddresses."},"website":{"type":"boolean","description":"Facility website URL, when available."},"medicalDepartment":{"type":"boolean","description":"The site's canonical routed departments, including departments\ninherited from the managing organization, with the ROI vendor withheld\nwhere the viewer may not see it. Selectable and returned, but not\nfilterable or sortable. Absent for every practitioner subject, which\nhas no department routing."},"facilityBillingDepartment":{"type":"boolean","description":"The site's facility billing records department, including one inherited\nfrom the managing organization, with the ROI vendor withheld where the\nviewer may not see it. Absent for practitioner subjects and when none is\nrouted."},"physicianBillingDepartment":{"type":"boolean","description":"The site's physician billing records department, including one inherited\nfrom the managing organization, with the ROI vendor withheld where the\nviewer may not see it. Absent for practitioner subjects and when none is\nrouted."},"imagingBillingDepartment":{"type":"boolean","description":"The site's imaging billing records department, including one inherited\nfrom the managing organization, with the ROI vendor withheld where the\nviewer may not see it. Absent for practitioner subjects and when none is\nrouted."},"emergencyRoomBillingDepartment":{"type":"boolean","description":"The site's emergency room billing records department, including one\ninherited from the managing organization, with the ROI vendor withheld\nwhere the viewer may not see it. Absent for practitioner subjects and\nwhen none is routed."},"anesthesiologyBillingDepartment":{"type":"boolean","description":"The site's anesthesiology billing records department, including one\ninherited from the managing organization, with the ROI vendor withheld\nwhere the viewer may not see it. Absent for practitioner subjects and\nwhen none is routed."},"imagingDepartment":{"type":"boolean","description":"The site's imaging records department, including one inherited from the\nmanaging organization, with the ROI vendor withheld where the viewer may\nnot see it. Absent for practitioner subjects and when none is routed."},"link":{"type":"boolean","description":"Facility → `/sites/{id}`; practitioner → `/practitioners/{id}`."}}},"VisitSubjectSiteFilter":{"type":"object","properties":{"id":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Resolved identifier of the facility or practitioner. Site redirects can\nmake this differ from the visit's own subject site key."},"name":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Name of the resolved facility or practitioner. One Sites row per\ndistinct resolved visit subject in the project."},"npis":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"National Provider Identifiers associated with the facility or\npractitioner. Each NPI is a 10-digit text value. Exported as a JSON\narray in one cell."},"isFacility":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether the visit subject is classified as a facility. Practitioner\nsubjects return false."},"inNetwork":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"boolean"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"boolean"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"boolean"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"boolean"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Whether any linked facility department is in the record-retrieval\nnetwork. Practitioner subjects return false. This is not the patient\ninsurance network status."},"roiVendor":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Release-of-information vendor associated with the facility medical\ndepartment. May be blank when unavailable or concealed by account access\nsettings."},"ehrVendor":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Electronic health record vendor associated with the facility medical\ndepartment, when known."},"addressLine1":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"First line of the facility or practitioner street address."},"addressLine2":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Second line of the facility address, such as a suite or building. Blank\nfor practitioner subjects in the visit-site view."},"city":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"City in the facility or practitioner address."},"state":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"State or region in the facility or practitioner address, as stored."},"zip":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"ZIP or postal code in the facility or practitioner address. Preserve as\ntext to retain leading zeros."},"primarySpecialty":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Primary medical specialty associated with the facility or practitioner."},"systemName":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Healthcare system associated with the facility, when known. Typically\nblank for individual practitioners."},"formattedAddress":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Complete formatted facility address, when available. This joined field\nis currently blank for practitioner subjects."},"googleMapsUrl":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Google Maps link for the facility or dispensing pharmacy, when\navailable."},"latitude":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"number","format":"double"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"number","format":"double"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"number","format":"double"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"number","format":"double"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"number","format":"double"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"number","format":"double"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Facility latitude in decimal degrees. This joined field is currently\nblank for practitioner subjects."},"longitude":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"number","format":"double"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"number","format":"double"}}},{"type":"object","required":["gt"],"properties":{"gt":{"type":"number","format":"double"}}},{"type":"object","required":["gte"],"properties":{"gte":{"type":"number","format":"double"}}},{"type":"object","required":["lt"],"properties":{"lt":{"type":"number","format":"double"}}},{"type":"object","required":["lte"],"properties":{"lte":{"type":"number","format":"double"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"number","format":"double"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Facility longitude in decimal degrees. This joined field is currently\nblank for practitioner subjects."},"phone":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Telephone number for the site. In the Visits and Sites views, blank for\npractitioner subjects."},"mainFax":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Main fax number for the facility. Separate from routed-department fax\nnumbers."},"email":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"General facility email address. Separate from routed-department email\naddresses."},"website":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Facility website URL, when available."},"link":{"type":"array","items":{"oneOf":[{"type":"object","required":["equals"],"properties":{"equals":{"type":"string"}}},{"type":"object","required":["notEquals"],"properties":{"notEquals":{"type":"string"}}},{"type":"object","required":["contains"],"properties":{"contains":{"type":"string"}}},{"type":"object","required":["startsWith"],"properties":{"startsWith":{"type":"string"}}},{"type":"object","required":["endsWith"],"properties":{"endsWith":{"type":"string"}}},{"type":"object","required":["in"],"properties":{"in":{"type":"array","items":{"type":"string"}}}},{"type":"object","required":["notIn"],"properties":{"notIn":{"type":"array","items":{"type":"string"}}}},{"type":"string","enum":["isNull","isNotNull"]}]},"description":"Facility → `/sites/{id}`; practitioner → `/practitioners/{id}`."}}},"VisitSubjectSiteJoinAggregates":{"allOf":[{"$ref":"#/components/schemas/VisitSubjectSiteAggregates"},{"type":"object"}]},"VisitSubjectSiteJoinAggregatesRequest":{"allOf":[{"$ref":"#/components/schemas/VisitSubjectSiteAggregatesRequest"},{"type":"object"}]},"VisitSubjectSiteJoinFields":{"allOf":[{"$ref":"#/components/schemas/VisitSubjectSiteFields"},{"type":"object"}]},"VisitSubjectSiteJoinFilter":{"allOf":[{"$ref":"#/components/schemas/VisitSubjectSiteFilter"},{"type":"object"}]},"VisitSubjectSiteJoinSelected":{"allOf":[{"$ref":"#/components/schemas/VisitSubjectSiteSelected"},{"type":"object"}]},"VisitSubjectSiteNumericAggregates":{"type":"object"},"VisitSubjectSiteNumericFields":{"type":"object","additionalProperties":false},"VisitSubjectSiteSelected":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Resolved identifier of the facility or practitioner. Site redirects can\nmake this differ from the visit's own subject site key."},"name":{"type":["string","null"],"description":"Name of the resolved facility or practitioner. One Sites row per\ndistinct resolved visit subject in the project."},"npis":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Npi"},"description":"National Provider Identifiers associated with the facility or\npractitioner. Each NPI is a 10-digit text value. Exported as a JSON\narray in one cell."},"isFacility":{"type":["boolean","null"],"description":"Whether the visit subject is classified as a facility. Practitioner\nsubjects return false."},"inNetwork":{"type":["boolean","null"],"description":"Whether any linked facility department is in the record-retrieval\nnetwork. Practitioner subjects return false. This is not the patient\ninsurance network status."},"roiVendor":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RoiVendor","description":"Release-of-information vendor associated with the facility medical\ndepartment. May be blank when unavailable or concealed by account access\nsettings."}]},"ehrVendor":{"type":["string","null"],"description":"Electronic health record vendor associated with the facility medical\ndepartment, when known."},"addressLine1":{"type":["string","null"],"description":"First line of the facility or practitioner street address."},"addressLine2":{"type":["string","null"],"description":"Second line of the facility address, such as a suite or building. Blank\nfor practitioner subjects in the visit-site view."},"city":{"type":["string","null"],"description":"City in the facility or practitioner address."},"state":{"type":["string","null"],"description":"State or region in the facility or practitioner address, as stored."},"zip":{"type":["string","null"],"description":"ZIP or postal code in the facility or practitioner address. Preserve as\ntext to retain leading zeros."},"primarySpecialty":{"type":["string","null"],"description":"Primary medical specialty associated with the facility or practitioner."},"systemName":{"type":["string","null"],"description":"Healthcare system associated with the facility, when known. Typically\nblank for individual practitioners."},"formattedAddress":{"type":["string","null"],"description":"Complete formatted facility address, when available. This joined field\nis currently blank for practitioner subjects."},"googleMapsUrl":{"type":["string","null"],"description":"Google Maps link for the facility or dispensing pharmacy, when\navailable."},"latitude":{"type":["number","null"],"format":"double","description":"Facility latitude in decimal degrees. This joined field is currently\nblank for practitioner subjects."},"longitude":{"type":["number","null"],"format":"double","description":"Facility longitude in decimal degrees. This joined field is currently\nblank for practitioner subjects."},"phone":{"type":["string","null"],"description":"Telephone number for the site. In the Visits and Sites views, blank for\npractitioner subjects."},"mainFax":{"type":["string","null"],"description":"Main fax number for the facility. Separate from routed-department fax\nnumbers."},"email":{"type":["string","null"],"description":"General facility email address. Separate from routed-department email\naddresses."},"website":{"type":["string","null"],"description":"Facility website URL, when available."},"medicalDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's canonical routed departments, including departments\ninherited from the managing organization, with the ROI vendor withheld\nwhere the viewer may not see it. Selectable and returned, but not\nfilterable or sortable. Absent for every practitioner subject, which\nhas no department routing."}]},"facilityBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's facility billing records department, including one inherited\nfrom the managing organization, with the ROI vendor withheld where the\nviewer may not see it. Absent for practitioner subjects and when none is\nrouted."}]},"physicianBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's physician billing records department, including one inherited\nfrom the managing organization, with the ROI vendor withheld where the\nviewer may not see it. Absent for practitioner subjects and when none is\nrouted."}]},"imagingBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's imaging billing records department, including one inherited\nfrom the managing organization, with the ROI vendor withheld where the\nviewer may not see it. Absent for practitioner subjects and when none is\nrouted."}]},"emergencyRoomBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's emergency room billing records department, including one\ninherited from the managing organization, with the ROI vendor withheld\nwhere the viewer may not see it. Absent for practitioner subjects and\nwhen none is routed."}]},"anesthesiologyBillingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's anesthesiology billing records department, including one\ninherited from the managing organization, with the ROI vendor withheld\nwhere the viewer may not see it. Absent for practitioner subjects and\nwhen none is routed."}]},"imagingDepartment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VisitSubjectDepartment","description":"The site's imaging records department, including one inherited from the\nmanaging organization, with the ROI vendor withheld where the viewer may\nnot see it. Absent for practitioner subjects and when none is routed."}]},"link":{"type":["string","null"],"description":"Facility → `/sites/{id}`; practitioner → `/practitioners/{id}`."}}},"VisitSubjectSiteSort":{"oneOf":[{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"Resolved identifier of the facility or practitioner. Site redirects can\nmake this differ from the visit's own subject site key.","enum":["asc","desc"]}}},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the resolved facility or practitioner. One Sites row per\ndistinct resolved visit subject in the project.","enum":["asc","desc"]}}},{"type":"object","required":["isFacility"],"properties":{"isFacility":{"type":"string","description":"Whether the visit subject is classified as a facility. Practitioner\nsubjects return false.","enum":["asc","desc"]}}},{"type":"object","required":["inNetwork"],"properties":{"inNetwork":{"type":"string","description":"Whether any linked facility department is in the record-retrieval\nnetwork. Practitioner subjects return false. This is not the patient\ninsurance network status.","enum":["asc","desc"]}}},{"type":"object","required":["roiVendor"],"properties":{"roiVendor":{"type":"string","description":"Release-of-information vendor associated with the facility medical\ndepartment. May be blank when unavailable or concealed by account access\nsettings.","enum":["asc","desc"]}}},{"type":"object","required":["ehrVendor"],"properties":{"ehrVendor":{"type":"string","description":"Electronic health record vendor associated with the facility medical\ndepartment, when known.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine1"],"properties":{"addressLine1":{"type":"string","description":"First line of the facility or practitioner street address.","enum":["asc","desc"]}}},{"type":"object","required":["addressLine2"],"properties":{"addressLine2":{"type":"string","description":"Second line of the facility address, such as a suite or building. Blank\nfor practitioner subjects in the visit-site view.","enum":["asc","desc"]}}},{"type":"object","required":["city"],"properties":{"city":{"type":"string","description":"City in the facility or practitioner address.","enum":["asc","desc"]}}},{"type":"object","required":["state"],"properties":{"state":{"type":"string","description":"State or region in the facility or practitioner address, as stored.","enum":["asc","desc"]}}},{"type":"object","required":["zip"],"properties":{"zip":{"type":"string","description":"ZIP or postal code in the facility or practitioner address. Preserve as\ntext to retain leading zeros.","enum":["asc","desc"]}}},{"type":"object","required":["primarySpecialty"],"properties":{"primarySpecialty":{"type":"string","description":"Primary medical specialty associated with the facility or practitioner.","enum":["asc","desc"]}}},{"type":"object","required":["systemName"],"properties":{"systemName":{"type":"string","description":"Healthcare system associated with the facility, when known. Typically\nblank for individual practitioners.","enum":["asc","desc"]}}},{"type":"object","required":["formattedAddress"],"properties":{"formattedAddress":{"type":"string","description":"Complete formatted facility address, when available. This joined field\nis currently blank for practitioner subjects.","enum":["asc","desc"]}}},{"type":"object","required":["googleMapsUrl"],"properties":{"googleMapsUrl":{"type":"string","description":"Google Maps link for the facility or dispensing pharmacy, when\navailable.","enum":["asc","desc"]}}},{"type":"object","required":["latitude"],"properties":{"latitude":{"type":"string","description":"Facility latitude in decimal degrees. This joined field is currently\nblank for practitioner subjects.","enum":["asc","desc"]}}},{"type":"object","required":["longitude"],"properties":{"longitude":{"type":"string","description":"Facility longitude in decimal degrees. This joined field is currently\nblank for practitioner subjects.","enum":["asc","desc"]}}},{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","description":"Telephone number for the site. In the Visits and Sites views, blank for\npractitioner subjects.","enum":["asc","desc"]}}},{"type":"object","required":["mainFax"],"properties":{"mainFax":{"type":"string","description":"Main fax number for the facility. Separate from routed-department fax\nnumbers.","enum":["asc","desc"]}}},{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"General facility email address. Separate from routed-department email\naddresses.","enum":["asc","desc"]}}},{"type":"object","required":["website"],"properties":{"website":{"type":"string","description":"Facility website URL, when available.","enum":["asc","desc"]}}},{"type":"object","required":["link"],"properties":{"link":{"type":"string","description":"Facility → `/sites/{id}`; practitioner → `/practitioners/{id}`.","enum":["asc","desc"]}}}],"description":"Sort on one of this entity's columns: an object with a single key naming the column, mapped to `asc` or `desc`."},"WebhookEndpointVersion":{"type":"string","description":"Which delivery contract an endpoint uses. Values: `classic` (the original\ncolumn subscriptions, deprecated) and `events` (named events such as\n`siteSonar.completed`). An `events` delivery carries this value in its\n`version` field; a `classic` delivery has no `version` field.","enum":["classic","events"]},"Zip":{"type":"string","description":"A US ZIP code: five digits, or ZIP+4 as NNNNN-NNNN. A ZIP+4 without its hyphen is accepted, and a base shorter than five digits is left-padded with zeroes. Surrounding whitespace is trimmed, and the value is always returned as NNNNN or NNNNN-NNNN. Anything else is rejected.","examples":["94110"]}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"account","description":"The user and company your API key belongs to. Start here: your `companyId` is in every `/v0/companies/{companyId}/...` route."},{"name":"companies","description":"Company management"},{"name":"projects","description":"Project management"},{"name":"project-files","description":"Project file operations"},{"name":"patients","description":"Patient records management"},{"name":"patient-authorization","description":"Patient authorization. Endpoints that return the analysis schema are marked as such; if you display auth-check results to end users, prefer the iframe embed described in [Embedding the auth-check UI](#embedding-the-auth-check-ui)."},{"name":"auth-intake","description":"Self-serve release-of-information authorizations. Mint an embed token with an optional approved `parentOrigin`, then embed the origin-bound (or temporarily legacy wildcard) patient-signing iframe on your own site; the patient enters their information and signs a generated authorization."},{"name":"patient-notes","description":"Patient notes"},{"name":"patient-search","description":"Patient search features"},{"name":"record-requests","description":"Record request operations"},{"name":"record-request-files","description":"Record request file operations"},{"name":"record-request-notes","description":"Record request notes"},{"name":"record-request-authorization","description":"Record request authorization. Endpoints that return the analysis schema are marked as such; if you display auth-check results to end users, prefer the iframe embed described in [Embedding the auth-check UI](#embedding-the-auth-check-ui)."},{"name":"auth-check","description":"Standalone authorization form analysis. The raw analysis schema (`Analysis`, `AuthCheck`, and related types) changes frequently as we expand document-type coverage, legal requirements, and edge cases. For end-user-facing surfaces, mint an embed token and iframe the read-only view — see [Embedding the auth-check UI](#embedding-the-auth-check-ui)."},{"name":"sites","description":"Site CRUD operations"},{"name":"site-finder","description":"Site lookup and matching. The finder is also available as an embeddable, interactive iframe — see [Embedding the site finder](#embedding-the-site-finder)."},{"name":"site-research","description":"AI-powered site research and enrichment"},{"name":"visits","description":"Patient visit browse operations. Shares the typed browse syntax described in [Browsing tables](#browsing-tables). To display this data to end users, prefer the iframe embed — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"procedures","description":"Procedure browse operations. Shares the typed browse syntax described in [Browsing tables](#browsing-tables). To display this data to end users, prefer the iframe embed — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"diagnoses","description":"Diagnosis browse operations. Shares the typed browse syntax described in [Browsing tables](#browsing-tables). To display this data to end users, prefer the iframe embed — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"prescription-fills","description":"Prescription-fill browse operations. Shares the typed browse syntax described in [Browsing tables](#browsing-tables). To display this data to end users, prefer the iframe embed — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"lab-accessions","description":"Lab-accession browse operations. Shares the typed browse syntax described in [Browsing tables](#browsing-tables). To display this data to end users, prefer the iframe embed — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"lab-results","description":"Lab-result browse operations. Shares the typed browse syntax described in [Browsing tables](#browsing-tables). To display this data to end users, prefer the iframe embed — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"clinical-data-embed","description":"Mint a token to iframe a single patient's read-only clinical-data browser (visits, procedures, diagnoses, prescription fills, lab results). The recommended way to show clinical data to end users — see [Embedding the clinical-data UI](#embedding-the-clinical-data-ui)."},{"name":"webhooks","description":"Outbound webhooks delivered to your configured endpoints. See [Outbound webhooks](#outbound-webhooks) for endpoint setup, subscriptions, the payload envelope, and signature verification."}],"x-tagGroups":[{"name":"Setup","tags":["account","projects","project-files"]},{"name":"Patients","tags":["patients","patient-authorization","patient-search","patient-notes","auth-intake","auth-check"]},{"name":"Clinical data","tags":["visits","diagnoses","procedures","prescription-fills","lab-accessions","lab-results","clinical-data-embed"]},{"name":"Record retrieval","tags":["record-requests","record-request-files","record-request-notes","record-request-authorization"]},{"name":"Facilities","tags":["sites","site-finder","site-research"]},{"name":"Webhooks","tags":["webhooks"]}],"webhooks":{"recordRequest.rowCreated":{"post":{"tags":["webhooks"],"summary":"Record request created","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a record request is created. `data` carries the subscribed columns of the new row; `changed` is empty.\n\nDelivered as a POST to your configured endpoint URL with a 10-second timeout. See the [Outbound webhooks](#outbound-webhooks) guide for the signature scheme, retry behavior, and column selection.","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of a subscription delivery.","required":["id","timestamp","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"eventType":{"type":"string","description":"The `<entity>.<trigger>` event type, such as\n`recordRequest.columnChanged`.","enum":["recordRequest.rowCreated"]},"resource":{"type":"string","description":"Path to the row the event is about, such as\n`companies/1/projects/p/patients/pat/record-requests/req`. GET it with\nyour API key for the full resource."},"changed":{"type":"array","items":{"type":"string"},"description":"The subscribed columns whose value changed. Empty for a `rowCreated` or\n`followUpDue` event."},"data":{"type":"object","description":"The subscribed columns and their current values: a narrow projection of\nthe row, not the full GET response for the resource."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"recordRequest.columnChanged":{"post":{"tags":["webhooks"],"summary":"Record request column changed","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a subscribed column on a record request changes value — e.g. subscribe to the `status` column to be notified on every status transition (including a sandbox request auto-completing). `changed` lists the subscribed columns whose value moved.\n\nDelivered as a POST to your configured endpoint URL with a 10-second timeout. See the [Outbound webhooks](#outbound-webhooks) guide for the signature scheme, retry behavior, and column selection.","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of a subscription delivery.","required":["id","timestamp","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"eventType":{"type":"string","description":"The `<entity>.<trigger>` event type, such as\n`recordRequest.columnChanged`.","enum":["recordRequest.columnChanged"]},"resource":{"type":"string","description":"Path to the row the event is about, such as\n`companies/1/projects/p/patients/pat/record-requests/req`. GET it with\nyour API key for the full resource."},"changed":{"type":"array","items":{"type":"string"},"description":"The subscribed columns whose value changed. Empty for a `rowCreated` or\n`followUpDue` event."},"data":{"type":"object","description":"The subscribed columns and their current values: a narrow projection of\nthe row, not the full GET response for the resource."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"recordRequest.followUpDue":{"post":{"tags":["webhooks"],"summary":"recordRequest.followUpDue","description":"A record request's follow-up date has arrived. Sent at most once a day while the date is due.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nA deprecated Classic endpoint subscribed to follow-up reminders receives the same `eventType` in the Classic body, which has no `version` field.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.followUpDue"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"patient.rowCreated":{"post":{"tags":["webhooks"],"summary":"Patient created","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a patient is created. `data` carries the subscribed columns of the new row; `changed` is empty.\n\nDelivered as a POST to your configured endpoint URL with a 10-second timeout. See the [Outbound webhooks](#outbound-webhooks) guide for the signature scheme, retry behavior, and column selection.","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of a subscription delivery.","required":["id","timestamp","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"eventType":{"type":"string","description":"The `<entity>.<trigger>` event type, such as\n`recordRequest.columnChanged`.","enum":["patient.rowCreated"]},"resource":{"type":"string","description":"Path to the row the event is about, such as\n`companies/1/projects/p/patients/pat/record-requests/req`. GET it with\nyour API key for the full resource."},"changed":{"type":"array","items":{"type":"string"},"description":"The subscribed columns whose value changed. Empty for a `rowCreated` or\n`followUpDue` event."},"data":{"type":"object","description":"The subscribed columns and their current values: a narrow projection of\nthe row, not the full GET response for the resource."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"patient.columnChanged":{"post":{"tags":["webhooks"],"summary":"Patient column changed","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a subscribed column on a patient changes value — e.g. subscribe to `searchStatus` to learn when a Site Sonar or patient-history search finishes, or `authorizationStatus` to track authorization changes.\n\nDelivered as a POST to your configured endpoint URL with a 10-second timeout. See the [Outbound webhooks](#outbound-webhooks) guide for the signature scheme, retry behavior, and column selection.","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of a subscription delivery.","required":["id","timestamp","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"eventType":{"type":"string","description":"The `<entity>.<trigger>` event type, such as\n`recordRequest.columnChanged`.","enum":["patient.columnChanged"]},"resource":{"type":"string","description":"Path to the row the event is about, such as\n`companies/1/projects/p/patients/pat/record-requests/req`. GET it with\nyour API key for the full resource."},"changed":{"type":"array","items":{"type":"string"},"description":"The subscribed columns whose value changed. Empty for a `rowCreated` or\n`followUpDue` event."},"data":{"type":"object","description":"The subscribed columns and their current values: a narrow projection of\nthe row, not the full GET response for the resource."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"note.rowCreated":{"post":{"tags":["webhooks"],"summary":"Note created","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a note is created on a patient or a record request. The `resource` path identifies the parent the note was attached to.\n\nDelivered as a POST to your configured endpoint URL with a 10-second timeout. See the [Outbound webhooks](#outbound-webhooks) guide for the signature scheme, retry behavior, and column selection.","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of a subscription delivery.","required":["id","timestamp","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"eventType":{"type":"string","description":"The `<entity>.<trigger>` event type, such as\n`recordRequest.columnChanged`.","enum":["note.rowCreated"]},"resource":{"type":"string","description":"Path to the row the event is about, such as\n`companies/1/projects/p/patients/pat/record-requests/req`. GET it with\nyour API key for the full resource."},"changed":{"type":"array","items":{"type":"string"},"description":"The subscribed columns whose value changed. Empty for a `rowCreated` or\n`followUpDue` event."},"data":{"type":"object","description":"The subscribed columns and their current values: a narrow projection of\nthe row, not the full GET response for the resource."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"note.columnChanged":{"post":{"tags":["webhooks"],"summary":"Note column changed","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a subscribed column on a note changes value.\n\nDelivered as a POST to your configured endpoint URL with a 10-second timeout. See the [Outbound webhooks](#outbound-webhooks) guide for the signature scheme, retry behavior, and column selection.","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of a subscription delivery.","required":["id","timestamp","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"eventType":{"type":"string","description":"The `<entity>.<trigger>` event type, such as\n`recordRequest.columnChanged`.","enum":["note.columnChanged"]},"resource":{"type":"string","description":"Path to the row the event is about, such as\n`companies/1/projects/p/patients/pat/record-requests/req`. GET it with\nyour API key for the full resource."},"changed":{"type":"array","items":{"type":"string"},"description":"The subscribed columns whose value changed. Empty for a `rowCreated` or\n`followUpDue` event."},"data":{"type":"object","description":"The subscribed columns and their current values: a narrow projection of\nthe row, not the full GET response for the resource."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"clinicalDataAdded":{"post":{"tags":["webhooks"],"summary":"Clinical data added","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when a Site Sonar, Patient Histories or sandbox run puts clinical content on a patient that they did not already have, with the count of what is new by type. A run that adds nothing sends nothing. A Classic endpoint opts in by picking it from the *Entity* dropdown of its subscription builder; see [Net-new clinical data](#net-new-clinical-data). Named-event endpoints receive `clinicalData.added` instead.\n\nDelivered as a POST to your endpoint URL with the two-field `eventType` / `data` envelope, signed with `X-Webhook-Signature`, and sent once with no retry. There is no delivery id to dedupe on.","parameters":[{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery: the event type and its payload, with\nno delivery id, timestamp, resource or changed columns.","required":["eventType","data"],"properties":{"eventType":{"type":"string","description":"The event type, such as `clinicalDataAdded`.","enum":["clinicalDataAdded"]},"data":{"$ref":"#/components/schemas/ClinicalDataAddedPayload","description":"The event's payload."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"aiResearchCompleted":{"post":{"tags":["webhooks"],"summary":"AI research completed","description":"**Classic endpoints only (deprecated).** No new Classic endpoint can be created; upgrade to named events in the web app.\n\nFired when an AI research run that you started finishes. It fires only to your own endpoints, never a colleague's. A Classic endpoint opts in by picking it from the *Entity* dropdown of its subscription builder; see [AI research completed](#ai-research-completed). Named-event endpoints receive `aiResearch.completed` instead.\n\nDelivered as a POST to your endpoint URL with the two-field `eventType` / `data` envelope, signed with `X-Webhook-Signature`, and sent once with no retry. There is no delivery id to dedupe on.","parameters":[{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery: the event type and its payload, with\nno delivery id, timestamp, resource or changed columns.","required":["eventType","data"],"properties":{"eventType":{"type":"string","description":"The event type, such as `clinicalDataAdded`.","enum":["aiResearchCompleted"]},"data":{"$ref":"#/components/schemas/AiResearchCompletedPayload","description":"The event's payload."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}},"deprecated":true}},"recordRequest.created":{"post":{"tags":["webhooks"],"summary":"recordRequest.created","description":"A record request is created.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.created"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"recordRequest.statusChanged":{"post":{"tags":["webhooks"],"summary":"recordRequest.statusChanged","description":"A record request moves to any new status.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.statusChanged"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"recordRequest.processing":{"post":{"tags":["webhooks"],"summary":"recordRequest.processing","description":"A record request is sent to the facility and is awaiting records.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.processing"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"recordRequest.needsResolution":{"post":{"tags":["webhooks"],"summary":"recordRequest.needsResolution","description":"A record request is blocked on your action, such as a denied authorization, a pending payment or a site-specific authorization.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.needsResolution"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"recordRequest.completed":{"post":{"tags":["webhooks"],"summary":"recordRequest.completed","description":"Records were received for a record request, fully or partially.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.completed"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"recordRequest.recordsNotFound":{"post":{"tags":["webhooks"],"summary":"recordRequest.recordsNotFound","description":"The facility could not provide records for a record request.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.recordsNotFound"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"recordRequest.canceled":{"post":{"tags":["webhooks"],"summary":"recordRequest.canceled","description":"A record request is canceled, voided or marked a duplicate.\n\nPart of the **Record Requests** group (`recordRequest`): A record request is created, changes status, or reaches its follow-up date.\n\nEvery event in the group sends the same `data`: `id`, `status`, `requestType`, `submittedSiteName`, `followUpDate`, `lastContactDate`, `completionDate`, `startDateOfService`, `endDateOfService`, `createdAt`, `updatedAt`, `patientId`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["recordRequest.canceled"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"siteSonar.started":{"post":{"tags":["webhooks"],"summary":"siteSonar.started","description":"Facility discovery starts for a patient.\n\nPart of the **Site Sonar** group (`siteSonar`): Facility discovery starts or finishes for a patient.\n\nEvery event in the group sends the same `data`: `id`, `siteSonar`, `searchStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["siteSonar.started"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"siteSonar.completed":{"post":{"tags":["webhooks"],"summary":"siteSonar.completed","description":"Facility discovery finishes for a patient. Sent on every run, whatever the result.\n\nPart of the **Site Sonar** group (`siteSonar`): Facility discovery starts or finishes for a patient.\n\nEvery event in the group sends the same `data`: `id`, `siteSonar`, `searchStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["siteSonar.completed"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"patientHistories.started":{"post":{"tags":["webhooks"],"summary":"patientHistories.started","description":"Clinical-history retrieval starts for a patient.\n\nPart of the **Patient Histories** group (`patientHistories`): Clinical-history retrieval starts or finishes for a patient.\n\nEvery event in the group sends the same `data`: `id`, `patientHistories`, `searchStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["patientHistories.started"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"patientHistories.completed":{"post":{"tags":["webhooks"],"summary":"patientHistories.completed","description":"Clinical-history retrieval finishes for a patient. Sent on every run, whatever the result.\n\nPart of the **Patient Histories** group (`patientHistories`): Clinical-history retrieval starts or finishes for a patient.\n\nEvery event in the group sends the same `data`: `id`, `patientHistories`, `searchStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["patientHistories.completed"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"ehrSearch.started":{"post":{"tags":["webhooks"],"summary":"ehrSearch.started","description":"Electronic health record discovery starts for a patient.\n\nPart of the **EHR Search** group (`ehrSearch`): Electronic health record discovery starts or finishes for a patient.\n\nEvery event in the group sends the same `data`: `id`, `ehrSearch`, `searchStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["ehrSearch.started"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"ehrSearch.completed":{"post":{"tags":["webhooks"],"summary":"ehrSearch.completed","description":"Electronic health record discovery finishes for a patient. Sent on every run, whatever the result.\n\nPart of the **EHR Search** group (`ehrSearch`): Electronic health record discovery starts or finishes for a patient.\n\nEvery event in the group sends the same `data`: `id`, `ehrSearch`, `searchStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["ehrSearch.completed"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"patient.created":{"post":{"tags":["webhooks"],"summary":"patient.created","description":"A patient is created.\n\nPart of the **Patients** group (`patient`): A patient is created, their profile changes, or their overall search status changes.\n\nEvery event in the group sends the same `data`: `id`, `firstName`, `lastName`, `dateOfBirth`, `sex`, `zipCodes`, `mobile`, `email`, `createdAt`, `searchStatus`, `authorizationStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["patient.created"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"patient.updated":{"post":{"tags":["webhooks"],"summary":"patient.updated","description":"A patient's profile details change: name, date of birth, sex, contact details or ZIP codes.\n\nPart of the **Patients** group (`patient`): A patient is created, their profile changes, or their overall search status changes.\n\nEvery event in the group sends the same `data`: `id`, `firstName`, `lastName`, `dateOfBirth`, `sex`, `zipCodes`, `mobile`, `email`, `createdAt`, `searchStatus`, `authorizationStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["patient.updated"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"patient.searchStatusChanged":{"post":{"tags":["webhooks"],"summary":"patient.searchStatusChanged","description":"A patient's overall search status changes.\n\nPart of the **Patients** group (`patient`): A patient is created, their profile changes, or their overall search status changes.\n\nEvery event in the group sends the same `data`: `id`, `firstName`, `lastName`, `dateOfBirth`, `sex`, `zipCodes`, `mobile`, `email`, `createdAt`, `searchStatus`, `authorizationStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["patient.searchStatusChanged"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"authorization.statusChanged":{"post":{"tags":["webhooks"],"summary":"authorization.statusChanged","description":"A patient's authorization status changes.\n\nPart of the **Authorization** group (`authorization`): A patient's authorization is reviewed or needs attention.\n\nEvery event in the group sends the same `data`: `id`, `authorizationStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["authorization.statusChanged"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"authorization.approved":{"post":{"tags":["webhooks"],"summary":"authorization.approved","description":"A patient's authorization is approved.\n\nPart of the **Authorization** group (`authorization`): A patient's authorization is reviewed or needs attention.\n\nEvery event in the group sends the same `data`: `id`, `authorizationStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["authorization.approved"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"authorization.needsAttention":{"post":{"tags":["webhooks"],"summary":"authorization.needsAttention","description":"A patient's authorization moves to a status other than approved, such as awaiting review or missing.\n\nPart of the **Authorization** group (`authorization`): A patient's authorization is reviewed or needs attention.\n\nEvery event in the group sends the same `data`: `id`, `authorizationStatus`, `projectId`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["authorization.needsAttention"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"clinicalData.added":{"post":{"tags":["webhooks"],"summary":"clinicalData.added","description":"A run adds clinical data a patient did not already have, with counts of what is new by type. A run that adds nothing sends nothing. Webhook endpoints only.\n\nPart of the **Clinical Data** group (`clinicalData`): A run adds clinical data the patient did not already have.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["clinicalData.added"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The payload of a `clinicalDataAdded` delivery.","required":["patients"],"properties":{"patients":{"type":"array","items":{"$ref":"#/components/schemas/PatientClinicalDataAdded"},"description":"Each patient a run added clinical content to that they did not already\nhave. Patients from one company and one environment are batched into a\nsingle delivery."}}}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"note.created":{"post":{"tags":["webhooks"],"summary":"note.created","description":"A note is added to a patient or a record request.\n\nPart of the **Notes** group (`note`): A note is added or edited.\n\nEvery event in the group sends the same `data`: `id`, `content`, `createdAt`, `updatedAt`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["note.created"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"note.updated":{"post":{"tags":["webhooks"],"summary":"note.updated","description":"A note's text is edited.\n\nPart of the **Notes** group (`note`): A note is added or edited.\n\nEvery event in the group sends the same `data`: `id`, `content`, `createdAt`, `updatedAt`, `companyId`. A field your role cannot see is left out.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["note.updated"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The event group's fixed payload: every event in a group sends the same\nfields. Fields your role cannot see are left out."}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}},"aiResearch.completed":{"post":{"tags":["webhooks"],"summary":"aiResearch.completed","description":"An AI research run you started finishes. Sent only to your own endpoints.\n\nPart of the **AI Research** group (`aiResearch`): An AI research run you started finishes. Sent only to your own endpoints, whatever their project filter.\n\nDelivered as a POST to your endpoint URL with a 10-second timeout, signed, retried until acknowledged, and carrying `version: \"events\"`. Dedupe on `id`. See [Outbound webhooks](#outbound-webhooks).","parameters":[{"name":"X-Webhook-Id","in":"header","description":"The delivery id (matches the envelope `id`). Stable across retries, so a resend is recognisable — dedupe on it.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Webhook-Timestamp","in":"header","description":"Unix seconds at which this attempt was signed. The signature covers \"{timestamp}.{body}\", so enforce a freshness window on this value to reject replayed requests.","required":true,"schema":{"type":"string"}},{"name":"X-Webhook-Signature","in":"header","description":"HMAC-SHA256 hex digest of \"{X-Webhook-Timestamp}.{raw_body}\", keyed by the endpoint's signing-secret UUID bytes (the 16 raw bytes, not the UUID's string form). During a secret rotation this carries multiple comma-separated signatures; accept the request if any matches, comparing in constant time.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The JSON body of an event delivery.","required":["id","timestamp","version","eventType","resource","changed","data"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique delivery id, stable across retries. Dedupe on it; it is also\nsent in the `X-Webhook-Id` header."},"timestamp":{"type":"string","format":"date-time","description":"When the event was emitted. Not the time of this attempt, which is the\nsigned `X-Webhook-Timestamp` header."},"version":{"$ref":"#/components/schemas/WebhookEndpointVersion","description":"Always `events`. Lets a receiver tell these deliveries from the\ndeprecated column-subscription deliveries, which have no `version`."},"eventType":{"type":"string","description":"The event's name, such as `siteSonar.completed`.","enum":["aiResearch.completed"]},"resource":{"type":"string","description":"Path to the record the event is about, such as\n`companies/1/projects/p/patients/pat`. GET it with your API key for the\nfull resource. For a clinical-data event it is the company, and for an\nAI research event the researched site."},"changed":{"type":"array","items":{"type":"string"},"description":"The payload fields whose value changed, such as `[\"status\"]`. Empty\nwhen the event is not a change, such as a `.created` or\n`.followUpDue` event."},"data":{"type":"object","description":"The payload of an `aiResearchCompleted` delivery: the site whose AI research\nfinished, and where to see it.","required":["siteId","siteName","url"],"properties":{"siteId":{"type":"string","description":"ID of the site that was researched."},"siteName":{"type":"string","description":"The site's name."},"url":{"type":"string","description":"Link to the site in the Hermes Health web app."}}}}}}},"required":true},"responses":{"2XX":{"description":"Consumer acknowledges receipt. A delivery answered with anything else is retried, except the deprecated two-field `eventType` / `data` deliveries, which are sent once."}}}}}}