Commit Graph

3 Commits

Author SHA1 Message Date
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 c7becbf9d6 - 2026-06-30 17:16:19 -04:00