CDS Hooks Library, published by Clinical Decision Support WG. This guide is not an authorized publication; it is the continuous build for version 2.0.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cds-hooks-library/ and changes regularly. See the Directory of published versions
| Official URL: http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext | Version: 2.0.0-cibuild | ||||
| Standards status: Informative Draft as of 2026-04-22 | Computable Name: CDSHookPatientViewContext | ||||
This structure is defined to allow the FHIR Validator to validate a CDSHooks Patient-View context.
Usages:
You can also check for usages in the FHIR IG Statistics
Description Differentials, Snapshots, and other representations.
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | CDSHookContext | The context for the patient-view hook | |
![]() ![]() |
C | 1..1 | string | The id of the current user. Must be in the format [ResourceType]/[id]. Constraints: ord-1 |
![]() ![]() |
1..1 | id | The FHIR Patient.id of the current patient in context | |
![]() ![]() |
0..1 | id | The FHIR Encounter.id of the current encounter in context | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ord-1 | error | CDSHookPatientViewContext.userId | Must be in the format {type}/{id} |
$this.matches('^[\\d\\w]+\\/[\\d\\w-.]+$')
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | CDSHookContext | The context for the patient-view hook | |
![]() ![]() |
C | 1..1 | string | The id of the current user. Must be in the format [ResourceType]/[id]. Constraints: ord-1 |
![]() ![]() |
1..1 | id | The FHIR Patient.id of the current patient in context | |
![]() ![]() |
0..1 | id | The FHIR Encounter.id of the current encounter in context | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ord-1 | error | CDSHookPatientViewContext.userId | Must be in the format {type}/{id} |
$this.matches('^[\\d\\w]+\\/[\\d\\w-.]+$')
|
Differential View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | CDSHookContext | The context for the patient-view hook | |
![]() ![]() |
C | 1..1 | string | The id of the current user. Must be in the format [ResourceType]/[id]. Constraints: ord-1 |
![]() ![]() |
1..1 | id | The FHIR Patient.id of the current patient in context | |
![]() ![]() |
0..1 | id | The FHIR Encounter.id of the current encounter in context | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ord-1 | error | CDSHookPatientViewContext.userId | Must be in the format {type}/{id} |
$this.matches('^[\\d\\w]+\\/[\\d\\w-.]+$')
|
Snapshot ViewView
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
0..* | CDSHookContext | The context for the patient-view hook | |
![]() ![]() |
C | 1..1 | string | The id of the current user. Must be in the format [ResourceType]/[id]. Constraints: ord-1 |
![]() ![]() |
1..1 | id | The FHIR Patient.id of the current patient in context | |
![]() ![]() |
0..1 | id | The FHIR Encounter.id of the current encounter in context | |
Documentation for this format | ||||
| Id | Grade | Path(s) | Description | Expression |
| ord-1 | error | CDSHookPatientViewContext.userId | Must be in the format {type}/{id} |
$this.matches('^[\\d\\w]+\\/[\\d\\w-.]+$')
|