Operation Details
Description: Reads the summary details for a hearing.
Sterotype: ns
SQL
SELECT
  Hearing.versionNo,
  Hearing.typeCode,
  HearingUserRole.caseUserRoleID,
  Hearing.scheduledDateTime,
  Hearing.statusCode,
  Hearing.locationID,
  Hearing.postponeReasonCode,
  Hearing.postponeReasonText,
  Hearing.postponeDate,
  Hearing.comments,
  Hearing.actualStartTime,
  Hearing.actualEndTime,
  Hearing.referenceNumber,
  Hearing.addressID,
  Hearing.noticeDate
INTO
  :versionNo,
  :typeCode,
  :caseUserRoleID,
  :scheduledDateTime,
  :statusCode,
  :locationID,
  :postponeReasonCode,
  :postponeReasonText,
  :postponeDate,
  :comments,
  :actualStartTime,
  :actualEndTime,
  :referenceNumber,
  :addressID,
  :noticeDate 
FROM
  Hearing,
  HearingUserRole,
  CaseUserRole 
WHERE Hearing.hearingID = :hearingID 
  AND Hearing.hearingID = HearingUserRole.hearingID 
  AND HearingUserRole.caseUserRoleID = CaseUserRole.caseUserRoleID 
  AND CaseUserRole.typeCode = :typeCode 
  AND 
  (
    CaseUserRole.recordStatus = :recordStatus 
    OR :recordStatus IS NULL 
  )