DEBUG
294
WITH cteSection AS
(
/* OG
SELECT ROW_NUMBER() OVER (
PARTITION BY JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode')
Order BY JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode'),
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_section')
) AS RowNum,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode') AS ActivityCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_section') AS SectionNum,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_brochurecode') AS BrochureCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_brochuretext') AS ActivityDescription,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_facilitylocation') AS LocationCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_displayonweb') AS Display
FROM AccuRecTrac
WHERE AccuRecTrac.TableName LIKE 'arsection'
-- [X] TODO - move to api filter
AND JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_archived') = 'false'
--AND JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_displayonweb') LIKE 'Yes'
*/
SELECT ROW_NUMBER() OVER (
PARTITION BY activitycode
Order BY activitycode,
section
) AS RowNum,
activitycode AS ActivityCode,
section AS SectionNum,
brochurecode AS BrochureCode,
brochuretext AS ActivityDescription,
facilitylocation AS LocationCode
FROM AccuRecTrac_arsection
),
cteSectionFilter AS
(
/* OG
SELECT DISTINCT JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode') AS ActivityCode
FROM AccuRecTrac
WHERE AccuRecTrac.TableName LIKE 'arsection'
-- [X] TODO - move to api filter
AND JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_displayonweb') LIKE 'Yes'
*/
SELECT DISTINCT activitycode AS ActivityCode
FROM AccuRecTrac_arsection
WHERE 1 = 1
),
cteBrochure AS
(
SELECT JSON_VALUE(AccuRecTrac.DataJSON, '$.sacommentcode_commentcode') AS BrochureCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.sacommentcode_comments') AS ActivityDescription
FROM AccuRecTrac
WHERE AccuRecTrac.TableName LIKE 'sacommentcode'
)
/* OG
SELECT DISTINCT JSON_VALUE(ART.DataJSON, '$.aractivity_activitycode') AS ActivityCode,
JSON_VALUE(ART.DataJSON, '$.aractivity_shortdescription') AS Title,
JSON_VALUE(ART.DataJSON, '$.aractivity_typecode') AS TypeCode,
CASE WHEN Brochure.ActivityDescription IS NOT NULL THEN Brochure.ActivityDescription ELSE SecDesc.ActivityDescription END AS ActivityDescription,
SecDesc.SectionNum as SectionNum,
SecDesc.RowNum
FROM AccuRecTrac AS ART
INNER JOIN cteSection AS SecDesc ON SecDesc.ActivityCode = JSON_VALUE(ART.DataJSON, '$.aractivity_activitycode')
LEFT JOIN cteBrochure AS Brochure ON Brochure.BrochureCode = SecDesc.BrochureCode
-- [] TODO - uncomment as the fallback skip activities with no sections returned will mess with pagination by possibly having less than rpp on a page
--INNER JOIN cteSectionFilter AS Filter ON Filter.ActivityCode = SecDesc.ActivityCode
WHERE ART.TableName LIKE 'aractivity'
-- [X] TODO - move to api filter
AND JSON_VALUE(ART.DataJSON, '$.aractivity_activitycode') <> ''
-- [X] TODO - move to api filter
AND SecDesc.ActivityDescription <> ''
AND RowNum = 1
-- [X] TODO - move to api filter
AND SecDesc.Display LIKE 'Yes'
*/
SELECT DISTINCT ART.activitycode AS ActivityCode,
ART.shortdescription AS Title,
ART.typecode AS TypeCode,
CASE WHEN Brochure.ActivityDescription IS NOT NULL THEN Brochure.ActivityDescription ELSE SecDesc.ActivityDescription END AS ActivityDescription,
SecDesc.SectionNum as SectionNum,
SecDesc.RowNum
FROM AccuRecTrac_aractivity AS ART
INNER JOIN cteSection AS SecDesc ON SecDesc.ActivityCode = ART.activitycode
LEFT JOIN cteBrochure AS Brochure ON Brochure.BrochureCode = SecDesc.BrochureCode
-- [] TODO - uncomment as the fallback skip activities with no sections returned will mess with pagination by possibly having less than rpp on a page
INNER JOIN cteSectionFilter AS Filter ON Filter.ActivityCode = SecDesc.ActivityCode
WHERE SecDesc.RowNum = 1
/* OG
ORDER BY JSON_VALUE(ART.DataJSON, '$.aractivity_typecode')
*/
ORDER BY ART.typecode
;
4230603 / STAR Tai Chi for Arthritis and Chronic Conditions
Tai Chi helps improve flexibility, muscle strength, heart and lung activity, posture, and balance to prevent falls. Enjoy the class at your own pace standing or seated. Instructor: Bobbie Adams. CAC
4230603-1 - Tai Chi for Arthritis and Chronic Conditions
Res/NonRes
$108.00/$108.00
6/14/2024 - 7/19/2024
11:30 am - 12:15 pm
Location
Centennial Activity Center
4230603-2 - Tai Chi for Arthritis and Chronic Conditions
7/26/2024 - 8/23/2024
11:30 am - 12:15 pm
Location
Centennial Activity Center
4230605 / STAR Tap Dance
Shuffle, hop, toe, flap, and ball- change! Learn how to be the next Gregory Hines or Ann Miller. Brush up on what you already know and add on to your repertoire. Instructor: Jeannine Pilolla. CAC
4230605-1 - Tap Class-12:30pm
6/11/2024 - 7/2/2024
12:30 pm - 1:30 pm
Location
Centennial Activity Center
4230605-2 - Tap Class-1:45pm
6/11/2024 - 7/2/2024
1:45 pm - 2:45 pm
Location
Centennial Activity Center
4230608 / STAR Movers & Shakers
Movers & Shakers Low Impact Dance Fitness
Learn easy-to-follow choreography that focuses on balance, range of motion, and coordination. Not only will you enjoy dance cardio, but light strength training as well. Come ready to sweat, and prepare to leave empowered and feeling strong. The moves are low impact and the perfect way to get you up moving and shaking! Instructor: Duvia Correa. CAC
4230608-1 - Movers & Shakers
6/10/2024 - 7/8/2024
8:45 am - 9:45 am
Location
Centennial Activity Center
4230608-2 - Movers & Shakers
Res/NonRes
$108.00/$108.00
7/15/2024 - 8/19/2024
8:45 am - 9:45 am
Location
Centennial Activity Center