Operation Details
Description: This method retrieves all evidence descriptor records by a given case id and status code ordered for evidence broker synchronization display. The records are ordered by instance id, time of event (take from EvidenceChangeHistory table), evidence type, participant and source case.
Sterotype: nsmulti
SQL
SELECT
  EvidenceDescriptor.evidenceDescriptorID,
  EvidenceDescriptor.caseID,
  EvidenceDescriptor.participantID,
  EvidenceDescriptor.statusCode,
  EvidenceDescriptor.receivedDate,
  EvidenceDescriptor.effectiveFrom,
  EvidenceDescriptor.correctionSetID,
  EvidenceDescriptor.successionID,
  EvidenceDescriptor.relatedID,
  EvidenceDescriptor.evidenceType,
  EvidenceDescriptor.pendingRemovalInd,
  EvidenceDescriptor.pendingUpdateInd,
  EvidenceDescriptor.newInd,
  EvidenceDescriptor.approvalRequestedInd,
  EvidenceDescriptor.sharedInstanceID,
  EvidenceDescriptor.sharedInd,
  EvidenceDescriptor.changeReceivedDate,
  EvidenceDescriptor.evidenceActivationDate,
  EvidenceDescriptor.sharedUnchangedInd,
  EvidenceDescriptor.sourceCaseID,
  EvidenceDescriptor.changeReason,
  EvidenceDescriptor.externalSourceCaseInd,
  EvidenceDescriptor.versionNo
INTO
  :evidenceDescriptorID,
  :caseID,
  :participantID,
  :statusCode,
  :receivedDate,
  :effectiveFrom,
  :correctionSetID,
  :successionID,
  :relatedID,
  :evidenceType,
  :pendingRemovalInd,
  :pendingUpdateInd,
  :newInd,
  :approvalRequestedInd,
  :sharedInstanceID,
  :sharedInd,
  :changeReceivedDate,
  :evidenceActivationDate,
  :sharedUnchangedInd,
  :sourceCaseID,
  :changeReason,
  :externalSourceCaseInd,
  :versionNo 
FROM
  EvidenceDescriptor,
  EvidenceChangeHistory 
WHERE caseID = :caseID 
  AND statusCode = :statusCode 
  AND EvidenceDescriptor.evidenceDescriptorID = EvidenceChangeHistory.evidenceDescriptorID 
ORDER BY EvidenceDescriptor.sharedInstanceID,
  EvidenceChangeHistory.changeDateTime,
  EvidenceDescriptor.evidenceType,
  EvidenceDescriptor.participantID,
  EvidenceDescriptor.sourceCaseID