Operation Details
Description: Get the number of outstanding verifications for each evidence type on a given case where the evidence status is Active or In Edit.
Sterotype: nsmulti
SQL
SELECT 
	count(verificationID),
	evidenceType 
INTO 
	:recordCount,
	:evidenceType 
FROM 
	verification, 
	VDIEDLink, 
	evidencedescriptor
WHERE
	evidencedescriptor.caseID = :caseID 
	AND
      (evidencedescriptor.statusCode = :statusCode1 OR evidencedescriptor.statusCode = :statusCode2) 				AND
	VDIEDLink.evidenceDescriptorID = evidencedescriptor.evidenceDescriptorID 
	AND
	verification.VDIEDLinkID = VDIEDLink.VDIEDLinkID 
	AND
	verificationStatus = :verificationStatus
GROUP BY 
	evidenceType