Database SQL Operation: InstructionLineItem.readSumAmtUnprocAmtByCaseIDTypeDateRange
Description: | To select the sum of the amount and unprocessed amount fields from the InstructionLineItem entity for a specified caseID, InstructionLineItemType, and effective date range. |
Sterotype: | ns |
SELECT
SUM(amount),
SUM(unprocessedAmount)
INTO
:amount,
:unprocessedAmount
FROM
InstructionLineItem
WHERE caseID = :caseID
AND instructionLineItemType = :typeCode
AND
(
effectiveDate >= :effectiveDateFrom
OR :effectiveDateFrom IS NULL
)
AND
(
effectiveDate <= :effectiveDateTo
OR :effectiveDateTo IS NULL
)
|