Operation Details
Description: Search for Retroactive programs by product type and date. Retroactive only case is identified as a case which starts in the past and ends in the past relative to its registration date.
Sterotype: nsmulti
SQL
SELECT
  CaseHeader.caseID,
  CaseHeader.receivedDate,
  CaseHeader.startDate,
  CaseHeader.registrationDate
INTO
  :caseID,
  :receivedDate,
  :startDate,
  :registrationDate 
FROM
  CaseHeader,
  ProductDelivery 
WHERE CaseHeader.integratedCaseID = :caseID 
  AND CaseHeader.caseID = ProductDelivery.caseID 
  AND ProductDelivery.productType = :productType 
  AND ProductDelivery.productID = :productID 
  AND CaseHeader.registrationDate > CaseHeader.endDate