Operation Details
Description: Return the details of the hearing for the context panel. Including the details for the context description.
Sterotype: ns
SQL
SELECT
ConcernRole.concernRoleName,
CaseHeader.caseReference, 
CaseHeader.caseTypeCode,
Hearing.statusCode, 
Hearing.typeCode, 
Hearing.scheduledDateTime,
Hearing.addressID, 
Hearing.locationID,
Hearing.locationType,
Hearing.actualStartTime,
Hearing.actualEndTime,
ExternalPartyOffice.primaryAddressID,
Appeal.appealTypeCode

INTO
:primaryClientName,
:caseReference, 
:caseTypeCode,
:hearingStatusCode, 
:hearingTypeCode, 
:scheduledDateTime,
:addressID, 
:locationID,
:locationType,
:actualStartTime,
:actualEndTime,
:externalPartyOfficeAddressID,
:appealTypeCode

FROM
ConcernRole,
CaseHeader LEFT OUTER JOIN Appeal ON(
CaseHeader.caseID = Appeal.caseID),

Hearing

LEFT OUTER JOIN ExternalPartyOffice ON (
Hearing.externalOfficeID = ExternalPartyOffice.externalPartyOfficeID)

WHERE
Hearing.hearingID = :hearingID AND
CaseHeader.caseID = Hearing.caseID AND
CaseHeader.concernRoleID = ConcernRole.concernRoleID