Database SQL Operation: CaseParticipantRole.searchCaseMembersByGender
Description: | Select members of a case by gender. |
Sterotype: | nsmulti |
SELECT
concernRoleName,
caseParticipantRoleID
INTO
:name,
:caseParticipantRoleID
FROM
ConcernRole,
CaseParticipantRole,
Person
WHERE CaseParticipantRole.caseID = :caseID
AND
(
CaseParticipantRole.typeCode = :type1
OR CaseParticipantRole.typeCode = :type2
)
AND ConcernRole.concernRoleID = CaseParticipantRole.participantRoleID
AND
(
Person.concernRoleID = ConcernRole.concernRoleID
AND Person.gender = :gender
)
|