description: 'This structure is defined to allow the FHIR Validator to validate a CDSHooks Request Body. TODO: This content will be moved to the CDS Hooks specification in the future' package_name: hl7.fhir.uv.tools.r5 derivation: specialization name: CDSHooksRequest type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksRequest elements: hook: {type: code, short: The hook that triggered this CDS Service call, index: 0} hookInstance: {short: A UUID for this particular hook call, type: uuid, index: 1} fhirServer: {type: url, short: The base URL of the CDS Client's FHIR server, index: 2} fhirAuthorization: type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement short: Authorization info for service to use when querying constraint: cds-r-2: {human: '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.', severity: error, expression: scope.contains('Patient/') implies patient.exists()} index: 3 elements: accessToken: {type: string, short: OAuth 2.0 access token giving access to FHIR server, index: 4} tokenType: pattern: {type: code, value: Bearer} short: Bearer type: code index: 5 expiresIn: {type: integer, short: The lifetime in seconds of the access token, index: 6} scope: {type: string, short: Scopes granted by access token, index: 7} subject: {type: string, short: OAuth 2.0 client identifier of the CDS Service, index: 8} patient: {type: id, short: OAuth 2.0 client identifier of the CDS Service, index: 9} required: [accessToken, expiresIn, scope, subject, tokenType] context: {type: 'http://hl7.org/fhir/tools/StructureDefinition/CDSHookContext', short: Contextual data always needed for this hook type, index: 10} prefetch: type: Base short: Additional information requested by service for this hook type array: true index: 11 elements: key: {type: code, short: Key of FHIR query, index: 12} value: {type: Resource, short: Results of query/read, index: 13} required: [key, value] package_version: 0.8.0 class: logical kind: logical url: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksRequest base: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksElement version: 0.8.0 required: [context, hook, hookInstance]