Schedule a demo
Conformance and infrastructure

Audit trail

This scenario illustrates how a routine clinical read of a patient wellness record leaves a transparent, non-alarming audit footprint. A practitioner opens the chart for authorized care coordination, and the system records who accessed what, when, and in which context. The storyline assumes appropriate use: access is legitimate, successful, and free of security exceptions in the generated data.

8resources / instance
8FHIR types
10instances
audit_trail.py
from zato_fhir.test.r4.v1 import Scenarios, TestData

for access in Scenarios.audit_trail:
    patient = access.patient
    for name in patient.name:
        print(name.text)

    event = access.audit_event
    if event.type_ is not None:
        print(event.type_.code)
    for sub in event.subtype:
        print(sub.code)

    prov = access.provenance
    print(prov.recorded)

    link = access.linkage
    print(link.active)

    basic = access.basic
    for coding in basic.code.coding:
        print(coding.code)

    binary = access.binary
    print(binary.contentType)

    params = access.parameters
    for param in params.parameter:
        print(param.name)

    outcome = access.operation_outcome
    for issue in outcome.issue:
        print(issue.severity)

About this scenario

This scenario illustrates how a routine clinical read of a patient wellness record leaves a transparent, non-alarming audit footprint. A practitioner opens the chart for authorized care coordination, and the system records who accessed what, when, and in which context. The storyline assumes appropriate use: access is legitimate, successful, and free of security exceptions in the generated data.

Supporting resources connect the patient to the audited activity and bundle auxiliary payloads where needed. Provenance documents the origin of key assertions, linkage ties related records for traceability, and basic or binary artifacts can stand in for opaque extensions or attachments in integration tests. Parameters and operation outcome wrap the interaction so clients can assert that the operation completed successfully.

FHIR resources in this scenario

8 resources per instance, 80 total across 10 instances.

FHIR resource typeRole in this scenario
PatientSubject of the accessed wellness record
AuditEventSecurity or access log for the chart read
ProvenanceAssertion of who created or signed relevant data
LinkageAssociations between related records for traceability
BasicSimple tag-like resource carrying scenario-specific metadata
BinaryOpaque content such as a small attachment or payload
ParametersInput or output parameters for the audited operation
OperationOutcomeOverall success indicator for the completed operation
FHIR resources per instance8
Total resources (10 instances)80
Distinct resource types8
Scenario identifier`Scenarios.audit_trail`

At a glance

8
FHIR resources per instance
80
Total resources (10 instances)
8
Distinct resource types
Scenarios.audit_trail
Scenario identifier

Ready to build integrations?

Get started with Zato and connect your systems in minutes.

Open source In Python