Dynamic Logic Functions
This section describes the dynamic logic functions that are used to create financial messages from financial transactions and financial transaction details.
Create Invoice
Financial 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 are the same. For this reason, the invoice can be based on a single financial transaction detail as input for the dynamic logic function; note also that the payment receiver is known at the financial transaction detail level, not on the financial transaction level.
Create Invoice XML
Dynamic functions of this type fill the values of an invoice element for an invoice of selected financial transaction. These dynamic functions are executed once per invoice of the financial transactions being processed.
| Parameter Name | Parameter Type | Input or Output | Description |
|---|---|---|---|
financialTransactionDetail |
FinancialTransaction Detail |
Input |
The financial transaction detail from which the invoice header attributes are derived to construct the XML. |
invoice |
Input / Output |
XML <invoice> element that will be 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. The amount is calculated by OHI and cannot be manipulated by the dynamic logic function.
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 will allow creation of zero, one, or more flat file rows each time it is executed.
| Parameter Name | Parameter Type | Input or Output | Description |
|---|---|---|---|
financialMessage |
FinancialMessage |
Input |
Financial Message Context[1] |
financialTransactionDetail |
FinancialTransactionDetail |
Input |
|
invoice |
Invoice |
Input |
Invoice Context[1] |
fileRows |
List<FileRow>[2] |
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 Claim"
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 = "CLA"
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
Financial transaction details are grouped into invoices 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 of an invoice line element for an amount that needs to be paid (or retracted). These dynamic functions are executed once for each generated by the 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.
| Parameter | Parameter Type | Input or Output | Description |
|---|---|---|---|
financialTransactionDetail |
FinancialTransaction Detail |
Input |
The financial transaction detail from which the invoice line attributes are derived to contract the XML. |
invoiceLine |
Input / Output |
XML <invoiceLine> element that will be 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, claim line, bill and claim to the invoice line. The amount is calculated by OHI and cannot be manipulated by the dynamic logic function.
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 will be executed for each "Invoice Line grouping" of financial transaction details. This function will allow creation of zero, one, or more flat file rows each time it is executed.
| Parameter Name | Parameter Type | Input or Output | Description |
|---|---|---|---|
financialMessage |
FinancialMessage |
Input |
Financial Message Context[1] |
financialTransactionDetail |
FinancialTransactionDetail |
Input |
Financial Transaction Detail |
invoice |
Invoice |
Input |
Invoice Context[1] |
invoiceLine |
InvoiceLine |
Input |
Invoice Line Context[1] |
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 = "CLA"
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
Financial transaction details are grouped into invoices 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). Dynamic Logic of the signature Create Accounting Details holds the logic to create accounting details based on the accounting detail grouping criteria.
Create Accounting Detail XML
This dynamic function is executed once per accounting detail generated by the Generate Financial Message activity.
| Parameter | Parameter Type | Input or Output | Description |
|---|---|---|---|
financialTransactionDetail |
Financial Transaction Detail |
Input |
The financial transaction detail from which the invoice line attributes are derived to contract the XML. |
accountingDetail |
Input / Output |
XML <accountingDetail> element that will be 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 will be executed for each "accounting detail grouping" of financial transaction details. This function will allow creation of zero, one, or more flat file rows each time it is executed.
| Parameter Name | Parameter Type | Input or Output | Description |
|---|---|---|---|
financialMessage |
FinancialMessage |
Input |
Financial Message Context[1] |
financialTransactionDetail |
FinancialTransactionDetails |
Input |
Financial Transaction Detail |
invoice |
Invoice |
Input |
InvoiceContext |
accountingDetail |
AccountingDetail |
Input |
Accounting Detail Context[1] |
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 = "CLA"
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(",")))
Transfer Claim Transaction Header
Dynamic functions of this type create a claim transaction "header" with claim-level details needed (in addition to the invoice, invoice lines, and accounting details of the financial message) for the financial application connector that is being used.
These dynamic functions are executed for each <ctrClaim> element (current and previous if applicable) of a financial message.
| Parameter Name | Parameter Type | Input or Output | Description |
|---|---|---|---|
ctrClaim |
CTR Claim |
Input |
|
finClaim |
CTR Claim |
Input / Output |
The dynamic logic needs to:
-
transfer all desired values from the ctr claim and its included objects (with the exception of claim lines) to the financial claim
Example:
finClaim.code = ctrClaim.code
finClaim.version = ctrClaim.version
finClaim.transactionDateTime = ctrClaim.transactionDateTime
finClaim.type = ctrClaim.type
finClaim.reversal = ctrClaim.reversal
finClaim.totalAllowedAmount = ctrClaim.totalAllowedAmount
finClaim.totalClaimedAmount = ctrClaim.totalClaimedAmount
finClaim.totalCoveredAmount = ctrClaim.totalCoveredAmount
//claimantMember
finClaim.claimantRelName = ctrClaim.claimantRelName
finClaim.claimantRelCode = ctrClaim.claimantRelCode
finClaim.claimantProvCode = ctrClaim.claimantProvCode
finClaim.claimantProvCodeDef = ctrClaim.claimantProvCodeDef
//servicedEntity
finClaim.servicedEntityType = ctrClaim.servicedEntityType
finClaim.servicedEntityName = ctrClaim.servicedEntityName
finClaim.servicedEntityCode = ctrClaim.servicedEntityCode
//paymentBeneficiary
finClaim.payBeneficiaryRelName = ctrClaim.payBeneficiaryRelName
finClaim.payBeneficiaryRelCode = ctrClaim.payBeneficiaryRelCode
finClaim.payBeneficiaryProvCode = ctrClaim.payBeneficiaryProvCode
finClaim.payBeneficiaryProvCodeDef = ctrClaim.payBeneficiaryProvCodeDef
//paymentReceiver
finClaim.payReceiverRelName = ctrClaim.payReceiverRelName
finClaim.payReceiverRelCode = ctrClaim.payReceiverRelCode
finClaim.payReceiverProvCode = ctrClaim.payReceiverProvCode
finClaim.payReceiverProvCodeDef = ctrClaim.payReceiverProvCodeDef
finClaim.entryDate = ctrClaim.entryDate
finClaim.claimDate = ctrClaim.claimDate
finClaim.formCode = ctrClaim.formCode
finClaim.providerMemberReference = ctrClaim.providerEntityReference
//diagnoses
for (ctrClaimDiagnosis in ctrClaim.ctrClaimDiagnosisList) {
def finClaimDiagnosis = new CtrClaimDiagnosis()
finClaimDiagnosis.code = ctrClaimDiagnosis.code
finClaimDiagnosis.description = ctrClaimDiagnosis.description
finClaimDiagnosis.codeDef = ctrClaimDiagnosis.codeDef
finClaimDiagnosis.sequence = ctrClaimDiagnosis.sequence
finClaimDiagnosis.typeCode = ctrClaimDiagnosis.typeCode
finClaimDiagnosis.typeDescription = ctrClaimDiagnosis.typeDescription
finClaim.addCtrClaimDiagnosis(finClaimDiagnosis)
}
// US Seed
ctrClaim.admissionType.each { admissionType ->
finClaim.addDynamicRecord ("admissionType",
[
code: admissionType?.code,
description: admissionType?.description
])
}
ctrClaim.patientDischargeStatus.each { patientDischargeStatus ->
finClaim.addDynamicRecord ("patientDischargeStatus",
[
code: patientDischargeStatus?.code,
description: patientDischargeStatus?.description
])
}
ctrClaim.diagnosisRelatedGroup.each { diagnosisRelatedGroup ->
finClaim.addDynamicRecord ("diagnosisRelatedGroup",
[
code: diagnosisRelatedGroup?.code,
description: diagnosisRelatedGroup?.description
])
}
ctrClaim.principleProcedure.each { principleProcedure ->
finClaim.addDynamicRecord ("principleProcedure",
[
code: principleProcedure?.code,
description: principleProcedure?.description,
procedureDate: principleProcedure?.procedureDate
])
}
ctrClaim.otherProcedures.each { otherProcedures ->
finClaim.addDynamicRecord ("otherProcedures",
[
code: otherProcedures?.code,
description: otherProcedures?.description,
procedureDate: otherProcedures?.procedureDate
])
}
ctrClaim.attendingProvider.each { attendingProvider ->
finClaim.addDynamicRecord ("attendingProvider",
[
code: attendingProvider?.code,
description: attendingProvider?.description
])
}
finClaim.admissionHour = ctrClaim.admissionHour
finClaim.admissionDate = ctrClaim.admissionDate
finClaim.dischargeHour = ctrClaim.dischargeHour
finClaim.dischargeDate = ctrClaim.dischargeDate
return finClaim
Transfer Claim Transaction Bill
Dynamic functions of this type create a claim transaction bill with details needed (in addition to the invoice, invoice lines, and accounting details of the financial message) for the financial application connector that is being used.
These dynamic functions are executed once per <ctrBill> element (current and previous if applicable) of a financial message.
| Parameter Name | Parameter Type | Input or Output | Description |
|---|---|---|---|
ctrBill |
CTR Bill |
Input |
|
finBill |
CTR Bill |
Input / Output |
The dynamic logic needs to:
-
transfer all desired values from the ctr bill and its included objects (with the exception of claim lines) to the financial bill
Transfer Claim Transaction Claim Line
Dynamic functions of this type create a claim transaction claim line with details needed (in addition to the invoice, invoice lines, and accounting details of the financial message) for the financial application connector that is being used.
These dynamic functions are executed once per <ctrClaimLine> element (current and previous if applicable) of a financial message.
| Parameter | Parameter Type | Input or Output | Description |
|---|---|---|---|
ctrClaimLine |
CTR ClaimLine |
Input |
|
finClaimLine |
CTR ClaimLine |
Input / Output |
The dynamic logic needs to:
-
transfer all desired values from the ctr claim line and its included objects (with the exception of financial details and allocations) to the financial claim line
Example:
finClaimLine.code = ctrClaimLine.code
finClaimLine.sequence = ctrClaimLine.sequence
finClaimLine.coveredAmount = ctrClaimLine.coveredAmount
finClaimLine.allowedAmount = ctrClaimLine.allowedAmount
finClaimLine.claimedAmount = ctrClaimLine.claimedAmount
finClaimLine.claimedNumberOfUnits = ctrClaimLine.claimedNumberOfUnits
finClaimLine.startDate = ctrClaimLine.startDate
finClaimLine.endDate = ctrClaimLine.endDate
//servicedEntity
finClaimLine.servicedEntityType = ctrClaimLine.servicedEntityType
finClaimLine.servicedEntityName = ctrClaimLine.servicedEntityName
finClaimLine.servicedEntityCode = ctrClaimLine.servicedEntityCode
//procedure
finClaimLine.procedureCode = ctrClaimLine.procedureCode
finClaimLine.procedureDescription = ctrClaimLine.procedureDescription
finClaimLine.procedureCodeDef = ctrClaimLine.procedureCodeDef
finClaimLine.procedureAccessCode = ctrClaimLine.procedureAccessCode
//serviceProvider
finClaimLine.serviceRelCode = ctrClaimLine.serviceRelCode
finClaimLine.serviceRelName = ctrClaimLine.serviceRelName
finClaimLine.serviceProvCode = ctrClaimLine.serviceProvCode
finClaimLine.serviceProvCodeDef = ctrClaimLine.serviceProvCodeDef
//paymentReceiver
finClaimLine.payReceiverRelCode = ctrClaimLine.payReceiverRelCode
finClaimLine.payReceiverRelName = ctrClaimLine.payReceiverRelName
finClaimLine.payReceiverProvCode = ctrClaimLine.payReceiverProvCode
finClaimLine.payReceiverProvCodeDef = ctrClaimLine.payReceiverProvCodeDef
//coverages (type, label, amount)
finClaimLine.coverageRegimeCode = ctrClaimLine.coverageRegimeCode
for (ctrClaimLineCoverage in ctrClaimLine.ctrClaimLineCoverageList) {
def finClaimLineCoverage = new CtrClaimLineCoverage()
finClaimLineCoverage.action = ctrClaimLineCoverage.action
finClaimLineCoverage.coverageLabelCode = ctrClaimLineCoverage.coverageLabelCode
finClaimLineCoverage.amount = ctrClaimLineCoverage.amount
finClaimLine.addCtrClaimLineCoverage(finClaimLineCoverage)
}
//diagnoses (code, flexCodeDefinitionCode, sequence)
for (ctrClaimLineDiagnosis in ctrClaimLine.ctrClaimLineDiagnosisList) {
def finClaimLineDiagnosis = new CtrClaimLineDiagnosis()
finClaimLineDiagnosis.code = ctrClaimLineDiagnosis.code
finClaimLineDiagnosis.description = ctrClaimLineDiagnosis.description
finClaimLineDiagnosis.codeDef = ctrClaimLineDiagnosis.codeDef
finClaimLineDiagnosis.sequence = ctrClaimLineDiagnosis.sequence
finClaimLineDiagnosis.typeCode = ctrClaimLineDiagnosis.typeCode
finClaimLineDiagnosis.typeDescription = ctrClaimLineDiagnosis.typeDescription
finClaimLine.addCtrClaimLineDiagnosis(finClaimLineDiagnosis)
}
//messages (code)
for (ctrClaimLineMessage in ctrClaimLine.ctrClaimLineMessageList) {
finClaimLineMessage = new CtrClaimLineMessage()
finClaimLineMessage.code = ctrClaimLineMessage.code
finClaimLine.addCtrClaimLineMessage(finClaimLineMessage)
}
//modifiers (code)
for (ctrClaimLineModifier in ctrClaimLine.ctrClaimLineModifierList) {
finClaimLineModifier = new CtrClaimLineModifier()
finClaimLineModifier.code = ctrClaimLineModifier.code
finClaimLine.addCtrClaimLineModifier(finClaimLineModifier)
}
finClaimLine.anesthesiaMinutes = ctrClaimLine.anesthesiaMinutes
return finClaimLine