- 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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Neon Medical Tracker
|
||||
|
||||
A dependency-free PHP, HTML5, JavaScript, and SQLite web app for multi-user medical tracking, searchable medical reference data, medication catalog lookup, terminology, symptoms, conditions, NIH/NLM study links, and admin-managed profiles.
|
||||
A dependency-free PHP, HTML5, JavaScript, and SQLite web app for multi-user medical tracking, searchable medical reference data, medication catalog lookup, common-use and official-label medicine context, terminology, symptoms, conditions, NIH/NLM study links, and admin-managed profiles.
|
||||
|
||||
This app is a personal tracking and reference tool. It is not medical advice, diagnosis, treatment guidance, emergency guidance, or a substitute for a clinician or pharmacist.
|
||||
|
||||
@@ -42,11 +42,14 @@ data/health_tracker.sqlite
|
||||
|
||||
The current SQLite snapshot includes:
|
||||
|
||||
- 6,002 medicine catalog records.
|
||||
- 242 symptom reference records.
|
||||
- 203 condition reference records.
|
||||
- 7,646 medicine catalog records.
|
||||
- 200 openFDA label-derived medicine use summaries.
|
||||
- 308 symptom reference records.
|
||||
- 283 condition reference records.
|
||||
- 23 medical terminology records.
|
||||
- 9 NIH/NLM research-link categories.
|
||||
- 8,077 medicine-to-condition links.
|
||||
- 10,590 medicine-to-symptom links.
|
||||
|
||||
The database also stores user profiles, medication logs, vitals, lab results, symptom logs, allergies, appointments, immunizations, optional legacy workout/nutrition/supplement data, theme preferences, and admin state.
|
||||
|
||||
@@ -57,10 +60,11 @@ The database also stores user profiles, medication logs, vitals, lab results, sy
|
||||
- Admin dashboard for creating, editing, activating/deactivating, and deleting profiles.
|
||||
- Admin medicine-source updater for refreshing catalog data from RxNorm, DailyMed, and openFDA.
|
||||
- Profile-scoped tracker for medication logs, vitals, lab results, symptoms, allergies, appointments, immunizations, notes, and older wellness data.
|
||||
- Searchable medicine catalog by generic name, active ingredient, chemical name, common brand names, generic/alternate names, class, family, and source terms.
|
||||
- Dynamic medicine pages with active ingredient, chemical name, brand names, tracking notes, RxNorm, DailyMed, PubChem, MedlinePlus, PubMed, and ClinicalTrials.gov links.
|
||||
- Searchable medicine catalog by generic name, active ingredient, chemical name, common brand names, generic/alternate names, class, family, what the medicine is used for, linked conditions, linked symptoms, and source terms.
|
||||
- Dynamic medicine pages with active ingredient, chemical name, brand names, what the medicine is used for, openFDA label-use source links when available, linked conditions, linked symptom contexts, tracking notes, RxNorm, DailyMed, PubChem, MedlinePlus, PubMed, and ClinicalTrials.gov links.
|
||||
- Searchable symptom database with body-system categories, tracking notes, urgency-context notes, MedlinePlus links, and dynamic detail pages.
|
||||
- Searchable condition database with category summaries, tracking notes, MedlinePlus links, and dynamic detail pages.
|
||||
- Dynamic condition and symptom pages with commonly linked medicines generated from therapeutic-use categories.
|
||||
- Medical terminology database with plain-language definitions, clinical context, source links, and dynamic detail pages.
|
||||
- Combined medical library search across symptoms, conditions, terminology, medicines, and research links.
|
||||
- NIH/NLM study-link categories related to listed medicines and conditions.
|
||||
@@ -68,7 +72,7 @@ The database also stores user profiles, medication logs, vitals, lab results, sy
|
||||
|
||||
## Medicine Catalog Updates
|
||||
|
||||
The medicine catalog ships with a curated starter set and the current SQLite snapshot includes thousands of imported medicine concepts. It can be refreshed from public sources.
|
||||
The medicine catalog ships with a curated starter set and the current SQLite snapshot includes thousands of imported medicine concepts. It can be refreshed from public sources, then re-linked to conditions and symptom contexts.
|
||||
|
||||
From the admin dashboard, use the medicine source updater and choose `All sources`, `RxNorm`, `DailyMed`, or `openFDA`.
|
||||
|
||||
@@ -80,6 +84,8 @@ frankenphp php-cli scripts/update_medicine_catalog.php 1000 all
|
||||
|
||||
For periodic maintenance, run the same command nightly or weekly. The first argument is the max rows per source, from `25` to `5000`; the second argument is `all`, `RxNorm`, `DailyMed`, or `openFDA`.
|
||||
|
||||
The updater imports RxNorm ingredient concepts, DailyMed drug names, and openFDA label records. openFDA rows prefer official label `indications_and_usage` text and fall back to label `purpose` text when available, then continue filling generic, brand, and substance buckets for broader catalog coverage. Imported rows are also enriched with rule-based common-use context when the medicine name, class, family, official use text, or source terms clearly match a therapeutic category.
|
||||
|
||||
## API
|
||||
|
||||
Main API endpoint:
|
||||
@@ -108,6 +114,7 @@ The old `public_signup` action has been removed.
|
||||
- PubMed research search: `https://pubmed.ncbi.nlm.nih.gov/`
|
||||
- ClinicalTrials.gov study search: `https://clinicaltrials.gov/`
|
||||
- openFDA drug label data: `https://open.fda.gov/apis/drug/label/`
|
||||
- openFDA drug label searchable fields, including `indications_and_usage` and `purpose`: `https://open.fda.gov/apis/drug/label/searchable-fields/`
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user