Questionnaire Profile¶
| Canonical | ../StructureDefinition/nexus-emr-core-questionnaire |
|---|---|
| Status | draft (experimental) · 1.26.0 |
| Base | Questionnaire (constraint) |
| Source | FSH · JSON |
A Nexus EMR form definition: what it asks, what it produces, and where its answers land in the chart.
TypedFhir API / Pydantic schema
The typed accessor surface Questionnaire exposes for Questionnaire — generated from this IG's compiled profile; each typed accessor has a validating raw-FHIR twin (xRaw) where marked. The three ports are parity-enforced.
The AI-facing shape: from typed_fhir.facade.generated.schemas import QuestionnaireSchema — model_json_schema() is a structured-output / tool definition; instantiating validates an extraction. Generated source.
class QuestionnaireSchema(BaseModel):
"""AI-facing shape of the Questionnaire profile: the facade's typed accessor
surface (curated + salient fields) as a pydantic model. `model_json_schema()` is a
structured-output / tool schema; instantiating validates an extraction."""
model_config = ConfigDict(extra="forbid")
url: str | None = Field(
None,
description=(
"Canonical identity of this form. An absolute URI that is used to identify this "
"questionnaire when it is referenced in a specification, model, design or an "
"instance; also called its canonical identifier. This SHOULD be globally unique and "
"SHOULD be a literal address at which at which an authoritative instance of this "
"questionnaire is (or will be) published. This URL can be the target of a canonical "
"reference. It SHALL remain the same when the questionnaire is stored on different "
"servers. Note: Required here though 0..1 in R4. This is the target of "
"`QuestionnaireResponse.questionnaire`; a response to a form with no canonical cannot "
"be interpreted beyond its own display text. Questionnaire.url — 1..1"
),
)
version: str | None = Field(
None,
description=(
"Business version of the form. The identifier that is used to identify this version "
"of the questionnaire when it is referenced in a specification, model, design or "
"instance. This is an arbitrary value managed by the questionnaire author and is not "
"expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) "
"if a managed version is not available. There is also no expectation that versions "
"can be placed in a lexicographical sequence. Note: Required here though 0..1 in R4. "
"Forms change, and a response is only interpretable against the version that was "
"answered. Form authoring systems already version their definitions; nothing is being "
"asked for that they do not already track. Questionnaire.version — 1..1"
),
)
name: str | None = Field(
None,
description=(
"Machine-readable name. A natural language name identifying the questionnaire. This "
"name should be usable as an identifier for the module by machine processing "
"applications such as code generation. Note: The name is not expected to be globally "
"unique. The name should be a simple alphanumeric type name to ensure that it is "
"machine-processing friendly. Questionnaire.name — 0..1"
),
)
title: str | None = Field(
None,
description=(
"The form's name, as shown in a picker. A short, descriptive, user-friendly title for "
"the questionnaire. Note: Required for the same reason `List.title` is required on a "
"template: a form nobody can name is a form nobody can choose. Questionnaire.title — "
"1..1"
),
)
status: Literal["active", "draft", "retired", "unknown"] | None = Field(
None,
description=(
"draft | active | retired | unknown. The status of this questionnaire. Enables "
"tracking the life-cycle of the content. Note: `retired` is how a form stops being "
"offered. As with templates, retiring is a status change and not a delete -- "
"responses to a retired form must stay interpretable. Questionnaire.status — 1..1"
),
)
date: FuzzyDate | None = Field(
None,
description=(
"Date last changed. The date (and optionally time) when the questionnaire was "
"published. The date must change when the business version changes and it must change "
"if the status code changes. In addition, it should change when the substantive "
"content of the questionnaire changes. Note: Note that this is not the same as the "
"resource last-modified-date, since the resource may be a secondary representation of "
"the questionnaire. Additional specific dates may be added as extensions or be found "
"by consulting Provenances associated with past versions of the resource. "
"Questionnaire.date — 0..1"
),
)
publisher: str | None = Field(
None,
description=(
"Name of the publisher (organization or individual). The name of the organization or "
"individual that published the questionnaire. Note: Usually an organization but may "
"be an individual. The publisher (or steward) of the questionnaire is the "
"organization or individual primarily responsible for the maintenance and upkeep of "
"the questionnaire. This is not necessarily the same individual or organization that "
"developed and initially authored the content. The publisher is the primary point of "
"contact for questions or issues with the questionnaire. This item SHOULD be "
"populated unless the information is available from context. Questionnaire.publisher "
"— 0..1"
),
)
description: str | None = Field(
None,
description=(
"Natural language description of the questionnaire. A free text natural language "
"description of the questionnaire from a consumer's perspective. Note: This "
"description can be used to capture details such as why the questionnaire was built, "
"comments about misuse, instructions for clinical use and interpretation, literature "
"references, examples from the paper world, etc. It is not a rendering of the "
"questionnaire as conveyed in the 'text' field of the resource itself. This item "
"SHOULD be populated unless the information is available from context (e.g. the "
"language of the questionnaire is presumed to be the predominant language in the "
"place the questionnaire was created). Questionnaire.description — 0..1"
),
)
jurisdiction: Concept | None = Field(
None,
description=(
"Intended jurisdiction for questionnaire (if applicable). A legal or geographic "
"region in which the questionnaire is intended to be used. Note: It may be possible "
"for the questionnaire to be used in jurisdictions other than those for which it was "
"originally designed or intended. Questionnaire.jurisdiction — 0..*"
),
)
effective_period: dict | None = Field(
None,
description=(
"When the questionnaire is expected to be used. The period during which the "
"questionnaire content was or is planned to be in active use. Note: The effective "
"period for a questionnaire determines when the content is applicable for usage and "
"is independent of publication and review dates. For example, a measure intended to "
"be used for the year 2016 might be published in 2015. Questionnaire.effectivePeriod "
"— 0..1"
),
)
code: dict | None = Field(
None,
description=(
"Concept that represents the overall questionnaire. An identifier for this question "
"or group of questions in a particular terminology such as LOINC. Questionnaire.code "
"— 0..*"
),
)
item: dict | None = Field(
None,
description=(
"The questions, and where their answers go. A particular question, question grouping "
"or display text that is part of the questionnaire. Note: Constrained here, unlike "
"`QuestionnaireResponse.item`, and the difference is deliberate. A RESPONSE may "
"arrive from an external instrument whose tree we do not govern, so constraining it "
"would make conformant partner data non-conformant. A form DEFINITION in Nexus is one "
"we authored or one we translated inward, so it is held to this shape. Item trees "
"nest arbitrarily deep -- a real intake form in production reaches six levels -- so "
"consumers MUST recurse rather than index positionally. Questionnaire.item — 0..*"
),
)