Operation Details
Description: Searches for all product deliveries of a specific product where the individual is of a specific type on the case. E.g. Case member or primary client.
Sterotype: nsmulti
SQL
SELECT
  ProductDelivery.caseID
INTO
  :caseID 
FROM
  ProductDelivery 
WHERE ProductDelivery.productID = :productID 
  AND ProductDelivery.caseID IN 
  ( 
  SELECT
    CaseParticipantRole.caseID 
  FROM
    CaseParticipantRole 
  WHERE CaseParticipantRole.participantRoleID = :concernRoleID 
    AND CaseParticipantRole.typeCode = :typeCode 
  )