Deterministic Dart and JavaScript implementations of Lab Health Pocket's versioned interpretation and recommendation domain. They cover:
- uric acid, glucose, hemoglobin, lipid panels, blood pressure, and BMI;
- canonical unit conversion and technical input validation;
- statuses
veryLow,low,normal,caution, andhigh; - action levels from self-care education through urgent-care escalation;
- deterministic Recommendation, Limit, Avoid, and Safety groups;
- 103 generated recommendation images with bilingual names and image descriptions.
They contain no Flutter UI, database, account, analytics, network, user history, or backend configuration.
| Package | Runtime |
|---|---|
packages/dart |
Dart and Flutter |
packages/javascript |
Node.js and modern browsers |
The JavaScript data snapshot is generated from the Dart ruleset. Both implementations are checked against fixtures/interpretation-cases.json.
final engine = DeterministicInterpretationEngine();
final result = engine.evaluate(
context: const MeasurementContext(
metric: MetricType.glucose,
subtype: 'fasting',
sex: PhysiologicalSex.male,
ageYears: 35,
interpretedAtMs: 0,
),
measurement: const CanonicalMeasurement(value1: 126),
);
final guidance = DefaultRecommendationResolver().resolvePackages(
result.recommendationPackageIds,
);const engine = new DeterministicInterpretationEngine();
const result = engine.evaluate({
context: {
metric: MetricType.GLUCOSE,
subtype: 'fasting',
sex: PhysiologicalSex.MALE,
ageYears: 35,
interpretedAtMs: 0,
},
measurement: { value1: 126 },
});
const guidance = new DefaultRecommendationResolver().resolvePackages(
result.recommendationPackageIds,
);The result carries the matched rule, clinical-2026.1 version, status, action level, facts, source IDs, and recommendation-package IDs. The resolver returns stable items and concrete object advice grouped as Recommendation, Limit, Avoid, or Safety.
assets/recommendations/manifest.json inventories all 103 WebP files. Every entry has a stable object ID, local path, Indonesian and English name, neutral Indonesian and English image description, and accessibility key. Images are optional presentation assets; recommendation behavior is driven by structured rules, not image recognition.
The code, original documentation, and original generated assets are MIT-licensed. The ruleset itself remains marked clinical-review-required; publish_to: none prevents accidental registry publication before an accountable clinical review. External medical sources are citations, not part of the MIT grant.
Read MEDICAL_SAFETY.md, LICENSE-STATUS.md, and the traceability documents in docs/sources before integration.
cd packages/dart
dart pub get --offline
dart run tool/build_asset_manifest.dart
dart run tool/export_javascript_data.dart
dart analyze
dart test
cd ../javascript && npm test