Database SQL Operation: PlannedItem.searchPlanItemsForClientParticipation
Description: | This method is used to get the plan items for a client. |
Sterotype: | nsmulti |
SELECT
plannedItemID,
name
INTO
:plannedItemID,
:name
FROM
CaseHeader,
PlannedItem,
PlannedSubGoal,
PlannedGoal
WHERE
(
PlannedItem.plannedSubGoalID = PlannedSubGoal.plannedSubGoalID
)
AND
(
PlannedSubGoal.plannedGoalID = PlannedGoal.plannedGoalID
)
AND
(
PlannedGoal.caseID = :caseID
)
AND
(
CaseHeader.caseID = PlannedGoal.caseID
)
AND
(
PlannedItem.responsibilityID = CaseHeader.concernRoleID
)
AND
(
PlannedItem.responsibilityType = :responsibilityType
)
AND
(
(
PlannedItem.status = :status1
)
OR
(
PlannedItem.status = :status2
)
)
|