{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2017-07-27T13:52:14.546+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "sec"
    }
  ],
  "url": "http://www.ihe.net/fhir/StructureDefinition/AuditEvent-REST-Query",
  "name": "AuditEvent-REST-Query",
  "status": "draft",
  "date": "2017-07-27T12:50:22.2844444+00:00",
  "description": "Base StructureDefinition for AuditEvent Resource when the event is a FHIR REST Query",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AuditEvent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AuditEvent",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AuditEvent.type.system",
        "path": "AuditEvent.type.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://dicom.nema.org/resources/ontology/DCM"
          }
        ]
      },
      {
        "id": "AuditEvent.type.code",
        "path": "AuditEvent.type.code",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "110112"
          }
        ]
      },
      {
        "id": "AuditEvent.type.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AuditEvent.type.display",
        "type": [
          {
            "code": "string",
            "profile": "Query"
          }
        ]
      },
      {
        "id": "AuditEvent.subtype",
        "path": "AuditEvent.subtype",
        "min": 1,
        "max": "1"
      },
      {
        "id": "AuditEvent.subtype.system",
        "path": "AuditEvent.subtype.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://hl7.org/fhir/restful-interaction"
          }
        ]
      },
      {
        "id": "AuditEvent.subtype.code",
        "path": "AuditEvent.subtype.code",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "search"
          }
        ]
      },
      {
        "id": "AuditEvent.subtype.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "AuditEvent.subtype.display",
        "min": 1,
        "type": [
          {
            "code": "string",
            "profile": "FHIR Search"
          }
        ]
      },
      {
        "id": "AuditEvent.action",
        "path": "AuditEvent.action",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "E"
          }
        ]
      },
      {
        "id": "AuditEvent.recorded",
        "path": "AuditEvent.recorded",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.outcome",
        "path": "AuditEvent.outcome",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.outcomeDesc",
        "path": "AuditEvent.outcomeDesc",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.agent",
        "path": "AuditEvent.agent",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "role"
            },
            {
              "type": "value",
              "path": "requestor"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "AuditEvent.agent:Requestor",
        "path": "AuditEvent.agent",
        "sliceName": "Requestor",
        "short": "Source system that initiated the Query",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.agent:Requestor.role",
        "path": "AuditEvent.agent.role",
        "min": 1,
        "max": "1"
      },
      {
        "id": "AuditEvent.agent:Requestor.role.coding.system",
        "path": "AuditEvent.agent.role.coding.system",
        "fixedUri": "http://nema.org/dicom/dicm"
      },
      {
        "id": "AuditEvent.agent:Requestor.role.coding.code",
        "path": "AuditEvent.agent.role.coding.code",
        "fixedCode": "110153"
      },
      {
        "id": "AuditEvent.agent:Requestor.requestor",
        "path": "AuditEvent.agent.requestor",
        "type": [
          {
            "code": "boolean",
            "profile": "false"
          }
        ]
      },
      {
        "id": "AuditEvent.agent:Responder",
        "path": "AuditEvent.agent",
        "sliceName": "Responder",
        "short": "Destination system responding to the Query",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.agent:Responder.role.coding.system",
        "path": "AuditEvent.agent.role.coding.system",
        "fixedUri": "http://nema.org/dicom/dicm"
      },
      {
        "id": "AuditEvent.agent:Responder.role.coding.code",
        "path": "AuditEvent.agent.role.coding.code",
        "fixedCode": "110152"
      },
      {
        "id": "AuditEvent.agent:Responder.requestor",
        "path": "AuditEvent.agent.requestor",
        "type": [
          {
            "code": "boolean",
            "profile": "false"
          }
        ]
      },
      {
        "id": "AuditEvent.agent:Human",
        "path": "AuditEvent.agent",
        "sliceName": "Human",
        "short": "Human that triggeed the query",
        "definition": "Some queries are not triggered by a human interaction, so there would be no human identifable.\r\nServers, if they have a security token available should record the identity.",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.agent:Human.requestor",
        "path": "AuditEvent.agent.requestor",
        "type": [
          {
            "code": "boolean",
            "profile": "true"
          }
        ]
      },
      {
        "id": "AuditEvent.source",
        "path": "AuditEvent.source",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity",
        "path": "AuditEvent.entity",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.code"
            },
            {
              "type": "value",
              "path": "role.code"
            }
          ],
          "description": "SHALL contain the query parameters as requested, and the Patient(s) if known",
          "rules": "open"
        }
      },
      {
        "id": "AuditEvent.entity:sliceEntity",
        "path": "AuditEvent.entity",
        "sliceName": "sliceEntity",
        "short": "Patient identity involved",
        "definition": "Where the query is constrained to specific Patient(s); these shall be individually recorded, so that audit analysis can more readily identify transactions involving specific patients.",
        "meaningWhenMissing": "The Query was not specific to a Patient or set of Patients.",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity:sliceEntity.identifier",
        "path": "AuditEvent.entity.identifier",
        "short": "Patient Identifier",
        "definition": "Identifies a specific instance of the Patient. The reference should always be version specific.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity:sliceEntity.reference",
        "path": "AuditEvent.entity.reference",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:sliceEntity.type.system",
        "path": "AuditEvent.entity.type.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/audit-entity-type"
      },
      {
        "id": "AuditEvent.entity:sliceEntity.type.code",
        "path": "AuditEvent.entity.type.code",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "1"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:sliceEntity.role.system",
        "path": "AuditEvent.entity.role.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://hl7.org/fhir/object-role"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:sliceEntity.role.code",
        "path": "AuditEvent.entity.role.code",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "1"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:sliceEntity.lifecycle",
        "path": "AuditEvent.entity.lifecycle",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:sliceEntity.securityLabel",
        "path": "AuditEvent.entity.securityLabel",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:sliceEntity.name",
        "path": "AuditEvent.entity.name",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:sliceEntity.description",
        "path": "AuditEvent.entity.description",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:sliceEntity.query",
        "path": "AuditEvent.entity.query",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:sliceEntity.detail",
        "path": "AuditEvent.entity.detail",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters",
        "path": "AuditEvent.entity",
        "sliceName": "QueryParameters",
        "short": "Query Parameters",
        "definition": "Specific query parameters requested.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity:QueryParameters.identifier",
        "path": "AuditEvent.entity.identifier",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters.reference",
        "path": "AuditEvent.entity.reference",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters.type.system",
        "path": "AuditEvent.entity.type.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://hl7.org/fhir/audit-entity-type"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:QueryParameters.type.code",
        "path": "AuditEvent.entity.type.code",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "2"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:QueryParameters.role.system",
        "path": "AuditEvent.entity.role.system",
        "min": 1,
        "type": [
          {
            "code": "uri",
            "profile": "http://hl7.org/fhir/object-role"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:QueryParameters.role.code",
        "path": "AuditEvent.entity.role.code",
        "min": 1,
        "type": [
          {
            "code": "code",
            "profile": "24"
          }
        ]
      },
      {
        "id": "AuditEvent.entity:QueryParameters.lifecycle",
        "path": "AuditEvent.entity.lifecycle",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters.securityLabel",
        "path": "AuditEvent.entity.securityLabel",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters.name",
        "path": "AuditEvent.entity.name",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters.description",
        "path": "AuditEvent.entity.description",
        "max": "0"
      },
      {
        "id": "AuditEvent.entity:QueryParameters.query",
        "path": "AuditEvent.entity.query",
        "definition": "the requested URL including query parameters, base64 encoded",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity:QueryParameters.detail",
        "path": "AuditEvent.entity.detail",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity:QueryParameters.detail.type",
        "path": "AuditEvent.entity.detail.type",
        "type": [
          {
            "code": "string",
            "profile": "http headers"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AuditEvent.entity:QueryParameters.detail.value",
        "path": "AuditEvent.entity.detail.value",
        "short": "http headers",
        "definition": "The http request headers (e.g., Accept Headers), base64 encoded. Used to carry bulk information.",
        "mustSupport": true
      }
    ]
  }
}