PackagesCanonicalsLogsProblems
    Packages
    ihe.iti.balp@1.1.0
    https://profiles.ihe.net/ITI/BALP/StructureDefinition/IHE.BasicAudit.Query
description: 'A basic AuditEvent profile for when a RESTful Query / Search action happens successfully.\n\n- Given a RESTful Query \n- And there is no known Patient subject. \n  - The requestor logging the event would potentially not know a patient identity\n  - The data objects may not be patient specific kind of objects\n- And OAuth is used to authorize both app and user\n- When an App requests a RESTful Query to retrieve Resource(s) \n- Then the search request is recorded  \n  - The raw search request is base64 encoded and placed in the .entity[query].query element. The base64 encoding of the raw search request enables preserving exactly what was requested, including possibly malicious patterns. This enables detection of malicious or malformed requests.\n  - The cleaned search may be recorded (not base64) in the .entity[query].description. The cleaned search request would have removed parameters that were not understood/supported. The cleaned search request in the .description element enables more efficient processing.\n\nNote: the pattern defined in DICOM and IHE have the client is identified as the Source Role ID, and the server is identified as the Destination Role ID. This represents the query parameters are flowing from the client to the server. This may not be so obvious, as the data actually flows the opposite direction. This pattern is established and thus followed here.'
package_name: ihe.iti.balp
derivation: constraint
name: Query
type: AuditEvent
elements:
  type:
    pattern:
      type: Coding
      value: {code: rest, system: 'http://terminology.hl7.org/CodeSystem/audit-event-type', display: Restful Operation}
    index: 0
  subtype:
    index: 1
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: value}
      min: 1
      slices:
        anySearch:
          match: {code: search, system: 'http://hl7.org/fhir/restful-interaction', display: search}
          schema:
            pattern:
              type: Coding
              value: {code: search, system: 'http://hl7.org/fhir/restful-interaction', display: search}
            index: 2
          min: 0
          max: 1
        anySearchT:
          match: {code: search-type, system: 'http://hl7.org/fhir/restful-interaction', display: search-type}
          schema:
            pattern:
              type: Coding
              value: {code: search-type, system: 'http://hl7.org/fhir/restful-interaction', display: search-type}
            index: 3
          min: 0
          max: 1
        anySearchS:
          match: {code: search-system, system: 'http://hl7.org/fhir/restful-interaction', display: search-system}
          schema:
            pattern:
              type: Coding
              value: {code: search-system, system: 'http://hl7.org/fhir/restful-interaction', display: search-system}
            index: 4
          min: 0
          max: 1
  action:
    pattern: {type: Code, value: E}
    index: 5
  outcome:
    pattern: {type: Code, value: '0'}
    index: 6
  agent:
    array: true
    min: 2
    index: 7
    slicing:
      rules: open
      discriminator:
      - {path: type, type: pattern}
      min: 2
      slices:
        client:
          match:
            type:
              coding:
              - {code: '110153', system: 'http://dicom.nema.org/resources/ontology/DCM', display: Source Role ID}
          schema:
            _required: true
            index: 8
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: '110153', system: 'http://dicom.nema.org/resources/ontology/DCM', display: Source Role ID}
                index: 9
              who: {index: 10}
              media: {index: 11}
              network: {index: 12}
            required: [who, network, type]
        server:
          match:
            type:
              coding:
              - {code: '110152', system: 'http://dicom.nema.org/resources/ontology/DCM', display: Destination Role ID}
          schema:
            _required: true
            index: 13
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: '110152', system: 'http://dicom.nema.org/resources/ontology/DCM', display: Destination Role ID}
                index: 14
              who: {index: 15}
              media: {index: 16}
              network: {index: 17}
            required: [who, network, type]
        user:
          match:
            type:
              coding:
              - {code: IRCP, system: 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', display: information recipient}
          schema:
            index: 18
            elements:
              type:
                pattern:
                  type: CodeableConcept
                  value:
                    coding:
                    - {code: IRCP, system: 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', display: information recipient}
                index: 19
              role: {mustSupport: true, index: 20}
              who: {index: 21}
              name: {mustSupport: true, index: 22}
              requestor:
                pattern: {type: Boolean, value: true}
                index: 23
              media: {index: 24}
              network: {index: 25}
              purposeOfUse: {mustSupport: true, index: 26}
            required: [who, type]
  source: {mustSupport: true, index: 27}
  entity:
    index: 28
    slicing:
      rules: open
      discriminator:
      - {path: type, type: pattern}
      min: 1
      slices:
        transaction:
          match:
            type: {code: XrequestId, system: 'https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType'}
          schema:
            index: 29
            elements:
              what:
                elements:
                  identifier:
                    elements:
                      value: {short: the value of X-Request-Id, index: 30}
                    required: [value]
              type:
                pattern:
                  type: Coding
                  value: {code: XrequestId, system: 'https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType'}
                index: 31
            required: [type]
        query:
          match:
            type: {code: '2', system: 'http://terminology.hl7.org/CodeSystem/audit-entity-type', display: System Object}
          schema:
            _required: true
            index: 32
            elements:
              what: {index: 33}
              type:
                pattern:
                  type: Coding
                  value: {code: '2', system: 'http://terminology.hl7.org/CodeSystem/audit-entity-type', display: System Object}
                index: 34
              role:
                pattern:
                  type: Coding
                  value: {code: '24', system: 'http://terminology.hl7.org/CodeSystem/object-role', display: Query}
                index: 35
              lifecycle: {index: 36}
              securityLabel: {short: may contain the security labels on the Bundle search set returned, index: 37}
              query: {index: 38}
              detail: {index: 39}
            required: [query, type]
package_version: 1.1.0
class: profile
kind: resource
url: https://profiles.ihe.net/ITI/BALP/StructureDefinition/IHE.BasicAudit.Query
base: http://hl7.org/fhir/StructureDefinition/AuditEvent
version: 1.1.0
required: [subtype, entity]