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.
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