Skip to content

feat: multi-master orchestration — desktop reports, clinician export, Databricks full sync#118

Merged
EduardPetraeus merged 9 commits intomainfrom
feature/multi-master-integration
Mar 8, 2026
Merged

feat: multi-master orchestration — desktop reports, clinician export, Databricks full sync#118
EduardPetraeus merged 9 commits intomainfrom
feature/multi-master-integration

Conversation

@EduardPetraeus
Copy link
Owner

Summary

Multi-master agent orchestration delivering 3 parallel domain features in a single session:

  • Desktop App (D2 S3-S5): PDF report engine (WeasyPrint), report templates, Reports + Explorer tabs, UI polish, app bundle config (py2app/PyInstaller)
  • Clinician Export (D3): FHIR R4 mapper + bundle generator, clinical PDF reports, export API endpoints (/v1/export/fhir, /v1/export/pdf)
  • Databricks Full Sync (E1): 17 new silver DLT SQL transforms, 17 gold views (10 dims + 7 facts), bronze Auto Loader configs, Unity Catalog DDL, job orchestration YAML, dev/prd environment configs

Cross-cutting: Shared contracts (interfaces.yml, data-models.yml, openapi.json), security hardening (FHIR allowlist, date validation).

Stats

  • 85 files changed (+10,212 lines)
  • 291 new tests (all pass)
  • 3 agents ran in parallel worktrees
  • Security review: WARN (3 MEDIUM fixed, 3 LOW accepted)

Test plan

  • 291 new tests pass (desktop reports: 39, export FHIR+PDF: 33, Databricks sync: 219)
  • Full existing test suite: 675 pass (1 pre-existing fail unrelated to changes)
  • All 3 branches merge cleanly with no conflicts
  • Security review completed, MEDIUM findings fixed
  • Manual: verify PDF generation with dev database
  • Manual: verify FHIR bundle validates against R4 spec
  • Manual: verify Databricks SQL syntax on Databricks workspace

Generated with Claude Code

EduardPetraeus and others added 9 commits March 8, 2026 06:08
Add shared contracts for multi-master agent orchestration:
- interfaces.yml: desktop, clinician export, databricks, mobile data shapes
- data-models.yml: patient profile, daily summary, auth, chat history schemas
- openapi.json: auto-generated from FastAPI app (9 endpoints)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add complete clinician export functionality:
- FHIR R4 resource mapper with LOINC codes for vital signs
- FHIR Bundle generator querying gold/silver layer data
- Clinical PDF report generator using WeasyPrint + Jinja2
- HTML templates with professional medical-grade styling
- FastAPI endpoints: GET /v1/export/fhir and GET /v1/export/pdf
- 33 tests covering mapper, bundle, PDF generation, and API auth

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…le config

- Task 1: ReportGenerator class with WeasyPrint PDF rendering from silver layer
- Task 2: Jinja2 report templates (base, report, 7 section partials) with
  professional medical/health CSS styling for print
- Task 3: Reports tab with date range picker, section checkboxes, PDF preview
  via iframe, and download button
- Task 4: Explorer tab with metric dropdown, computation selector, date range,
  loading states, and toast error display
- Task 5: UI polish — toast notifications, loading spinners on all buttons,
  responsive layout (3 breakpoints), consistent styling across all 4 tabs
- Task 6: App bundle config (bundle/ dir) — PyInstaller and py2app build
  scripts, Info.plist template, bundle ID com.healthreporting.desktop
- Added generate_report() and download_report() methods to DesktopAPI
- 39 new tests (test_desktop_reports.py + test_desktop_api_reports.py), all pass
- Existing 36 desktop API tests still pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…L, 17 gold SQL, Unity Catalog, jobs, config

Complete Databricks deployment layer:
- Bronze: autoloader_config.py (config generator) + bronze_dlt_pipeline.py (DLT with @dlt.table for all sources)
- Silver: 17 new SQL files ported from local dbt models using staging+MERGE+drop pattern with sha2() hashing
- Gold: 10 dimensions + 7 facts ported from DuckDB to Databricks SQL (generate_series->explode(sequence), quantile_cont->PERCENTILE, etc.)
- Unity Catalog: catalog_setup.sql (DDL + grants) + table_definitions.sql (13 silver + 1 audit table)
- Jobs: daily_pipeline.yml (bronze->silver->gold, 06:00 UTC) + weekly_pipeline.yml (dims rebuild + OPTIMIZE/VACUUM, Sunday 08:00 UTC)
- Config: dev.yml + prd.yml (env separation) + cluster_config.yml
- Tests: 219 passing tests covering file existence, MERGE pattern, YAML validity, env separation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
name_parts contains list[str] values (given), not just str — fix
type hint from dict[str, str] to dict[str, Any].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Allowlist FHIR resource types (Patient, Observation, DiagnosticReport)
- Validate date format (YYYY-MM-DD) in desktop report API methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EduardPetraeus EduardPetraeus merged commit ef18a69 into main Mar 8, 2026
6 of 9 checks passed
@EduardPetraeus EduardPetraeus deleted the feature/multi-master-integration branch March 8, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant