This commit is contained in:
Ty Clifford
2026-06-30 17:16:19 -04:00
parent a1d0383da9
commit c7becbf9d6
2 changed files with 162 additions and 25 deletions
+75
View File
@@ -0,0 +1,75 @@
# Changelog
All notable changes to Neon Medical Tracker are documented here.
## [Unreleased] - 2026-06-30
### Added
- Added a public medical reference hub at `/` focused on medicines, symptoms, terminology, conditions, research, tracker access, and admin access.
- Added a searchable medicine catalog with thousands of records and dynamic medicine detail pages at `/medicine.php?id=...`.
- Added medicine detail fields for active ingredient, chemical name, common brand names, generic/alternate names, class, family, tracking notes, and external reference links.
- Added public medicine-source refresh support through the admin dashboard and `scripts/update_medicine_catalog.php`.
- Added data import/update support for RxNorm, DailyMed, and openFDA.
- Added a searchable symptom reference database at `/symptoms.php`.
- Added dynamic symptom detail pages at `/symptom.php?id=...`.
- Added 242 seeded symptom records grouped by body system/category, with tracking notes, urgency-context notes, search terms, and MedlinePlus links.
- Added a searchable condition reference database at `/workouts.php`.
- Added dynamic condition detail pages at `/condition.php?id=...`.
- Added 203 seeded condition records grouped by clinical category, with overviews, tracking notes, and MedlinePlus links.
- Added dynamic medical terminology detail pages at `/term.php?id=...`.
- Added combined medical library search across symptoms, terminology, conditions, medicines, and research-study links.
- Added search-result ordering so direct symptom and condition name matches rank above broad category/overview matches.
- Added related-record sections on dynamic detail pages, linking conditions, symptoms, terms, medicines, and research records where available.
- Added admin dashboard support for managing profiles and refreshing medication sources.
- Added profile-scoped medical tracker data for medication logs, vitals, labs, symptoms, allergies, appointments, immunizations, and notes.
- Added route documentation for all dynamic medicine, symptom, condition, and terminology endpoints.
- Added responsive overflow protections for long chemical names, brand names, reference URLs, symptoms, conditions, and directory rows.
### Changed
- Renamed the project focus from a workout/nutrition tracker to a medical tracker and medical reference database.
- Reworked the homepage from a marketing-style landing page into a direct medical reference hub.
- Reworked `/nutrition.php` from nutrition tracking content into the medicine catalog route.
- Reworked `/workouts.php` from workout planning content into the condition database route while keeping the legacy URL for compatibility.
- Reworked `/medical.php` into a combined searchable library for symptoms, terms, conditions, medicines, and study links.
- Reworked medicine and terminology list views from dense cards into compact searchable directory rows with dynamic detail links.
- Updated profile management so public profile creation is no longer part of the site flow; profile creation is handled through admin/tracker tools.
- Updated `README.md` to match the current medical-reference app, current routes, current data counts, source update process, and API actions.
- Preserved legacy fitness, nutrition, supplement, routine, workout, and body-metric data structures as optional wellness context inside the tracker.
### Removed
- Removed the public signup form and public signup JavaScript.
- Removed the `public_signup` API action.
- Removed signup links from the public header, footer, homepage, and condition pages.
- Removed unused signup/showcase CSS from the public stylesheet.
- Replaced `/signup.php` with a simple redirect to `/tracker.php` for legacy links.
### Fixed
- Fixed text overflow on long medicine names, chemical names, brand lists, source URLs, and compact database rows.
- Fixed searchable medicine and terminology pages so entries have shareable dynamic pages instead of only inline catalog cards.
- Fixed condition and symptom search behavior so relevant name matches appear first.
- Reduced one-time SQLite seeding lock risk by wrapping symptom catalog seeding in a short transaction and skipping once populated.
### Verified
- Verified dynamic medicine, symptom, condition, and terminology routes return `200` for representative records.
- Verified legacy `/signup.php` returns `302` to `/tracker.php`.
- Verified `api.php?action=public_signup` returns `404`.
- Verified current SQLite snapshot counts: 6,002 medicines, 242 symptoms, 203 conditions, 23 terms, and 9 research-link categories.
- Verified browser layout checks for medicine, symptom, and terminology pages at desktop and mobile widths with no horizontal overflow.
## Earlier Scope
### Added
- Added the original multi-user tracker foundation with SQLite storage.
- Added user profiles with role, status, contact details, care focus, height, theme mode, and accent color.
- Added first-user-is-admin behavior.
- Added admin user-management dashboard.
- Added daily, weekly, and monthly planning views.
- Added workout, routine, exercise, nutrition goal, nutrition log, supplement, supplement log, body metric, medication log, vital log, lab result, symptom log, allergy, appointment, and immunization tables.
- Added built-in exercise and supplement libraries.
- Added neon theme styling with dark mode default, light mode support, and green, blue, red, pink, and orange accents.
+87 -25
View File
@@ -1,11 +1,13 @@
# Neon Health Tracker # Neon Medical Tracker
A dependency-free PHP, HTML5, JavaScript, and SQLite tracker for workouts, nutrition, supplements, and body metrics. 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.
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.
## Run ## Run
```sh ```sh
frankenphp php-server --root public --listen 127.0.0.1:8080 /Users/tyemeclifford/frankenphp php-server --root public --listen 127.0.0.1:8080
``` ```
Then open: Then open:
@@ -16,15 +18,21 @@ http://127.0.0.1:8080
## Public Routes ## Public Routes
- `/` - public homepage for the service. - `/` - medical reference hub with search, database totals, and links to tracker/admin tools.
- `/workouts.php` - workout planning feature page. - `/nutrition.php` - searchable medicine catalog.
- `/nutrition.php` - nutrition tracking feature page. - `/medicine.php?id=46` - dynamic medicine detail page backed by SQLite.
- `/recovery.php` - recovery, supplements, and health monitoring feature page. - `/symptoms.php` - searchable symptom reference database.
- `/signup.php` - public profile signup. - `/symptom.php?id=24` - dynamic symptom detail page backed by SQLite.
- `/tracker.php` - the workout, nutrition, supplement, and health dashboard. - `/workouts.php` - searchable condition reference database.
- `/admin.php` - admin user-management dashboard. - `/condition.php?id=2` - dynamic condition detail page backed by SQLite.
- `/medical.php` - combined search for symptoms, terminology, conditions, medicines, and study links.
- `/term.php?id=1` - dynamic medical terminology detail page backed by SQLite.
- `/recovery.php` - NIH/NLM research and study-link categories.
- `/tracker.php` - profile-scoped medical tracker dashboard.
- `/admin.php` - admin user-management dashboard and medicine-source updater.
- `/signup.php` - legacy route that redirects to `/tracker.php`; public signup has been removed.
## Storage ## Current Data
SQLite is created automatically at: SQLite is created automatically at:
@@ -32,23 +40,77 @@ SQLite is created automatically at:
data/health_tracker.sqlite data/health_tracker.sqlite
``` ```
The app seeds two sample profiles, built-in exercise movements, common gym supplements, starter routines, planner entries, nutrition logs, supplement logs, and body metrics. The current SQLite snapshot includes:
- 6,002 medicine catalog records.
- 242 symptom reference records.
- 203 condition reference records.
- 23 medical terminology records.
- 9 NIH/NLM research-link categories.
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.
## Included ## Included
- Multi-user profiles with separate routines, logs, goals, and theme preferences. - Multi-user profiles with separate medical records and theme preferences.
- Admin dashboard for creating, editing, activating/deactivating, and deleting user profiles. - First user in a database is automatically promoted to `admin`; later users default to `member`.
- First user created in a database is automatically promoted to `admin`; later users default to `member`. - Admin dashboard for creating, editing, activating/deactivating, and deleting profiles.
- Daily, weekly, and monthly workout planner views. - Admin medicine-source updater for refreshing catalog data from RxNorm, DailyMed, and openFDA.
- Routine planning for weight lifting, cycling, running, swimming, conditioning, mobility, core, outdoor, and hybrid programs. - Profile-scoped tracker for medication logs, vitals, lab results, symptoms, allergies, appointments, immunizations, notes, and older wellness data.
- Configurable exercise and supplement libraries. - Searchable medicine catalog by generic name, active ingredient, chemical name, common brand names, generic/alternate names, class, family, and source terms.
- Nutrition goals scoped by day, week, or month, compared against actual logs. - Dynamic medicine pages with active ingredient, chemical name, brand names, tracking notes, RxNorm, DailyMed, PubChem, MedlinePlus, PubMed, and ClinicalTrials.gov links.
- Supplement tracking for pre-workout, intra-workout, post-workout, daily, and evening use. - Searchable symptom database with body-system categories, tracking notes, urgency-context notes, MedlinePlus links, and dynamic detail pages.
- Health metrics for weight, body fat, sleep, resting heart rate, mood, and notes. - Searchable condition database with category summaries, tracking notes, MedlinePlus links, and dynamic detail pages.
- 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.
- Neon dark theme by default, light mode option, and green, blue, red, pink, and orange accents. - Neon dark theme by default, light mode option, and green, blue, red, pink, and orange accents.
## Photo Credits ## Medicine Catalog Updates
- `Jogging Woman in Grass` by Mike Baird, CC BY 2.0. 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.
- `Cycling in Amsterdam (893)` by FaceMePLS, CC BY-SA 2.0.
- `A large mixed salad` by Jmabel, CC BY-SA 4.0. From the admin dashboard, use the medicine source updater and choose `All sources`, `RxNorm`, `DailyMed`, or `openFDA`.
From the command line:
```sh
/Users/tyemeclifford/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`.
## API
Main API endpoint:
```text
public/api.php
```
Useful actions:
- `GET api.php?action=state` - tracker/admin state payload.
- `GET api.php?action=library_search&q=chest&limit=20` - combined reference search.
- `POST api.php?action=create_user` - create a user profile from admin/tracker tools.
- `POST api.php?action=update_user` - update a user profile.
- `POST api.php?action=delete_user` - delete a user profile.
- `POST api.php?action=refresh_medication_sources` - refresh the medicine catalog from configured public sources.
The old `public_signup` action has been removed.
## Reference Sources
- MedlinePlus health topics, symptoms, conditions, labs, and drug information: `https://medlineplus.gov/`
- RxNorm and RxNav from the U.S. National Library of Medicine: `https://www.nlm.nih.gov/research/umls/rxnorm/index.html`
- DailyMed label search from the U.S. National Library of Medicine: `https://dailymed.nlm.nih.gov/dailymed/`
- PubChem chemical and compound search from NCBI: `https://pubchem.ncbi.nlm.nih.gov/`
- 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/`
## Notes
- This project intentionally avoids a public signup funnel. Profiles are managed through `/admin.php` and `/tracker.php`.
- Dynamic detail pages use shared PHP endpoints and pull records from SQLite; individual medicine, symptom, condition, and term pages do not need to exist as separate files.
- Legacy workout, nutrition, and supplement tracker data remains in the schema as wellness context, but the public app focus is now medical tracking and reference lookup.