This commit is contained in:
Ty Clifford
2026-07-03 17:42:16 -04:00
parent c1cb93083e
commit c5ec4f4c7e
18 changed files with 30 additions and 29 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
# Changelog
All notable changes to Neon Medical Tracker are documented here.
All notable changes to Medical Tracker are documented here.
## [Unreleased] - 2026-07-03
@@ -23,6 +23,7 @@ All notable changes to Neon Medical Tracker are documented here.
- Updated medicine catalog, medicine detail, condition, symptom, terminology, and combined-library pages to show "what it is used for" text through one shared helper.
- Updated relationship generation so official medicine-use label text participates in condition and symptom linking.
- Updated openFDA refreshes to fetch label documents first, then fall back to generic, brand, and substance buckets for broader coverage.
- Renamed user-facing branding from "Neon Medical Tracker" to "Medical Tracker".
- Batched imported medicine upserts inside a SQLite transaction for faster source refreshes.
- Increased SQLite busy timeout for safer first-run migrations and source refreshes.
- Updated `README.md` with current counts, relationship data, and source-refresh behavior.
+2 -2
View File
@@ -1,4 +1,4 @@
# Neon Medical Tracker
# Medical Tracker
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.
@@ -68,7 +68,7 @@ The database also stores user profiles, medication logs, vitals, lab results, sy
- 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.
- Dark neon theme by default, light mode option, and green, blue, red, pink, and orange accents.
## Medicine Catalog Updates
+6 -6
View File
@@ -1889,7 +1889,7 @@ function medicine_rows_with_use_summary(array $rows): array
function therapeutic_relationship_source_name(): string
{
return 'Neon therapeutic-use relationships';
return 'Medical Tracker therapeutic-use relationships';
}
function therapeutic_relationship_source_url(): string
@@ -2197,7 +2197,7 @@ function relationship_common_use(array $rules): string
function seed_medical_relationships(PDO $pdo, bool $force = false): void
{
$version = '2026-07-03-therapeutic-links-v5';
$version = '2026-07-03-therapeutic-links-v6';
$medicineCount = (int) db_value($pdo, 'SELECT COUNT(*) FROM medication_catalog');
$conditionCount = (int) db_value($pdo, 'SELECT COUNT(*) FROM medical_conditions');
$symptomCount = (int) db_value($pdo, 'SELECT COUNT(*) FROM medical_symptoms');
@@ -2247,8 +2247,8 @@ function seed_medical_relationships(PDO $pdo, bool $force = false): void
}
try {
$pdo->prepare('DELETE FROM medication_condition_links WHERE source_name = ?')->execute([$sourceName]);
$pdo->prepare('DELETE FROM medication_symptom_links WHERE source_name = ?')->execute([$sourceName]);
$pdo->prepare('DELETE FROM medication_condition_links WHERE source_name IN (?, ?)')->execute([$sourceName, 'Neon therapeutic-use relationships']);
$pdo->prepare('DELETE FROM medication_symptom_links WHERE source_name IN (?, ?)')->execute([$sourceName, 'Neon therapeutic-use relationships']);
foreach ($medicines as $medicine) {
$haystack = relationship_haystack($medicine);
@@ -3028,7 +3028,7 @@ function http_json(string $url, int $timeout = 20): ?array
'http' => [
'method' => 'GET',
'timeout' => $timeout,
'header' => "Accept: application/json\r\nUser-Agent: NeonMedicalTracker/1.0\r\n",
'header' => "Accept: application/json\r\nUser-Agent: MedicalTracker/1.0\r\n",
],
]);
$body = @file_get_contents($url, false, $context);
@@ -3041,7 +3041,7 @@ function http_json(string $url, int $timeout = 20): ?array
$command = escapeshellarg($curl)
. ' -fsSL --max-time ' . (int) $timeout
. ' -H ' . escapeshellarg('Accept: application/json')
. ' -A ' . escapeshellarg('NeonMedicalTracker/1.0')
. ' -A ' . escapeshellarg('MedicalTracker/1.0')
. ' ' . escapeshellarg($url)
. ' 2>/dev/null';
$body = shell_exec($command);
Binary file not shown.
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
app_db();
$pageTitle = 'Admin Dashboard | Neon Medical Tracker';
$pageTitle = 'Admin Dashboard | Medical Tracker';
$activePage = 'admin';
require __DIR__ . '/partials/site-header.php';
?>
+2 -2
View File
@@ -6,8 +6,8 @@ $pdo = app_db();
$condition = find_medical_condition_item($pdo, $_GET);
$pageTitle = $condition
? (string) $condition['name'] . ' | Condition Detail | Neon Medical Tracker'
: 'Condition Not Found | Neon Medical Tracker';
? (string) $condition['name'] . ' | Condition Detail | Medical Tracker'
: 'Condition Not Found | Medical Tracker';
$activePage = 'conditions';
$relatedSymptoms = [];
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
$pdo = app_db();
$pageTitle = 'Medical Reference Library | Neon Medical Tracker';
$pageTitle = 'Medical Reference Library | Medical Tracker';
$activePage = 'home';
$totalMedicines = (int) db_value($pdo, 'SELECT COUNT(*) FROM medication_catalog');
$totalTerms = (int) db_value($pdo, 'SELECT COUNT(*) FROM medical_terms');
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
$pdo = app_db();
$pageTitle = 'Medical Terminology Database | Neon Medical Tracker';
$pageTitle = 'Medical Terminology Database | Medical Tracker';
$activePage = 'terminology';
$searchQuery = trim((string) ($_GET['q'] ?? ''));
$library = library_search_payload(['q' => $searchQuery, 'limit' => 500]);
+2 -2
View File
@@ -6,8 +6,8 @@ $pdo = app_db();
$medicine = find_medication_catalog_item($pdo, $_GET);
$pageTitle = $medicine
? ucfirst((string) $medicine['generic_name']) . ' | Medicine Detail | Neon Medical Tracker'
: 'Medicine Not Found | Neon Medical Tracker';
? ucfirst((string) $medicine['generic_name']) . ' | Medicine Detail | Medical Tracker'
: 'Medicine Not Found | Medical Tracker';
$activePage = 'medicines';
$relatedStudies = [];
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
$pdo = app_db();
$pageTitle = 'Medicine Catalog | Neon Medical Tracker';
$pageTitle = 'Medicine Catalog | Medical Tracker';
$activePage = 'medicines';
$searchQuery = trim((string) ($_GET['q'] ?? ''));
$library = library_search_payload(['q' => $searchQuery, 'limit' => 500]);
+1 -1
View File
@@ -1,6 +1,6 @@
<footer class="site-footer">
<div>
<strong>Neon Medical Tracker</strong>
<strong>Medical Tracker</strong>
<p>Medication logs, vitals, lab results, terminology, NIH/NLM study links, and admin-managed profiles.</p>
</div>
<div class="footer-links">
+2 -2
View File
@@ -1,5 +1,5 @@
<?php
$pageTitle = $pageTitle ?? 'Neon Medical Tracker';
$pageTitle = $pageTitle ?? 'Medical Tracker';
$activePage = $activePage ?? '';
function site_active(string $page, string $activePage): string
{
@@ -18,7 +18,7 @@ function site_active(string $page, string $activePage): string
<header class="site-header">
<a class="site-logo" href="/">
<span class="site-logo-bars" aria-hidden="true"><i></i><i></i><i></i></span>
<span>Neon Medical Tracker</span>
<span>Medical Tracker</span>
</a>
<nav class="site-nav" aria-label="Primary navigation">
<a<?= site_active('home', $activePage) ?> href="/">Home</a>
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
$pdo = app_db();
$pageTitle = 'NIH/NLM Research Links | Neon Medical Tracker';
$pageTitle = 'NIH/NLM Research Links | Medical Tracker';
$activePage = 'research';
$studies = db_all($pdo, 'SELECT * FROM research_studies ORDER BY category, related_medicine, title');
$photo = 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/45/Jogging_Woman_in_Grass.jpg/1280px-Jogging_Woman_in_Grass.jpg';
+2 -2
View File
@@ -6,8 +6,8 @@ $pdo = app_db();
$symptom = find_medical_symptom_item($pdo, $_GET);
$pageTitle = $symptom
? (string) $symptom['name'] . ' | Symptom Detail | Neon Medical Tracker'
: 'Symptom Not Found | Neon Medical Tracker';
? (string) $symptom['name'] . ' | Symptom Detail | Medical Tracker'
: 'Symptom Not Found | Medical Tracker';
$activePage = 'symptoms';
$relatedTerms = [];
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
$pdo = app_db();
$pageTitle = 'Symptom Database | Neon Medical Tracker';
$pageTitle = 'Symptom Database | Medical Tracker';
$activePage = 'symptoms';
$searchQuery = trim((string) ($_GET['q'] ?? ''));
$library = library_search_payload(['q' => $searchQuery, 'limit' => 500]);
+2 -2
View File
@@ -6,8 +6,8 @@ $pdo = app_db();
$term = find_medical_term_item($pdo, $_GET);
$pageTitle = $term
? (string) $term['term'] . ' | Medical Term | Neon Medical Tracker'
: 'Medical Term Not Found | Neon Medical Tracker';
? (string) $term['term'] . ' | Medical Term | Medical Tracker'
: 'Medical Term Not Found | Medical Tracker';
$activePage = 'terminology';
$relatedMedicines = [];
+2 -2
View File
@@ -9,7 +9,7 @@ app_db();
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Neon Medical Tracker</title>
<title>Medical Tracker</title>
<link rel="stylesheet" href="/assets/styles.css">
</head>
<body data-theme="dark" data-accent="green">
@@ -22,7 +22,7 @@ app_db();
<span></span>
</div>
<div>
<h1>Neon Medical Tracker</h1>
<h1>Medical Tracker</h1>
<p id="profileFocus">Loading profile</p>
</div>
</div>
+1 -1
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
require __DIR__ . '/../app/bootstrap.php';
$pdo = app_db();
$pageTitle = 'Condition Database | Neon Medical Tracker';
$pageTitle = 'Condition Database | Medical Tracker';
$activePage = 'conditions';
$searchQuery = trim((string) ($_GET['q'] ?? ''));
$library = library_search_payload(['q' => $searchQuery, 'limit' => 500]);