Functions
A dynamic logic function is the most generic type of dynamic logic: it can have one or more input arguments and return different types of output. A dynamic logic function is used to extend default behavior in certain areas. Each usage of dynamic logic functions is described in a separate paragraph below.
Amount
On adjustment schedule lines and rate schedule lines a dynamic logic function can be specified to calculate the adjustment or rate amount.
Adjustment
The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
attribution |
Attribution |
The attribution that is being evaluated |
In |
adjustmentScheduleLine |
AdjustmentScheduleLine |
The adjustment schedule line that is selected |
In |
amount |
Money |
The input amount on which the adjustment is calculated |
In |
referenceDate |
Date |
The reference date of the contract calculation period |
Out |
n/a |
Money |
The adjustment amount and currency as outcome of the calculation |
The input amount is the calculated amount up to the point in the process where the adjustment schedule line is applied. For example, if there is a dynamic field additionalPaymentPercentage on the person, consider the following function to clarify:
return (attribution.person.additionalPaymentPercentage/100) * amount
Rate
The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
attribution |
Attribution |
The attribution that is being evaluated |
In |
rateScheduleLine |
RateScheduleLine |
The rate schedule line that is selected |
In |
referenceDate |
Date |
The reference date of the contract calculation period |
Out |
n/a |
Money |
The rate amount and currency as outcome of the calculation |
For example, if there is a dynamic field overridingRate on the provider, consider the following function to clarify:
return Money.create(attribution.provider.overridingRate, rateScheduleLine.rateSchedule.currency.code)
Calculation Period Reference Date
On a contract a dynamic logic function can be specified to determine the reference date of a contract calculation period (if the function is not specified it is defaulted to the start date of the calculation period). The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
contractCalculationPeriod |
ContractCalculationPeriod |
The contract calculation period that is being evaluated |
Out |
n/a |
Date |
The reference date of the calculation period |
For example:
return contractCalculationPeriod.endDate
Change Event Rule
Modifications on a number of tables can lead (through configurable change event rules) to contract events. The date from which day onwards the modification has effect, is configurable through a dynamic logic function. It depends on the entity which is modified. Often it is the start date of a time valid entity, but it may be something else like the sysdate.
The following signature applies to change event rules to define the effective date of a contract event (and contract mutation):
In or Out | Name | Type | Description |
---|---|---|---|
In |
old[EntityName] that is, entity name is prefixed by "old" |
Depends on the entity (old) |
The old version of the entity that is being evaluated |
In |
new[EntityName] that is, entity name is prefixed by "new" |
Depends on the entity (new) |
The new version of the entity that is being evaluated |
Out |
n/a |
Date |
The date (without time aspect) from which on the mutation becomes effective |
A straightforward example on assigned providers:
return newAssignedProvider.startDate
The reason for having both the old and the new version of the object being modified as an input parameter, is that when the start date of the object is being changed, it becomes possible to pick the earliest date. For example:
if (newAssignedProvider.startDate <= oldAssignedProvider.startDate) return newAssignedProvider.startDate else return oldAssignedProvider.startDate
Code Generation
Person and organization codes can be produced by a dynamic function.
Organization Code Generation
The following signature applies for organizations:
In or Out | Name | Type | Description |
---|---|---|---|
In |
organization |
Organization |
The organization for which the code is to be generated |
Out |
n/a |
Alphanumerical |
The organization code |
Example:
// Uses the id of the organization and prefixes it with ORG return "ORG" + organization.id.toString()
Person Code Generation
The following signature applies for persons:
In or Out | Name | Type | Description |
---|---|---|---|
In |
person |
Person |
The person for which the code is to be generated |
Out |
n/a |
Alphanumerical |
The person code |
Example:
// Uses the id of the person and prefixes it with MEM return "MEM" + person.id.toString()
Country Format
This function is attached to a country and defines the format of addresses within that country. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
address |
Address |
The address that is to be displayed |
Out |
n/a |
String |
The character string that represents the formatted address. |
This function is executed whenever an address is displayed. There is no default as-of date.
Create Invoice
The transaction details are grouped into invoices within a Financial Message. Grouping of invoices is done on various attributes on Financial Transaction and Financial Transaction Detail (Process Data). Additional fields required for an invoice are added or generated in this dynamic logic function. Dynamic Logic of the signature Create Invoice holds the logic to create invoices based on the invoice grouping criteria. Because of the grouping functionality all attributes on a financial transaction detail that have to be included in an invoice element are the same. For this reason, the invoice element can be based on a single financial transaction detail as input for the dynamic logic function.
Create Invoice XML
Dynamic functions of this type fill the values with an invoice element for an invoice for selected transaction. They are executed once per invoice of the transactions being processed.
Parameters
In or Out | Parameter Name | Type | Description |
---|---|---|---|
In |
financialTransactionDetail |
FinancialTransactionDetail |
The financial transaction detail from which the invoice header attributes are derived to construct the XML. |
In/Out |
invoice |
Invoice |
XML <invoice> element that is included in the financial message. Input: empty invoice with only the attributes assigned by the fixed logic set |
The dynamic logic needs to:
-
transfer all desired values from the input parameters and financial transaction(s) to the invoice header
In addition, logic needed to set details that only exist in an invoice header may be included (that is to set values that are derived as opposed to simply being transferred).
Create Invoice Flat File
This function is executed for each "Invoice grouping" of financial transaction details. This function allows creation of zero, one, or more flat file rows each time it is executed.
Parameters
Parameter Name | Parameter Type | Input or Output | Description |
---|---|---|---|
financialMessage |
FinancialMessage |
Input |
Financial Message Context* |
financialTransactionDetail |
FinancialTransactionDetail |
Input |
Financial Transaction Detail |
invoice |
Invoice |
Input |
Invoice Context* |
fileRows |
List<FileRow>** |
Input / Output |
FileRow consists of the file identifier and row content |
- Example
Map apInv = [:] apInv.INVOICE_ID apInv.OPERATING_UNIT = "OHI BU" apInv.SOURCE = "EXTERNAL" apInv.INVOICE_NUM apInv.INVOICE_AMOUNT = invoice.invoiceAmount apInv.INVOICE_DATE apInv.VENDOR_NAME = "" apInv.VENDOR_NUM apInv.VENDOR_SITE_CODE apInv.INVOICE_CURRENCY_CODE = apInv.PAYMENT_CURRENCY_CODE apInv.DESCRIPTION = "Health Insurance Capitation Contract" apInv.GROUP_ID = financialMessage.jobId apInv.INVOICE_TYPE_LOOKUP_CODE apInv.LEGAL_ENTITY_NAME = "OHI Entity" apInv.CUST_REGISTRATION_NUMBER = "" apInv.CUST_REGISTRATION_CODE = "" apInv.FIRST_PARTY_REGISTRATION_NUM = "" apInv.THIRD_PARTY_REGISTRATION_NUM = "" apInv.TERMS_NAME = "Immediate" apInv.TERMS_DATE apInv.GOODS_RECEIVED_DATE = "" apInv.INVOICE_RECEIVED_DATE apInv.GL_DATE apInv.PAYMENT_METHOD_CODE = "EFT" apInv.PAY_GROUP_LOOKUP_CODE apInv.EXCLUSIVE_PAYMENT_FLAG = "" apInv.AMOUNT_APPLICABLE_TO_DISCOUNT ="" apInv.PREPAY_NUM = "" apInv.PREPAY_LINE_NUM = "" apInv.PREPAY_APPLY_AMOUNT = "" apInv.PREPAY_GL_DATE = "" apInv.INVOICE_INCLUDES_PREPAY_FLAG = "" apInv.EXCHANGE_RATE_TYPE = "CORPORATE" apInv.EXCHANGE_DATE apInv.EXCHANGE_RATE "" apInv.ACCTS_PAY_CODE_CONCATENATED = "010-22500-00000-00000-00000-00000-00000" apInv.DOC_CATEGORY_CODE = "" apInv.VOUCHER_NUM = "" apInv.REQUESTER_FIRST_NAME = "" apInv.REQUESTER_LAST_NAME = "" apInv.REQUESTER_EMPLOYEE_NUM = "" apInv.DELIVERY_CHANNEL_CODE = "" apInv.BANK_CHARGE_BEARER = "" apInv.REMIT_TO_SUPPLIER_NAME = "" apInv.REMIT_TO_SUPPLIER_NUM= "" apInv.REMIT_TO_ADDRESS_NAME = "" apInv.PAYMENT_PRIORITY = "1" apInv.SETTLEMENT_PRIORITY = "NORMAL" apInv.UNIQUE_REMITTANCE_IDENTIFIER = "" apInv.URI_CHECK_DIGIT = "" apInv.PAYMENT_REASON_CODE = "" apInv.PAYMENT_REASON_COMMENTS = "" apInv.REMITTANCE_MESSAGE1= "" apInv.REMITTANCE_MESSAGE2 = "" apInv.REMITTANCE_MESSAGE3 = "" apInv.AWT_GROUP_NAME = "" apInv.SHIP_TO_LOCATION = "" apInv.TAXATION_COUNTRY = "" apInv.DOCUMENT_SUB_TYPE = "" apInv.TAX_INVOICE_INTERNAL_SEQ = "" apInv.SUPPLIER_TAX_INVOICE_NUM = "" apInv.TAX_INVOICE_RECORDING_DATE = "" apInv.SUPPLIER_TAX_INVOICE_DATE = "" apInv.SUPPLIER_TAX_EXCHANGE_RATE = "" apInv.PORT_OF_ENTRY_CODE = "" apInv.CORRECTION_YEAR = "" apInv.CORRECTION_PERIOD = "" apInv.IMPORT_DOCUMENT_NUMBER = "" apInv.IMPORT_DOCUMENT_DATE = "" apInv.CONTROL_AMOUNT = "" apInv.CALC_TAX_DURING_IMPORT_FLAG = "N" apInv.ADD_TAX_TO_INV_AMOUNT_FLAG = "N" apInv.ATTRIBUTE_CATEGORY = "OHI_DATA" apInv.ATTRIBUTE1 = "" apInv.ATTRIBUTE2 = "" apInv.ATTRIBUTE3 = "" apInv.ATTRIBUTE4 = "" apInv.ATTRIBUTE5 = "" apInv.ATTRIBUTE6 = "" apInv.ATTRIBUTE7 = "POL" apInv.ATTRIBUTE8 = invoice.ohiInvoiceId apInv.ATTRIBUTE9 = "" apInv.ATTRIBUTE10 = "" apInv.ATTRIBUTE11 = "" apInv.ATTRIBUTE12 = "" apInv.ATTRIBUTE13 = "" apInv.ATTRIBUTE14 = "" apInv.ATTRIBUTE15 = "" apInv.ATTRIBUTE_NUMBER1 = "" apInv.ATTRIBUTE_NUMBER2 = "" apInv.ATTRIBUTE_NUMBER3 = "" apInv.ATTRIBUTE_NUMBER4 = "" apInv.ATTRIBUTE_NUMBER5 = "" apInv.ATTRIBUTE_DATE1 = "" apInv.ATTRIBUTE_DATE2 = "" apInv.ATTRIBUTE_DATE3 = "" apInv.ATTRIBUTE_DATE4 = "" apInv.ATTRIBUTE_DATE5 = "" apInv.GLOBAL_ATTRIBUTE_CATEGORY = "" apInv.GLOBAL_ATTRIBUTE1 = "" apInv.GLOBAL_ATTRIBUTE2 = "" apInv.GLOBAL_ATTRIBUTE3 = "" apInv.GLOBAL_ATTRIBUTE4 = "" apInv.GLOBAL_ATTRIBUTE5 = "" apInv.GLOBAL_ATTRIBUTE6 = "" apInv.GLOBAL_ATTRIBUTE7 = "" apInv.GLOBAL_ATTRIBUTE8 = "" apInv.GLOBAL_ATTRIBUTE9 = "" apInv.GLOBAL_ATTRIBUTE10 = "" apInv.GLOBAL_ATTRIBUTE11 = "" apInv.GLOBAL_ATTRIBUTE12 = "" apInv.GLOBAL_ATTRIBUTE13 = "" apInv.GLOBAL_ATTRIBUTE14 = "" apInv.GLOBAL_ATTRIBUTE15 = "" apInv.GLOBAL_ATTRIBUTE16 = "" apInv.GLOBAL_ATTRIBUTE17 = "" apInv.GLOBAL_ATTRIBUTE18 = "" apInv.GLOBAL_ATTRIBUTE19 = "" apInv.GLOBAL_ATTRIBUTE20 = "" apInv.GLOBAL_ATTRIBUTE_NUMBER1 = "" apInv.GLOBAL_ATTRIBUTE_NUMBER2 = "" apInv.GLOBAL_ATTRIBUTE_NUMBER3 = "" apInv.GLOBAL_ATTRIBUTE_NUMBER4 = "" apInv.GLOBAL_ATTRIBUTE_NUMBER5 = "" apInv.GLOBAL_ATTRIBUTE_DATE1 = "" apInv.GLOBAL_ATTRIBUTE_DATE2 = "" apInv.GLOBAL_ATTRIBUTE_DATE3 = "" apInv.GLOBAL_ATTRIBUTE_DATE4 = "" apInv.GLOBAL_ATTRIBUTE_DATE5 = "" fileRows.add(new FileRow("AP_INVOICES_INTERFACE", apInv.values().join(",")))
Create Invoice Line
The transaction details are grouped into invoice lines within an Invoice in a Financial Message. Grouping of invoice lines is done on various attributes on Financial Transaction and Financial Transaction Detail (Process Data). Additional fields required for an invoice line are added or generated in this dynamic logic function. Dynamic Logic of the signature Create Invoice Line holds the logic to create invoice lines based on the invoice line grouping criteria.
Create Invoice Line XML
Dynamic functions of this type fill the values with an invoice line element for an amount that needs to be paid (or retracted). They are executed once for each generated Invoice Line by Generate Financial Message activity. They are executed within the context of the invoice with the same payment receiver of the financial transaction detail process data.
Parameters
In or Out | Parameter | Type | Description |
---|---|---|---|
In |
financialTransactionDetail |
FinancialTransactionDetail |
The financial transaction detail from which the invoice line attributes are derived to contract the XML. |
In / Out |
invoiceLine |
InvoiceLine |
XML <invoiceLine> element included in the financial message. Input: empty invoice header with only invoiceId set |
The dynamic logic needs to:
-
transfer all desired values from the financial detail to the invoice line.
In addition, logic needed to set details that only exist in an invoice line may be included (that is, to set values that are derived as opposed to simply being transferred).
Create Invoice Line Flat File
This function executes for each "Invoice Line grouping" of financial transaction details. This function allows creation of zero, one, or more flat file rows each time it is executed.
Parameters
Parameter Name | Parameter Type | Input or Output | Description |
---|---|---|---|
financialMessage |
FinancialMessage |
Input |
Financial Message Context* |
financialTransactionDetail |
FinancialTransactionDetail |
Input |
Financial Transaction Detail |
invoice |
Invoice |
Input |
Invoice Context* |
invoiceLine |
InvoiceLine |
Input |
Invoice Line Context* |
fileRows |
List<FileRow> |
Input / Output |
File row consists of the file identifier and row content |
- Example
Map apInvLn = [:] apInvLn.INVOICE_ID = apInvLn.LINE_NUMBER = apInvLn.LINE_TYPE_LOOKUP_CODE = "Item" apInvLn.AMOUNT = invoiceLine.Amount apInvLn.QUANTITY_INVOICED = "" apInvLn.UNIT_PRICE = "" apInvLn.UNIT_OF_MEAS_LOOKUP_CODE = "" apInvLn.DESCRIPTION = apInvLn.PO_NUMBER = "" apInvLn.PO_LINE_NUMBER = "" apInvLn.PO_SHIPMENT_NUM = "" apInvLn.PO_DISTRIBUTION_NUM = "" apInvLn.ITEM_DESCRIPTION = "" apInvLn.RELEASE_NUMBER = "" apInvLn.PURCHASING_CATEGORY = "" apInvLn.RECEIPT_NUMBER = "" apInvLn.RECEIPT_LINE_NUMBER = "" apInvLn.CONSUMPTION_ADVICE_NUMBER = "" apInvLn.CONSUMPTION_ADVICE_LINE_NUMBER = "" apInvLn.PACKING_SLIP = "" apInvLn.FINAL_MATCH_FLAG = "" apInvLn.DIST_CODE_CONCATENATED = "010-44040-00000-00000-00000-00000-00000" apInvLn.DISTRIBUTION_SET_NAME = "" apInvLn.ACCOUNTING_DATE apInvLn.ACCOUNT_SEGMENT = "" apInvLn.BALANCING_SEGMENT = "" apInvLn.COST_CENTER_SEGMENT = "" apInvLn.TAX_CLASSIFICATION_CODE = "" apInvLn.SHIP_TO_LOCATION_CODE = "" apInvLn.SHIP_FROM_LOCATION_CODE = "" apInvLn.FINAL_DISCHARGE_LOCATION_CODE = "" apInvLn.TRX_BUSINESS_CATEGORY = "" apInvLn.PRODUCT_FISC_CLASSIFICATION = "" apInvLn.PRIMARY_INTENDED_USE = "" apInvLn.USER_DEFINED_FISC_CLASS = "" apInvLn.PRODUCT_TYPE = "" apInvLn.ASSESSABLE_VALUE = "" apInvLn.PRODUCT_CATEGORY = "" apInvLn.CONTROL_AMOUNT = "" apInvLn.TAX_REGIME_CODE = "" apInvLn.TAX = "" apInvLn.TAX_STATUS_CODE = "" apInvLn.TAX_JURISDICTION_CODE = "" apInvLn.TAX_RATE_CODE = "" apInvLn.TAX_RATE = "" apInvLn.AWT_GROUP_NAME = "" apInvLn.TYPE_1099 = "" apInvLn.INCOME_TAX_REGION = "" apInvLn.PRORATE_ACROSS_FLAG = "N" apInvLn.LINE_GROUP_NUMBER = "1" apInvLn.COST_FACTOR_NAME = "" apInvLn.STAT_AMOUNT = "" apInvLn.ASSET_TRACKING_FLAG = "N" apInvLn.ASSET_BOOK_TYPE_CODE = "" apInvLn.ASSET_CATEGORY_ID = "" apInvLn.SERIAL_NUMBER = "" apInvLn.MANUFACTURER = "" apInvLn.MODEL_NUMBER = "" apInvLn.WARRANTY_NUMBER = "" apInvLn.PRICE_CORRECTION_FLAG = "N" apInvLn.PRICE_CORRECT_INV_NUM = "" apInvLn.PRICE_CORRECT_INV_LINE_NUM = "" apInvLn.REQUESTER_FIRST_NAME = "" apInvLn.REQUESTER_LAST_NAME = "" apInvLn.REQUESTER_EMPLOYEE_NUM = "" apInvLn.ATTRIBUTECATEGORY = "" apInvLn.ATTRIBUTE1 = "POL" apInvLn.ATTRIBUTE2 = invoiceLine.ohiLineId apInvLn.ATTRIBUTE3 = "" apInvLn.ATTRIBUTE4 = "" apInvLn.ATTRIBUTE5 = "" apInvLn.ATTRIBUTE6 = "" apInvLn.ATTRIBUTE7 = "" apInvLn.ATTRIBUTE8 = "" apInvLn.ATTRIBUTE9 = "" apInvLn.ATTRIBUTE10 = "" apInvLn.ATTRIBUTE11 = "" apInvLn.ATTRIBUTE12 = "" apInvLn.ATTRIBUTE13 = "" apInvLn.ATTRIBUTE14 = "" apInvLn.ATTRIBUTE15 = "" apInvLn.ATTRIBUTE_NUMBER1 = "" apInvLn.ATTRIBUTE_NUMBER2 = "" apInvLn.ATTRIBUTE_NUMBER3 = "" apInvLn.ATTRIBUTE_NUMBER4 = "" apInvLn.ATTRIBUTE_NUMBER5 = "" apInvLn.ATTRIBUTE_DATE1 = "" apInvLn.ATTRIBUTE_DATE2 = "" apInvLn.ATTRIBUTE_DATE3 = "" apInvLn.ATTRIBUTE_DATE4 = "" apInvLn.ATTRIBUTE_DATE5 = "" apInvLn.GLOBAL_ATTRIBUTECATEGORY = "" apInvLn.GLOBAL_ATTRIBUTE1 = "" apInvLn.GLOBAL_ATTRIBUTE2 = "" apInvLn.GLOBAL_ATTRIBUTE3 = "" apInvLn.GLOBAL_ATTRIBUTE4 = "" apInvLn.GLOBAL_ATTRIBUTE5 = "" apInvLn.GLOBAL_ATTRIBUTE6 = "" apInvLn.GLOBAL_ATTRIBUTE7 = "" apInvLn.GLOBAL_ATTRIBUTE8 = "" apInvLn.GLOBAL_ATTRIBUTE9 = "" apInvLn.GLOBAL_ATTRIBUTE10 = "" apInvLn.GLOBAL_ATTRIBUTE11 = "" apInvLn.GLOBAL_ATTRIBUTE12 = "" apInvLn.GLOBAL_ATTRIBUTE13 = "" apInvLn.GLOBAL_ATTRIBUTE14 = "" apInvLn.GLOBAL_ATTRIBUTE15 = "" apInvLn.GLOBAL_ATTRIBUTE16 = "" apInvLn.GLOBAL_ATTRIBUTE17 = "" apInvLn.GLOBAL_ATTRIBUTE18 = "" apInvLn.GLOBAL_ATTRIBUTE19 = "" apInvLn.GLOBAL_ATTRIBUTE20 = "" apInvLn.GLOBAL_ATTRIBUTE_NUMBER1 = "" apInvLn.GLOBAL_ATTRIBUTE_NUMBER2 = "" apInvLn.GLOBAL_ATTRIBUTE_NUMBER3 = "" apInvLn.GLOBAL_ATTRIBUTE_NUMBER4 = "" apInvLn.GLOBAL_ATTRIBUTE_NUMBER5 = "" apInvLn.GLOBAL_ATTRIBUTE_DATE1 = "" apInvLn.GLOBAL_ATTRIBUTE_DATE2 = "" apInvLn.GLOBAL_ATTRIBUTE_DATE3 = "" apInvLn.GLOBAL_ATTRIBUTE_DATE4 = "" apInvLn.GLOBAL_ATTRIBUTE_DATE5 = "" apInvLn.PJC_PROJECT_ID = "" apInvLn.PJC_TASK_ID = "" apInvLn.PJC_EXPENDITURE_TYPE_ID = "" apInvLn.PJC_EXPENDITURE_ITEM_DATE = "" apInvLn.PJC_EXPENDITURE_ORGANIZATION_ID = "" apInvLn.PJC_PROJECT_NUMBER = "" apInvLn.PJC_TASK_NUMBER = "" apInvLn.PJC_EXPENDITURE_TYPE = "" apInvLn.PJC_EXPENDITURE_ORGANIZATION = "" apInvLn.PJC_FUNDING_SOURCE_ID = "" apInvLn.PJC_RESERVED_ATTRIBUTE2 = "" apInvLn.PJC_RESERVED_ATTRIBUTE3 = "" apInvLn.PJC_RESERVED_ATTRIBUTE4 = "" apInvLn.PJC_RESERVED_ATTRIBUTE5 = "" apInvLn.PJC_RESERVED_ATTRIBUTE6 = "" apInvLn.PJC_RESERVED_ATTRIBUTE7 = "" apInvLn.PJC_RESERVED_ATTRIBUTE8 = "" apInvLn.PJC_RESERVED_ATTRIBUTE9 = "" apInvLn.PJC_RESERVED_ATTRIBUTE10 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE1 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE2 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE3 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE4 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE5 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE6 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE7 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE8 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE9 = "" apInvLn.PJC_USER_DEFINED_ATTRIBUTE10 = "" fileRows.add(new FileRow("AP_INVOICE_LINES_INTERFACE", apInvLn.values().join(",")))
Create Accounting Details
Dynamic Logic of the signature Create Accounting Details holds the logic to create accounting details based on the accounting detail grouping criteria. These dynamic functions are executed once per accounting detail generated by Generate Financial Message activity.
Create Accounting Detail XML
Parameters:
In or Out | Parameter | Type | Description |
---|---|---|---|
In |
financialTransactionDetail |
FinancialTransactionDetail |
The financial transaction detail from which the invoice line attributes are derived to contract the XML. |
In / Out |
accountingDetail |
AccountingDetail |
XML <accountingDetail> element included in the financial message. |
The dynamic logic needs to:
-
transfer all desired values from the financial transaction detail and related objects to the accounting detail.
In addition, logic needed to set details that only exist in an accounting detail may be included (that is to set values that are derived as opposed to simply being transferred).
Create Accounting Detail Flat File
This function executes for each "accounting detail grouping" of financial transaction details. This function allows creation of zero, one, or more flat file rows each time it is executed.
Parameters:
Parameter Name | Parameter Type | Input or Output | Description |
---|---|---|---|
financialMessage |
FinancialMessage |
Input |
Financial Message Context* |
financialTransactionDetail |
FinancialTransactionDetails |
Input |
Financial Transaction Detail |
invoice |
Invoice |
Input |
InvoiceContext |
accountingDetail |
AccountingDetail |
Input |
Accounting Detail Context* |
fileRows |
List<FileRow> |
Input / Output |
File row consists of the file identifier and row content |
- Example
Map glInt = [:] glInt.STATUS = "NEW" glInt.LEDGER_ID = "300000004014096" glInt.ACCOUNTING_DATE = accountingDetail.accountingDate glInt.USER_JE_SOURCE_NAME = "OHI" glInt.USER_JE_CATEGORY_NAME = "OHI" glInt.CURRENCY_CODE = glInt.DATE_CREATED = glInt.ACTUAL_FLAG = "A" glInt.SEGMENT1 = glInt.SEGMENT2 = glInt.SEGMENT3 = glInt.SEGMENT4 = glInt.SEGMENT5 = glInt.SEGMENT6 = "" glInt.SEGMENT6 = "" glInt.SEGMENT8 = "" glInt.SEGMENT9 = "" glInt.SEGMENT1O = "" glInt.SEGMENT11 = "" glInt.SEGMENT12 = "" glInt.SEGMENT13 = "" glInt.SEGMENT14 = "" glInt.SEGMENT15 = "" glInt.SEGMENT16 = "" glInt.SEGMENT16 = "" glInt.SEGMENT18 = "" glInt.SEGMENT19 = "" glInt.SEGMENT2O = "" glInt.SEGMENT21 = "" glInt.SEGMENT22 = "" glInt.SEGMENT23 = "" glInt.SEGMENT24 = "" glInt.SEGMENT25 = "" glInt.SEGMENT26 = "" glInt.SEGMENT26 = "" glInt.SEGMENT28 = "" glInt.SEGMENT29 = "" glInt.SEGMENT3O = "" glInt.ENTERED_DR = accountingDetail.amountDebit.toPlainString() glInt.ENTERED_CR = accountingDetail.amountCredit.toPlainString() glInt.ACCOUNTED_DR = "" glInt.ACCOUNTED_CR = "" glInt.REFERENCE1 = financialMessage.jobId glInt.REFERENCE2 = "" glInt.REFERENCE3 = "" glInt.REFERENCE4 = "" glInt.REFERENCE5 = "" glInt.REFERENCE6 = "" glInt.REFERENCE7 = "" glInt.REFERENCE8 = "" glInt.REFERENCE9 = "" glInt.REFERENCE10 = "" glInt.REFERENCE21 = "" glInt.REFERENCE22 = "" glInt.REFERENCE23 = "" glInt.REFERENCE24 = "" glInt.REFERENCE25 = "" glInt.REFERENCE26 = "" glInt.REFERENCE27 = "" glInt.REFERENCE28 = "" glInt.REFERENCE29 = "" glInt.REFERENCE30 = "" glInt.STAT_AMOUNT = "" glInt.USER_CURRENCY CONVERSION TYPE = "" glInt.CURRENCY CONVERSION DATE = "" glInt.CURRENCY CONVERSION RATE = "" glInt.GROUP_ID = financialMessage.jobId glInt.ATTRIBUTE_CATEGORY = "OHI_DATA" glInt.ATTRIBUTE1 = "" glInt.ATTRIBUTE2 = "" glInt.ATTRIBUTE3 = "" glInt.ATTRIBUTE4 = "" glInt.ATTRIBUTE5 = "" glInt.ATTRIBUTE6 = "" glInt.ATTRIBUTE7 = "POL" glInt.ATTRIBUTE8 = accountingDetail.ohiAccountingDetailId glInt.ATTRIBUTE9 = "" glInt.ATTRIBUTE10 = "" glInt.ATTRIBUTE11 = "" glInt.ATTRIBUTE12 = "" glInt.ATTRIBUTE13 = "" glInt.ATTRIBUTE14 = "" glInt.ATTRIBUTE15 = "" glInt.ATTRIBUTE16 = "" glInt.ATTRIBUTE17 = "" glInt.ATTRIBUTE18 = "" glInt.ATTRIBUTE19 = "" glInt.ATTRIBUTE20 = "" glInt.ATTRIBUTE_CATEGORY_3 = "" glInt.AVERAGE JOURNAL FLAG = "" glInt.ORIGINATION_BAL_SEG_VALUE = "" glInt.LEDGER NAME = "" glInt.ENCUMBRANCE TYPE ID = "" glInt.JGZZ_RECON_REF = "" fileRows.add(new FileRow("GL_INTERFACE", glInt.values().join(",")))
Financial Transaction
This function species how the calculation results have to be mapped to the financial transaction header.
In / Out | Name | Type | Description |
---|---|---|---|
In |
calculationResult |
CalculationResult |
The calculation result for which the financial transaction is being created |
In |
financialTransaction |
FinancialTransaction |
The Financial Transaction that is the result of executing the fixed default transaction creation logic |
Out |
financialTransaction |
FinancialTransaction |
The Financial Transaction updated by the dynamic logic functionality |
The dynamic logic can:
-
Add more Financial Transaction Details
-
Set attributes of new/existing Financial Transaction Detail and corresponding Financial Transaction Process Data elements
-
Set Financial Transaction Process Detail and Financial Transaction Detail Process Detail attributes
The financialTransactionDetail.sequenceNumber of the input financial transaction is set to the corresponding calculation result line sequence. This sequence is later re-set by the system if new financial transaction details are added. |
Payment Receiver
On a contract payment receiver a dynamic logic function must be specified to determine the payment receiver (counterparty code). The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
attribution |
Attribution |
The attribution that is being evaluated |
In |
contractPaymentReceiver |
ContractPaymentReceiver |
The contract payment receiver in context |
In |
referenceDate |
Date |
The reference date of the contract calculation period |
Out |
n/a |
Alphanumerical |
The counterparty code stored on the financial transaction detail process data |
For example:
return attribution.provider.code
Person Data Replication Transformation
Data replication is required to synchronize or replicate data between different Oracle Health Insurance applications. An entity replicates data from a source to a target application using dynamic logic that overcomes differences between the two applications. Person Data Replication Transformation is a dynamic logic function used to replicate data of a Person entity. A Data Replication Transformation dynamic logic is configured between a combination of Oracle Health Insurance applications that are certified to exchange data using the data replication mechanism.
Parameters:
In / Out | Name | Type | Description |
---|---|---|---|
In |
payload |
StringReader |
The JSON payload representation of the entity retrieved from the source system. Oracle recommends using the JsonSlurper. |
In |
persistable |
Oracle Health Insurance Domain class |
The OHI domain class that was constructed from the entity and retrieved from the source system. |
- Example
-
The following sample logic sets the value of (dynamic) field, field, defined in the target system to the value of the (dynamic) field, anotherField, defined in the source system:
def message = new groovy.json.JsonSlurper().parse(payload) assert message instanceof Map persistable.field = message.anotherField
Provider Code Generation
A provider code can be produced by a dynamic function. This function can use the generated sequence number for generating a provider code. If the dynamic logic is not present, then the code defaults to the primary key of the entity. The following signature applies:
In or Out | Name | Type | Description |
---|---|---|---|
In |
provider |
Provider |
The provider being created |
Out |
n/a |
Alphanumerical |
The provider code |
// Uses the id of the provider and prefixes it with 'PROV-' return "PROV-" + provider.id.toString()
A field validation rule on the Provider Flex Code Definition may enforce a specific format and or value of the provider code. If such a validation rule exists the provider code generation dynamic logic must meet that validation. |
Reusable Code
This is a common signature, available in all the applications. This signature has no bindings. It allows for writing standalone methods/reusable classes code that can be shared across other scripts.
If a reusable dynamic logic is changed, and the changes are not reflected in the dynamic logics that have used or imported the reusable dynamic logic. To get it to work, invoke the invalidateall operation before starting other operations. See Invalidate Dynamic Logic, for more info.
|
Extension
This is a common signature, available in all the applications. This signature has no bindings. It allows for writing extensions to the dynamic logic scripts that are delivered by the product.
Test Unit
A dynamic logic with the Test Unit signature tests another dynamic logic. Such a dynamic logic that runs a test on another dynamic logic is called a test case. A test case sends objects as input to the unit under test (UUT) and validates the output.
In or Out | Name | Type | Description |
---|---|---|---|
Out |
Not Available |
Boolean |
Returns |
You can run a test case using the Test Dynamic Logic. |
URL Composition
A flex code field usage of a dynamic record definition can reference a dynamic logic function to build up the URL needed to access an external application. In this way it is possible to change, for example, a server location in a central way.
In or Out | Name | Type | Description |
---|---|---|---|
In |
dynamicRecord |
DynamicRecord |
The dynamic record |
Out |
n/a |
Alphanumerical |
The composed URL |
Example:
return "http://financialsystem.oracle.com?p_check_number="+dynamicRecord.checkNumber