Your Revenue Cycle Management Data Template
Your Revenue Cycle Management Data Template
- Recommended attributes to collect
- Key activities to track
- Extraction guidance for Oracle Health Revenue Cycle
Revenue Cycle Management Attributes
| Name | Description | ||
|---|---|---|---|
| Activity Name ActivityName | The name of the specific step or event that occurred within the revenue cycle process. | ||
| Description This attribute records the name of each activity performed within the lifecycle of a billing event. Examples include 'Charges Captured', 'Claim Submitted To Payer', and 'Payment Posted'. These activities form the nodes of the discovered process map. Analyzing the sequence and frequency of activities is the core of process mining. This attribute helps identify the most common process paths, discover deviations from the standard procedure, and understand the operational flow of the revenue cycle. Why it matters It defines the steps in the process, allowing for the visualization of the process map and analysis of workflow patterns. Where to get Typically derived from event logs, status change records, or specific transaction tables associated with different stages of the revenue cycle in Oracle Health. Examples Claim GeneratedRemittance ReceivedDenial AppealedAccount Closed | |||
| Billing Event BillingEvent | The unique identifier for a single service or product delivery that generates a charge, serving as the case identifier for the revenue cycle process. | ||
| Description The Billing Event acts as the primary case identifier, linking all activities from charge capture to account closure for a distinct billable item. Each Billing Event represents a unique instance of the revenue cycle process, allowing for comprehensive tracking of its journey through various stages like claim submission, payment posting, and potential denials or adjustments. In process mining analysis, this attribute is fundamental for reconstructing the end-to-end process flow. It enables the visualization of process variants, calculation of cycle times between activities, and identification of bottlenecks or deviations associated with specific billable events. Why it matters This is the essential key for tracking the entire lifecycle of a billable service, enabling all process flow analysis and performance measurement. Where to get This identifier should be a unique key present in the core billing or charge transaction tables within Oracle Health Revenue Cycle. Consult system documentation to identify the primary key for charge events. Examples BEVNT-987654321BEVNT-987654322BEVNT-987654323 | |||
| Event Timestamp EventTimestamp | The precise date and time when an activity was recorded in the system. | ||
| Description This attribute provides the timestamp for each activity, marking the exact moment it occurred. It is essential for understanding the timing and sequence of events within the revenue cycle for a specific billing event. In analysis, the Event Timestamp is used to order activities chronologically, calculate durations and cycle times between different steps, and perform bottleneck analysis. It is the foundation for all time-based process mining metrics, such as identifying delays between 'Claim Submitted' and 'Remittance Received'. Why it matters This timestamp is critical for ordering events, calculating all performance metrics like cycle times and durations, and identifying process bottlenecks. Where to get Each transaction or event log table in Oracle Health Revenue Cycle should have a timestamp column indicating when the record was created or the event occurred. Examples 2023-04-15T09:00:00Z2023-04-18T14:30:00Z2023-05-02T11:25:10Z | |||
| Adjustment Amount AdjustmentAmount | The monetary value of any adjustments made to the account balance. | ||
| Description This attribute captures the amount of any financial adjustment, such as contractual allowances, write-offs, or corrections, applied to the billing event. Adjustments directly reduce the expected revenue from a charge. The 'Account Adjustment Impact' dashboard relies heavily on this attribute. Analyzing adjustment amounts and their associated reasons helps identify sources of revenue leakage, issues with contract management, or problems in the initial charge capture process. It is a key metric for financial health. Why it matters Quantifies revenue leakage due to write-offs or corrections, helping to identify and address root causes of financial erosion. Where to get Found in financial transaction tables that log adjustments or write-offs against a patient account. Examples -50.25-120.0025.00 | |||
| Billing Department BillingDepartment | The department or functional team responsible for the activity. | ||
| Description This attribute specifies the department, such as 'Charge Capture', 'Coding', or 'Collections', that performed the activity. It provides an organizational context to the process flow. Analyzing the process from a departmental view is essential for understanding handoffs between teams and identifying cross-functional inefficiencies. It supports the 'Billing Department Workload' dashboard by allowing aggregation of activities and performance metrics at the department level. Why it matters Assigns activities to organizational units, which is key for analyzing inter-departmental handoffs, workload, and team performance. Where to get This information might be stored directly with the user profile data in Oracle Health or derived based on the user or activity type. Examples Patient AccessCodingBillingCollections | |||
| Denial Reason Code DenialReasonCode | A standardized code indicating the reason a claim was denied by the payer. | ||
| Description When a payer denies a claim, they provide a reason code explaining the denial, such as 'Non-covered service' or 'Duplicate claim'. This attribute captures that code and its associated description. Analyzing denial reasons is fundamental to improving the revenue cycle. It allows the organization to identify common patterns, such as issues with coding or patient eligibility, and implement corrective actions to prevent future denials. This directly impacts the clean claim rate and reduces the cost of rework. Why it matters Provides the root cause for claim denials, enabling targeted improvements to increase the clean claim rate and accelerate revenue collection. Where to get This information is received in the electronic remittance advice (ANSI 835 file) from the payer and should be stored in the claim or remittance tables in Oracle Health. Examples CO-16: Claim/service lacks information needed for adjudication.PR-96: Non-covered charge(s).CO-18: Duplicate claim/service. | |||
| Outstanding Balance OutstandingBalance | The remaining unpaid balance for the billing event at a given point in time. | ||
| Description This attribute shows the current outstanding amount owed for a billing event after all payments and adjustments have been applied. It represents the active accounts receivable for that specific charge. This is a critical attribute for the 'Outstanding Balance Aging' dashboard. Analyzing this value over time helps in monitoring the velocity of cash flow, assessing the effectiveness of collection efforts, and calculating key financial KPIs like Days Sales Outstanding (DSO). Why it matters Tracks the current accounts receivable for each case, which is essential for managing cash flow and analyzing the effectiveness of collections. Where to get This value is typically calculated from the sum of all financial transactions (charges, payments, adjustments) for a given billing event. It may exist as a field in an account summary table. Examples 75.000.00550.80 | |||
| Patient Class PatientClass | The classification of the patient encounter, such as Inpatient or Outpatient. | ||
| Description This attribute categorizes the type of patient visit or encounter that generated the charge. Common classifications include Inpatient, Outpatient, Emergency, and Recurring Patient. The patient class often dictates the entire billing and claims submission process. Different patient classes follow distinct process paths and have different compliance requirements. Analyzing the process based on this attribute helps to understand these variations, tailor improvement initiatives, and ensure that the correct procedures are being followed for each class. Why it matters Separates distinct process flows (e.g., Inpatient vs. Outpatient) that have different complexities, timelines, and billing requirements. Where to get This is a standard field associated with a patient encounter or admission record in Oracle Health. Examples InpatientOutpatientEmergencyRecurring | |||
| Payer Name PayerName | The name of the insurance company or third-party payer responsible for payment. | ||
| Description This attribute identifies the entity, such as an insurance company or government program like Medicare, that is billed for the service. Payer information is fundamental to revenue cycle analysis. Analyzing the process by payer can reveal significant variations in payment times, denial rates, and appeal success rates. It helps in identifying problematic payers that cause delays or revenue loss and is essential for managing payer contracts and relationships effectively. Why it matters Allows for segmentation of the process by payer, revealing different behaviors, denial rates, and payment speeds which is crucial for financial performance. Where to get This information is stored in the patient's billing or insurance records within Oracle Health Revenue Cycle. Examples AetnaBlue Cross Blue ShieldUnitedHealthcareMedicareCigna | |||
| User UserPerformingAction | The user ID or name of the person who performed the activity. | ||
| Description This attribute identifies the employee or automated system user responsible for executing a specific activity in the process. It is crucial for understanding workload distribution, resource performance, and identifying training needs. In analysis, this attribute allows for filtering the process map by user or team, comparing performance across different resources, and analyzing workload for the 'Billing Department Workload' dashboard. It can help identify top performers or individuals who may require additional support or training. Why it matters Links process activities to specific users or teams, enabling workload analysis, performance comparison, and identification of training opportunities. Where to get User ID fields (e.g., 'CREATED_BY', 'USER_ID') are typically present in transaction tables across Oracle Health modules. Examples j.doeasmithBillingBot_AUTOk.williams | |||
| Charge Amount ChargeAmount | The gross monetary value of the service or product being billed. | ||
| Description This attribute represents the initial, undiscounted amount charged for a service before any adjustments, contractual allowances, or payments are applied. It is the starting financial value for the billing event. Tracking the charge amount is crucial for financial analysis, such as calculating the total value of services rendered and understanding the financial impact of subsequent adjustments or write-offs. It serves as a baseline for measuring revenue realization. Why it matters Establishes the initial financial value of the case, which is fundamental for all subsequent financial analysis and impact assessment. Where to get Located in the charge detail or charge transaction tables in Oracle Health. Examples 150.001250.7585.50 | |||
| Claim ID ClaimId | The unique identifier for the insurance claim submitted to a payer. | ||
| Description This attribute is the unique ID assigned to a claim that is generated and sent to a payer for reimbursement. A single billing event may result in one or more claims over its lifecycle, for example if a correction is needed. Using the Claim ID allows for tracing a specific submission to a payer and linking it directly to the response, such as a payment or denial. It provides a more granular level of tracking within the broader revenue cycle process. Why it matters Provides a specific identifier to track the journey of a claim with a payer, which is more granular than the overall billing event. Where to get This ID is generated by Oracle Health when a claim is created and is stored in the primary claims table. Examples CLM-2023-55489CLM-2023-55490CLM-2023-55491-C1 | |||
| Dispute Reason DisputeReason | The reason provided by the customer or patient for disputing an invoice or charge. | ||
| Description This attribute captures the reason why a patient or other responsible party has disputed a bill. Reasons can include incorrect charges, services not rendered, or issues with insurance processing. This information is essential for the 'Invoice Dispute Resolution Metrics' dashboard. Understanding the most common reasons for disputes helps to identify systemic problems in the charge capture, coding, or billing processes. Addressing these root causes can significantly reduce the dispute rate and the administrative overhead required to resolve them. Why it matters Explains why invoices are being disputed, providing direct insight into issues with billing accuracy or clarity that need to be fixed. Where to get This is likely stored in a case management or customer service module within Oracle Health, linked to the patient's account. Examples Incorrect Service BilledDuplicate ChargeInsurance Billed IncorrectlyService Not Rendered | |||
| Event End Time EventEndTime | The timestamp marking the completion of an activity, if available. | ||
| Description While StartTime marks the beginning of an activity, EventEndTime marks its conclusion. Not all activities have a distinct end time, as many are instantaneous events. However, for activities that have a duration, such as 'Denial Appealed' which might take time to process, this field is very useful. This attribute allows for a more precise calculation of the processing time for individual activities. It helps differentiate between waiting time (time between activities) and processing time (time spent on an activity). Why it matters Enables the direct calculation of how long an activity takes to complete, separating processing time from waiting time. Where to get Some transaction tables in Oracle Health Revenue Cycle may contain both a start and end timestamp for specific, long-running tasks. Examples 2023-04-15T09:05:14Z2023-04-18T16:00:00Z | |||
| Is Automated IsAutomated | A flag indicating whether the activity was performed by an automated system or a human user. | ||
| Description This boolean attribute distinguishes between activities executed by software automation, such as bots or system batch jobs, and those performed manually by a user. For example, 'Claim Generated' might be an automated step, while 'Denial Appealed' is likely manual. Analyzing this attribute helps in understanding the level of automation in the process and its impact on efficiency and error rates. It can be used to compare the performance of automated versus manual paths and identify opportunities for further automation. Why it matters Differentiates between human and system-driven activities, which is critical for analyzing automation effectiveness and identifying new automation opportunities. Where to get This is typically derived based on the UserPerformingAction attribute. For example, activities performed by user IDs like 'SYSTEM' or 'RPA_BOT' are flagged as automated. Examples truefalse | |||
| Is Rework IsRework | A flag that identifies activities representing rework or repeated effort. | ||
| Description This calculated attribute flags activities that indicate a deviation from the ideal 'happy path' and constitute rework. Examples include 'Corrected Claim Submitted' or 'Denial Appealed', which would not occur if the process went perfectly the first time. Identifying and quantifying rework is a key goal of process mining. This flag allows for easy filtering and analysis of all rework loops, helping to measure the frequency, cost, and causes of process inefficiencies. It is essential for understanding the true cost of quality in the revenue cycle. Why it matters Helps quantify the frequency and impact of rework loops, highlighting process inefficiencies and the cost of poor quality. Where to get This is a derived attribute. It is calculated during data transformation by applying business logic that flags specific activity names as rework. Examples truefalse | |||
| Last Data Update LastDataUpdate | The timestamp indicating the last time the data for this event was refreshed or extracted. | ||
| Description This attribute shows when the dataset was last updated. It provides context on the freshness of the data being analyzed, which is important for understanding the timeliness of the insights derived from the process mining analysis. Users can check this attribute to confirm they are viewing the most current process information. It helps manage expectations about the data's recency and is a key component of data governance and quality assurance. Why it matters Indicates the freshness of the data, ensuring that analysis and decisions are based on up-to-date information. Where to get This is a metadata field typically generated and populated during the ETL process that loads data into the process mining platform. Examples 2023-10-27T02:00:00Z2023-10-28T02:00:00Z | |||
| Patient ID PatientId | The unique identifier for the patient associated with the billing event. | ||
| Description This attribute is the unique identifier for the patient who received the service, often known as the Medical Record Number (MRN). It links the financial transaction to a specific individual. While not the case ID for the process, the Patient ID is useful for aggregating all billing events for a single patient to understand their entire financial journey. It also allows for segmentation based on patient demographics or history if joined with patient master data. Why it matters Links financial events to a specific patient, allowing for patient-centric analysis and aggregation of all their billing activities. Where to get This identifier is a core element of the patient master record and will be present in all related transaction tables like charges, claims, and payments. Examples MRN-1002345MRN-1002346MRN-1002347 | |||
| Processing Time ProcessingTime | The duration of time spent actively working on an activity. | ||
| Description This attribute measures the active processing time for an event, calculated as the difference between its start and end timestamps. It helps distinguish between time spent actively working on a task versus time spent waiting for the next step. This is a crucial metric for performance analysis, as it isolates the efficiency of the resource performing the task from systemic delays. It helps answer questions about how long it takes to code a claim or post a payment, independent of how long the item sat in a work queue. Why it matters Measures the actual work duration for an activity, separating it from idle or wait time to provide a clearer view of resource efficiency. Where to get This is a calculated metric, derived by subtracting the EventTimestamp from the EventEndTime. It can only be calculated when both fields are available. Examples 300120045 | |||
| Source System SourceSystem | The system from which the event data was extracted. | ||
| Description This attribute identifies the source application or module where the data originated. For this process, it will typically be 'Oracle Health Revenue Cycle', but it could also specify different modules within the system if data is integrated from multiple places. This information is valuable for data governance and troubleshooting. It helps confirm data lineage and is important in environments where multiple systems contribute to a single end-to-end process. Why it matters Provides context on data origin, which is crucial for data validation, governance, and understanding process variations that might be system-dependent. Where to get This is often a static value added during the data extraction, transformation, and loading (ETL) process to label the origin of the dataset. Examples OracleHealth-RCMOracleHealth-CernerOH-RevCycle-PROD | |||
Revenue Cycle Management Activities
| Activity | Description | ||
|---|---|---|---|
| Account Closed | The final activity, indicating that the account balance is zero and no further activity is expected. This is often inferred when the account balance reaches zero. | ||
| Why it matters Marks the successful completion of the revenue cycle. The time to reach this state is a key measure of overall process efficiency. Where to get This is typically inferred by identifying the first time the account's outstanding balance becomes zero and remains zero after all payments and adjustments. Capture Calculated when the account balance first equals zero after all charges and payments are posted. Event type calculated | |||
| Claim Generated | Marks the point where individual charges are compiled into a formal billing claim, like a UB-04 or CMS-1500. This is a system-generated event that creates the initial invoice. | ||
| Why it matters This is a major milestone that signifies readiness to bill a payer. It's the endpoint for measuring the internal charge-to-bill lag. Where to get An explicit event recorded in claim generation logs or tables. Look for the creation timestamp of the primary claim record associated with the encounter. Capture Event logged upon the creation of the claim record. Event type explicit | |||
| Claim Submitted To Payer | Represents the electronic or paper submission of the generated claim to the insurance company or payer. The system should log the date and time of this transmission. | ||
| Why it matters This activity starts the clock on the payment cycle. Analyzing the time from submission to payment is key to understanding payer performance and Days Sales Outstanding (DSO). Where to get Sourced from the claims management module, which logs transmission events. Look for a submission timestamp or a status change to 'Submitted' in the claim history. Capture Event logged when the claim is successfully transmitted via the clearinghouse. Event type explicit | |||
| Patient Encounter Created | Marks the creation of a patient account for a specific visit or service. This is typically an explicit event triggered by the registration system or an Admit/Discharge/Transfer (ADT) feed. | ||
| Why it matters It serves as the starting point for the entire revenue cycle for a given billing event, enabling analysis of the total process duration and registration accuracy. Where to get Sourced from the Patient Registration or ADT module logs. Look for encounter creation events or the earliest timestamp associated with the encounter or financial number. Capture Event logged upon patient registration or admission. Event type explicit | |||
| Payment Posted | Represents the application of the payment received from the payer to the corresponding charges on the patient's account. This is a financial transaction logged by a user or an automated process. | ||
| Why it matters The efficiency of payment posting affects the accuracy of accounts receivable. Delays here can distort the financial picture and delay secondary billing. Where to get Found in the payment transaction tables. Each payment posting will have a unique transaction ID and an associated timestamp. Capture A financial transaction is recorded when the payment is applied to the account. Event type explicit | |||
| Account Adjusted | Represents a financial adjustment made to the account balance, such as a contractual allowance, a write-off, or a discount. Each adjustment is a discrete financial transaction. | ||
| Why it matters Adjustments directly impact revenue. Analyzing their frequency, type, and amount helps identify revenue leakage and billing inaccuracies. Where to get Found in financial transaction tables. Each adjustment is logged as a separate line item with a specific transaction code and timestamp. Capture A financial transaction is logged with a specific adjustment code. Event type explicit | |||
| Charges Captured | Represents the entry of billable services or items into the patient's account. This can happen automatically from clinical systems or through manual entry by staff. | ||
| Why it matters This activity is critical for measuring 'charge lag', the time between service delivery and billing initiation, which directly impacts cash flow and revenue integrity. Where to get Captured from charge transaction tables, identified by the creation timestamp of each charge line item. In Oracle Health, this is often in charge-related tables. Capture Transaction log entry created for each new charge. Event type explicit | |||
| Charges Coded | Represents the process where medical coders assign standardized codes, like CPT or ICD-10, to the captured charges. This is often tracked by a status change on the charge or encounter. | ||
| Why it matters Delays in coding are a common bottleneck. Tracking this activity helps identify inefficiencies in the coding workflow and their impact on billing timelines. Where to get Often inferred from a status change on the patient encounter or charge batch, for example, from 'Uncoded' to 'Coded'. A timestamp for this status change is required. Capture Inferred from change in encounter or charge status to 'Coded' or 'Ready for Billing'. Event type inferred | |||
| Collection Activity Started | Indicates that the patient's account has been moved to a collections process due to non-payment. This is typically captured by a change in the account's financial or status class. | ||
| Why it matters This is a critical step for managing bad debt. Analyzing what leads to this stage and its success rate is vital for financial health. Where to get Inferred from a change in the account status field to 'Collections' or 'Bad Debt'. This status change should have an associated timestamp. Capture Inferred from an account status change to a 'Collections' or similar state. Event type inferred | |||
| Corrected Claim Submitted | Represents the submission of a revised or corrected claim to the payer, often following a denial or request for more information. This is identified by a new claim submission with a correction indicator. | ||
| Why it matters This activity is a key part of the denial management rework loop. High frequency indicates problems with initial claim accuracy. Where to get Captured from the claim submission logs. Look for a new submission for an existing encounter, often marked with a resubmission code or a higher iteration number. Capture Logged event for a claim resubmission, often identifiable by a specific claim frequency type code. Event type explicit | |||
| Denial Appealed | A user or system action indicating that a denied claim is being appealed. This is typically captured as a status update or a specific task created in a work queue. | ||
| Why it matters This activity initiates a rework loop. Analyzing the frequency and success rate of appeals is critical for optimizing revenue recovery efforts. Where to get This could be an explicit user-initiated event or inferred from a status change on the claim, such as 'Appealed' or 'In Review'. Capture A status change or logged event when a user initiates the appeal process for a denied claim. Event type explicit | |||
| Denial Received | Marks the event where the payer has rejected a claim or specific line items, as indicated in the remittance advice. This event is often inferred from denial codes present in the remittance data. | ||
| Why it matters Tracking denials is essential for identifying root causes, such as coding errors or eligibility issues, and improving the clean claim rate. Where to get Inferred from the remittance (ERA/835) data. When a claim or line item has a non-zero denial amount and a corresponding denial reason code, this event is triggered. Capture Inferred from remittance data containing denial reason codes (CARCs/RARCs). Event type inferred | |||
| Patient Statement Sent | Marks the event where a bill for the remaining patient responsibility is generated and sent to the patient. This is an explicit action logged by the patient billing module. | ||
| Why it matters This initiates the patient payment portion of the revenue cycle. Tracking this helps in analyzing the effectiveness of patient collections. Where to get Sourced from patient billing or correspondence logs. The system should record the date each statement was generated or sent. Capture Event logged when a patient statement is generated and printed or sent electronically. Event type explicit | |||
| Remittance Received | Indicates the receipt of an Electronic Remittance Advice (ERA) or a paper Explanation of Benefits (EOB) from the payer. This document details which charges were paid, denied, or adjusted. | ||
| Why it matters This is the first response from the payer and is crucial for understanding payment velocity and identifying denial trends early. Where to get Recorded in the remittance processing module. Look for the import or creation timestamp of the ERA file, like an 835 transaction file, linked to the claim. Capture Event logged upon import and processing of the payer's remittance file (e.g., ANSI 835). Event type explicit | |||
Extraction Guides
Steps
- Request Database Access: Obtain read-only credentials for the Oracle Health Revenue Cycle database. You will need access to the schemas containing patient, encounter, billing, and financial transaction data. This typically requires approval from the IT security and database administration teams.
- Identify Schema and Table Names: Work with a database administrator or a system analyst to confirm the exact schema and table names for your Oracle Health instance. The names provided in the query are common placeholders and must be mapped to your specific environment.
- Install a SQL Client: Install a compatible SQL client, such as Oracle SQL Developer or DBeaver, on your workstation. This tool will be used to connect to the database and execute the extraction script.
- Establish Database Connection: Configure a new database connection in your SQL client using the provided host, port, service name, and credentials. Test the connection to ensure it is successful.
- Customize the SQL Query: Copy the provided SQL script into a new query editor window. Locate the placeholder values, such as
[START_DATE]and[END_DATE], and replace them with the desired date range for your analysis (e.g., '2023-01-01'). Adjust any filter conditions based on your specific analytical needs, such as filtering for a particular Patient Class. - Execute the Extraction Script: Run the customized SQL script. The query is designed to be comprehensive and may take several minutes to hours to complete, depending on the date range and the size of your database.
- Review Initial Results: Once the query finishes, review the first few hundred rows in your SQL client's results grid. Check for obvious errors, such as all-null columns or incorrect data formats, to ensure the script ran correctly.
- Export Data to CSV: Export the entire result set to a CSV file. Use UTF-8 encoding to prevent character issues. Ensure the exported file includes a header row with the column names specified in the query aliases (e.g., "BillingEvent", "ActivityName").
- Prepare for Upload: Before uploading to a process mining tool, open the CSV file to confirm its integrity. Check that the timestamp format is consistent and that the column headers match the required attributes exactly. The file is now ready for upload.
Configuration
- Date Range: The query uses
[START_DATE]and[END_DATE]placeholders. It is critical to define a specific and reasonable date range to control the data volume. A range of 3 to 6 months is recommended for an initial analysis. - Filtering: The initial data set is filtered by the encounter registration date (
reg_dt_tm) in theRelevantEncounterssection. You can add otherWHEREclauses to this section to narrow the scope, for example,e.patient_class_code IN ('INPATIENT', 'OUTPATIENT')to focus on specific encounter types. - Performance: Direct database querying on a production system can impact performance. It is highly recommended to run this extraction during off-peak hours or against a read-only replica of the production database if available.
- Prerequisites: This method requires a database user account with
SELECTprivileges on all tables referenced in the query. These tables include encounter, billing, charge, claim, remittance, and financial transaction tables. - Table and Column Mapping: The provided script uses common, representative names for tables and columns. You must validate and map these to the actual names in your organization's Oracle Health database schema. For instance,
FINANCIAL_TRANSACTIONmight be namedAR_TRANSACTIONSin your system.
a Sample Query sql
WITH RelevantEncounters AS (
SELECT
e.billing_event_id
FROM ENCOUNTER e
WHERE e.reg_dt_tm BETWEEN TO_DATE('[START_DATE]', 'YYYY-MM-DD') AND TO_DATE('[END_DATE]', 'YYYY-MM-DD')
)
SELECT
e.billing_event_id AS "BillingEvent",
'Patient Encounter Created' AS "ActivityName",
e.reg_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
e.total_account_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM ENCOUNTER e
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON e.reg_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON e.reg_facility_org_id = org.organization_id
LEFT JOIN PAYER pyr ON e.primary_payer_id = pyr.payer_id
UNION ALL
SELECT
cd.billing_event_id AS "BillingEvent",
'Charges Captured' AS "ActivityName",
cd.charge_entry_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
cd.charge_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM CHARGE_DETAIL cd
JOIN ENCOUNTER e ON cd.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON cd.entry_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON cd.performing_dept_org_id = org.organization_id
LEFT JOIN PAYER pyr ON e.primary_payer_id = pyr.payer_id
UNION ALL
SELECT
ch.billing_event_id AS "BillingEvent",
'Charges Coded' AS "ActivityName",
ch.coded_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
e.total_account_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM CODING_HISTORY ch
JOIN ENCOUNTER e ON ch.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON ch.coder_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON p.default_org_id = org.organization_id
LEFT JOIN PAYER pyr ON e.primary_payer_id = pyr.payer_id
UNION ALL
SELECT
cl.billing_event_id AS "BillingEvent",
'Claim Generated' AS "ActivityName",
cl.create_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
cl.claim_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM CLAIM cl
JOIN ENCOUNTER e ON cl.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON cl.create_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON cl.billing_entity_org_id = org.organization_id
LEFT JOIN PAYER pyr ON cl.payer_id = pyr.payer_id
UNION ALL
SELECT
csl.billing_event_id AS "BillingEvent",
'Claim Submitted To Payer' AS "ActivityName",
csl.submission_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
cl.claim_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM CLAIM_SUBMISSION_LOG csl
JOIN CLAIM cl ON csl.claim_id = cl.claim_id
JOIN ENCOUNTER e ON cl.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON csl.submit_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON cl.billing_entity_org_id = org.organization_id
LEFT JOIN PAYER pyr ON cl.payer_id = pyr.payer_id
WHERE csl.submission_type = 'INITIAL'
UNION ALL
SELECT
ra.billing_event_id AS "BillingEvent",
'Remittance Received' AS "ActivityName",
ra.remit_received_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
e.total_account_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM REMITTANCE_ADVICE ra
JOIN ENCOUNTER e ON ra.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON ra.processed_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON ra.processing_org_id = org.organization_id
LEFT JOIN PAYER pyr ON ra.payer_id = pyr.payer_id
UNION ALL
SELECT
ft.billing_event_id AS "BillingEvent",
'Payment Posted' AS "ActivityName",
ft.transaction_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
ft.ending_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM FINANCIAL_TRANSACTION ft
JOIN ENCOUNTER e ON ft.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON ft.post_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON ft.post_dept_org_id = org.organization_id
LEFT JOIN PAYER pyr ON ft.payer_id = pyr.payer_id
WHERE ft.transaction_type_code = 'PAYMENT'
UNION ALL
SELECT
rd.billing_event_id AS "BillingEvent",
'Denial Received' AS "ActivityName",
ra.remit_received_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
e.total_account_balance AS "OutstandingBalance",
rd.denial_reason_code AS "DenialReasonCode"
FROM REMITTANCE_DETAIL rd
JOIN REMITTANCE_ADVICE ra ON rd.remit_id = ra.remit_id
JOIN ENCOUNTER e ON ra.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON ra.processed_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON ra.processing_org_id = org.organization_id
LEFT JOIN PAYER pyr ON ra.payer_id = pyr.payer_id
WHERE rd.denial_reason_code IS NOT NULL
UNION ALL
SELECT
at.billing_event_id AS "BillingEvent",
'Denial Appealed' AS "ActivityName",
at.appeal_filed_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
e.total_account_balance AS "OutstandingBalance",
at.related_denial_code AS "DenialReasonCode"
FROM APPEAL_TRACKING at
JOIN ENCOUNTER e ON at.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON at.appeal_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON p.default_org_id = org.organization_id
LEFT JOIN PAYER pyr ON at.payer_id = pyr.payer_id
UNION ALL
SELECT
csl.billing_event_id AS "BillingEvent",
'Corrected Claim Submitted' AS "ActivityName",
csl.submission_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
cl.claim_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM CLAIM_SUBMISSION_LOG csl
JOIN CLAIM cl ON csl.claim_id = cl.claim_id
JOIN ENCOUNTER e ON cl.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON csl.submit_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON cl.billing_entity_org_id = org.organization_id
LEFT JOIN PAYER pyr ON cl.payer_id = pyr.payer_id
WHERE csl.submission_type = 'CORRECTED'
UNION ALL
SELECT
psl.billing_event_id AS "BillingEvent",
'Patient Statement Sent' AS "ActivityName",
psl.statement_sent_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
NULL AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
psl.statement_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM PATIENT_STATEMENT_LOG psl
JOIN ENCOUNTER e ON psl.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON psl.sent_by_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON p.default_org_id = org.organization_id
UNION ALL
SELECT
ash.billing_event_id AS "BillingEvent",
'Collection Activity Started' AS "ActivityName",
ash.status_change_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
NULL AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
ash.account_balance AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM ACCOUNT_STATUS_HISTORY ash
JOIN ENCOUNTER e ON ash.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON ash.change_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON ash.responsible_org_id = org.organization_id
WHERE ash.new_status_code = 'COLLECTIONS'
UNION ALL
SELECT
ft.billing_event_id AS "BillingEvent",
'Account Adjusted' AS "ActivityName",
ft.transaction_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
pyr.payer_name AS "PayerName",
e.patient_class_code AS "PatientClass",
ft.transaction_amount AS "AdjustmentAmount",
ft.ending_balance AS "OutstandingBalance",
ft.adjustment_reason_code AS "DenialReasonCode"
FROM FINANCIAL_TRANSACTION ft
JOIN ENCOUNTER e ON ft.encntr_id = e.encntr_id
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON ft.post_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON ft.post_dept_org_id = org.organization_id
LEFT JOIN PAYER pyr ON ft.payer_id = pyr.payer_id
WHERE ft.transaction_type_code = 'ADJUSTMENT'
UNION ALL
SELECT
e.billing_event_id AS "BillingEvent",
'Account Closed' AS "ActivityName",
e.account_closed_dt_tm AS "EventTimestamp",
p.name_full_formatted AS "UserPerformingAction",
org.organization_name AS "BillingDepartment",
NULL AS "PayerName",
e.patient_class_code AS "PatientClass",
NULL AS "AdjustmentAmount",
0 AS "OutstandingBalance",
NULL AS "DenialReasonCode"
FROM ENCOUNTER e
JOIN RelevantEncounters re ON e.billing_event_id = re.billing_event_id
LEFT JOIN PERSONNEL p ON e.closed_by_prsnl_id = p.person_id
LEFT JOIN ORGANIZATION org ON e.reg_facility_org_id = org.organization_id
WHERE e.total_account_balance = 0 AND e.account_closed_dt_tm IS NOT NULL;