On this page:

12.2Transaction Log

 

The Smile CDR transaction log is responsible for creating a temporary log of incoming and outgoing transactions as they enter and leave the system.

The transaction log is a part of the Smile CDR Cluster Manager module, and runs on every node in a cluster. Configuration for the cluster manager is stored in the Node Configuration Properties File.

12.2.1Transaction Log Configuration

 

Enabling/Disabling the Transaction Log

  • transactionlog.enabled – Controls whether the transaction log will be written to. The default value is true. If set to false, no new entries will be written (existing entries are not deleted simply by modifying this setting).

Controlling the Transaction Log Size

  • transactionlog.persist_bodies_in_clustermgr_db – Controls whether payload bodies will be stored in the transaction log. The default value is true. If set to false, items such as raw HTTP requests and responses, HL7 v2.x messages, etc., will not be written to the transaction log. Storing payload bodies is helpful for troubleshooting, but has implications in terms of performance (since this potentially means a lot of extra data is saved in the database) and in terms of privacy (since the transaction log is not aware of the meaning of payloads and therefore can not restrict access by subject or other payload properties). This setting is a master setting, and can be further refined using several other options:

  • retain_transaction_log_days – Controls how many days to keep transaction log entries before deleting them.

Persisting Transaction Bodies

By default the transaction log will store the request and response bodies for transactions flowing through the system.

Controlling Transaction Log Events

By default all events will be written to the transaction log. This is useful for troubleshooting, but can quickly make the transaction log very noisy. For this reason, it is often useful to trim certain events out of the log.

Events in the Transaction Log can be customized using the Event Whitelist and Event Blacklist properties. If the Event Whitelist property is set, only events matched by the whitelist will be included in the transaction log. If the Event Blacklist is set, any events that are matched by the blacklist will not be processed. Note that the whitelist is processed first, and any events that pass through the whitelist (or all events, if no whitelist is set) are then filtered by the blacklist.

The format of the whitelist/blacklist is a comma separated list of codes, in the format: [Type Code]|[SubType Code]. See Event Types and SubTypes below for a list of valid event codes. Both the Type Code and SubType Code may be a code from the list of available codes, or the value * to match all codes.

The following configuration properties are used to control the lists.

For example, the following settings will cause the transaction log to include ONLY received HL7 v2.x messages, excluding ADT^A28 and ADT^A31 messages.

transactionlog.event_whitelist=HL7V2_INBOUND|*
transactionlog.event_blacklist=HL7V2_INBOUND|HL7V2_ADT_A28, HL7V2_INBOUND|HL7V2_ADT_A31

12.2.2Event Types and SubTypes

 

This section lists the event codes for transaction log entries. Every entry in the transaction log will have exactly one type code and one subtype code.

The Type Code can be thought of as the high level category, with the SubType Code being the specific payload type. Note that these codes can have a many-to-many relationship. For example, the HL7V2_ADT_A01 SubType code means that the specific transaction involves an HL7 v2.x ADT^A01 message. This SubType code will be logged with the Type Code of HL7V2_INBOUND when this type of message is received by Smile CDR, and will be logged with a Type Code of HL7V2_OUTBOUND when this message is sent by Smile CDR.

Event Type Codes

FHIR_REQUEST
FHIR Request Indicates than a FHIR client request has been handled by a Smile CDR FHIR Server Endpoint.
HL7V2_INBOUND
HL7 v2.x Inbound Indicates that an HL7 v2.x message has been received by Smile CDR.
HL7V2_OUTBOUND
HL7 v2.x Outbound Indicates that an HL7 v2.x message has been sent by Smile CDR.
SOAP_REQUEST
SOAP Request Indicates that a SOAP client request has been handled by Smile CDR.

Event SubType Codes

FHIR_APPLY_CODESYSTEM_DELTA_ADD
Apply Codesystem Delta: Add Codes
FHIR_APPLY_CODESYSTEM_DELTA_REMOVE
Apply Codesystem Delta: Remove Codes
FHIR_BINARY_ACCESS_READ
FHIR Binary Access - Read ($binary-access-read)
FHIR_BINARY_ACCESS_WRITE
FHIR Binary Access - Write ($binary-access-write)
FHIR_CODESYSTEM_LOOKUP
Code Lookup ($lookup)
FHIR_COMPOSITION_DOCUMENT
Generate Document ($document)
FHIR_CONCEPTMAP_TRANSLATE
Translate Code ($translate)
FHIR_CONFORMANCE
Fetch Conformance (/metadata)
FHIR_CREATE
Create Resource
FHIR_DELETE
Delete Resource
FHIR_GET_PAGE
Fetch Page
FHIR_HISTORY_INSTANCE
History (Instance)
FHIR_HISTORY_SYSTEM
History (System)
FHIR_HISTORY_TYPE
History (Type)
FHIR_MARK_ALL_RESOURCES_FOR_REINDEXING
Mark all resources for reindexing
FHIR_META_ADD
Add to Metadata ($meta-add)
FHIR_META_DELETE
Delete from Metadata ($meta-delete)
FHIR_META_GET
Fetch Metadata ($meta)
FHIR_OPERATION_EVERYTHING_ENCOUNTER_INSTANCE
Search Entire Encounter Record ($everything)
FHIR_OPERATION_EVERYTHING_PATIENT_INSTANCE
Search Entire Patient Chart ($everything)
FHIR_OPERATION_EXPUNGE
Expunge Operation ($expunge)
FHIR_OPERATION_GET_RESOURCE_COUNTS
Get Resource Counts Operation ($get-resource-counts)
FHIR_OPERATION_GRAPHQL
GraphQL Operation ($graphql)
FHIR_OPERATION_LIVEBUNDLE
LiveBundle ($livebundle)
FHIR_OPERATION_LIVEBUNDLE_WATCHLIST
LiveBundle Watchlist ($livebundle-watchlist)
FHIR_OPERATION_LIVEBUNDLE_WATCHLIST_ADD
LiveBundle Watchlist Add ($livebundle-watchlist-add)
FHIR_OPERATION_LIVEBUNDLE_WATCHLIST_DELETE
LiveBundle Watchlist Delete ($livebundle-watchlist-delete)
FHIR_OPERATION_MATCH_PATIENT
FHIR Patient Match ($match)
FHIR_OPERATION_SUGGEST_KEYWORDS
Suggest Keywords
FHIR_OPERATION_TRIGGER_SUBSCRIPTION
Manually Trigger Subscription ($trigger-subscription)
FHIR_OPERATION_UNCLASSIFIED
FHIR Operation (Unclassified)
FHIR_PATCH
Patch Resource
FHIR_PERFORM_REINDEXING_PASS
Perform reindexing pass
FHIR_PROCESS_MESSAGE
Process Message ($process-message)
FHIR_READ
Read Resource
FHIR_SEARCH_SYSTEM
Search Across All Resource Types
FHIR_SEARCH_TYPE
Search for Resources
FHIR_TRANSACTION
Transaction
FHIR_UPDATE
Update Resource
FHIR_UPLOAD_EXTERNAL_CODE_SYSTEM
Upload External Terminology Code System
FHIR_VALIDATE
Validate Resource ($validate)
FHIR_VALUESET_EXPAND
Expand ValueSet ($expand)
FHIR_VALUESET_VALIDATE_CODE
Validate Code ($validate-code)
FHIR_VREAD
VRead Resource
HL7V2_ADT_A01
ADT^A01 (Admit)
HL7V2_ADT_A02
ADT^A02 (Transfer)
HL7V2_ADT_A03
ADT^A03 (Discharge)
HL7V2_ADT_A04
ADT^A04 (Register)
HL7V2_ADT_A05
ADT^A05 (Pre-Admit)
HL7V2_ADT_A06
ADT^A06 (Convert OP to IP)
HL7V2_ADT_A07
ADT^A07 (Convert IP to OP)
HL7V2_ADT_A08
ADT^A08 (Update Visit)
HL7V2_ADT_A11
ADT^A11 (Cancel Admit)
HL7V2_ADT_A12
ADT^A12 (Cancel Transfer)
HL7V2_ADT_A13
ADT^A13 (Cancel Discharge)
HL7V2_ADT_A14
ADT^A14 (Pending Admit)
HL7V2_ADT_A15
ADT^A15 (Pending Transfer)
HL7V2_ADT_A16
ADT^A16 (Pending Discharge)
HL7V2_ADT_A17
ADT^A17 (Swap Patients)
HL7V2_ADT_A21
ADT^A21 (Patient begins LOA)
HL7V2_ADT_A22
ADT^A22 (Patient returns from LOA)
HL7V2_ADT_A24
ADT^A24 (Link Patient Information)
HL7V2_ADT_A25
ADT^A25 (Cancel Pending Discharge)
HL7V2_ADT_A27
ADT^A27 (Cancel Pending Admit)
HL7V2_ADT_A28
ADT^A28 (Add Patient)
HL7V2_ADT_A29
ADT^A29 (Delete Person Information)
HL7V2_ADT_A31
ADT^A31 (Update Patient)
HL7V2_ADT_A34
ADT^A34 (Merge Patient Information)
HL7V2_ADT_A37
ADT^A37 (Unlink Patient)
HL7V2_ADT_A38
ADT^A38 (Cancel Pre-Admit)
HL7V2_ADT_A39
ADT^A39 (Merge Person - Patient ID)
HL7V2_ADT_A40
ADT^A40 (Merge Patient)
HL7V2_ADT_A45
ADT^A45 (Move Visit Information - Visit Number)
HL7V2_ADT_A47
ADT^A47 (Change Patient Identifier List)
HL7V2_ADT_A54
ADT^A54 (Change Attending)
HL7V2_ADT_A60
ADT^A60 (Update Allergies)
HL7V2_ADT_A61
ADT^A61 (Change Consulting)
HL7V2_BAR_P01
BAR^P01 (Establish Billing Account)
HL7V2_DFT_P03
DFT^P03 (Post Detailed Financial Transaction)
HL7V2_OMG_O19
OMG^O19 (General Clinical Order Message)
HL7V2_ORU_R01
ORU^R01 (Unsolicited Result)
HL7V2_RAS_O17
RAS^O17 (Medication Administration)
HL7V2_RDE_O01
RDE^O01 (Medication Order - Legacy)
HL7V2_RDE_O11
RDE^O11 (Medication Order)
HL7V2_UNKNOWN_MESSAGE_TRIGGER
Unknown Message Trigger
INVALID_REQUEST
Invalid Request
UNSPECIFIED
Unspecified