{
  "resourceType": "StructureDefinition",
  "id": "GuidanceResponse",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Clinical.Request &amp; Response"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "patient"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "cds"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": ".status = entered-in-error"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/GuidanceResponse",
  "version": "4.6.0",
  "name": "GuidanceResponse",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00:00",
  "publisher": "Health Level Seven International (Clinical Decision Support)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/dss/index.cfm"
        }
      ]
    }
  ],
  "description": "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.",
  "purpose": "The GuidanceResponse resource supports recording the results of decision support interactions, reportability determination for public health, as well as the communication of additional data requirements for subsequent interactions.",
  "fhirVersion": "4.6.0",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "GuidanceResponse",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "GuidanceResponse",
        "path": "GuidanceResponse",
        "short": "The formal response to a guidance request",
        "definition": "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event"
          },
          {
            "identity": "w5",
            "map": "clinical.general"
          }
        ]
      },
      {
        "id": "GuidanceResponse.requestIdentifier",
        "path": "GuidanceResponse.requestIdentifier",
        "short": "The identifier of the request associated with this response, if any",
        "definition": "The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.basedOn"
          }
        ]
      },
      {
        "id": "GuidanceResponse.identifier",
        "path": "GuidanceResponse.identifier",
        "short": "Business identifier",
        "definition": "Allows a service to provide  unique, business identifiers for the response.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.identifier"
          },
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          }
        ]
      },
      {
        "id": "GuidanceResponse.module[x]",
        "path": "GuidanceResponse.module[x]",
        "short": "What guidance was requested",
        "definition": "An identifier, CodeableConcept or canonical reference to the guidance that was requested.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "uri"
          },
          {
            "code": "canonical"
          },
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "GuidanceModuleCode"
            }
          ],
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/ValueSet/guidance-module-code"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.instantiatesUri | Event.instantiatesCanonical"
          }
        ]
      },
      {
        "id": "GuidanceResponse.status",
        "path": "GuidanceResponse.status",
        "short": "success | data-requested | data-required | in-progress | failure | entered-in-error",
        "definition": "The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.",
        "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "GuidanceResponseStatus"
            }
          ],
          "strength": "required",
          "description": "The status of a guidance response.",
          "valueSet": "http://hl7.org/fhir/ValueSet/guidance-response-status"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.status"
          },
          {
            "identity": "w5",
            "map": "FiveWs.status"
          }
        ]
      },
      {
        "id": "GuidanceResponse.subject",
        "path": "GuidanceResponse.subject",
        "short": "Patient the request was performed for",
        "definition": "The patient for which the request was processed.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Group"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.subject"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject[x]"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject"
          }
        ]
      },
      {
        "id": "GuidanceResponse.encounter",
        "path": "GuidanceResponse.encounter",
        "short": "Encounter during which the response was returned",
        "definition": "The encounter during which this response was created or to which the creation of this record is tightly associated.",
        "comment": "This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official copmletion of an encounter but still be tied to the context of the encounter.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Encounter"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.encounter"
          },
          {
            "identity": "w5",
            "map": "FiveWs.context"
          }
        ]
      },
      {
        "id": "GuidanceResponse.occurrenceDateTime",
        "path": "GuidanceResponse.occurrenceDateTime",
        "short": "When the guidance response was processed",
        "definition": "Indicates when the guidance response was processed.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.occurrence[x]"
          },
          {
            "identity": "w5",
            "map": "FiveWs.done[x]"
          }
        ]
      },
      {
        "id": "GuidanceResponse.performer",
        "path": "GuidanceResponse.performer",
        "short": "Device returning the guidance",
        "definition": "Provides a reference to the device that performed the guidance.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.performer.actor"
          },
          {
            "identity": "w5",
            "map": "FiveWs.actor"
          }
        ]
      },
      {
        "id": "GuidanceResponse.reason",
        "path": "GuidanceResponse.reason",
        "short": "Why guidance is needed",
        "definition": "Describes the reason for the guidance response in coded or textual form, or Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableReference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Condition",
              "http://hl7.org/fhir/StructureDefinition/Observation",
              "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
              "http://hl7.org/fhir/StructureDefinition/DocumentReference"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.reason"
          },
          {
            "identity": "w5",
            "map": "FiveWs.why[x]"
          }
        ]
      },
      {
        "id": "GuidanceResponse.note",
        "path": "GuidanceResponse.note",
        "short": "Additional notes about the response",
        "definition": "Provides a mechanism to communicate additional information about the response.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Annotation"
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.note"
          }
        ]
      },
      {
        "id": "GuidanceResponse.evaluationMessage",
        "path": "GuidanceResponse.evaluationMessage",
        "short": "Messages resulting from the evaluation of the artifact or artifacts",
        "definition": "Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/OperationOutcome"
            ]
          }
        ]
      },
      {
        "id": "GuidanceResponse.outputParameters",
        "path": "GuidanceResponse.outputParameters",
        "short": "The output parameters of the evaluation, if any",
        "definition": "The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Parameters"
            ]
          }
        ]
      },
      {
        "id": "GuidanceResponse.result",
        "path": "GuidanceResponse.result",
        "short": "Proposed actions, if any",
        "definition": "The actions, if any, produced by the evaluation of the artifact.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/CarePlan",
              "http://hl7.org/fhir/StructureDefinition/RequestGroup"
            ]
          }
        ]
      },
      {
        "id": "GuidanceResponse.dataRequirement",
        "path": "GuidanceResponse.dataRequirement",
        "short": "Additional required data",
        "definition": "If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "DataRequirement"
          }
        ]
      }
    ]
  }
}