Operation Details
Description: Counts the number of active hearing representatives matching the given caseParticipantRole.
Sterotype: ns
SQL
SELECT
  COUNT(*)
INTO
  :numberOfRecords 
FROM
  HearingRepresentative,
  CaseParticipantRole 
WHERE HearingRepresentative.hearingID = :hearingID 
  AND HearingRepresentative.caseParticipantRoleID = :caseParticipantRoleID 
  AND CaseParticipantRole.recordStatus = :recordStatus