PackagesCanonicalsLogsProblems
    Packages
    fhir.r4.nhsengland.programme@0.2.2-pre-release
    https://fhir.nhs.uk/England/StructureDefinition/England-AuditEvent-PARS
description: The Patient Audit Record Service (PARS) is a reporting service that describes how patient data has been accessed. This service is used by guardians of data e.g. Privacy officers to track and monitor requests to access patient records.
package_name: fhir.r4.nhsengland.programme
derivation: constraint
name: EnglandAuditEventPARS
type: AuditEvent
elements:
  action: {short: Type of operation - Create Read Update Delete, index: 0}
  recorded: {index: 1}
  agent:
    index: 2
    slicing:
      rules: closed
      discriminator:
      - {path: who.type, type: value}
      min: null
      slices:
        organisation:
          match:
            who: {type: Organization}
          schema:
            array: true
            min: 1
            max: 2
            _required: true
            index: 3
            elements:
              who:
                short: Name of the organisation
                index: 4
                elements:
                  type:
                    pattern: {type: Uri, value: Organization}
                    index: 5
                  display: {short: Name of the organisation, index: 6}
        patient:
          match:
            who: {type: Patient}
          schema:
            index: 7
            elements:
              who:
                elements:
                  type:
                    pattern: {type: Uri, value: Patient}
                    index: 8
                  display: {short: Patient Name, index: 9}
        user:
          match:
            who: {type: Practitioner}
          schema:
            index: 10
            elements:
              who:
                elements:
                  type:
                    pattern: {type: Uri, value: Practitioner}
                    index: 11
                  display: {short: User Name, index: 12}
        userRole:
          match:
            who: {type: PractitionerRole}
          schema:
            index: 13
            elements:
              who:
                elements:
                  type:
                    pattern: {type: Uri, value: PractitionerRole}
                    index: 14
        device:
          match:
            who: {type: Endpoint}
          schema:
            index: 15
            elements:
              who:
                elements:
                  type:
                    pattern: {type: Uri, value: Endpoint}
                    index: 16
                  identifier: {type: Identifier, index: 17}
  source:
    elements:
      site: {short: Audit Creator system Code, index: 18}
      observer:
        type: Reference
        refers: ['http://hl7.org/fhir/StructureDefinition/Device']
        index: 19
        elements:
          identifier: {type: Identifier, short: Audit Creator system Identifier, index: 20}
          display: {short: Audit Creator Name, index: 21}
        required: [identifier]
  entity:
    index: 22
    slicing:
      rules: closed
      discriminator:
      - {path: type.system, type: value}
      - {path: type.code, type: value}
      min: null
      slices:
        patient:
          match:
            type: {system: 'http://terminology.hl7.org/CodeSystem/audit-entity-type', code: '1'}
          schema:
            short: Patient NHS number
            _required: true
            index: 23
            elements:
              type:
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/audit-entity-type'}
                    index: 24
                  code:
                    pattern: {type: Code, value: '1'}
                    index: 25
              role:
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/object-role'}
                    index: 26
                  code:
                    pattern: {type: Code, value: '1'}
                    index: 27
                required: [system]
        transaction:
          match:
            type: {system: 'https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType', code: XrequestId}
          schema:
            short: Transaction Id, Correlation Id or X-RequestID
            _required: true
            index: 28
            elements:
              type:
                elements:
                  system:
                    pattern: {type: Uri, value: 'https://profiles.ihe.net/ITI/BALP/CodeSystem/BasicAuditEntityType'}
                    index: 29
                  code:
                    pattern: {type: Code, value: XrequestId}
                    index: 30
        submittedOrganisation:
          match:
            type: {system: 'http://terminology.hl7.org/CodeSystem/audit-entity-type', code: '3'}
          schema:
            short: ODS code of the organisation submitted in the message/headers
            index: 31
            elements:
              type:
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/audit-entity-type'}
                    index: 32
                  code:
                    pattern: {type: Code, value: '3'}
                    index: 33
        endpoint:
          match:
            type: {system: 'http://hl7.org/fhir/resource-types', code: Endpoint}
          schema:
            short: Endpoint details
            index: 34
            elements:
              what:
                elements:
                  identifier: {type: Identifier, index: 35}
              type:
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://hl7.org/fhir/resource-types'}
                    index: 36
                  code:
                    pattern: {type: Code, value: Endpoint}
                    index: 37
              name: {short: Human readable interactionID. E.g. Parent Prescription, index: 38}
              detail:
                array: true
                min: 2
                max: 2
                index: 39
                slicing:
                  rules: open
                  discriminator:
                  - {path: type, type: value}
                  min: 2
                  max: 2
                  slices:
                    productIdentifier:
                      match: {type: productIdentifier}
                      schema:
                        short: High level grouping of the message types
                        _required: true
                        index: 40
                        elements:
                          type:
                            pattern: {type: String, value: productIdentifier}
                            index: 41
                          value:
                            choices: [valueString]
                            index: 43
                          valueString: {type: string, choiceOf: value, index: 44}
                    interactionIdentifier:
                      match: {type: interactionIdentifier}
                      schema:
                        _required: true
                        index: 45
                        elements:
                          type:
                            pattern: {type: String, value: interactionIdentifier}
                            index: 46
                          value:
                            choices: [valueString]
                            index: 48
                          valueString: {type: string, choiceOf: value, index: 49}
            required: [name]
package_version: 0.2.2-pre-release
class: profile
kind: resource
url: https://fhir.nhs.uk/England/StructureDefinition/England-AuditEvent-PARS
base: https://fhir.nhs.uk/England/StructureDefinition/England-AuditEvent
version: 0.0.2