CDS Hooks
3.0.0 - R3 Normative/Trial-Use International flag

CDS Hooks, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 3.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cds-hooks/ and changes regularly. See the Directory of published versions

Logical Model: CDSHooks Request (Logical Definition) - XML Profile

Page standards status: Informative Maturity Level: 1

XML representation of the CDSHooksRequest logical model.

Raw xml | Download


<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="CDSHooksRequest"/>
  <language value="en"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureDefinition CDSHooksRequest</b></p><table border="0" cellpadding="0" cellspacing="0" class="xhtTableBorder0"><tr class="xhtRowBorder1"><th scope="col" style="" class="hierarchy xhtCellBorder0"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="The logical name of the element">Name</a></th><th scope="col" style="" class="hierarchy xhtCellBorder0"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Information about the use of the element">Flags</a></th><th scope="col" style="" class="hierarchy xhtCellBorder0"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Minimum and Maximum # of times the element can appear in the instance">Card.</a></th><th scope="col" style="; width: 100px" class="hierarchy xhtCellBorder0"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Reference to the type of the element">Type</a></th><th scope="col" style="" class="hierarchy xhtCellBorder0"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Additional information about the element">Description &amp; Constraints</a><span style="float: right"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/></a></span></th></tr><tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck1.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="" style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest" title="The data structure that used when invoking a CDS Hook service">CDSHooksRequest</a><a name="CDSHooksRequest"> </a></td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints ( cds-r-1 )" class="xhtConstraintStyle">C</a></td><td style="" class="hierarchy xhtCellBorder0"><span class="xhtPieceDeEmphasized">0</span><span class="xhtPieceDeEmphasized">..</span><span class="xhtPieceDeEmphasized">*</span></td><td style="" class="hierarchy xhtCellBorder0"><a href="StructureDefinition-CDSHooksElement.html">CDSHooksElement</a></td><td style="" class="hierarchy xhtCellBorder0">A request for decision support<br/><br/>Elements defined in Ancestors:<a href="StructureDefinition-CDSHooksElement.html" title="A JSON object that has properties where the names are defined by the extension definitions">extension</a><br class="constraint"/><span class="constraint">Constraints: </span><span title="if fhirAuthorization details are provided, a fhirServer SHALL be specified" class="xhtPieceBold constraint">cds-r-1</span></td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck10.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.hook" title="The hook that triggered this CDS Service call">hook</a><a name="CDSHooksRequest.hook"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="" class="hierarchy xhtCellBorder0">The hook that triggered this CDS Service call</td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck10.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.hookInstance" title="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">hookInstance</a><a name="CDSHooksRequest.hookInstance"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#uuid">uuid</a></td><td style="" class="hierarchy xhtCellBorder0">A UUID for this particular hook call<br/>When this element is read <code>urn:uuid:</code> is prefixed to the value before validation</td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck10.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirServer" title="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">fhirServer</a><a name="CDSHooksRequest.fhirServer"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">0..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#url">url</a></td><td style="" class="hierarchy xhtCellBorder0">The base URL of the CDS Client's FHIR server</td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck11.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="" style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization" title="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">fhirAuthorization</a><a name="CDSHooksRequest.fhirAuthorization"> </a></td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints ( cds-r-2 )" class="xhtConstraintStyle">C</a></td><td style="" class="hierarchy xhtCellBorder0">0..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="StructureDefinition-CDSHooksElement.html">CDSHooksElement</a></td><td style="" class="hierarchy xhtCellBorder0">Authorization info for service to use when querying<br class="constraint"/><span class="constraint">Constraints: </span><span title="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." class="xhtPieceBold constraint">cds-r-2</span></td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck110.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.fhirAuthorization.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization.accessToken" title="This is the OAuth 2.0 access token that provides access to the FHIR server">accessToken</a><a name="CDSHooksRequest.fhirAuthorization.accessToken"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="" class="hierarchy xhtCellBorder0">OAuth 2.0 access token giving access to FHIR server<br/><span class="xhtPieceBold">JSON Property Name: </span>access_token</td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck110.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.fhirAuthorization.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization.tokenType" title="The type of token provided.  (Present to support future extensibility)">tokenType</a><a name="CDSHooksRequest.fhirAuthorization.tokenType"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#code">code</a></td><td style="" class="hierarchy xhtCellBorder0">Bearer<br/><span class="xhtPieceBold">JSON Property Name: </span>token_type<br/><span class="xhtPieceBold">Fixed Value: </span><span class="xhtPieceDarkGreen">Bearer</span> (no extensions allowed)</td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck110.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.fhirAuthorization.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization.expiresIn" title="The lifetime in seconds of the access token.">expiresIn</a><a name="CDSHooksRequest.fhirAuthorization.expiresIn"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#integer">integer</a></td><td style="" class="hierarchy xhtCellBorder0">The lifetime in seconds of the access token<br/><span class="xhtPieceBold">JSON Property Name: </span>expires_in</td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck110.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.fhirAuthorization.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization.scope" title="The scopes the access token grants the CDS Service">scope</a><a name="CDSHooksRequest.fhirAuthorization.scope"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="" class="hierarchy xhtCellBorder0">Scopes granted by access token</td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck110.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.fhirAuthorization.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization.subject" title="The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server">subject</a><a name="CDSHooksRequest.fhirAuthorization.subject"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="" class="hierarchy xhtCellBorder0">OAuth 2.0 client identifier of the CDS Service</td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck100.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: white; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.fhirAuthorization.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.fhirAuthorization.patient" title="The FHIR id of the patient.">patient</a><a name="CDSHooksRequest.fhirAuthorization.patient"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">0..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#id">id</a></td><td style="" class="hierarchy xhtCellBorder0">FHIR id of the patient</td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck10.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Resource" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.context" title="Hook-specific contextual data that the CDS service will need">context</a><a name="CDSHooksRequest.context"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="StructureDefinition-CDSHookContext.html">CDSHookContext</a></td><td style="" class="hierarchy xhtCellBorder0">Contextual data always needed for this hook type<br/>JSON: If<code>%resource.hook = 'appointment-book'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext</code><br/>JSON: If<code>%resource.hook = 'encounter-start'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext</code><br/>JSON: If<code>%resource.hook = 'encounter-discharge'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext</code><br/>JSON: If<code>%resource.hook = 'patient-view'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext</code><br/>JSON: If<code>%resource.hook = 'order-dispatch'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext</code><br/>JSON: If<code>%resource.hook = 'order-sign'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext</code><br/>JSON: If<code>%resource.hook = 'order-select'</code>then the type is <code>http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext</code></td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck01.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_datatype.gif" alt="" style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.prefetch" title="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">prefetch</a><a name="CDSHooksRequest.prefetch"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">0..*</td><td style="" class="hierarchy xhtCellBorder0">Base</td><td style="" class="hierarchy xhtCellBorder0">Additional information requested by service for this hook type<br/>JSON: Represented as a single JSON Object with named properties using the value of the key child as the key<br/></td></tr>
<tr class="xhtRowBorder0 xhtRowOdd"><td style="background-image: url(tbl_bck010.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_primitive.png" alt="" style="background-color: #F7F7F7; background-color: inherit" title="Primitive Data Type" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.prefetch.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.prefetch.key" title="Name of the FHIR query/read from the CDS Hooks Services object provided by the server">key</a><a name="CDSHooksRequest.prefetch.key"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0"><a href="http://hl7.org/fhir/R4/datatypes.html#code">code</a></td><td style="" class="hierarchy xhtCellBorder0">Key of FHIR query</td></tr>
<tr class="xhtRowBorder0 xhtRowEven"><td style="background-image: url(tbl_bck000.png)" class="hierarchy xhtCellBorder0 xhtCellNoWrap"><img src="tbl_spacer.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="" style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="" style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/> <span style="position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0" class="sr-only">CDSHooksRequest.prefetch.</span><a href="StructureDefinition-CDSHooksRequest-definitions.html#CDSHooksRequest.prefetch.value" title="What was found by executing the search or read requested by the CDS Hooks Service in the context of this particular hook invocation">value</a><a name="CDSHooksRequest.prefetch.value"> </a></td><td style="" class="hierarchy xhtCellBorder0"/><td style="" class="hierarchy xhtCellBorder0">1..1</td><td style="" class="hierarchy xhtCellBorder0">Resource</td><td style="" class="hierarchy xhtCellBorder0">Results of query/read<br/>Id may or not be present (this is the default for elements but not resources)<br/>JSON: This object can be represented as null in the JSON structure (which counts as 'present' for cardinality purposes)</td></tr>
<tr><td colspan="5" class="hierarchy"><br/><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/> Documentation for this format</a></td></tr></table></div>
  </text>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="1"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="cds"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="informative"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/json-suppress-resourcetype">
    <valueBoolean value="true"/>
  </extension>
  <url value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:2.16.840.1.113883.4.642.40.93.42.5"/>
  </identifier>
  <version value="3.0.0"/>
  <name value="CDSHooksRequest"/>
  <title value="CDSHooks Request (Logical Definition)"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2026-10-19T12:39:41+00:00"/>
  <publisher value="HL7 International / Clinical Decision Support"/>
  <contact>
    <name value="HL7 International / Clinical Decision Support"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/dss/index.cfm"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="cds@lists.HL7.org"/>
    </telecom>
  </contact>
  <description
               value="This structure is defined to allow the FHIR Validator to validate a CDSHooks Request Body."/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <fhirVersion value="4.0.1"/>
  <kind value="logical"/>
  <abstract value="false"/>
  <type value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest"/>
  <baseDefinition
                  value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksElement"/>
  <derivation value="specialization"/>
  <snapshot>
    <extension
               url="http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version">
      <valueString value="3.0.0"/>
    </extension>
    <element id="CDSHooksRequest">
      <path value="CDSHooksRequest"/>
      <short value="A request for decision support"/>
      <definition
                  value="The data structure that used when invoking a CDS Hook service"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Base"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <constraint>
        <key value="cds-r-1"/>
        <severity value="error"/>
        <human
               value="if fhirAuthorization details are provided, a fhirServer SHALL be specified"/>
        <expression
                    value="fhirAuthorization.exists() implies fhirServer.exists()"/>
        <source
                value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest"/>
      </constraint>
      <isModifier value="false"/>
    </element>
    <element id="CDSHooksRequest.extension">
      <path value="CDSHooksRequest.extension"/>
      <short value="Object that has Named Extension Properties"/>
      <definition
                  value="A JSON object that has properties where the names are defined by the extension definitions"/>
      <comment
               value="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. How to handle complex extensions (objects) is not defined"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksElement.extension"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code
              value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksExtensions"/>
      </type>
    </element>
    <element id="CDSHooksRequest.hook">
      <path value="CDSHooksRequest.hook"/>
      <short value="The hook that triggered this CDS Service call"/>
      <definition value="The hook that triggered this CDS Service call"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.hook"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.hookInstance">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix">
        <valueString value="urn:uuid:"/>
      </extension>
      <path value="CDSHooksRequest.hookInstance"/>
      <short value="A UUID for this particular hook call"/>
      <definition
                  value="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"/>
      <comment
               value="Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.hookInstance"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uuid"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirServer">
      <path value="CDSHooksRequest.fhirServer"/>
      <short value="The base URL of the CDS Client's FHIR server"/>
      <definition
                  value="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"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirServer"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="url"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization">
      <path value="CDSHooksRequest.fhirAuthorization"/>
      <short value="Authorization info for service to use when querying"/>
      <definition
                  value="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"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code
              value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksElement"/>
      </type>
      <constraint>
        <key value="cds-r-2"/>
        <severity value="warning"/>
        <human
               value="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."/>
        <expression
                    value="scope.contains('patient/') implies patient.exists()"/>
        <source
                value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest"/>
      </constraint>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.extension">
      <path value="CDSHooksRequest.fhirAuthorization.extension"/>
      <short value="Object that has Named Extension Properties"/>
      <definition
                  value="A JSON object that has properties where the names are defined by the extension definitions"/>
      <comment
               value="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. How to handle complex extensions (objects) is not defined"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksElement.extension"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code
              value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksExtensions"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.accessToken">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-name">
        <valueString value="access_token"/>
      </extension>
      <path value="CDSHooksRequest.fhirAuthorization.accessToken"/>
      <short value="OAuth 2.0 access token giving access to FHIR server"/>
      <definition
                  value="This is the OAuth 2.0 access token that provides access to the FHIR server"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization.accessToken"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.tokenType">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-name">
        <valueString value="token_type"/>
      </extension>
      <path value="CDSHooksRequest.fhirAuthorization.tokenType"/>
      <short value="Bearer"/>
      <definition
                  value="The type of token provided.  (Present to support future extensibility)"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization.tokenType"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <fixedCode value="Bearer"/>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.expiresIn">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-name">
        <valueString value="expires_in"/>
      </extension>
      <path value="CDSHooksRequest.fhirAuthorization.expiresIn"/>
      <short value="The lifetime in seconds of the access token"/>
      <definition value="The lifetime in seconds of the access token."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization.expiresIn"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.scope">
      <path value="CDSHooksRequest.fhirAuthorization.scope"/>
      <short value="Scopes granted by access token"/>
      <definition value="The scopes the access token grants the CDS Service"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization.scope"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.subject">
      <path value="CDSHooksRequest.fhirAuthorization.subject"/>
      <short value="OAuth 2.0 client identifier of the CDS Service"/>
      <definition
                  value="The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization.subject"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.patient">
      <path value="CDSHooksRequest.fhirAuthorization.patient"/>
      <short value="FHIR id of the patient"/>
      <definition value="The FHIR id of the patient."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.fhirAuthorization.patient"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="CDSHooksRequest.context">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'appointment-book'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'encounter-start'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'encounter-discharge'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'patient-view'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'order-dispatch'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'order-sign'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'order-select'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext"/>
        </extension>
      </extension>
      <path value="CDSHooksRequest.context"/>
      <short value="Contextual data always needed for this hook type"/>
      <definition
                  value="Hook-specific contextual data that the CDS service will need"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.context"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code
              value="http://cds-hooks.hl7.org/StructureDefinition/CDSHookContext"/>
      </type>
    </element>
    <element id="CDSHooksRequest.prefetch">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-property-key">
        <valueCode value="key"/>
      </extension>
      <path value="CDSHooksRequest.prefetch"/>
      <short
             value="Additional information requested by service for this hook type"/>
      <definition
                  value="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"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="CDSHooksRequest.prefetch"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Base"/>
      </type>
    </element>
    <element id="CDSHooksRequest.prefetch.key">
      <path value="CDSHooksRequest.prefetch.key"/>
      <short value="Key of FHIR query"/>
      <definition
                  value="Name of the FHIR query/read from the CDS Hooks Services object provided by the server"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.prefetch.key"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
    </element>
    <element id="CDSHooksRequest.prefetch.value">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-nullable">
        <valueBoolean value="true"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/id-expectation">
        <valueCode value="optional"/>
      </extension>
      <path value="CDSHooksRequest.prefetch.value"/>
      <short value="Results of query/read"/>
      <definition
                  value="What was found by executing the search or read requested by the CDS Hooks Service in the context of this particular hook invocation"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="CDSHooksRequest.prefetch.value"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
    </element>
  </snapshot>
  <differential>
    <element id="CDSHooksRequest">
      <path value="CDSHooksRequest"/>
      <short value="A request for decision support"/>
      <definition
                  value="The data structure that used when invoking a CDS Hook service"/>
      <constraint>
        <key value="cds-r-1"/>
        <severity value="error"/>
        <human
               value="if fhirAuthorization details are provided, a fhirServer SHALL be specified"/>
        <expression
                    value="fhirAuthorization.exists() implies fhirServer.exists()"/>
        <source
                value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest"/>
      </constraint>
    </element>
    <element id="CDSHooksRequest.hook">
      <path value="CDSHooksRequest.hook"/>
      <short value="The hook that triggered this CDS Service call"/>
      <definition value="The hook that triggered this CDS Service call"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.hookInstance">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/implied-string-prefix">
        <valueString value="urn:uuid:"/>
      </extension>
      <path value="CDSHooksRequest.hookInstance"/>
      <short value="A UUID for this particular hook call"/>
      <definition
                  value="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"/>
      <comment
               value="Note: the hookInstance is globally unique and should contain enough entropy to be un-guessable."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="uuid"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirServer">
      <path value="CDSHooksRequest.fhirServer"/>
      <short value="The base URL of the CDS Client's FHIR server"/>
      <definition
                  value="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"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="url"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization">
      <path value="CDSHooksRequest.fhirAuthorization"/>
      <short value="Authorization info for service to use when querying"/>
      <definition
                  value="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"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code
              value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksElement"/>
      </type>
      <constraint>
        <key value="cds-r-2"/>
        <severity value="warning"/>
        <human
               value="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."/>
        <expression
                    value="scope.contains('patient/') implies patient.exists()"/>
        <source
                value="http://cds-hooks.hl7.org/StructureDefinition/CDSHooksRequest"/>
      </constraint>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.accessToken">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-name">
        <valueString value="access_token"/>
      </extension>
      <path value="CDSHooksRequest.fhirAuthorization.accessToken"/>
      <short value="OAuth 2.0 access token giving access to FHIR server"/>
      <definition
                  value="This is the OAuth 2.0 access token that provides access to the FHIR server"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.tokenType">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-name">
        <valueString value="token_type"/>
      </extension>
      <path value="CDSHooksRequest.fhirAuthorization.tokenType"/>
      <short value="Bearer"/>
      <definition
                  value="The type of token provided.  (Present to support future extensibility)"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
      <fixedCode value="Bearer"/>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.expiresIn">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-name">
        <valueString value="expires_in"/>
      </extension>
      <path value="CDSHooksRequest.fhirAuthorization.expiresIn"/>
      <short value="The lifetime in seconds of the access token"/>
      <definition value="The lifetime in seconds of the access token."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="integer"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.scope">
      <path value="CDSHooksRequest.fhirAuthorization.scope"/>
      <short value="Scopes granted by access token"/>
      <definition value="The scopes the access token grants the CDS Service"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.subject">
      <path value="CDSHooksRequest.fhirAuthorization.subject"/>
      <short value="OAuth 2.0 client identifier of the CDS Service"/>
      <definition
                  value="The OAuth 2.0 client identifier of the CDS Service, as registered with the CDS Client's authorization server"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="string"/>
      </type>
    </element>
    <element id="CDSHooksRequest.fhirAuthorization.patient">
      <path value="CDSHooksRequest.fhirAuthorization.patient"/>
      <short value="FHIR id of the patient"/>
      <definition value="The FHIR id of the patient."/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="id"/>
      </type>
    </element>
    <element id="CDSHooksRequest.context">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'appointment-book'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookAppointmentBookContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'encounter-start'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterStartContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'encounter-discharge'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookEncounterDischargeContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'patient-view'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookPatientViewContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'order-dispatch'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderDispatchContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'order-sign'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSignContext"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/type-specifier">
        <extension url="condition">
          <valueString value="%resource.hook = 'order-select'"/>
        </extension>
        <extension url="type">
          <valueCode
                     value="http://cds-hooks.hl7.org/hooks/StructureDefinition/CDSHookOrderSelectContext"/>
        </extension>
      </extension>
      <path value="CDSHooksRequest.context"/>
      <short value="Contextual data always needed for this hook type"/>
      <definition
                  value="Hook-specific contextual data that the CDS service will need"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code
              value="http://cds-hooks.hl7.org/StructureDefinition/CDSHookContext"/>
      </type>
    </element>
    <element id="CDSHooksRequest.prefetch">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-property-key">
        <valueCode value="key"/>
      </extension>
      <path value="CDSHooksRequest.prefetch"/>
      <short
             value="Additional information requested by service for this hook type"/>
      <definition
                  value="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"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="Base"/>
      </type>
    </element>
    <element id="CDSHooksRequest.prefetch.key">
      <path value="CDSHooksRequest.prefetch.key"/>
      <short value="Key of FHIR query"/>
      <definition
                  value="Name of the FHIR query/read from the CDS Hooks Services object provided by the server"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="code"/>
      </type>
    </element>
    <element id="CDSHooksRequest.prefetch.value">
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/json-nullable">
        <valueBoolean value="true"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/tools/StructureDefinition/id-expectation">
        <valueCode value="optional"/>
      </extension>
      <path value="CDSHooksRequest.prefetch.value"/>
      <short value="Results of query/read"/>
      <definition
                  value="What was found by executing the search or read requested by the CDS Hooks Service in the context of this particular hook invocation"/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Resource"/>
      </type>
    </element>
  </differential>
</StructureDefinition>