Operation Details
Description: Return the details required to display the name and tool tip details of an Organisation Appellant added after the Appeal has been created.
Sterotype: nsmulti
SQL
SELECT 
OrganisationUnit.name,
OrganisationUnit.organisationUnitID,
OrganisationUnit.locationID


INTO
:orgUnitName,
:orgUnitID,
:locationID

FROM
  Appeal,
  Appellant,
  OrganisationUnit
WHERE
Appellant.appealID = (
  SELECT DISTINCT
  Appellant.appealID
  FROM 
  Appellant
  WHERE
  Appeal.caseID = :caseID AND
  Appellant.appealID = Appeal.appealID) AND
Appellant.caseParticipantRoleID = OrganisationUnit.organisationUnitID AND 
(
Appellant.toDate IS NULL OR
Appellant.toDate < :currentDate
)