This page is part of the HL7 Tools Extension IG (v0.2.0: Release - Informative) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 0.8.0. For a full list of available versions, see the Directory of published versions
| Draft as of 2024-04-26 | Maturity Level: 2 |
Definitions for the CDSHooksRequest logical model.
Guidance on how to interpret the contents of this table can be found here
| 0. CDSHooksRequest | |
| Definition | The response to the discovery endpoint |
| Short | The response to the discovery endpoint |
| Logical Model | Instances of this logical model are not marked to be the target of a Reference |
| Invariants | cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified (fhirAuthorization.exists() implies fhirServer.exists()) |
| 2. CDSHooksRequest.hook | |
| Definition | The hook that triggered this CDS Service call |
| Short | The hook that triggered this CDS Service call |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 4. CDSHooksRequest.hookInstance | |
| Definition | While working in the CDS Client, a user can perform multiple actions in series or in parallel. For example, a clinician might prescribe two drugs in a row; each prescription action would be assigned a unique hookInstance. This allows a CDS Service to uniquely identify each hook invocation |
| Short | A universally unique identifier (UUID) for this particular hook call |
| Comments | Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable. |
| Control | 1..1 |
| Type | uuid |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| String Format | When this element is read urn:uuid:is prefixed to the value before validation |
| 6. CDSHooksRequest.fhirServer | |
| Definition | The base URL of the CDS Client's FHIR server. If fhirAuthorization is provided, this field is REQUIRED. The scheme MUST be https when production data is exchanged |
| Short | The base URL of the CDS Client's FHIR server |
| Control | 0..1 |
| Type | url |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 8. CDSHooksRequest.fhirAuthorization | |
| Definition | A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token |
| Short | A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token |
| Control | 0..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement |
| Invariants | cds-r-2: If the granted SMART scopes include patient scopes (i.e. 'patient/'), the patient field SHOULD be populated to identify the FHIR id of that patient. (scope.contains('Patient/') implies patient.exists()) |
| 10. CDSHooksRequest.fhirAuthorization.accessToken | |
| Definition | This is the OAuth 2.0 access token that provides access to the FHIR server |
| Short | This is the OAuth 2.0 access token that provides access to the FHIR server |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nameaccess_token |
| 12. CDSHooksRequest.fhirAuthorization.tokenType | |
| Definition | Fixed value: Bearer |
| Short | Fixed value: Bearer |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nametoken_type |
| Fixed Value | Bearer |
| 14. CDSHooksRequest.fhirAuthorization.expiresIn | |
| Definition | The lifetime in seconds of the access token. |
| Short | The lifetime in seconds of the access token. |
| Control | 1..1 |
| Type | integer |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nameexpires_in |
| 16. CDSHooksRequest.fhirAuthorization.scope | |
| Definition | The scopes the access token grants the CDS Service |
| Short | The scopes the access token grants the CDS Service |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 18. CDSHooksRequest.fhirAuthorization.subject | |
| Definition | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Short | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 20. CDSHooksRequest.fhirAuthorization.patient | |
| Definition | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Short | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Control | 0..1 |
| Type | id |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 22. CDSHooksRequest.context | |
| Definition | Hook-specific contextual data that the CDS service will need |
| Short | Hook-specific contextual data that the CDS service will need |
| Control | 1..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHookContext |
| Type Specifiers | If %resource.hook = 'patient-view' then the type is CDSHookPatientViewContextIf %resource.hook = 'order-sign' then the type is CDSHookOrderSignContextIf %resource.hook = 'order-select' then the type is CDSHookOrderSelectContext |
| 24. CDSHooksRequest.prefetch | |
| Definition | An object containing key/value pairs of FHIR queries that this Request is requesting the CDS Client to perform and provide on each Request call. The key is a string that describes the type of data being requested and the value is a string representing the FHIR query |
| Short | Key/value pairs of FHIR queries the CDS Client provides on each call |
| Control | 0..* |
| Type | Base |
| JSON Format | This repeating object is represented as a single JSON object with named properties. The name of the property (key) is the value of thekey child |
| 26. CDSHooksRequest.prefetch.key | |
| Definition | Key of FHIR query - name for client to use when sending to Request |
| Short | Key of FHIR query - name for client to use when sending to Request |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 28. CDSHooksRequest.prefetch.value | |
| Definition | Value of FHIR query - FHIR Query for client to perform |
| Short | Value of FHIR query - FHIR Query for client to perform |
| Control | 1..1 |
| Type | Resource |
| ID Expectation | Id may or not be present (this is the default for elements but not resources) |
| JSON Format | This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes) |
Guidance on how to interpret the contents of this table can be found here
| 0. CDSHooksRequest | |
| Definition | The response to the discovery endpoint Base definition for all types defined in FHIR type system. |
| Short | The response to the discovery endpointBase for all types and resources |
| Control | 0..* |
| Is Modifier | false |
| Logical Model | Instances of this logical model are not marked to be the target of a Reference |
| Invariants | cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified (fhirAuthorization.exists() implies fhirServer.exists()) |
| 2. CDSHooksRequest.hook | |
| Definition | The hook that triggered this CDS Service call |
| Short | The hook that triggered this CDS Service call |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 4. CDSHooksRequest.hookInstance | |
| Definition | While working in the CDS Client, a user can perform multiple actions in series or in parallel. For example, a clinician might prescribe two drugs in a row; each prescription action would be assigned a unique hookInstance. This allows a CDS Service to uniquely identify each hook invocation |
| Short | A universally unique identifier (UUID) for this particular hook call |
| Comments | Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable. |
| Control | 1..1 |
| Type | uuid |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| String Format | When this element is read urn:uuid:is prefixed to the value before validation |
| 6. CDSHooksRequest.fhirServer | |
| Definition | The base URL of the CDS Client's FHIR server. If fhirAuthorization is provided, this field is REQUIRED. The scheme MUST be https when production data is exchanged |
| Short | The base URL of the CDS Client's FHIR server |
| Control | 0..1 |
| Type | url |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 8. CDSHooksRequest.fhirAuthorization | |
| Definition | A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token |
| Short | A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token |
| Control | 0..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement |
| Invariants | cds-r-2: If the granted SMART scopes include patient scopes (i.e. 'patient/'), the patient field SHOULD be populated to identify the FHIR id of that patient. (scope.contains('Patient/') implies patient.exists()) |
| 10. CDSHooksRequest.fhirAuthorization.accessToken | |
| Definition | This is the OAuth 2.0 access token that provides access to the FHIR server |
| Short | This is the OAuth 2.0 access token that provides access to the FHIR server |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nameaccess_token |
| 12. CDSHooksRequest.fhirAuthorization.tokenType | |
| Definition | Fixed value: Bearer |
| Short | Fixed value: Bearer |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nametoken_type |
| Fixed Value | Bearer |
| 14. CDSHooksRequest.fhirAuthorization.expiresIn | |
| Definition | The lifetime in seconds of the access token. |
| Short | The lifetime in seconds of the access token. |
| Control | 1..1 |
| Type | integer |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nameexpires_in |
| 16. CDSHooksRequest.fhirAuthorization.scope | |
| Definition | The scopes the access token grants the CDS Service |
| Short | The scopes the access token grants the CDS Service |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 18. CDSHooksRequest.fhirAuthorization.subject | |
| Definition | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Short | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 20. CDSHooksRequest.fhirAuthorization.patient | |
| Definition | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Short | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Control | 0..1 |
| Type | id |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 22. CDSHooksRequest.context | |
| Definition | Hook-specific contextual data that the CDS service will need |
| Short | Hook-specific contextual data that the CDS service will need |
| Control | 1..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHookContext |
| Type Specifiers | If %resource.hook = 'patient-view' then the type is CDSHookPatientViewContextIf %resource.hook = 'order-sign' then the type is CDSHookOrderSignContextIf %resource.hook = 'order-select' then the type is CDSHookOrderSelectContext |
| 24. CDSHooksRequest.prefetch | |
| Definition | An object containing key/value pairs of FHIR queries that this Request is requesting the CDS Client to perform and provide on each Request call. The key is a string that describes the type of data being requested and the value is a string representing the FHIR query |
| Short | Key/value pairs of FHIR queries the CDS Client provides on each call |
| Control | 0..* |
| Type | Base |
| JSON Format | This repeating object is represented as a single JSON object with named properties. The name of the property (key) is the value of thekey child |
| 26. CDSHooksRequest.prefetch.key | |
| Definition | Key of FHIR query - name for client to use when sending to Request |
| Short | Key of FHIR query - name for client to use when sending to Request |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 28. CDSHooksRequest.prefetch.value | |
| Definition | Value of FHIR query - FHIR Query for client to perform |
| Short | Value of FHIR query - FHIR Query for client to perform |
| Control | 1..1 |
| Type | Resource |
| ID Expectation | Id may or not be present (this is the default for elements but not resources) |
| JSON Format | This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes) |
Guidance on how to interpret the contents of this table can be found here
| 0. CDSHooksRequest | |
| Definition | The response to the discovery endpoint |
| Short | The response to the discovery endpoint |
| Control | 0..* |
| Is Modifier | false |
| Logical Model | Instances of this logical model are not marked to be the target of a Reference |
| Invariants | cds-r-1: if fhirAuthorization details are provided, a fhirServer SHALL be specified (fhirAuthorization.exists() implies fhirServer.exists()) |
| 2. CDSHooksRequest.extension | |
| Definition | A JSON object that has properties where the names are defined by the extension definitions |
| Short | Object that has Named Extension Properties |
| Comments | Extension structures SHOULD use a strategy for naming that ensures global uniqueness, such as reverse-domain-name notation, e.g. com.cds-hooks.sandbox.myextension-practitionerspecialty |
| Control | 0..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement |
| Extension Style | This element can be extended by named JSON elements |
| 4. CDSHooksRequest.hook | |
| Definition | The hook that triggered this CDS Service call |
| Short | The hook that triggered this CDS Service call |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 6. CDSHooksRequest.hookInstance | |
| Definition | While working in the CDS Client, a user can perform multiple actions in series or in parallel. For example, a clinician might prescribe two drugs in a row; each prescription action would be assigned a unique hookInstance. This allows a CDS Service to uniquely identify each hook invocation |
| Short | A universally unique identifier (UUID) for this particular hook call |
| Comments | Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable. |
| Control | 1..1 |
| Type | uuid |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| String Format | When this element is read urn:uuid:is prefixed to the value before validation |
| 8. CDSHooksRequest.fhirServer | |
| Definition | The base URL of the CDS Client's FHIR server. If fhirAuthorization is provided, this field is REQUIRED. The scheme MUST be https when production data is exchanged |
| Short | The base URL of the CDS Client's FHIR server |
| Control | 0..1 |
| Type | url |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 10. CDSHooksRequest.fhirAuthorization | |
| Definition | A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token |
| Short | A structure holding an OAuth 2.0 bearer access token granting the CDS Service access to FHIR resources, along with supplemental information relating to the token |
| Control | 0..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement |
| Invariants | cds-r-2: If the granted SMART scopes include patient scopes (i.e. 'patient/'), the patient field SHOULD be populated to identify the FHIR id of that patient. (scope.contains('Patient/') implies patient.exists()) |
| 12. CDSHooksRequest.fhirAuthorization.extension | |
| Definition | A JSON object that has properties where the names are defined by the extension definitions |
| Short | Object that has Named Extension Properties |
| Comments | Extension structures SHOULD use a strategy for naming that ensures global uniqueness, such as reverse-domain-name notation, e.g. com.cds-hooks.sandbox.myextension-practitionerspecialty |
| Control | 0..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement |
| Extension Style | This element can be extended by named JSON elements |
| 14. CDSHooksRequest.fhirAuthorization.accessToken | |
| Definition | This is the OAuth 2.0 access token that provides access to the FHIR server |
| Short | This is the OAuth 2.0 access token that provides access to the FHIR server |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nameaccess_token |
| 16. CDSHooksRequest.fhirAuthorization.tokenType | |
| Definition | Fixed value: Bearer |
| Short | Fixed value: Bearer |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nametoken_type |
| Fixed Value | Bearer |
| 18. CDSHooksRequest.fhirAuthorization.expiresIn | |
| Definition | The lifetime in seconds of the access token. |
| Short | The lifetime in seconds of the access token. |
| Control | 1..1 |
| Type | integer |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| JSON Format | This property appears in JSON with the property nameexpires_in |
| 20. CDSHooksRequest.fhirAuthorization.scope | |
| Definition | The scopes the access token grants the CDS Service |
| Short | The scopes the access token grants the CDS Service |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 22. CDSHooksRequest.fhirAuthorization.subject | |
| Definition | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Short | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Control | 1..1 |
| Type | string |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 24. CDSHooksRequest.fhirAuthorization.patient | |
| Definition | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Short | The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server |
| Control | 0..1 |
| Type | id |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 26. CDSHooksRequest.context | |
| Definition | Hook-specific contextual data that the CDS service will need |
| Short | Hook-specific contextual data that the CDS service will need |
| Control | 1..1 |
| Type | http://hl7.org/fhir/tools/StructureDefinition/CDSHookContext |
| Type Specifiers | If %resource.hook = 'patient-view' then the type is CDSHookPatientViewContextIf %resource.hook = 'order-sign' then the type is CDSHookOrderSignContextIf %resource.hook = 'order-select' then the type is CDSHookOrderSelectContext |
| 28. CDSHooksRequest.prefetch | |
| Definition | An object containing key/value pairs of FHIR queries that this Request is requesting the CDS Client to perform and provide on each Request call. The key is a string that describes the type of data being requested and the value is a string representing the FHIR query |
| Short | Key/value pairs of FHIR queries the CDS Client provides on each call |
| Control | 0..* |
| Type | Base |
| JSON Format | This repeating object is represented as a single JSON object with named properties. The name of the property (key) is the value of thekey child |
| 30. CDSHooksRequest.prefetch.key | |
| Definition | Key of FHIR query - name for client to use when sending to Request |
| Short | Key of FHIR query - name for client to use when sending to Request |
| Control | 1..1 |
| Type | code |
| Primitive Value | This primitive element may be present, or absent, or replaced by an extension |
| 32. CDSHooksRequest.prefetch.value | |
| Definition | Value of FHIR query - FHIR Query for client to perform |
| Short | Value of FHIR query - FHIR Query for client to perform |
| Control | 1..1 |
| Type | Resource |
| ID Expectation | Id may or not be present (this is the default for elements but not resources) |
| JSON Format | This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes) |