9 Commits

Author SHA1 Message Date
Ty Clifford 90b1194b65 - Public display 2026-07-03 18:00:34 -04:00
Ty Clifford c5ec4f4c7e - brand 2026-07-03 17:42:16 -04:00
Ty Clifford c1cb93083e - Fixed. Medicines now show “what it is used for” from official label data when available, with curated/common-use text as the fallback.
Changed:
Added official_use, source name, and source URL fields to the medicine 
schema in [app/bootstrap.php (line 
200)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:200).
Added shared display helpers and API used_for output in 
[app/bootstrap.php (line 
1848)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:1848).
Updated openFDA imports to pull indications_and_usage first, then 
purpose, and store source links in [app/bootstrap.php (line 
3060)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:3060).
Updated the medicine detail page to show “What It Is Used For” plus the 
openFDA label link in [public/medicine.php (line 
72)](/Users/tyemeclifford/Documents/GH/workout/public/medicine.php:72).
Updated catalog/list contexts to use the same helper, including 
[public/nutrition.php (line 
66)](/Users/tyemeclifford/Documents/GH/workout/public/nutrition.php:66).
Updated docs/counts in [README.md (line 
45)](/Users/tyemeclifford/Documents/GH/workout/README.md:45) and 
[CHANGELOG.md (line 
15)](/Users/tyemeclifford/Documents/GH/workout/CHANGELOG.md:15).
Database is updated to 7,646 medicines, with 200 openFDA label-derived 
use summaries, 8,077 medicine-condition links, and 10,590 
medicine-symptom links.
Verified:
Refreshed openFDA label-use data with 
scripts/update_medicine_catalog.php 200 openFDA.
/medicine.php?id=7644, /medicine.php?id=6, 
/nutrition.php?q=serdexmethylphenidate, 
/api.php?action=library_search&q=ADHD&limit=5, and / all returned 200.
Confirmed the page shows “What It Is Used For”, “Used for: ...”, and an 
openFDA label source link.
Stock php -l was not available in this workspace, but the FrankenPHP 
bootstrap and route/API smoke tests executed successfully.
Sources used: openFDA drug label fields and openFDA query parameters.
2026-07-03 16:34:31 -04:00
Ty Clifford e45324fde4 - 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)
2026-06-30 16:35:27 -04:00
Ty Clifford 0d492451c7 - Implemented the symptom database as a full searchable reference area, parallel to terminology.
Added:
New medical_symptoms SQLite catalog with 242 seeded symptom records, 
categories, body systems, tracking notes, urgency-context notes, search 
terms, and MedlinePlus links: [app/bootstrap.php (line 
186)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:186), 
[seed logic (line 
635)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:635)
New searchable symptom directory: [public/symptoms.php (line 
1)](/Users/tyemeclifford/Documents/GH/workout/public/symptoms.php:1)
New dynamic per-symptom page, e.g. /symptom.php?id=24: 
[public/symptom.php (line 
1)](/Users/tyemeclifford/Documents/GH/workout/public/symptom.php:1)
Symptom helper/link lookup functions: [app/bootstrap.php (line 
1473)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:1473)
medicalSymptoms added to the combined library search/API: 
[app/bootstrap.php (line 
2024)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:2024)
Symptoms added to nav, homepage, and combined medical search: 
[site-header.php (line 
27)](/Users/tyemeclifford/Documents/GH/workout/public/partials/site-header.php:27), 
[index.php (line 
11)](/Users/tyemeclifford/Documents/GH/workout/public/index.php:11), 
[medical.php (line 
13)](/Users/tyemeclifford/Documents/GH/workout/public/medical.php:13)
2026-06-30 16:19:09 -04:00
Ty Clifford b8045eb068 - The medicine and terminology directories are now organized as compact rows, and each item links to a dynamic database-backed detail page:
Medicines: /medicine.php?id=46
Terms: /term.php?id=13
Key files:
Dynamic medicine page: [public/medicine.php (line 
1)](/Users/tyemeclifford/Documents/GH/workout/public/medicine.php:1)
Dynamic term page: [public/term.php (line 
1)](/Users/tyemeclifford/Documents/GH/workout/public/term.php:1)
Shared lookup/link helpers: [app/bootstrap.php (line 
1220)](/Users/tyemeclifford/Documents/GH/workout/app/bootstrap.php:1220)
Reworked medicine directory: [public/nutrition.php (line 
49)](/Users/tyemeclifford/Documents/GH/workout/public/nutrition.php:49)
Reworked terminology page: [public/medical.php (line 
64)](/Users/tyemeclifford/Documents/GH/workout/public/medical.php:64)
Overflow-safe layout CSS: [public/assets/site.css (line 
344)](/Users/tyemeclifford/Documents/GH/workout/public/assets/site.css:344)
2026-06-30 15:41:55 -04:00
Ty Clifford 96de47be43 - The medicine database is now much bigger and has a real update path.
Added:
Live source updater for RxNorm, DailyMed, and openFDA.
Admin dashboard panel to refresh medicine sources.
CLI updater for periodic jobs: 
[scripts/update_medicine_catalog.php](/Users/tyemeclifford/Documents/GH/workout/scripts/update_medicine_catalog.php)
Update history table: medication_source_updates.
Curl fallback for external fetches when PHP stream DNS fails.
README instructions for periodic updates.
I also ran the imports:
Current medication catalog count: 6,002.
Latest source imports:RxNorm: 3,875 inserted, 1,125 updated.
openFDA: 912 inserted, 88 updated.
DailyMed: 95 inserted.

Periodic update command:
/Users/tyemeclifford/frankenphp php-cli 
scripts/update_medicine_catalog.php 5000 all
2026-06-30 15:29:57 -04:00
Ty Clifford 17ebaf21a3 - 2026-06-30 12:39:17 -04:00
Ty Clifford 0fe5a92f90 - 2026-06-30 11:14:42 -04:00