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
;
4230311 / STAR Boost Your Brain Health
Boost Your Brain Health
Mary Bielski RN, MSN, EdD
Research focused on the brain shows decision-making skills improve as we age. Discover how to keep your mind sharp, healthy and fit, in this interactive 4-week class. This series provides you with exercises to enhance brain health, address management of other factors such as sleep, nutrition, supplements, and so much more! CAC
4230311-1 - Boost Your Brain Health
7/9/2024 - 7/30/2024
6:00 pm - 8:30 pm
Location
Centennial Activity Center
4230311-2 - Boost Your Brain Health
8/6/2024 - 8/27/2024
6:00 pm - 8:30 pm
Location
Centennial Activity Center
4230312 / Fun with Facercise
Fun with Facercise
Do facial exercises help with aging? Facial exercises are a great way to keep your face looking and feeling young and fresh. Your face is made up of over 50 muscles and just like muscles, they get stronger the more you use them. Join us for this fun and interactive session as you stimulate the flow of new blood to the face. Bring a mirror for use in class and also learn various inexpensive ways to create a home beauty spa using every day items to compliment your new facercise routine. Instructor: Aleca Breneman. CAC
4230312-1 - Fun with Facercise
7/19/2024 - 7/19/2024
11:30 am - 12:30 pm
Location
Centennial Activity Center
4230314 / Beginning Ceramic Workshop
Whether you're a complete beginner or looking to build on existing skills, our beginning hand building classes are the perfect place to start. Join us and unleash your inner artist!
In the Beginners Hand Building Class, you'll learn a variety of techniques over 8 weeks to create your own handmade pottery.
Here are some of the items you'll learn to make:
• Pinch and coil pots
• Coiled pots and textured bowls
Throughout the course, you'll also be introduced to basic glazing techniques.
4230314-1 - Beginning Ceramic Workshop
7/15/2024 - 8/19/2024
1:00 pm - 3:00 pm
Location
Centennial Activity Center