Generate Financial Message

Generate Financial Message activities create financial messages in either XML or Flat File format and record financial processing results to the financial transaction process data.

Financial transactions are grouped into financial messages and their transaction details are grouped into invoices, invoice lines (if the invoice line grouping indicator is set) and accounting details (if the accounting detail grouping indicator is set) within the financial messages.

The create financial message process only includes financial transactions of base financial objects for which Supersede Transactions activity has been done and that had no changes since then (that is, the status of the base financial objects is Supersede and Reverse Done).

Within the context of a Financial Message:

  • an invoice is created for each invoice grouping of invoiced transaction details (this occurs within the scope of the financial message’s transactions

  • if the invoice line grouping indicator is set, an invoice line is created for each invoice line grouping of invoiced transaction details (this occurs within the scope of each invoice' s transaction details)

  • if the accounting detail grouping indicator is set, an invoice accounting detail is created for each accounting detail grouping of invoiced transaction details (this occurs within the scope of each invoice' s transaction details)

  • a non-invoice accounting detail is created for each accounting detail grouping of non-invoiced transaction details (this occurs within the scope of each financial message’s transaction details)

Generate Financial Message (XML/Flat File) activity is always done in the context of a financial transaction set; however, financial transactions that have not completed general processing (the general financial processing complete datetime on the base financial object has no value) are excluded.

Although the user execution level of these activities is a financial transaction set, the commit level is the financial message. The financial message creation process step is always executed (and saved) together with the stamping of financial processing results for the financial transactions handled by it. If one of the two process steps cannot be executed successfully, the other process step is rolled back. This does not block the creation of other financial messages that are generated in the context of the financial transaction set.

If a specific financial message cannot be created, message FIN-VL-CRFM-002 is logged for the financial transaction set level activity. The message holds the Financial Message Bulking Group as an identifier for reference.

The activity types have the following parameters:

Table 1. Generate Financial Message
Parameter Description

Cut-Off Date

Only financial transactions for which general financial processing has been completed, that is, the general financial processing completed datetime on the base financial object is before Generate Financial Message activity picks up the cut-off date and time.

Cut-Off Time

The cut-off time is always combined with the cut-off date. Cut-off time must be entered in HHMM format.

Create Invoice Dynamic Logic Function

This dynamic logic function must be of signature Create Invoice XML or Create Invoice Flat File depending on the activity type.

Create Invoice Line Dynamic Logic Function

This dynamic logic function must be of signature Create Invoice Line XML or Create Invoice Line Flat File depending on the activity type.

Create Accounting Detail Dynamic Logic Function

This dynamic logic function must be of signature Create Accounting Detail XML or Create Accounting Detail Flat File depending on the activity type.

Processing

Financial Transaction Selection for Message Creation

This activity selects all the financial transactions for the message creation process that are:

  • within the financial transaction set

  • within the bounds of the specified activity parameters

  • not superseded

The next step is to group the financial transactions that are going out on the same financial message. The transactions are grouped as follows:

  • Transactions that have the same Financial Message Bulking Group label are grouped together. This label is an attribute on the financial transaction process data record. By default, this is set to contract code and financial transactions for the same contract code are grouped together into a single financial message.

  • Reversal transactions are automatically included in the same group as the next non-superseded financial transaction of the same base object.

Financial Messages

For each resulting transaction group, the activity creates a single financial message. The image above shows an example of two transactions that are grouped into a single message. A financial message can include multiple invoices and accounting details. The activity recognizes invoices and accounting details as follows:

  • Financial transaction details on which the invoice indicator set to Y are mapped to invoice lines that are subsequently bundled together into invoices. One invoice is created for each distinct Invoice Bulking Group label. If this label is unspecified, all invoice lines within the message are bundled into a single invoice.

    By default, each financial transaction detail maps to a single invoice line, as shown in the image. It is also possible to have multiple details map to a single invoice line by setting the Invoice Line Grouping indicator to Y and specifying the same Invoice Line Bulking Group label on all the details that should be grouped into a single line.

  • All financial transaction details are mapped to accounting details.

    By default, each financial transaction detail maps to a single accounting detail, as shown in the image. It is also possible to have multiple financial details map to a single accounting detail by specifying the same Accounting Detail Bulking Group label on all the Financial Details that should be grouped into a single line.

    The activity always separate accounting details for financial transaction details that are invoiced and financial transaction details that are not invoiced.

Grouping of Invoiced Financial Transaction Details into Invoices

The invoice financial transaction details are grouped together to create an invoice. The number of invoices to be created is determined by:

  1. The financial transactions with the field Financial Message Mandatory Indicator set to Y

  2. Invoice Bulking Group (stored on financial transaction detail process data)

  3. Currency Code (stored on financial transaction detail)

  4. Counterparty Code

  5. Counterparty Qualifier

  6. Invoice Destination

The financial transactions with the Financial Message Mandatory Indicator set to Y are propagated into separate invoices with the appropriate reversal financial transactions. The reversal financial transaction is always grouped with the next non-superseded mandatory financial transaction to generate an invoice. After that invoice group bulking is applied. Consider the following example:

Table 2. Grouping of Invoiced Financial Transaction Details into Invoices
Base Financial Object Version Indicator Reversal Transaction Mandatory Comments Invoice Group Bulking Invoice

A

1

Y

-

1

2

N

Y

-

1

2

Y

-

2

3

N

N

Superseded

3

Y

Superseded

4

N

Y

-

2

4

Y

-

3

5

N

-

3

B

1

Y

-

3

2

N

-

3

Base financial objects A and B in the example could represent two consecutive calculation periods - For example, January and February for the same member and contract. The example assumes that the version 1 transactions of both base financial object A and B have already been processed in the past.

Since the original invoice, there have been 4 recalculations for January and 1 recalculation for February. Typically, the system would send out an invoice with reverse transaction for version 1 of A and charge for version 5. However, version 2 and 4 have been flagged as mandatory. This means that the activity generates separate invoices for them. Note that version 3 of base financial object A was not flagged as mandatory and therefore never makes it into an invoice; invoice #2 in the example reverses results from version 2 and replaces them with results from version 4.

The next discriminator is the currency code. If after the first two groupings, an invoice would consist of different currencies, it splits up per currency. In the example above, this could be the case for invoice 3, if base financial object A would be in a currency different from the one for base financial object B.

Each invoice is created using the Create Invoice dynamic logic function that has been configured. The invoice amount is the sum of all the invoiced financial transaction details selected for the invoice. The amount is calculated by Oracle Health Insurance and cannot be manipulated by the dynamic logic function.

A unique OHI Invoice Id is generated for each invoice. This Id is included in the financial message and used for stamping on the financial transaction detail process data.

The system then creates invoice lines and accounting details for the selected financial transaction(s) that are part of the invoice.

Grouping of Invoiced Transaction Details into Invoice Lines

This step creates one or more invoice lines. If the invoice line grouping indicator on the financial transaction detail process data is set to N an invoice line is created for every financial transaction detail. If the invoice line grouping indicator on the financial transaction detail process data is set to Y multiple financial transaction details of each invoice can be grouped into a single invoice line. If they are to be grouped into lines, the following attributes are used:

  • Invoice Line Bulking Group (from Financial Transaction Detail Process Data)

  • Reversal Indicator (from Financial Transaction)

    Default behavior is that grouping on the reversal indicator takes place. As a result, a financial transaction detail and its reversal cannot be grouped together, leading to separate invoice lines. This behavior can lead to large volumes: capitation recalculations as a result of change events can often result in debit and credit financial transaction details having the same amounts.

    To allow for the possibility to group them together instead of having separate invoice lines, the parameter Disable Reversal Grouping (Invoice Line) can be set during capitation calculation (see the Capitation Calculation page in the Operations Guide). If this parameter is not set or set to N, then the default behavior is applied. If the parameter is however set to Y, no grouping takes place on the reversal indicator. Setting this parameter to Y sets the invoice line grouping indicator automatically to Y as well, both for the new and the reversal financial transaction details. Then, only grouping on the Invoice Line Bulking Group applies - which can be set as desired.

For each group (unique combination of criteria) or each financial transaction detail (if grouping is not being done), an invoice line is created using the Create Invoice Line dynamic logic routine that has been configured. The invoice line amount is the sum of all the financial transaction details selected for the invoice line. The amount is calculated by Oracle Health Insurance and cannot be manipulated by the dynamic logic function. A unique OHI Invoice Line Id is generated for each invoice line. This id is included in the financial message and used for stamping on the financial transaction detail process data.

Grouping of Invoiced Financial Transaction Details into Accounting Details

This step of the process creates one or more accounting details for the financial transaction details that have the indicator invoice set to Y. If the accounting detail grouping indicator on the financial transaction detail process data is set to N one accounting detail is created for each financial transaction detail. If the accounting detail grouping indicator on the financial transaction detail process data is set to Y multiple financial transaction details included in the same invoice can be grouped into a single accounting detail. If financial transaction details are to be grouped into accounting details, the following criteria are used for grouping:

  • General Ledger Account (from Financial Transaction Detail Process Data)

  • Accounting Bulking Group (from Financial Transaction Detail Process Data)

  • Reversal Indicator (from Financial Transaction)

For each group, an accounting detail is created within its invoice using the Create Accounting Detail dynamic logic routine that has been configured. A unique OHI Accounting Detail Id is generated for each accounting detail. This id is included in the financial message and used for stamping on the financial transaction detail process data.

Grouping of Non-Invoiced Financial Transaction Details into Accounting Details

This step of the process creates accounting details for the financial transaction details that have the indicator invoice set to N. If the accounting detail grouping indicator on the financial transaction detail process data is set to N one accounting detail is created for each financial transaction detail. If the accounting detail grouping indicator on the financial transaction detail process data is set to Y multiple financial transaction details can be grouped into a single accounting detail based on the following criteria:

  • General Ledger Account (from Financial Transaction Detail Process Data)

  • Accounting Bulking Group (from Financial Transaction Detail Process Data)

  • Reversal Indicator (from Financial Transaction)

For each group, an accounting detail is created using the Create Accounting Detail dynamic logic routine that has been configured. A unique OHI Accounting Detail Id is generated for each accounting detail. This id is included in the financial message and used for stamping on the financial transaction detail process data.

Stamping of Results

The last step stores the results of the financial message creation processes on the financial transactions processed by this activity. Various objects that are part of financial data structure are updated based on the outcome of the financial message creation step.

Financial Transaction Process Data
  • Financial Message Id

    • The identification of the financial message in which the financial transaction is included.

  • Financial Message Result

    • This attribute shows that a financial transaction is handled by Generate Financial Message activity and based on the outcome it can have the following values:

      • M (Message Created): This value is used when a transaction is included in a financial message

      • N (Not Required): This value is set when a financial transaction is processed by the financial message creation activity but the transaction does not have to be reported to the financial system. This happens when neither invoice information nor accounting detail information is present when creating the financial message.

      • S (superseded): This value is set for the financial transactions that have been superseded by the Supersede Transactions activity. Once this indicator is set, the financial transaction is ignored by future executions of Supersede activity.

  • Fin Message Handled Datetime

    • This attribute is updated with the system date and time on which the financial message is created.

Financial Transaction Detail Process Data
  • OHI Invoice Id

    • The unique OHI Invoice Id of the invoice in which the financial transaction detail is included.

  • OHI Invoice Line Id

    • The unique OHI Invoice Line Id of the invoice line in which the financial transaction detail is included.

  • OHI Accounting Detail Id

    • The unique OHI Accounting Detail Id of the accounting detail entry that covers the financial transaction detail.

Base Financial Object

The status of the base financial object that holds the transactions that are included in the financial message is updated to Financial Message Handled when all the financial transactions that belong to the base financial message have the field Fin Message Handled Datetime and Financial Message Result set.

Financial Transaction Set

The status of the financial transaction set is set to Closed. All financial transactions that are part of the financial transaction set and are not handled by Generate Financial Message activity are removed from the set.

These above-mentioned steps related to stamping of results are also applicable for the reversal financial transactions in the set and processed by the activity.

Delivery of the Financial Messages

The financial messages generated by these activity types (both the XML and the Flat File) are delivered to an external system through a file. A notification message through the Financial Message Integration Point with the details of the file is sent the external system. The file can be then accessed by using the Data File Integration Point. Both integration points are described in the Developer Guide.

Messages

The Generate Financial Message activity can result in the following activity messages:

Table 3. Messages
Code Severity Message Text

FIN-VL-CRFM-001

Fatal

The status of the Financial Transaction Set must be Open

FIN-VL-CRFM-002

Fatal

Message creation for {message bulking group} failed

FIN-VL-CRFM-004

Fatal

Invalid signature for dynamic logic function {dyn logic code}

ACT-FL-DAFI-001

Informative

Messages are written to the Data File Set or Sets {comma separated list of data file set ids}

XML Message Structure

This structure is designed to support grouping of multiple financial transactions into a single financial message with invoices, invoice lines, and accounting details being totals of multiple financial transaction lines of multiple financial transactions within a message. This approach can greatly reduce the number of financial messages and invoices, invoice lines and accounting details within them that need to be handled by the financial system. The process of creation of the XML is summarized by the image below:

xml message creation

The structure holds two accounting details sections. The first top level section holds accounting details for non invoiced financial transaction details. The second level holds accounting details related to an invoice. The top level structure of the financial message is as follows:

<financialMessage jobId="123">
  ...  -- see Financial Message section below for attributes
  <accountingDetails>
    <accountingDetail>
       <accountingDetailBulkingCriteria>
         ...
       </accountingDetailBulkingCriteria>
       ... -- see Accounting Detail section below for attr.
    </accountingDetail> -- refer to Accounting Detail section below for attributes
     …
  </accountingDetails>
        ...
        .... -- see Invoice section below for attributes
           ...
        .... -- see Invoice Line section below for attributes
          -- see Invoice Line section below for attributes
        ...

        <accountingDetails>
          <accountingDetail>
           <accountingDetailBulkingCriteria>
            ...
            </accountingDetailBulkingCriteria>
             ... -- see Accounting Detail section below for attributes
          </accountingDetail>
        </accountingDetails>
      ...

</financialMessage>

The expected source of attributes in the element descriptions that follow is only an indication of what could be expected in a financial message. The expected source is indicated to give a more concrete image of the end-to-end payment flow. The actual source is determined during configuration and may depend on the configuration of the financial system. The actual values are set by the dynamic logic functions used in this activity.

Financial Message Element

This element has attributes that relate to the financial message itself. Attributes in this XML element are all populated by a fixed logic in Generate Financial Message activity. There is no dynamic logic function to manipulate the attribute values.

Table 4. Financial Message Element
Element Source of Value Note

id

Simple Sequence

Unique id of the message generated by Oracle Health Insurance.

jobId

Activity Id that created this financial message

Unique id of the Financial Message Creation activity.

messageDate

System Date and time

Date / Time the message was created.

messageBulkingCriteria

Financial Transaction Process Data.Fin Message Bulking Group

Invoice Element

This element has attributes that hold identifying attributes at invoice header level. The source of value column indicates which attributes are expected to be used and what the expected source for them would be. Non-customizable attributes are set by Oracle Health Insurance and cannot be changed in the dynamic logic function.

Table 5. Invoice Element
Element Source of Value Note

invoiceBulkingCriteria:

invoiceBulkingGroup

Financial Transaction Detail Process Data.Invoice Bulking Group

Shows additional invoice bulking. Non-customizable.

invoiceDestination

Financial Transaction Process Data.Invoice Destination

Payable or Receivable.

counterpartyCode

Financial Transaction Detail Process Data.Counterparty Code

counterpartyQualifier

Financial Transaction Detail Process Data.Counterparty Qualifier

invoice attributes:

ohiInvoiceId

Sequence

Unique identifier for Oracle Health Insurance invoices generated by Oracle Health Insurance. Non-customizable.

documentId

Defaulted with OHI invoice Id but can be changed in the dynamic logic function

This is used as invoice number in the financial system. The invoice number is defined in the dynamic logic function and is not validated in Oracle Health Insurance.

organization

Organizational unit in which the invoice is accounted.

Defined in dynamic logic.

invoiceType

Message generation logic.

STANDARD if amount > 0 or 0 or CREDIT if amount < 0.

invoiceDate

Financial Transaction Process Data.Fin Message Handled Date Time

currencyCode

Financial Transaction Detail.Amount Curr

invoiceAmount

Sum of all Financial Transaction Detail amounts included in the invoice.

Negative for invoice type CREDIT. Non-customizable.

paymentTerms

Fixed IMMEDIATE if invoicing being done just in time to meet the due date. Otherwise, provided in dynamic field (determined upstream based on payment agreements with providers and general rules).

description

OHI Capitation Calculation

Default value that can be overridden in dynamic logic.

source

OHI Capitation Calculation

Default value that can be overridden in dynamic logic.

invoiceCategory

Defined in dynamic logic.

attribute1 .. attribute30

Free format elements for additional configuration defined attributes

Defined in dynamic logic.

Invoice Line Element

This element has attributes that hold identifying attributes at invoice line level. The source of value column indicates which attributes are expected to be used and what the expected source for them would be. Mandatory attributes are set by Oracle Health Insurance and cannot be changed in the dynamic logic function.

Table 6. Invoice Line Element
Element Source of Value Note

invoiceLineBulkingCriteria:

invoiceLineBulkingGroup

Financial Transaction Detail Process Data.Invoice Line Bulking Group

Shows additional invoice line bulking. Non-customizable.

reversal

Financial Transaction.Ind Reversal

Non-customizable.

invoiceLine attributes:

ohiLineId

Sequence

Unique identifier for Oracle Health Insurance invoice lines generated by Oracle Health Insurance. Non-customizable.

lineNumber

Unique number within invoice. Used to ensure line number is unique for an invoice.

lineType

ITEM

Defined in dynamic logic.

amount

Financial Transaction Detail.Amount

Sum of all Financial Transaction Detail amounts included in the invoice line. Non-customizable.

description

OHI Capitation Calculation

Default value that can be overridden in dynamic logic.

distributionAccount

Financial Transaction Detail Process Data.General Ledger Account

Default value that can be overridden in dynamic logic.

attribute1 .. attribute30

Free format elements for additional configuration defined attributes. Defined in dynamic logic.

Accounting Detail Element

This element has attributes that match the attributes of the subledger to which the accounting details are exported.

Table 7. Accounting Detail Element
Element Source of Value Note

accountingDetailBulkingCriteria:

accountingDetailBulkingGroup

Financial Transaction Detail Process Data.Accounting Bulking Group

Shows additional accounting bulking. Non-customizable.

reversal

Financial Transaction.Ind Reversal

Non-customizable.

distributionAccount

Financial Transaction Detail Process Data.General Ledger Account

accountingDetail attributes:

ohiAccountingDetailId

Sequence

Unique identifier for Oracle Health Insurance accounting details generated by Oracle Health Insurance. Non-customizable.

ledgerId

Identification of the ledger to which the accounting details are interfaced.

accountingDate

Financial Transaction Process Data.Fin Message Handled Date Time

transactionDate

Financial Transaction Process Data.Fin Message Handled Date Time

category

Defined in dynamic logic.

source

Defined in dynamic logic.

currencyCode

Financial Transaction Detail.Amount Curr

amountDebit

Financial Transaction Detail.Amount

Sum of all Financial Transaction Detail amounts included in the accounting detail. This element is only populated if the amount is a debit amount. Non-customizable.

amountCredit

Financial Transaction Detail.Amount

Sum of all Financial Transaction Detail amounts included in the accounting detail. This element is only populated if the amount is a credit amount. Non-customizable.

description

OHI Capitation Calculation

Default value that can be overridden in dynamic logic.

accountingPeriod

Defined in dynamic logic.

glSegment1.. glSegment30

Financial Transaction Detail Process Data.General Ledger Account

Mapping to the various GL accounting segments. Up to 30 segments are available to match the required chart of accounts structures.

attribute1 .. attribute30

Free format elements for additional configuration defined attributes. Defined in dynamic logic.

Flat File Message Structure

The system supports creation of the flat files that can be easily imported to Fusion Financial or other systems that have similar file structures. The process of creation of the flat files is summarized by the image below:

message creation flat file

The file contents are driven by the dynamic logic functions. Each dynamic logic function takes in as input a combination of the relevant contexts - financial message, invoice, invoice line, accounting line detail and financial transaction detail. The function dynamic logic returns one or more rows along with the file details (file identifier and row content) to which they are required to be written. See function dynamic logic signature for details. One data file is created for each distinct file identifier found in any of the rows created by the dynamic logic functions during the activity processing. The rows with the same file identifier are written to it.

The order in which the rows of the financial message or messages for accounting details, invoice and invoice lines are written to the data file or files is not configurable.

Financial Message

This has attributes that relate to the financial message itself.

Table 8. Financial Message
Element Source of Value Note

id

Simple Sequence

Unique id of message generated by Oracle Health Insurance.

jobId

Activity Id that created this financial message

Unique id of the Financial Message Creation activity.

messageDate

System Date and time

Date / Time the message was created.

messageBulkingCriteria

Financial Transaction Process Data.Fin Message Bulking Group

Invoice

This has attributes that hold identifying attributes at invoice level.

Table 9. Invoice
Field Source of Value Note

invoiceBulkingGroup

Financial Transaction Detail Process Data.Invoice Bulking Group

Shows additional invoice bulking. Non-customizable.

invoiceDestination

Financial Transaction Process Data.Invoice Destination

Payable or Receivable.

counterpartyCode

Financial Transaction Detail Process Data.Counterparty Code

counterpartyQualifier

Financial Transaction Detail Process Data.Counterparty Qualifier

ohiInvoiceId

Sequence

Unique identifier for Oracle Health Insurance invoices generated by Oracle Health Insurance. Non-customizable.

documentId

Defaulted with OHI invoice Id

invoiceDate

Financial Transaction Process Data.Fin Message Handled Date Time

currencyCode

Financial Transaction Detail.Amount Curr

invoiceAmount

Sum of all Financial Transaction Detail amounts included in the invoice. Negative for invoice type CREDIT. Non-customizable.

Invoice Line

This has attributes that hold identifying attributes at invoice line level.

Table 10. Invoice Line
Element Source of Value Note

invoiceLineBulkingGroup

Financial Transaction Detail Process Data.Invoice Line Bulking Group

Shows additional invoice line bulking. Non-customizable.

reversal

Financial Transaction.Ind Reversal

Non-customizable.

ohiLineId

Sequence

Unique identifier for Oracle Health Insurance invoice lines generated by Oracle Health Insurance. Reversal indicator is a fixed grouping criterion for invoices. Non-customizable.

lineNumber

Unique number within invoice. Used to ensure line number is unique for an invoice.

amount

Financial Transaction Detail.Amount

Sum of all Financial Transaction Detail amounts included in the invoice line. Non-customizable.

distributionAccount

Financial Transaction Detail Process Data.General Ledger Account

Accounting Detail

This element has attributes that match the attributes of the subledger to which the accounting details are exported.

Table 11. Accounting Detail
Element Source of Value Note

accountingDetailBulkingGroup

Financial Transaction Detail Process Data.Accounting Bulking Group

Shows additional accounting bulking. Non-customizable.

reversal

Financial Transaction.Ind Reversal

Non-customizable.

distributionAccount

Financial Transaction Detail Process Data.General Ledger Account

ohiAccountingDetailId

Sequence

Unique identifier for Oracle Health Insurance accounting details generated by Oracle Health Insurance. Non-customizable.

accountingDate

Financial Transaction Process Data.Fin Message Handled Date Time

transactionDate

Financial Transaction Process Data.Fin Message Handled Date Time

currencyCode

Financial Transaction Detail.Amount Curr

amountDebit

Financial Transaction Detail.Amount

Sum of all Financial Transaction Detail amounts included in the accounting detail. This field is populated if the amount is a debit amount. Non-customizable.

amountCredit

Financial Transaction Detail.Amount

Sum of all Financial Transaction Detail amounts included in the accounting detail. This field is populated if the amount is a credit amount. Non-customizable.