time() - 300) { $j = json_decode((string) file_get_contents($cache), true); if (is_array($j) && isset($j['programmes'])) { return $j; } } $ctx = stream_context_create(['http' => ['timeout' => 5, 'header' => "User-Agent: DistricthiveResearchLabs/1.0\r\n"]]); $raw = @file_get_contents('https://districthive.com/ai_discover/api/wellness.php', false, $ctx); $j = $raw !== false ? json_decode($raw, true) : null; if (is_array($j) && isset($j['programmes'])) { @file_put_contents($cache, $raw); return $j; } if (is_file($cache)) { $j = json_decode((string) file_get_contents($cache), true); if (is_array($j)) { return $j; } } return ['programmes' => [], 'summary' => [], 'per_programme' => [], 'per_circuit' => [], 'log' => [], 'change' => [], 'unavailable' => true]; } $d = wl_feed(); $kinds = ['sauna' => 'Heat', 'steam' => 'Steam', 'cold' => 'Cold air', 'breath' => 'Breath', 'meditation' => 'Stillness', 'light' => 'Light', 'sound' => 'Sound', 'movement' => 'Movement', 'rest' => 'Rest', 'nature' => 'Outside', 'salt' => 'Salt water', 'jacuzzi' => 'Warm water', 'aroma' => 'Aroma', 'tea' => 'Tea', 'silence' => 'Silence', 'sky' => 'Sky']; $s = $d['summary'] ?? []; page_header('Wellness programme', 'wellness'); echo '
The Outpost\'s stations as logged doses: heat, steam, cold air, salt water, light, aroma, breath, stillness, movement, silence and the sky, arranged into routes for a day. Guests follow a route in the retreat app step by step. Research consent is chosen in the app before the programme begins, defaults to none, and can be changed at any time; the stay is the same whatever is chosen. Below the questionnaires tier the app asks no questions and keeps the steps without any identifier. Everything below is anonymous: sessions are kept under codes, never names, and averages are published only for groups of at least '.(int) ($d['rules']['min_group'] ?? 5).' sessions. This is the primary strand of the doctoral programme; the routes shown here are definition '.h((string) ($d['definition_version'] ?? '')).' and every change to a step, duration or limit is a versioned research-design change.
'; if (!empty($d['unavailable'])) { echo 'Consent tiers chosen, by session: none '.(int) ($tiers['none'] ?? 0).' (never enters the research), telemetry '.(int) ($tiers['telemetry'] ?? 0).' (aggregates only), questionnaires '.(int) ($tiers['questionnaires'] ?? 0).', wearables and interviews '.(int) ($tiers['wearables'] ?? 0).'. A dot means the group is still below the minimum size.
'; if (($s['sessions'] ?? 0) === 0) { echo 'No sessions in the research yet: the programme opens with the retreat. The outline below is live now.
'; } /* arrival, departure, four weeks on (guarded: a cached feed may predate the 'change' block) */ $ch = is_array($d['change'] ?? null) ? $d['change'] : []; $chItems = is_array($ch['items'] ?? null) ? $ch['items'] : []; $pr = is_array($ch['paired'] ?? null) ? $ch['paired'] : []; $fu = is_array($ch['followup'] ?? null) ? $ch['followup'] : []; $ft = is_array($ch['followup12'] ?? null) ? $ch['followup12'] : []; $dot = static fn ($v): string => $v === null || $v === '' ? '·' : h((string) $v); $signed = static fn ($v): string => $v === null || $v === '' ? '·' : h(((float) $v > 0 ? '+' : '').(string) $v); if ($chItems !== []) { echo 'The same nine feeling scales, 0 to 10, answered in the app on arrival and on departure, and four and twelve weeks after the stay through private links sent by e-mail. Change is departure minus arrival; on the stress scale the lower figure is the calmer one. n is arrival · departure · four weeks · twelve weeks. A dot means the group is still below the minimum size.
'; echo '| item | arrival | departure | change | four weeks on | twelve weeks on | n |
|---|---|---|---|---|---|---|
| '.h((string) ($r['question'] ?? $r['key'] ?? '')).(!empty($r['reverse']) ? ' (lower is calmer)' : '').' | '.$dot($r['arrival'] ?? null).' | '.$dot($r['departure'] ?? null).' | '.$signed($r['change'] ?? null).' | '.$dot($r['followup'] ?? null).' | '.$dot($r['followup12'] ?? null).' | '.(int) ($r['n_arrival'] ?? 0).' · '.(int) ($r['n_departure'] ?? 0).' · '.(int) ($r['n_followup'] ?? 0).' · '.(int) ($r['n_followup12'] ?? 0).' |
Paired stays, both arrival and departure answered: '.(int) ($pr['n'] ?? 0).' · mean change across the nine items per stay, stress reversed: '.$signed($pr['mean_change'] ?? null).'
'; $labels = ['days' => 'a day or two', 'week' => 'about a week', 'weeks' => 'a few weeks', 'still' => 'it is still with me']; if (is_array($fu['lasted_options'] ?? null) && $fu['lasted_options'] !== []) { $labels = $fu['lasted_options']; } foreach ([['Four weeks after', $fu], ['Twelve weeks after', $ft]] as [$wl, $fw]) { $lastedTxt = '·'; if (is_array($fw['lasted'] ?? null)) { $parts = []; foreach ($labels as $k => $label) { $parts[] = h((string) $label).' '.(int) ($fw['lasted'][$k] ?? 0); } $lastedTxt = implode(' · ', $parts); } echo ''.h($wl).': follow-ups '.(int) ($fw['scheduled'] ?? $fw['due'] ?? 0).' scheduled · '.(int) ($fw['sent'] ?? 0).' sent · '.(int) ($fw['answered'] ?? 0).' answered · the stay in mind today '.$dot($fw['memorable'] ?? null).' of 10 (n '.(int) ($fw['n_memorable'] ?? 0).') · would come back '.(isset($fw['would_return_share']) ? h((string) $fw['would_return_share']).'%' : '·').' (n '.(int) ($fw['n_return'] ?? 0).') · how long the feeling lasted: '.$lastedTxt.'
'; } echo '| route | sessions | completed | steps done | the day, 0 to 10 | would repeat |
|---|---|---|---|---|---|
| '.h($r['programme']).' | '.(int) $r['sessions'].' | '.(int) $r['completed'].' | '.($r['share_done'] !== null ? h((string) $r['share_done']).'%' : '').' | '.h((string) ($r['day_rating'] ?? '·')).' | '.(isset($r['would_repeat_share']) && $r['would_repeat_share'] !== null ? h((string) $r['would_repeat_share']).'%' : '·').' |
| route | step | station | reached | done | skipped | share | felt | minutes |
|---|---|---|---|---|---|---|---|---|
| '.h($r['programme']).' | '.h($r['title']).' | '.h(($r['station'] ?? '').' '.($kinds[$r['kind']] ?? $r['kind'])).' | '.(int) $r['reached'].' | '.(int) $r['done'].' | '.(int) $r['skipped'].' | '.($r['share_done'] !== null ? h((string) $r['share_done']).'%' : '').' | '.h((string) ($r['feeling'] ?? '·')).' | '.h((string) ($r['minutes'] ?? '')).' |
'.h($p['purpose']).' · '.h($p['tagline']).'
'.h($p['description']).'
Every session at the questionnaires tier and above as a coded row: participant code, route, day, the daily prompt, steps done of those offered, how the day felt, whether the guest would repeat the route. Open data for the research; nothing here identifies a person.
'; echo '| session | participant | route | day | definition | status | present | rested | connected | done | offered | skipped | the day | repeat | minutes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| '.(int) $r['session'].' | '.h($r['participant']).' | '.h($r['programme']).' | '.h($r['day']).' | '.h((string) ($r['definition'] ?? '')).' | '.h($r['status']).' | '.h((string) ($r['mindful'] ?? '')).' | '.h((string) ($r['restored'] ?? '')).' | '.h((string) ($r['connected'] ?? '')).' | '.(int) $r['done'].' | '.(int) $r['offered'].' | '.(int) $r['skipped'].' | '.h((string) ($r['day_rating'] ?? '')).' | '.(isset($r['would_repeat']) ? ($r['would_repeat'] ? 'yes' : 'no') : '').' | '.(int) $r['minutes'].' |
Method: a guest signs in to the retreat app from their booking; the app then keeps only a salted code for the person and the stay, and below the questionnaires tier not even that. Measures follow the research plan: the same nine feeling scales (0 to 10, with three words) answered on arrival, on departure, and four and twelve weeks after the stay by e-mail, the daily prompt (three items, 0 to 10) on the mornings between, per-step feedback (0 to 10), the closing feedback (the day 0 to 10, three words, would repeat) and a measurement moment on the first and last mornings (five minutes seated, one cuff reading, entered by hand until a device is connected). Words are never published. Wearable readings will join the same log at the wearables tier. Guests may skip, pause or abandon at any time, and every session counts, complete or not.
'; page_footer();