System Overview & 5-Stage Data Topology
SHARP (Senior Housing Acquisition & Regional Platform, package namespace soar) is a zero-cost, local-first Python analytics and underwriting platform built for Healthcare Real Estate Investment Trusts (REITs) such as Welltower, Ventas, CareTrust, and Sabra. Rather than evaluating greenfield construction, SHARP screens 14,686 CMS-certified nursing facilities and 3,144 US counties (`1,026` institutional-scale rankable markets) for existing facility acquisitions, turnaround arbitrage, and regional roll-ups.
[US Census CC-EST2023 & SAIPE] [Zillow ZHVI County] [CMS 4pq5-n9py & xubh-q36u] [FEMA NRI ArcGIS API]
│ │ │ │
└───────────────────────────┴────────────┬────────────┴───────────────────────────┘
▼
STAGE 1: INGESTION (src/soar/ingest/) ──► Cached Raw Parquet Snapshots (data/raw/*.parquet)
│
▼
STAGE 2: ENTITY RESOLUTION (src/soar/clean/fips.py)
• Canonical 5-digit zero-padded county FIPS resolution across 14,686 SNFs & 5,419 Hospitals
• Connecticut Legacy County (09001–09015) ──► 2022 Census Planning Region (09110–09190) crosswalk
│
▼
STAGE 3: FEATURE ENGINEERING & OVERLAYS (src/soar/model/)
• Joins CON statutes, BLS clinical wages, State Medicaid deficits, FEMA NRI building loss rates
• Vectorized Haversine distance matrix (14,686 x 14,686) for 20-mi Monopoly & 30-mi Cluster metrics
• Persists 74-column unified table to data/processed/county_market_metrics.parquet & data/soar.duckdb
│
▼
STAGE 4: DYNAMIC PERCENTILE SCORING (src/soar/score/scorer.py)
• Applies institutional liquidity hurdle (default: >=300 beds, >=2,000 seniors 75+, >=2 facilities)
• Computes 7 percentile subscores strictly on base_rankable cohort (N = 1,026 counties)
│
▼
STAGE 5: PRESENTATION & UNDERWRITING (src/soar/present/)
• 7-Tab Streamlit Application + Cached Global Omnibar (3,144 Counties + 14,686 Facilities)
• 5-Year DCF Pro Forma (NNN vs. RIDEA), Portfolio Roll-Up Cart, ReportLab PDF IC Memo & AI Analyst
Codebase & Module Map
| Module Path | Layer | Primary Functions / Classes | Responsibility |
|---|---|---|---|
src/soar/config.py |
Config | BASE_DIR, RAW_DATA_DIR, PROCESSED_DATA_DIR, DUCKDB_PATH |
Centralized directory paths and environment variable bindings. |
src/soar/pipeline/runner.py |
Orchestration | run_pipeline(force_refresh) |
Executes Stages 0–4 end-to-end and writes execution telemetry to data/ingest_manifest.json. |
src/soar/clean/fips.py |
Clean | CountyFipsResolver, standardize_fips(), KNOWN_COUNTY_ALIASES |
Normalizes county/parish/city names and resolves CMS strings to canonical 5-digit FIPS codes. |
src/soar/ingest/census_ingest.py |
Ingest | fetch_census_age_data(), fetch_census_income_data() |
Downloads Census 65+/75+/85+ cohorts, 2020–2023 CAGRs, and SAIPE county median household income. |
src/soar/ingest/housing_ingest.py |
Ingest | fetch_housing_wealth_data(), expand_ct_planning_regions() |
Ingests Zillow ZHVI typical single-family home values and computes private-pay home equity runway. |
src/soar/ingest/cms_ingest.py |
Ingest | fetch_cms_nursing_homes(), fetch_cms_hospitals() |
Pulls CMS Provider Info & PBJ nurse staffing hours, calculates distress index (`0–100`), and maps FIPS. |
src/soar/ingest/fema_ingest.py |
Ingest | fetch_fema_nri_counties() |
Queries FEMA National Risk Index ArcGIS FeatureServer for 7 property-peril Expected Annual Loss (EAL) metrics. |
src/soar/model/metrics.py |
Model | build_county_metrics() |
Left-joins all datasets onto Census counties, tracks imputation flags, and writes DuckDB + Parquet tables. |
src/soar/model/con_rules.py |
Model | get_state_con_info() |
51-jurisdiction Certificate of Need (CON) statute classifications and exit cap rate adjustments (`-55` to `0` bps). |
src/soar/model/labor_rules.py |
Model | get_state_labor_info() |
State BLS RN/LPN/CNA hourly wages, wage index (`US = 100`), agency risk tier, and recommended EBITDAR margins. |
src/soar/model/payer_rules.py |
Model | get_state_medicaid_info() |
State Medicaid daily rates, actual care cost per day, daily shortfall gap, and senior liquid wealth screens. |
src/soar/model/staffing_rules.py |
Model | evaluate_facility_staffing_compliance() |
Audits facility PBJ hours against the CMS 3.48 Total / 0.55 RN / 2.45 CNA HPRD mandate and sizes payroll remediation. |
src/soar/model/insurance_rules.py |
Model | get_county_insurance_profile(), compute_insurance_stress_model() |
Combines FEMA NRI building loss rates with state tort severity to price per-bed P&C insurance and storm deductibles. |
src/soar/model/debt_rules.py |
Model | estimate_facility_debt_profile() |
Models 2020–2023 loan vintages, 2026–2028 maturity walls, SOFR refinancing shocks, and lender equity paydown gaps. |
src/soar/model/cluster_engine.py |
Model | analyze_regional_cluster(), batch_calculate_county_clusters() |
Computes 15/30/45-mile facility & bed density, ACO hospital referral catchment, and float-pool margin synergies. |
src/soar/model/diamonds.py |
Model | compute_diamonds_in_the_rough() |
Screens 4–5★, 82%+ occupancy facilities in low-competition corridors for high Yield-on-Cost basis arbitrage. |
src/soar/model/operator_bench.py |
Model | find_regional_operator_bench() |
Ranks operating chains within 50 miles on a 0–100 institutional fit score to replace distressed operators on Day 1. |
src/soar/model/portfolio_roll_up.py |
Model | compute_portfolio_roll_up(), build_portfolio_ic_memo_pdf() |
Aggregates multi-asset shopping cart, state HHI concentration diversification, and 3x3 macro stress matrix. |
src/soar/score/scorer.py |
Score | score_markets(), REIT_PRESETS |
Dynamic 7-factor percentile ranker with `is_base_rankable` isolation so pinned micro-counties never shift national ranks. |
src/soar/present/underwrite.py |
Present | run_deal_underwriting() |
5-year DCF pro forma supporting Triple-Net (NNN) and RIDEA JV structures, Newton-Raphson IRR solver, and sensitivity grids. |
src/soar/present/ic_memo_pdf.py |
Present | build_ic_memo_pdf() |
Generates 3-page institutional ReportLab PDF Investment Committee Memoranda for single assets or county submarkets. |
Upstream Public Datasets & Vintages
| Dataset | Source / Endpoint | Granularity & Row Count | Local Cache Artifact | Validation & Timeout Rules |
|---|---|---|---|---|
| US Census Age/Sex Estimates | cc-est2023-agesex-all.csv (PopEst 2020–2023) |
County (`SUMLEV=50`) 3,144 rows |
data/raw/census_agesex_2023.parquet |
60s HTTP timeout; asserts len >= 3,000; extracts `YEAR=2` (July 2020) to `YEAR=5` (July 2023) 3.0-yr CAGRs. |
| US Census SAIPE Income | est22all.txt (Small Area Income & Poverty) |
County (`5-digit FIPS`) 3,143 rows |
data/raw/census_income_2022.parquet |
30s HTTP timeout; asserts len >= 3,000; Loving County TX (`48301`) imputed with flag is_income_imputed=True. |
| Zillow ZHVI Home Values | County_zhvi_uc_sfrcondo_tier_0.33_0.67_sm_sa_month.csv |
County (`5-digit FIPS`) 3,080 rows (incl. 9 CT regions) |
data/raw/zillow_county_home_values.parquet |
60s HTTP timeout; regex date column selector ^\d{4}-\d{2}-\d{2}$; drops null FIPS prior to int cast; expands CT regions. |
| CMS Nursing Home Provider Info & PBJ | CMS Metastore Dataset ID 4pq5-n9py |
Facility (`6-char CCN`) 14,686 rows |
data/raw/cms_nursing_homes.parquet |
60s HTTP timeout; retains all 6 PBJ nurse HPRD & turnover columns; stores occupancy_rate on 0.0–1.0 scale. |
| CMS Acute & Critical Access Hospitals | CMS Metastore Dataset ID xubh-q36u |
Hospital (`facility_id`) 5,419 rows |
data/raw/cms_hospitals.parquet |
60s HTTP timeout; tracks emergency services (`has_emergency`) and CMS hospital star ratings for ACO catchment scoring. |
| FEMA National Risk Index (NRI) | ArcGIS FeatureServer (`National_Risk_Index_Counties`) | County (`STCOFIPS`) 3,232 rows |
data/processed/fema_nri_counties.parquet |
Paginated 2,000-row REST queries; extracts 7 commercial property perils (`HRCN`, `CFLD`, `IFLD`, `TRND`, `HAIL`, `SWND`, `WFIR`). |
FIPS Entity Resolution & Connecticut Planning Region Crosswalk
A classic pitfall in US county-level public data pipelines is the 2022 Connecticut Geography Transition: the US Census Bureau replaced Connecticut's 8 legacy counties (`09001`–`09015`) with 9 Councils of Governments Planning Regions (`09110`–`09190`), while Zillow ZHVI still publishes under the legacy county FIPS codes and CMS Provider Info uses abbreviated planning region strings (e.g., South Central Ct, Nw Hills).
expand_ct_planning_regions() in src/soar/ingest/housing_ingest.py maps Zillow's legacy CT county home values into the 9 Census Planning Regions using population-weighted crosswalk weights, and KNOWN_COUNTY_ALIASES in src/soar/clean/fips.py maps all CMS abbreviated county names to their 2023 Planning Region FIPS.
| 2023 Census Planning Region FIPS | Planning Region Name | CMS Provider County Alias(es) | Zillow Legacy County Crosswalk Weights |
|---|---|---|---|
09110 | Capitol Planning Region | Capitol, Hartford, Tolland | 80% Hartford (09003) + 20% Tolland (09013) |
09120 | Greater Bridgeport Planning Region | Greater Bridgeport | 100% Fairfield (09001) |
09130 | Lower Connecticut River Valley Planning Region | Lower Ct River Vly, Middlesex | 100% Middlesex (09007) |
09140 | Naugatuck Valley Planning Region | Naugatuck Vly | 70% New Haven (09009) + 30% Litchfield (09005) |
09150 | Northeastern Connecticut Planning Region | Northeastern Ct, Windham | 100% Windham (09015) |
09160 | Northwest Hills Planning Region | Nw Hills, Litchfield | 100% Litchfield (09005) |
09170 | South Central Connecticut Planning Region | South Central Ct, New Haven | 100% New Haven (09009) |
09180 | Southeastern Connecticut Planning Region | Southeastern Ct, New London | 100% New London (09011) |
09190 | Western Connecticut Planning Region | Western Ct, Fairfield | 100% Fairfield (09001) |
Master County Metrics Schema (county_market_metrics.parquet)
Generated by build_county_metrics() in src/soar/model/metrics.py (`3,144` rows x `74` columns). Key columns and units:
| Column Name | Type / Scale | Source / Derivation Formula |
|---|---|---|
fips | str (5-char) | Primary key (`01001` to `56045`), zero-padded. |
pop_65plus, pop_75plus, pop_85plus | int | July 1, 2023 Census county senior population cohorts. |
pop_75plus_cagr_2020_2023 | float (%) | ((pop_75plus_2023 / pop_75plus_2020) ** (1 / span) - 1) * 100. |
median_household_income | float ($) | Census SAIPE county median household income; flagged by is_income_imputed. |
median_home_value | float ($) | Zillow ZHVI typical single-family/condo value; flagged by is_home_value_imputed. |
home_equity_runway_years | float (yrs) | (median_home_value * 0.94) / 72,000 (years of private-pay care at $6,000/mo net of 6% selling costs). |
combined_wealth_index | float (0–100) | 0.50 * pct_rank(median_household_income) + 0.50 * pct_rank(median_home_value). |
total_nursing_homes, total_certified_beds | int | Active CMS-certified SNF facility count and total licensed bed capacity in county. |
avg_occupancy_rate | float (0–100%) | (sum(avg_residents) / sum(certified_beds)) * 100.0. Note: facility-level df_nh["occupancy_rate"] is 0.0–1.0. |
independent_count, pct_independent_operators | int, float (%) | Facilities with blank chain_name (mom-and-pop bilateral acquisition candidates). |
turnaround_count, pct_turnaround_facilities | int, float (%) | Facilities with CMS overall rating between `1` and `3` stars (`is_turnaround_target`). |
distressed_facility_count, critical_distress_count | int | Facilities with operator_distress_score >= 35 (Distressed) or >= 60 (Critical Motivated Seller). |
seniors_per_bed | float | pop_75plus / total_certified_beds (clipped `0–100`; measures demographic scarcity per existing bed). |
value_add_spread | float (0–100) | 0.50 * pct_rank(combined_wealth_index) + 0.50 * pct_rank(5.0 - avg_nursing_home_rating). |
has_imputed_data | bool | is_income_imputed | is_home_value_imputed — discloses counties with synthetic median fallback values. |
The 7-Factor SHARP Scoring Engine (src/soar/score/scorer.py)
score_markets() evaluates counties where institutional liquidity thresholds are met (`is_base_rankable`: default total_certified_beds >= 300, pop_75plus >= 2,000, and total_nursing_homes >= 2, yielding 1,026 rankable US submarkets).
.rank(pct=True)) and national_rank values are computed strictly across is_base_rankable. When a user pins a small rural county in the UI via force_include_fips, that county's subscores are interpolated against the base reference distribution without shifting the score or rank of any of the 1,026 institutional markets.
Component Subscore Formulas (All Scaled 0–100 via Percentile Rank)
2. subscore_target_pool = PctRank( 0.35 × PctRank(independent_count) + 0.35 × PctRank(turnaround_count) + 0.30 × PctRank(pct_independent_operators) )
3. subscore_housing_wealth = PctRank( combined_wealth_index )
4. subscore_barriers = 0.55 × PctRank(seniors_per_bed) + 0.45 × PctRank(con_score)
5. subscore_occupancy = PctRank( avg_occupancy_rate )
6. subscore_scale = PctRank( total_certified_beds )
7. subscore_distress = PctRank( 0.30 × PctRank(distressed_facility_count) + 0.25 × PctRank(distressed_share_pct) + 0.25 × PctRank(avg_fine_per_facility) + 0.20 × PctRank(sff_facility_count) )
Institutional Strategy Preset Weights (REIT_PRESETS)
| Preset Thesis | Value-Add Spread | Target Pool | Housing Wealth | Barriers to Entry | In-Place Occupancy | Market Scale | Distress Workout |
|---|---|---|---|---|---|---|---|
| Value-Add Turnaround (Default) | 25% | 25% | 20% | 15% | 15% | 0% | 0% |
| Core-Plus Stable Yield | 10% | 15% | 25% | 20% | 30% | 0% | 0% |
| Mom-and-Pop Portfolio Roll-Up | 0% | 35% | 20% | 0% | 20% | 25% | 0% |
| High-Barrier Infill | 25% | 0% | 25% | 30% | 20% | 0% | 0% |
| Distressed Workout & Motivated Sellers | 25% | 0% | 20% | 10% | 10% | 0% | 35% |
Diamonds in the Rough & Spatial Monopoly Engine (src/soar/model/diamonds.py)
Identifies decoupled high-performing individual facilities (4–5★ CMS rating, ≥ 82% occupancy, ≥ 50 beds, < $25,000 CMS fines) that enjoy a geographic monopoly moat and trade at secondary-market per-bed basis (`$68,000–$82,500/bed`) vs. primary infill replacement cost (`$135,000/bed`).
• Projected NOI / Bed = Occupancy_Fraction × $78,000 Gross Rev/Occ Bed × 14.5% Stabilized Margin
• Projected Yield on Cost (%) = (Projected NOI / Bed ÷ Entry Basis / Bed) × 100
• Arbitrage Spread (bps) = (Projected Yield on Cost % − 6.75% Benchmark Infill Cap Rate) × 100
• Diamond Arbitrage Score (0–100) = 0.35 × MonopolyScore + 0.25 × SpreadScore + 0.20 × QualityScore + 0.20 × CensusScore
5-Year DCF Pro Forma Engine: Triple-Net (NNN) vs. RIDEA JV (src/soar/present/underwrite.py)
run_deal_underwriting() models acquisition basis, senior debt sizing, clinical labor shocks, Medicaid shortfall drag, regional cluster synergies, FEMA property insurance variances, CMS staffing mandate remediation, and 5-year levered cash flows.
Total Cost Basis = Beds × (Purchase Price/Bed + Renovation/Bed)
Senior Debt = Total Cost Basis × LTV% | Equity Invested = Total Cost Basis − Senior Debt
Annual Debt Service = Senior Debt × (Interest Rate + 1.50% Principal Amortization)
2. Property-Level Operating Cash Flow (EBITDARM → EBITDAR):
Effective Margin = Base Margin − (Labor Wage Shock % × 0.60) + Cluster Margin Lift
Stabilized EBITDARM = Gross Revenue × Effective Margin + Cluster Synergies − Insurance Variance − Staffing Mandate Remediation
Stabilized EBITDAR (After 5% Management Fee) = Stabilized EBITDARM − (0.05 × Gross Revenue)
3. REIT Cash Flow Split by Deal Structure:
• Triple-Net (NNN) Master Lease:
Year-1 NNN Rent = Total Cost Basis × Initial Lease Yield%
Stabilized (Year 3) NNN Rent = Year-1 NNN Rent × (1 + Escalator)^2
EBITDAR Rent Coverage = Operator EBITDAR ÷ NNN Rent (Institutional Covenant ≥ 1.40x)
• RIDEA Joint Venture (TRS Operating Structure):
REIT NOI = Operator EBITDAR × REIT Equity Share % (typically 90% REIT / 10% Operator)
4. Terminal Exit Valuation & 5-Year Levered IRR:
Effective Exit Cap Rate = max(4.50%, Base Exit Cap + CON Cap Adjustment bps + Insurance Hazard bps)
Exit Valuation = Stabilized EBITDARM ÷ Effective Exit Cap Rate
Cash Flows = [ −Equity_Invested, CF_Y1, (CF_Y1+CF_Stab)/2, CF_Stab, CF_Stab, CF_Stab + (Exit_Valuation − Remaining_Debt) ]
Levered IRR solved via 100-iteration Newton-Raphson root finder (
_calculate_irr).
CON Moats, BLS Clinical Wages, Medicaid Payer Rules & FEMA NRI Insurance
-
Certificate of Need (
src/soar/model/con_rules.py): Classifies all 51 jurisdictions into Strict CON Moat (`con_score = 90–100`, `-35` to `-55` bps exit cap compression, e.g., NY, CT, VA, FL, GA), Moderate CON / Moratorium (`con_score = 60–75`, `-15` to `-25` bps, e.g., TX, MO, OH), or Deregulated / Open Market (`con_score = 20`, `0` bps, e.g., CA, PA, AZ). -
BLS Clinical Labor Intelligence (
src/soar/model/labor_rules.py): Computes state-level blended clinical hourly wage using institutional SNF staffing weights (20% RN + 22% LPN + 58% CNA) and indexes against the US benchmark (`$26.44/hr = 100.0`). Calibrates recommended in-place and stabilized operating margins. -
Medicaid Reimbursement & Senior Liquid Wealth (
src/soar/model/payer_rules.py): Tracks the daily margin gap between state Medicaid reimbursement (`$195–$365/day`) and actual care cost, alongside the percentage of county seniors 75+ holding `>$350,000` in liquid net worth. -
FEMA NRI Property & GL/PL Insurance Curve (
src/soar/model/insurance_rules.py): Combines empirical county Expected Annual Loss rates across 7 weather perils with state tort liability multipliers (`$850/bed` baseline to `$3,800+/bed` in high-velocity hurricane + severe tort corridors like South Florida), plus a 2% named-storm deductible escrow reserve.
CMS 3.48 HPRD Staffing Mandate & Commercial Debt Maturity Clock
1. Federal CMS Minimum Staffing Mandate Engine (src/soar/model/staffing_rules.py)
Audits every facility's Payroll-Based Journal (PBJ) reported hours against the federal 42 CFR § 483 thresholds: 3.48 Total Nurse HPRD, 0.55 RN HPRD, and 2.45 CNA HPRD.
• Residual Gap = max(0, (3.48 − Reported_Total_HPRD) − (RN_Gap + CNA_Gap))
• Annual Remediation Cost ($) = 365 × Daily_Census × 1.30 Fringe Load × [ (RN_Gap × State_RN_Wage) + (CNA_Gap × State_CNA_Wage) + (Residual_Gap × Blended_Wage) ]
2. Commercial Debt Maturity Distress Clock (src/soar/model/debt_rules.py)
Models the 2024–2027 healthcare real estate refinancing wall where 2020–2022 bridge/term loans originated at `3.50%–4.25%` must refinance into a `7.75%` (`SOFR 4.65% + 310 bps`) coupon environment:
• Refi DSCR = In_Place_EBITDAR ÷ Refi_Debt_Service
• Max Supportable Debt (at 1.25x Lender Covenant) = In_Place_EBITDAR ÷ (1.25 × Debt_Constant)
• Required Cash-In Equity Paydown = max(0, Current_Loan_Balance − Max_Supportable_Debt)
30-Mile Regional Cluster Engine & 50-Mile Operator Replacement Bench
-
Radial Cluster Synergies (
src/soar/model/cluster_engine.py): Uses vectorized Haversine trigonometry to count facilities, beds, independent bolt-ons, and acute-care hospitals within `15`, `30`, and `45` miles. Assigns submarkets to 4 tiers:- Flagship Super-Cluster (8+ Facs / 900+ Beds within 30mi):
+250 bpsmargin lift,$2,800/bed/yrshared overhead savings,35%agency nurse reduction. - Core Regional Pod (4–7 Facs / 450+ Beds):
+150 bpsmargin lift,$1,650/bed/yrsavings,22%agency reduction. - Developing Hub (2–3 Facs):
+50 bpsmargin lift,$600/bed/yrsavings. - Isolated Orphan Asset (0–1 Facs):
-150 bpspenalty,-$1,200/bed/yrremote oversight drag.
- Flagship Super-Cluster (8+ Facs / 900+ Beds within 30mi):
-
Operator Replacement Bench (
src/soar/model/operator_bench.py): Answers the Investment Committee question "Who runs the building on Day 1?" by scoring every multi-facility chain within 50 miles on a 100-point scale: 40 pts Clinical Quality (`avg_overall / 5 * 40`), 25 pts Regional Density, 20 pts Staffing Mandate Compliance (`(avg_hprd / 3.48) * 15 + (avg_staffing / 5) * 5`), and 15 pts Proximity (`15 - min_dist / 5`), with a `-30 pt` penalty for any Special Focus Facility (`is_sff`).
Developer Runbook, CLI Commands & Automated Testing
1. Common CLI Operations
# 1. Launch the Streamlit Platform (Port 8501)
$env:PYTHONPATH="src;."; .\.venv\Scripts\streamlit.exe run src/soar/present/app.py
# 2. Run the Data Pipeline (Uses local Parquet caches unless --force-refresh is passed)
$env:PYTHONPATH="src;."; .\.venv\Scripts\python.exe -m soar.pipeline.runner
$env:PYTHONPATH="src;."; .\.venv\Scripts\python.exe -m soar.pipeline.runner --force-refresh
# 3. Execute the Automated Pytest Suite (9 Core Verification Tests)
$env:PYTHONPATH="src;."; .\.venv\Scripts\python.exe -m pytest tests/test_soar_core.py -v
# 4. Open this Engineering Wiki in Your Default Browser
.\scripts\open_wiki.ps1
2. Automated Test Suite Coverage (tests/test_soar_core.py)
| Test Name | Module Under Test | Invariant Verified |
|---|---|---|
test_standardize_fips_padding | soar.clean.fips | 4-digit integers, floats (`"36087.0"`), and strings pad cleanly to 5-digit FIPS. |
test_county_to_fips_resolver_aliases_and_connecticut | soar.clean.fips | Resolves all CT Planning Regions (`09110`–`09190`), CMS typos (`Jeffrson Davis`, `Scott Bluff`), and blocks short prefix false positives. |
test_expand_ct_planning_regions_from_legacy_zillow | soar.ingest.housing_ingest | Crosswalks legacy CT counties (`09001`–`09015`) into all 9 CT Planning Regions (`09110`–`09190`). |
test_empty_cluster_result_schema | soar.model.cluster_engine | Ensures fallback empty cluster dictionary includes hospitals_catchment_count. |
test_score_markets_and_force_include_fips_isolation | soar.score.scorer | Proves pinning an unrankable small county via force_include_fips produces zero change in soar_score or national_rank for all 1,026 base markets. |
test_diamonds_occupancy_scale_invariance | soar.model.diamonds | Verifies identical Yield-on-Cost (`5%–20%`) whether occupancy is passed as `0.0–1.0` or `0–100`. |
test_underwriting_and_ic_memo_pdf_basis | soar.present.underwrite, ic_memo_pdf | Verifies positive total_cost_basis and valid `%PDF-` output even when optional overlays are disabled. |
test_staffing_mandate_and_operator_bench_scoring | soar.model.staffing_rules, operator_bench | Verifies exact HPRD deficit gaps (`3.48 / 0.55 / 2.45`) and operator benchmark ranking order. |
test_ai_agent_facility_occupancy_formatting | soar.ai.agent | Verifies deterministic AI facility dossiers format occupancy on a `0–100%` scale (never `0.8%`). |