SELECT
AssessmentConfiguration.assessmentConfigurationID,
ScreeningAssessmentConfig.scrAssConfigID,
AssessmentConfiguration.name,
ScreeningAssessmentConfig.startDate,
ScreeningAssessmentConfig.endDate,
AssessmentConfiguration.status
INTO
:assessmentConfigurationID,
:scrAssConfigID,
:assessmentName,
:startDate,
:endDate,
:recordStatus
FROM
ScreeningAssessmentConfig,
AssessmentConfiguration,
Screening
WHERE Screening.caseID = :caseID
AND ScreeningAssessmentConfig.screeningConfigID = Screening.screeningConfigID
AND ScreeningAssessmentConfig.assessmentConfigurationID = AssessmentConfiguration.assessmentConfigurationID
AND ScreeningAssessmentConfig.recordStatus <> :canceledStatusCode
AND
(
ScreeningAssessmentConfig.startDate <= :today
)
AND
(
ScreeningAssessmentConfig.endDate IS NULL
OR ScreeningAssessmentConfig.endDate >= :today
)
|