description: 'A basic AuditEvent profile for when a RESTful Query / Search action happens successfully.\n\n- Given a RESTful Query is requested\n- And the request does not have a Patient subject indicated\n - The requestor logging the event would potentially not know they have requested Patient specific data\n - The data objects may not be patient specific kind of objects\n - when the request is Patient specific then [PatientQuery](StructureDefinition-IHE.BasicAudit.PatientQuery.html) is used\n- And the request is authorized\n - Authorization failures should follow [FHIR core Access Denied](http://hl7.org/fhir/security.html#AccessDenied)\n- When successful\n - Note a failure AuditEvent may follow this pattern, but would not be a successful outcome and should have an OperationOutcome\n - Note success may result in zero or more results. The number of results and the content of the results are not recorded.\n- And the results are not Patient specific\n - when the results are Patient specific then [PatientQuery](StructureDefinition-IHE.BasicAudit.PatientQuery.html) are used\n- Then the AuditEvent recorded will conform\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'} index: 0 subtype: index: 1 slicing: rules: open discriminator: - {path: $this, type: value} min: 1 slices: anySearch: match: {} schema: binding: {strength: required, valueSet: 'https://profiles.ihe.net/ITI/BALP/ValueSet/AllSearchVS'} _required: true index: 2 min: 1 max: 1 action: pattern: {type: Code, value: E} index: 3 outcome: pattern: {type: Code, value: '0'} index: 4 agent: array: true min: 2 index: 5 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'} schema: _required: true index: 6 elements: type: pattern: type: CodeableConcept value: coding: - {code: '110153', system: 'http://dicom.nema.org/resources/ontology/DCM'} index: 7 who: {index: 8} media: {index: 9} network: {index: 10} required: [who, network, type] server: match: type: coding: - {code: '110152', system: 'http://dicom.nema.org/resources/ontology/DCM'} schema: _required: true index: 11 elements: type: pattern: type: CodeableConcept value: coding: - {code: '110152', system: 'http://dicom.nema.org/resources/ontology/DCM'} index: 12 who: {index: 13} media: {index: 14} network: {index: 15} required: [who, network, type] user: match: type: coding: - {code: IRCP, system: 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType'} schema: index: 16 elements: type: pattern: type: CodeableConcept value: coding: - {code: IRCP, system: 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType'} index: 17 role: {mustSupport: true, index: 18} who: {index: 19} name: {mustSupport: true, index: 20} requestor: pattern: {type: Boolean, value: true} index: 21 media: {index: 22} network: {index: 23} purposeOfUse: {mustSupport: true, index: 24} required: [who, type] source: {mustSupport: true, index: 25} entity: index: 26 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: 27 elements: what: elements: identifier: elements: value: {short: the value of X-Request-Id, index: 28} required: [value] type: pattern: type: Coding value: {code: XrequestId, system: 'https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType'} index: 29 required: [type] query: match: type: {code: '2', system: 'http://terminology.hl7.org/CodeSystem/audit-entity-type'} schema: _required: true index: 30 elements: what: {index: 31} type: pattern: type: Coding value: {code: '2', system: 'http://terminology.hl7.org/CodeSystem/audit-entity-type'} index: 32 role: pattern: type: Coding value: {code: '24', system: 'http://terminology.hl7.org/CodeSystem/object-role'} index: 33 lifecycle: {index: 34} securityLabel: {short: may contain the security labels on the Bundle search set returned, index: 35} query: {index: 36} detail: {index: 37} required: [role, query, type] package_version: 1.1.3 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.3 required: [subtype, entity, outcome]