- Conditions now use the same database/detail-page model as medicines, terminology, and symptoms.
What changed: Rebuilt the Conditions page into a searchable condition database: [public/workouts.php (line 1)](/Users/tyemeclifford/Documents/GH/workout/public/workouts.php:1) Added dynamic condition detail pages, e.g. /condition.php?name=Type%202%20Diabetes or /condition.php?id=2: [public/condition.php (line 1)](/Users/tyemeclifford/Documents/GH/workout/public/condition.php:1) Added condition detail/link lookup helpers: [app/bootstrap.php (line 1680)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:1680) Expanded the seeded condition catalog to 203 conditions with categories, tracking notes, and MedlinePlus links: [app/bootstrap.php (line 636)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:636) Updated combined medical search to link conditions internally with “View condition”: [public/medical.php (line 48)](/Users/tyemeclifford/Documents/GH/workout/public/medical.php:48) Updated related records on symptom/term pages to point to condition detail pages. Updated README route docs: [README.md (line 21)](/Users/tyemeclifford/Documents/GH/workout/README.md:21)
This commit is contained in:
+18
-11
@@ -45,22 +45,29 @@ require __DIR__ . '/partials/site-header.php';
|
||||
<article><strong><?= count($studies) ?></strong><span>study links</span></article>
|
||||
</div>
|
||||
|
||||
<div class="detail-grid">
|
||||
<?php foreach ($conditions as $condition): ?>
|
||||
<article>
|
||||
<h2><?= htmlspecialchars($condition['name'], ENT_QUOTES) ?></h2>
|
||||
<p><strong><?= htmlspecialchars($condition['category'], ENT_QUOTES) ?></strong></p>
|
||||
<p><?= htmlspecialchars($condition['overview'], ENT_QUOTES) ?></p>
|
||||
<p><?= htmlspecialchars($condition['common_tracking'], ENT_QUOTES) ?></p>
|
||||
<a class="site-secondary" href="<?= htmlspecialchars($condition['source_url'], ENT_QUOTES) ?>">Source</a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php if (!$conditions): ?>
|
||||
<article class="empty-state">
|
||||
<h3>No conditions found.</h3>
|
||||
<p>Try another medicine, symptom, lab, or tracking term.</p>
|
||||
</article>
|
||||
<?php else: ?>
|
||||
<div class="library-list">
|
||||
<?php foreach ($conditions as $condition): ?>
|
||||
<article class="library-row">
|
||||
<div class="library-row-main">
|
||||
<h3><?= htmlspecialchars((string) $condition['name'], ENT_QUOTES) ?></h3>
|
||||
<p><?= htmlspecialchars((string) $condition['overview'], ENT_QUOTES) ?></p>
|
||||
<div class="library-row-meta">
|
||||
<span><?= htmlspecialchars((string) $condition['category'], ENT_QUOTES) ?></span>
|
||||
<span><?= htmlspecialchars((string) $condition['source_name'], ENT_QUOTES) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="library-row-actions">
|
||||
<a class="site-primary" href="<?= htmlspecialchars(condition_detail_path($condition), ENT_QUOTES) ?>">View condition</a>
|
||||
</div>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user