Chrome Extension + Excel VBA Dashboard Bridging wellsite data capture, office reporting, and equipment lifecycle tracking.
PHX OpenCap is an independent toolset that extracts operational drilling data from the FieldCap web application and delivers it into structured formats for downstream use in Excel-based field reports, custom dashboards, and (planned) web-based office/field ecosystems.
The system consists of two main components:
| Component | Location | Purpose |
|---|---|---|
| Chrome Extension | src/chrome-extension/ |
Extracts job, crew, BHA equipment, and daily slide/rotate metre data from FieldCap via OData API |
| Excel VBA Module | src/excel/MDL_DDTools.bas |
Imports exported CSVs and renders an interactive DD Tools dashboard with BHA selectors, hour/meter tracking, and fatigue warnings |
┌─────────────────────────────────────────────────────────────────┐
│ FieldCap Web Application │
│ (PHX Technology — phxtech.com) │
└────────────────────────┬────────────────────────────────────────┘
│ OData v4 API + XHR/Fetch Interception
▼
┌─────────────────────────────────────────────────────────────────┐
│ Chrome Extension (Manifest V3) │
│ ┌──────────┐ ┌──────────────┐ ┌───────────────────────────┐ │
│ │content.js│ │injected-spy.js│ │ background.js │ │
│ │DOM scrape│ │XHR/Fetch hook │ │ OData fetch + normalize │ │
│ └────┬─────┘ └──────┬───────┘ │ CSV generation │ │
│ │ │ │ ActivityLog metre parsing │ │
│ └───────────────┴──────────┤ │ │
│ └────────────┬───────────────┘ │
│ │ │
│ ┌──────────────────────────────────────────┐ │ │
│ │ popup.js + popup.html │ │ │
│ │ • Job ID input │◄┘ │
│ │ • 4-checkbox export selector │ │
│ │ • Fetch & Build CSVs │ │
│ │ • File System Access API download │ │
│ │ • Per-export status cards │ │
│ └──────────────────────┬───────────────────┘ │
└─────────────────────────┼────────────────────────────────────────┘
│ 4 CSV files
▼
┌─────────────────────────────────────────────────────────────────┐
│ Local File System │
│ fieldcap-job-{id}-job-details.csv │
│ fieldcap-job-{id}-crew.csv │
│ fieldcap-job-{id}-bha-equipment.csv │
│ fieldcap-job-{id}-slide-rotate-metres-by-day.csv │
└─────────────────────────┬────────────────────────────────────────┘
│ VBA Refresh import
▼
┌─────────────────────────────────────────────────────────────────┐
│ Excel DD Tools Dashboard │
│ • Interactive BHA selector buttons │
│ • Per-BHA stats: meters, hours (slide/rot/circ), fatigue │
│ • Cumulative serial-hour tracking with 300hr limit warnings │
│ • Raw BHA Summary table (for VLOOKUP formulas) │
│ • Slide Meters / Rotate Meters breakdown │
└─────────────────────────────────────────────────────────────────┘
| File | Contents |
|---|---|
fieldcap-job-{id}-job-details.csv |
Core job metadata + all custom field key-value pairs |
fieldcap-job-{id}-crew.csv |
One row per crew member with role, contact, dates |
fieldcap-job-{id}-bha-equipment.csv |
One row per BHA component with serial, hours, meters, fatigue data |
fieldcap-job-{id}-slide-rotate-metres-by-day.csv |
Daily slide and rotate metres per BHA, sourced directly from ActivityLogs |
The slide-rotate-metres-by-day CSV is built directly from the FieldCap ActivityLogs OData endpoint — the same source that powers the Slide Sheet tab inside FieldCap. Each row represents one calendar day of drilling for a specific BHA.
| Column | Description |
|---|---|
Job ID |
FieldCap job number |
Date |
Calendar date (YYYY-MM-DD) from StartDateTime |
BHA # |
BHA assembly number |
Slide Metres |
Sum of End MD − Start MD where ActivityType = 'Sliding' |
Rotate Metres |
Sum of End MD − Start MD where ActivityType = 'Drilling' |
Survey Course Sum |
Total of slide + rotate for the day |
This replaces the previous SurveySheetEntries-based calculation which was producing incorrect (often doubled) totals. The ActivityLogs source exactly matches what FieldCap displays on its Slide Sheet tab.
Job ID, BHA #, Section, Status, Motor, Guidance,
Metres Drilled, BHA Mtrs Slid, BHA Mtrs Rot,
BHA Total Hrs, BHA Hrs Slid, BHA Hrs Rot, BHA Hrs Circ, BHA Below Rot,
Activated On, Completed On,
Serial #, Item Code, Description, Sub Description,
Length, Accum Length, Top, Bottom, Max OD, Min ID,
Job Hours, HSLS, Strapped, Shipping Status, Dispatched On, Returned On
chrome://extensions (or edge://extensions).src/chrome-extension/.live bhaRows and live activityRows counts in the status bar reflect DOM-captured data for the BHA equipment CSV.Imports the exported CSVs and renders a fully interactive directional drilling dashboard:
Alt+F11 → File → Import File → select src/excel/MDL_DDTools.bas.RebuildDashboard (creates the DD Tools sheet structure).bha-equipment, crew, job-details._FC_BHA, _FC_CREW, _FC_JOB).See src/excel/DD_TOOLS_SETUP.md for detailed setup instructions.
PHX_FieldCap/
├── README.md
├── .gitignore
├── fieldcap-job-20786-*.csv (sample exports — not committed)
│
└── src/
├── chrome-extension/
│ ├── manifest.json (Manifest V3, v3.1.1)
│ ├── background.js (OData fetch, CSV generation, ActivityLog parsing)
│ ├── content.js (DOM scraping, table detection, auto-scrape)
│ ├── injected-spy.js (page-context XHR/Fetch interception)
│ ├── popup.html (extension UI — PHX dark/teal theme, 4-export layout)
│ ├── popup.js (popup logic, File System Access API downloads)
│ └── icons/
│ ├── icon16.png
│ ├── icon48.png
│ ├── icon128.png
│ └── make_icons.ps1
│
├── excel/
│ ├── MDL_DDTools.bas (DD Tools dashboard VBA module)
│ └── DD_TOOLS_SETUP.md (setup instructions)
│
├── js/ (legacy/diagnostic scripts)
│ ├── fieldcap-bha-equipment-exporter.js
│ ├── fieldcap-console-exporter.js
│ ├── fieldcap-hour-field-diagnostic.js
│ └── fieldcap-visible-table-exporter.js
│
└── vba/
└── FieldCapInventoryMacro.bas (standalone inventory macro)
ActivityLogs OData endpoint, exactly matching the FieldCap Slide Sheet tab.
ActivityType = 'Sliding' → slide metres (End MD − Start MD)ActivityType = 'Drilling' → rotate metres (End MD − Start MD)SurveySheetEntries which produced incorrect (often doubled) values; now uses ActivityLogs as the authoritative sourceYYYYMMDDHHMI integer format (eliminated phantom 1976 dates)This project (OpenCap) is an independent, unofficial tool. It is not affiliated with, endorsed by, or supported by PHX Technology, FieldCap, or any other third party. All trademarks and product names belong to their respective owners.
The name FieldCap is used solely to describe the third-party web application this tool interacts with. Use of that name does not imply any association or endorsement.
MIT — free to use, modify, and distribute.