A Chrome extension that exports lab results from multiple health providers to Google Sheets.
- Clone the repository and install dependencies:
git clone https://github.com/YOUR_USERNAME/labsaver.git cd labsaver npm install - Set up your development OAuth credentials by following the
OAUTH_SETUP.mdguide. - Build the development version:
npm run build:dev
- Load the extension in Chrome from the
dist/directory.
For a complete guide, see the DEVELOPMENT.md documentation.
- Exports all biomarker results from Function Health
- Creates multiple sheets:
FH_Values- All lab results with full historyFH_Definitions- Biomarker definitions and reference rangesFH_Latest- Most recent value for each biomarkerFH_Table- Pivot table view (biomarkers × dates)FH_Grouped- Results grouped by category
- NEW: Automatic LOINC code derivation for standardized lab identification
- Exports all lab results from Sutter Health MyChart
- Creates sheet:
SH_Export- All component-level lab results
- NEW: Automatic LOINC code derivation for standardized lab identification
- Automatically adds standardized LOINC codes to exported lab results
- Enables cross-system comparison between Function Health and Sutter Health data
- Uses exact mapping (no guessing) - returns empty string when no mapping exists
- Adds
Derived_LOINCcolumn as the last column (position 22) in both sheets - Automated Quest LOINC Mapping: Build-time script generates mappings from Quest Diagnostics API
- Customizable mapping files for each health system
- See QUEST_LOINC_MAPPING.md for Quest mapping documentation
- See LOINC_VERIFICATION.md for verification guide
- See LOINC_MAPPINGS.md for complete mapping reference
- Both exporters write to the same Google Sheet (stored as
masterSheetId) - Data is kept separate using tab prefixes (
FH_andSH_) - One-click export with automatic authentication
- No data merging (yet) - each system maintains its own tabs
Coming Soon! Once published, you will be able to install LabSaver directly from the Chrome Web Store.
- Log in to Function Health
- Click the "Export Labs" button that appears in the top-right corner
- Enter a name for your Google Sheet (or use the default)
- Authorize Google Sheets access if prompted
- Wait for the export to complete
- Log in to Sutter Health MyHealthOnline
- Navigate to the Test Results section
- Click the "Export Sutter Labs" button that appears in the top-right corner
- The extension will use the same Google Sheet as Function Health exports
- Wait for the export to complete
- biomarkerId, biomarkerName, primaryCategory
- questBiomarkerCode, questBiomarkerId
- dateOfService, testResultRaw, testResultNumeric
- measurementUnits, statusLabel, testResultOutOfRange
- rangeString, rangeMinDisplay, rangeMaxDisplay
- questReferenceRange, improving, neutral
- hasNewResults, type, requisitionId, createdAt
- Derived_LOINC - Standardized LOINC code (when mapping exists)
- orderKey, orderName, orderDisplayDate, resultStatus
- componentID, componentName, componentCommonName, loincCode
- value, numericValue, units
- referenceRangeFormatted, referenceRangeLowDisplay, referenceRangeHighDisplay
- abnormalFlagCategory, authorizingProviderName
- resultTimestampDisplay, prioritizedInstantISO, prioritizedInstantDisplay
- collectionTimestampsDisplay, resultingLabName
- Derived_LOINC - Standardized LOINC code (when mapping exists)
The extension uses a consolidated codebase and a Node.js-based build system that handles environment-specific configurations (development vs. production). It automatically generates the manifest.json and packages the extension for distribution.
For a complete explanation of the project structure, build process, and design decisions, please see the full ARCHITECTURE.md document.
Your privacy is our top priority. This extension is designed with privacy-first principles:
- ✅ All data processing happens locally in your browser
- ✅ No data is sent to external servers (except Google Sheets, which you control)
- ✅ No tracking or analytics - we don't collect any usage data
- ✅ No user data storage - the extension doesn't store your health data
- Reads lab results from health portals using your existing browser session
- Processes and formats the data entirely in your browser
- Writes data only to your personal Google Sheet (which you own and control)
- ❌ Does not send data to any third-party servers
- ❌ Does not track which tests you have or their values
- ❌ Does not store your health information
- ❌ Does not share data with anyone
- Uses your existing browser session cookies for health portal access
- Uses OAuth 2.0 for Google Sheets access (standard Google security)
- OAuth Scope: Uses minimal
drive.filescope - only accesses files you explicitly create or select - All credentials stay in your browser
- Enhanced privacy through restricted permissions (v2.3.0+)
- All code is open source and available for review
- You can verify exactly what the extension does
- No hidden functionality or data collection
The extension uses a manual, privacy-focused workflow to generate Quest biomarker code to LOINC code mappings:
- Export your data: Use the extension to export Function Health data to Google Sheets
- Review the export: Check the
Derived_LOINCcolumn - empty cells indicate unmapped Quest codes - Identify codes to map: Note which Quest codes you want to add LOINC mappings for
- Create input file: Make a JSON or CSV file with those Quest codes
- Run mapping script: Use the build script to fetch Quest metadata and create mappings
Create a JSON file with the Quest codes you want to map:
Example my_quest_codes.json:
[
{
"questBiomarkerCode": "12345678",
"biomarkerName": "Test Name",
"units": "mg/dL"
}
]Then run the mapping builder:
cd labsaver
npm run build:quest-map -- --input data/my_quest_codes.jsonThis will:
- Fetch test metadata from Quest Diagnostics public API
- Apply strict validation rules (exact name/unit matching)
- Update
data/quest_loinc_map.jsonwith new mappings - Preserve all existing mappings
We chose a manual workflow to protect your privacy:
- No automatic tracking of which tests you have
- You control which codes to map
- No data collection about your health conditions
- Privacy-first design
Validate the mapping file structure:
npm run validate:quest-mapFor complete documentation, see QUEST_LOINC_MAPPING.md.
- Data merging and normalization across systems using LOINC codes
- Trend analysis and visualization
- Additional health system support
- Expanded LOINC mapping coverage
- Automatic LOINC code suggestions for unmapped tests
ARCHITECTURE.md: A deep dive into the project structure, build system, and design decisions.DEVELOPMENT.md: A complete guide for setting up a local environment and contributing to the project.RELEASE_PROCESS.md: Step-by-step instructions for publishing new versions to the Chrome Web Store.AI_CONTEXT.md: Essential rules and context for AI assistants working on this codebase.CONTRIBUTING.md: Guidelines for contributing to the project.CHANGELOG.md: A complete history of changes for each version.OAUTH_SETUP.md: Instructions for creating and configuring Google OAuth credentials.
MIT License - See LICENSE file for details
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Issues: Open an issue on GitHub
- Discussions: GitHub Discussions
- Email: [Your support email]
- Function Health for providing comprehensive biomarker testing
- Sutter Health for their patient portal
- Quest Diagnostics for their public LOINC API
- The LOINC community for standardized lab codes