> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Result format

`GET /v1/jobs/{id}/result` returns one of two shapes, told apart by `type`. The
[API reference](/formfill/api) has the full JSON Schema of each; this
page explains what the fields mean.

## Questionnaire result

```json
{
  "id": "job_8f2c1d0e9b7a6c5d4e3f2a1b",
  "type": "questionnaire",
  "questionnaire_response": { "resourceType": "QuestionnaireResponse", "...": "..." },
  "stats": { "...": "..." },
  "pipeline_version": "2026.10.12-1"
}
```

| Field                    | Meaning                                                                 |
| ------------------------ | ----------------------------------------------------------------------- |
| `id`                     | The job id                                                              |
| `type`                   | `questionnaire`                                                         |
| `questionnaire_response` | A FHIR R4 QuestionnaireResponse answering your Questionnaire; see below |
| `stats`                  | Counts for the fill; see [Stats](#stats)                                |
| `pipeline_version`       | The API release that produced the result                                |

### The QuestionnaireResponse

| Element         | Content                                                                                                                                                                                                                                           |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `resourceType`  | `QuestionnaireResponse`                                                                                                                                                                                                                           |
| `status`        | `completed`, or `in-progress` when a required item is unanswered (`stats.required_missing` lists them)                                                                                                                                            |
| `authored`      | When the response was produced (UTC)                                                                                                                                                                                                              |
| `questionnaire` | Your Questionnaire's `url`, when it has one                                                                                                                                                                                                       |
| `item`          | One node per answered item, nested as in your Questionnaire. Each node has the item's `linkId` and `text`, its `answer` list, and its answered children in `item`. Items without an answer, and groups with no answered item inside, are left out |

A repeating item holds one `answer` per value. A repeating group occurs once per
entry: several sibling nodes that share the group's `linkId`.

Each answer's `value[x]` follows the item's `type`:

| Item type                                                                            | Answer                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `choice`, `coding`, `open-choice`, or any item with `answerOption`s                  | The chosen option as given in your Questionnaire: `valueCoding` with its `system`, `code` and `display`, or the option's own `valueString`, `valueInteger`, `valueDate` or `valueTime` |
| Open items (`open-choice`, `answerConstraint` `optionsOrString`) when no option fits | `valueString`: the value as the document states it                                                                                                                                     |
| `answerConstraint` `optionsOrType` when no option fits                               | A value of the item's type; for a coded item, a `valueCoding` with a `display` only, never an invented `code`                                                                          |
| `quantity`                                                                           | `valueQuantity`: `value`, plus `unit`, `system` and `code` from the item's `questionnaire-unit` extension                                                                              |
| `string`, `text`                                                                     | `valueString`                                                                                                                                                                          |
| `decimal`, `integer`                                                                 | `valueDecimal`, `valueInteger`                                                                                                                                                         |
| `boolean`                                                                            | `valueBoolean`                                                                                                                                                                         |
| `date`, `dateTime`, `time`                                                           | `valueDate`, `valueDateTime`, `valueTime`                                                                                                                                              |
| `url`                                                                                | `valueUri`                                                                                                                                                                             |

### Extensions

Answers carry emtelligent extensions alongside their value:

```json
{
  "valueCoding": { "system": "http://loinc.org", "code": "LA6560-2", "display": "Oriented" },
  "extension": [
    { "url": "https://emtelligent.com/fhir/StructureDefinition/answer-confidence",
      "valueDecimal": 0.9 },
    { "url": "https://emtelligent.com/fhir/StructureDefinition/answer-evidence",
      "valueString": "A/O x3" }
  ]
}
```

| Extension `url`                                                      | Value                                  | Present on                                                | Meaning                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `https://emtelligent.com/fhir/StructureDefinition/answer-confidence` | `valueDecimal`, 0 to 1                 | Answers taken from the document, and calculated answers   | The service's estimate of how well the document supports the answer; see [Confidence](/formfill/guides/results-and-evidence#confidence). On a calculated answer, the lowest confidence of the answers it was calculated from                                                   |
| `https://emtelligent.com/fhir/StructureDefinition/answer-evidence`   | `valueString`                          | Every answer taken from the document                      | The verbatim quote the answer was taken from, without offsets; see [Evidence](/formfill/guides/results-and-evidence#evidence)                                                                                                                                                  |
| `https://emtelligent.com/fhir/StructureDefinition/answer-derivation` | `valueCode`: `calculated` or `implied` | Answers the service derived, instead of `answer-evidence` | `calculated`: a score your form defines as a sum of option weights, calculated from the answers chosen. `implied`: a yes/no control implied by an answered item it gates. See [Answers the service derives](/formfill/guides/results-and-evidence#answers-the-service-derives) |

Each extension appears at most once on an answer, and only on
`QuestionnaireResponse.item.answer`. Software that does not know them can ignore
them: the answers are complete without them.

## Questions result

```json
{
  "id": "job_8f2c1d0e9b7a6c5d4e3f2a1b",
  "type": "questions",
  "answers": [ { "...": "..." } ],
  "stats": { "...": "..." },
  "pipeline_version": "2026.10.12-1"
}
```

`answers` holds one object per question, in the order you asked them:

| Field        | Meaning                                                                                                                                                     |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`         | Your question's `id`; where you gave none, `q1`, `q2`, … by its position                                                                                    |
| `question`   | The question text                                                                                                                                           |
| `type`       | `text`, `number`, `boolean`, `date` or `choice`                                                                                                             |
| `status`     | `answered`, `not_found` or `unmatched_option`; see [Questions](/formfill/guides/questions#the-result)                                                       |
| `answer`     | The typed answer; `null` when not found. For a `multiple` question, a list of `{answer, confidence, evidence}` objects, one per value (`[]` when not found) |
| `confidence` | 0 to 1, when answered                                                                                                                                       |
| `evidence`   | `{quote, spans}` when answered: the verbatim quote and where it occurs in `document.text`; see [Evidence](/formfill/guides/results-and-evidence#evidence)   |

## Stats

Both result types carry the same `stats`:

| Field              | Meaning                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `answerable`       | Items or questions that can hold an answer (not groups or display items)                                                |
| `answered`         | Items or questions that received at least one answer                                                                    |
| `answer_values`    | Total answers; a repeating item or `multiple` question may hold several                                                 |
| `unmatched_option` | Coded answers dropped because they matched none of your options                                                         |
| `suppressed`       | Answers dropped because your form's `enableWhen` logic disables the item                                                |
| `evidence_located` | Answers whose evidence quote was found in the document                                                                  |
| `required_missing` | linkIds of required items your form logic enables that the document does not answer. Always `[]` for a questions result |
| `ungrounded`       | Free-text answers dropped because the document does not support them                                                    |