{
  "resourceType": "OperationDefinition",
  "id": "indexing-status",
  "url": "https://fhir.apps.health/OperationDefinition/indexing-status",
  "title": "Indexing status",
  "description": "Report which search parameters are defined and indexed on the store this tenant is bound to, and\nwhether an indexing job is running there right now.\n\n    POST [base]/$indexing-status\n\n**This is an administrative operation.** The right that admits it is granted to an administrative\nrole, not to an integration. It is described here because it is the only way to answer a question\nthe [server CapabilityStatement](CapabilityStatement-nexus-emr-server.md) raises: two of the search\nparameters that statement declares are not base R4, and a store that has never been given their\ndefinitions ignores them silently rather than failing. This operation says whether a given tenant's\nstore has them.\n\n**It takes no input and changes nothing.** Post it with no body. A body, if sent, is ignored\nentirely: there are no input parameters and no filter.\n\n**`affectsState` is `false`, and the operation is still POST-only.** The `GET` form is refused at\n`403` before it reaches the operation, because the right that admits this operation is spelled as a\nwrite. Do not build the `GET` call.\n\n### Reading the reply\n\nA reply is a `Parameters` at `200`, carrying three scalars and one repeating `searchParameters`\npart, one occurrence per parameter known to this tenant's store. The operation declares no refusal\nvocabulary of its own: there is nothing in a request for it to reject, so anything other than a\n`200` is the gateway's generic handling of a fault rather than a statement about indexing.\n\n**`isFullyIndexed` is narrower than it sounds.** It is `true` only when every CUSTOM parameter is\npresent, matches its expected definition, and no job is running. A built-in parameter reported with\n`searchParameterIndexed` `false` does **not** make it `false`. To ask \"is the parameter I depend on\nusable\", read that parameter's own entry; do not read the summary flag.\n\n**`currentIndexingIntensity` is defaulted, not measured.** When nothing is running it reads `Low`.\nIt is a claim about a running job only when `isIndexing` is `true`; read `isIndexing` first.\n\n**An absent entry is not a negative answer.** Built-in parameters are listed only where the\nunderlying store can report them. On a store that cannot, the reply carries the custom parameters\nalone, and the absence of a base R4 parameter says nothing about whether searches using it work.\n\nEntries are not ordered by contract. Match on `searchParameterUrl`, which is the parameter's\ncanonical, compared exactly.\n\n### What it does not tell you\n\nThere is no job identifier, no start time, no percentage complete and no estimate. Two replies\ncannot be compared to derive progress beyond the booleans they carry. A parameter that is being\nindexed reports `searchParameterIsCurrentlyIndexing` `true` and nothing further, and a job that has\nended -- whether it finished, was abandoned, or was discarded because the store could not perform\nit -- simply stops appearing.",
  "name": "IndexingStatus",
  "status": "draft",
  "kind": "operation",
  "experimental": false,
  "publisher": "WELLSTAR Technologies Corp.",
  "affectsState": false,
  "code": "indexing-status",
  "system": true,
  "type": false,
  "instance": false,
  "parameter": [
    {
      "name": "isFullyIndexed",
      "use": "out",
      "min": 1,
      "max": "1",
      "type": "boolean",
      "documentation": "Whether every CUSTOM search parameter is present on the store, matches its expected definition, and is not mid-rebuild. NARROWER THAN THE NAME SUGGESTS: built-in parameters are excluded from this judgement, so a built-in reported as not indexed leaves this `true`. It is also `false` for the whole time any job is running, whatever that job is indexing. Read a specific parameter's own entry rather than this flag when the question is whether one search is usable."
    },
    {
      "name": "isIndexing",
      "use": "out",
      "min": 1,
      "max": "1",
      "type": "boolean",
      "documentation": "Whether any indexing job is running for this tenant right now, for any parameter. Indexing is serialised per tenant, so this being `true` is also the reason a request to start another one is refused."
    },
    {
      "name": "currentIndexingIntensity",
      "use": "out",
      "min": 1,
      "max": "1",
      "type": "string",
      "documentation": "The intensity of the running work, as `Low`, `Medium` or `High`, published as a `valueString`. Where several jobs run, it is the highest of them. A DEFAULTED VALUE, NOT A MEASUREMENT: when `isIndexing` is `false` this reads `Low` and means nothing. Read `isIndexing` first."
    },
    {
      "name": "searchParameters",
      "use": "out",
      "min": 0,
      "max": "*",
      "documentation": "One search parameter known to this tenant's store, and its state. Repeats once per parameter. Custom parameters are always listed; built-in parameters are listed only where the underlying store can report them, so an absent entry means the store did not report the parameter, NOT that searches using it fail. Not ordered by contract.",
      "part": [
        {
          "name": "searchParameterUrl",
          "use": "out",
          "min": 1,
          "max": "1",
          "type": "string",
          "documentation": "The parameter's canonical, published as a `valueString` rather than a `uri`. This is the key: match on it exactly. It is also the value the index-search-parameter operation takes."
        },
        {
          "name": "searchParameterIndexed",
          "use": "out",
          "min": 1,
          "max": "1",
          "type": "boolean",
          "documentation": "Whether this parameter is usable for search on this store. For a custom parameter this is a deep comparison and not a presence check: a definition that exists but differs from the one expected reports `false`, and it additionally requires that any built-in parameter sharing the same canonical is itself indexed. `false` here is the condition under which a search using this parameter is ignored rather than refused."
        },
        {
          "name": "searchParameterIsCurrentlyIndexing",
          "use": "out",
          "min": 1,
          "max": "1",
          "type": "boolean",
          "documentation": "Whether a running job claims this parameter. It carries no progress and no estimate; when the job ends this returns to `false` whether the work finished or was abandoned."
        },
        {
          "name": "searchParameterIsBuiltIn",
          "use": "out",
          "min": 1,
          "max": "1",
          "type": "boolean",
          "documentation": "Whether the parameter comes from the base specification (`true`) or is declared by this estate (`false`). It changes how the entry is judged: only the `false` entries count toward `isFullyIndexed`."
        }
      ]
    }
  ]
}
