Operation Details
Description: retrieves list of case header details by concern role id and start date
Sterotype: nsmulti
SQL
SELECT
  CaseHeader.caseID,
  CaseHeader.planID,
  CaseHeader.concernRoleID,
  CaseHeader.integratedCaseID,
  CaseHeader.integratedCaseType,
  CaseHeader.ownerOrgObjectLinkID,
  CaseHeader.registrationDate,
  CaseHeader.caseReference,
  CaseHeader.expectedStartDate,
  CaseHeader.expectedEndDate,
  CaseHeader.startDate,
  CaseHeader.endDate,
  CaseHeader.effectiveDate,
  CaseHeader.statusCode,
  CaseHeader.classificationCode,
  CaseHeader.priorityCode,
  CaseHeader.objectiveCode,
  CaseHeader.appealIndicator,
  CaseHeader.outcomeCode,
  CaseHeader.comments,
  CaseHeader.caseTypeCode,
  CaseHeader.receivedDate,
  CaseHeader.defaultDeliveryMethodType,
  CaseHeader.defaultCurrencyTypeCode,
  CaseHeader.firstReviewDate,
  CaseHeader.versionNo
INTO
  :caseID,
  :planID,
  :concernRoleID,
  :integratedCaseID,
  :integratedCaseType,
  :ownerOrgObjectLinkID,
  :registrationDate,
  :caseReference,
  :expectedStartDate,
  :expectedEndDate,
  :startDate,
  :endDate,
  :effectiveDate,
  :statusCode,
  :classificationCode,
  :priorityCode,
  :objectiveCode,
  :appealIndicator,
  :outcomeCode,
  :comments,
  :caseTypeCode,
  :receivedDate,
  :defaultDeliveryMethodType,
  :defaultCurrencyTypeCode,
  :firstReviewDate,
  :versionNo 
FROM
  CaseHeader 
WHERE CaseHeader.concernRoleID = :concernRoleID 
  AND 
  (
    CaseHeader.startDate >= :startDateFrom 
    OR :startDateFrom IS NULL 
  ) 
  AND 
  (
    CaseHeader.startDate <= :startDateTo 
    OR :startDateTo IS NULL 
  ) 
ORDER BY startDate DESC