{"_id":"@davecook/home-care-cost-model","name":"@davecook/home-care-cost-model","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@davecook/home-care-cost-model","version":"0.1.0","description":"A reference cost model for Canadian home care service-mix decisions (PSW, housekeeping, nursing) with 2026 tax relief stack and per-province subsidy eligibility.","main":"engines/python/engine.py","keywords":["home-care","psw","personal-support-worker","aging-in-place","canada","health-policy","cost-model","tax-credit"],"author":{"name":"Dave Cook","email":"dave@binx.ca"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DaveCookVectorLabs/home-care-cost-model.git"},"homepage":"https://github.com/DaveCookVectorLabs/home-care-cost-model","gitHead":"c66eac175a86232ba5ab2b3d1520d73f75ae1966","bugs":{"url":"https://github.com/DaveCookVectorLabs/home-care-cost-model/issues"},"_id":"@davecook/home-care-cost-model@0.1.0","_nodeVersion":"20.18.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-4EP6NvoIXxEogUGshvbetXA5IVpCgeyQLjPKDWTeYISAhyQwLz++4vlLuodklYC6jXSVa9MzT6ySDZO7tyILOw==","shasum":"98f4081801b5ef8fe615496eb24688108e834ed3","tarball":"https://registry.npmjs.org/@davecook/home-care-cost-model/-/home-care-cost-model-0.1.0.tgz","fileCount":66,"unpackedSize":3315488,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG40RCha9JXNoxl4dzedbKLgB/DNee8fYtRTsO5uapCAAiEA8B7dyaJXGwbB+u5NJ/dfIm15w92tXEms8nYX7ztjt3A="}]},"_npmUser":{"name":"davecook","email":"dave.vectorlabs@proton.me"},"directories":{},"maintainers":[{"name":"davecook","email":"dave.vectorlabs@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/home-care-cost-model_0.1.0_1775795349775_0.5954593935129744"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T04:29:09.704Z","0.1.0":"2026-04-10T04:29:09.997Z","modified":"2026-04-10T04:29:10.208Z"},"maintainers":[{"name":"davecook","email":"dave.vectorlabs@proton.me"}],"description":"A reference cost model for Canadian home care service-mix decisions (PSW, housekeeping, nursing) with 2026 tax relief stack and per-province subsidy eligibility.","homepage":"https://github.com/DaveCookVectorLabs/home-care-cost-model","keywords":["home-care","psw","personal-support-worker","aging-in-place","canada","health-policy","cost-model","tax-credit"],"repository":{"type":"git","url":"git+https://github.com/DaveCookVectorLabs/home-care-cost-model.git"},"author":{"name":"Dave Cook","email":"dave@binx.ca"},"bugs":{"url":"https://github.com/DaveCookVectorLabs/home-care-cost-model/issues"},"license":"MIT","readme":"# Home Care Cost Model\n\n[![PyPI version](https://badge.fury.io/py/home-care-cost-model.svg)](https://pypi.org/project/home-care-cost-model/)\n[![npm version](https://badge.fury.io/js/%40davecook%2Fhome-care-cost-model.svg)](https://www.npmjs.com/package/@davecook/home-care-cost-model)\n[![Crates.io](https://img.shields.io/crates/v/home-care-cost-model-engine.svg)](https://crates.io/crates/home-care-cost-model-engine)\n[![Gem Version](https://badge.fury.io/rb/home_care_cost_model.svg)](https://rubygems.org/gems/home_care_cost_model)\n[![Hex.pm](https://img.shields.io/hexpm/v/home_care_cost_model.svg)](https://hex.pm/packages/home_care_cost_model)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Data: CC BY 4.0](https://img.shields.io/badge/Data-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)\n\nA reference cost model and open dataset collection for home care decisions in\nCanada. The model quantifies the trade-off families face when combining\nPersonal Support Worker (PSW) hours, housekeeping services, nursing care, and\ninformal caregiving for an older adult or person with a disability remaining at\nhome. It spans all ten provinces and three territories, incorporates 2026 tax\nrelief parameters (Medical Expense Tax Credit, Disability Tax Credit, Canada\nCaregiver Credit, Veterans Independence Program), and emits explicit scope of\npractice warnings when inputs imply a service substitution that is not legally\npermissible.\n\n---\n\n## Plain-language summary\n\nFamilies across Canada routinely face a choice between hiring a Personal\nSupport Worker (PSW) and hiring a cleaner or housekeeper when a parent or\nspouse begins to need help at home. The two roles are not interchangeable. A\nPSW is trained and authorised to provide personal care — bathing, toileting,\ntransfers, feeding, medication reminders, and (in some provinces and under\ndelegation) basic wound and ostomy care. A housekeeper or cleaning service is\nauthorised to clean. Asking a cleaner to help with personal care is outside\ntheir scope of practice and, in several provinces, outside the scope of their\ninsurance.\n\nThis repository publishes a parametric model that takes a recipient's\nactivities-of-daily-living (ADL) and instrumental-activities-of-daily-living\n(IADL) scores, their province, a short description of their household and\ndiagnosis, and returns a service mix (PSW hours, housekeeping hours, nursing\nhours), a monthly private-pay cost, the hours covered by the applicable\nprovincial subsidised program, and the federal and provincial tax credits\nthat typically apply. It also flags, in writing, any combination of inputs\nwhere cleaning services cannot legally substitute for personal support.\n\nThe model is not clinical advice. It is a reference framework for comparing\noptions before a formal care assessment. All data sources are government or\npeer-reviewed. All code is open source under MIT. All data is published under\nCC BY 4.0.\n\n---\n\n## What This Does\n\nGiven an older adult or disability-care recipient's functional assessment and\njurisdiction, the model computes:\n\n- **Recommended weekly service hours** across three categories (personal\n  support, housekeeping, skilled nursing), derived from Katz ADL and Lawton\n  IADL scores with diagnosis- and cognition-aware adjustments.\n- **Scope of practice warnings** when the combination of inputs implies a\n  legally-impermissible substitution (e.g. housekeeping for a recipient whose\n  ADL score indicates need for bathing or transfer assistance).\n- **Private-pay monthly cost** using per-province rate bands derived from\n  Statistics Canada wage tables and Canadian Home Care Association agency\n  markup ranges.\n- **Subsidised hours allocation** for the recipient's province, following\n  publicly-documented eligibility rules (Ontario HCCSS, BC Health Authority\n  home care, Alberta Continuing Care at Home, Quebec CLSC Soutien à domicile,\n  Saskatchewan Health Authority, Manitoba Home Care, Atlantic provinces,\n  Territories).\n- **Federal and provincial tax credit stack** — Medical Expense Tax Credit\n  (METC), Disability Tax Credit (DTC), Canada Caregiver Credit (CCC),\n  Veterans Affairs Canada VIP, and Indigenous Services Canada FNIHB Home and\n  Community Care Program flags.\n- **Out-of-pocket cost after credits**, monthly and annualised.\n- **Hybrid-versus-all-PSW comparison**, showing how much a family saves by\n  using a cleaning service for housekeeping hours rather than paying a PSW\n  rate for those same hours.\n- **Employment-law warnings** when private-hire arrangements exceed a\n  threshold that triggers CRA employer obligations (CPP, EI, provincial\n  WSIB, T4 filing).\n- **Data source citations** linking every output field to the Sources\n  manifest row that supplied its constants.\n\nEvery response includes a `disclaimer` field: *\"Reference model only. Not\nclinical or financial advice; consult a regulated health professional or\nregistered tax practitioner for individual decisions.\"*\n\n---\n\n## Datasets\n\nThree classes of data ship with this repository. All live under `datasets/`.\n\n### Class 1 — Sources (raw, verbatim, credited)\n\nFetched by `datasets/pull_sources.py` from authoritative portals and stored\nunder `datasets/sources/<organisation>/<filename>` with a sibling\n`<filename>.source.json` that records upstream URL, retrieval timestamp,\nlicense, and SHA256. A human-readable manifest is at\n`datasets/SOURCES.md`. No Source file is ever edited after download.\n\nUpstream organisations represented in Sources: Statistics Canada (wage,\npopulation, CPI tables), Canadian Institute for Health Information (home\ncare indicators), Canada Revenue Agency (tax folios), Veterans Affairs\nCanada (VIP rate schedule), Indigenous Services Canada (FNIHB Home and\nCommunity Care), Canadian Home Care Association, the Ontario Ministry of\nHealth (HCCSS), and the equivalent provincial and territorial ministries.\n\n### Class 2 — Reference tables (hand-curated, deterministic)\n\n| File | Rows | Description |\n|---|---|---|\n| `home_care_services_canada.csv` | ~112 | Scope-of-practice and rate bands for 8 service categories across 13 Canadian jurisdictions, plus federal/cross-jurisdiction rows for VAC VIP and ISC FNIHB. Every row cites a `source_url`. |\n| `home_care_tax_parameters_2026.csv` | ~40 | Tax-year 2026 parameters for METC, DTC, CCC, VAC VIP, and provincial disability supplements. Every row cites a CRA folio or equivalent. |\n| `home_care_subsidy_programs.csv` | ~25 | Provincial and territorial subsidised home care programs: administering body, eligibility rules, typical hours awarded, wait time, URL, retrieval date. |\n\n### Class 3 — Derived scenarios (engine-generated)\n\nThese are the analysis-ready tables published to Hugging Face, Kaggle,\nZenodo, Dryad, and Mendeley Data. Every row is produced by calling\n`engines/python/engine.py` with a specific input grid.\n\n| File | Rows | Description |\n|---|---|---|\n| `home_care_scenarios.csv` | 5,000 | Synthetic household scenarios with population-weighted province sampling, joint-distribution diagnosis/cognition/mobility sampling calibrated to CIHI home care indicators, and per-scenario engine outputs. Deterministic with `random.seed(42)`. |\n| `home_care_per_province_rate_bands.csv` | ~650 | Product of the reference scope table × Statistics Canada CPI-adjusted wage data for 2019–2026, yielding implied private-pay and agency-billed rate ranges per (province, service, year). |\n| `home_care_cost_model_archetypes.csv` | ~2,500 | Engine outputs for a grid of canonical household archetypes: every (province × ADL × IADL × cognitive × mobility) combination at constant household composition and income. The lookup-table form of the calculator. |\n| `home_care_tax_relief_sensitivity.csv` | ~3,500 | Sensitivity grid: ~700 base scenarios × 5 net-income bands ($25k, $50k, $75k, $100k, $150k). Shows how tax-credit value shifts across the income distribution. |\n| `home_care_subsidy_gap.csv` | ~390 | 13 jurisdictions × 30 representative scenarios. Reports subsidised hours awarded vs. model-recommended hours vs. monthly dollar gap, exposing cross-province variation in home care program generosity. |\n\nAll derived datasets are labelled **\"Synthetic. Generated from seed 42. Not\nsurvey data.\"** in their header comments and dataset cards.\n\n---\n\n## Calculation Model\n\n```\n# Inputs\nadl_katz_score        ∈ [0, 6]\niadl_lawton_score     ∈ [0, 8]\nprovince              ∈ {ON, QC, BC, AB, SK, MB, NS, NB, NL, PE, YT, NT, NU}\nhousehold_composition ∈ {alone, with_spouse, with_adult_child, multigen}\ncognitive_status      ∈ {intact, mild, moderate, severe}\nmobility_status       ∈ {independent, cane, walker, wheelchair, bedbound}\nprimary_diagnosis     ∈ {dementia, stroke, frailty, parkinson, post_surgical,\n                         mobility_only, chronic_mixed}\n\n# Hours derivation\npsw_hours_per_week    = max(0, 7*(6 - adl) + cognitive_bump\n                             - min(informal_hours*0.5, cap))\nhousekeeping_hours    = max(0, 2*(8 - iadl) + household_modifier)\nnursing_hours         = diagnosis_map[primary_diagnosis]\n\n# Gates\nif adl <= 4 or cognitive in {moderate, severe}:\n    require PSW or HCA for personal care         # scope gate\nif diagnosis requires skilled nursing:\n    require LPN/RN                               # nursing gate\n\n# Cost stack\nprivate_pay      = hours * province_rate_from(services_canada.csv)\nsubsidy          = province_subsidy_allocation(province, adl)\nout_of_pocket    = private_pay - subsidy\n\n# Tax relief (2026)\nmetc_qualifying  = max(0, out_of_pocket*12 - min(0.03*net_income,\n                                                  METC_FLOOR_2026))\nmetc_value       = metc_qualifying * (0.15 + provincial_factor)\ndtc_value        = DTC_BASE_2026 * (0.15 + provincial_factor)      if eligible\nccc_value        = CCC_BASE_2026 * (0.15 + provincial_factor)      if eligible\nvac_vip_value    = VAC_VIP_SCHEDULE_2026                           if veteran\ntotal_credits    = metc_value + dtc_value + ccc_value + vac_vip_value\n\n# Comparison\nall_psw_cost     = (psw_hours + housekeeping_hours + nursing_hours)\n                   * psw_rate(province)\nhybrid_savings   = all_psw_cost - private_pay\n```\n\nThe reference implementation is `engines/python/engine.py`. Six additional\nlanguage ports implement identical logic; cross-language parity is verified\non three case studies from the PDF working paper.\n\n---\n\n## Engines\n\nSeven language implementations. Each exposes `POST /calculate` and\n`GET /health` and loads the reference CSVs at startup.\n\n| Language | Directory | Package |\n|----------|-----------|---------|\n| Python (FastAPI) | `engines/python/` | `home-care-cost-model` on PyPI |\n| Rust (axum) | `engines/rust/` | `home-care-cost-model-engine` on Crates.io |\n| Java | `engines/java/` | `io.github.davecookvectorlabs:home-care-cost-model-engine` on Maven Central |\n| Ruby (Sinatra) | `engines/ruby/` | `home_care_cost_model` on RubyGems |\n| Elixir (Plug) | `engines/elixir/` | `home_care_cost_model` on Hex.pm |\n| PHP | `engines/php/` | `davecook/home-care-cost-model` on Packagist |\n| Go (net/http) | `engines/go/` | `github.com/DaveCookVectorLabs/home-care-cost-model` on pkg.go.dev |\n\n### Quick Start (Python)\n\n```bash\npip install home-care-cost-model\n# or run from source:\ncd engines/python\npip install -r requirements.txt\npython engine.py              # CLI mode — runs a sample calculation\npython engine.py --serve      # HTTP server on port 8003\n```\n\n### API Example\n\n```bash\ncurl -X POST http://localhost:8003/calculate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"adl_katz_score\": 2,\n    \"iadl_lawton_score\": 1,\n    \"province\": \"BC\",\n    \"household_composition\": \"with_spouse\",\n    \"cognitive_status\": \"moderate\",\n    \"mobility_status\": \"walker\",\n    \"primary_diagnosis_category\": \"dementia\",\n    \"informal_caregiver_hours_per_week\": 20,\n    \"net_family_income_cad\": 72000,\n    \"is_veteran\": false,\n    \"has_dtc\": true,\n    \"agency_vs_private\": \"private\",\n    \"include_subsidy\": true,\n    \"tax_year\": 2026\n  }'\n```\n\n---\n\n## Data Sources\n\nPrimary government and peer-reviewed sources referenced by the reference\ntables and cited in every derived dataset row via `source_id`:\n\n- Statistics Canada — wage and employment tables (NOC 44101 Home support\n  workers; NOC 33102 Nurse aides, orderlies and patient service associates);\n  population estimates by age and sex; health services CPI.\n  <https://www.statcan.gc.ca>\n- Canadian Institute for Health Information — Home Care Reporting System\n  public indicators; Your Health System home care volume and wait time\n  tables. <https://www.cihi.ca>\n- Canada Revenue Agency — Income Tax Folio S1-F1-C1 (Medical Expense Tax\n  Credit); S1-F1-C2 (Disability Tax Credit); Canada Caregiver Credit\n  guidance. <https://www.canada.ca/en/revenue-agency.html>\n- Veterans Affairs Canada — Veterans Independence Program rate schedule.\n  <https://www.veterans.gc.ca>\n- Indigenous Services Canada — First Nations and Inuit Home and Community\n  Care Program. <https://www.sac-isc.gc.ca>\n- Ontario Ministry of Health — Home and Community Care Support Services\n  program pages. <https://www.ontario.ca/page/homecare-seniors>\n- Government of British Columbia — Home and Community Care policy manual.\n  <https://www2.gov.bc.ca>\n- Alberta Health Services — Continuing Care at Home.\n  <https://www.albertahealthservices.ca>\n- Gouvernement du Québec — CLSC Soutien à domicile.\n  <https://www.quebec.ca>\n- Provincial ministry pages for Saskatchewan, Manitoba, New Brunswick, Nova\n  Scotia, Prince Edward Island, Newfoundland and Labrador, Yukon, Northwest\n  Territories, and Nunavut home care programs.\n- Canadian Home Care Association — *High-Value Home Care* report series.\n  <https://cdnhomecare.ca>\n- Katz S, Ford AB, Moskowitz RW, Jackson BA, Jaffe MW. *Studies of Illness\n  in the Aged. The Index of ADL: A Standardized Measure of Biological and\n  Psychosocial Function.* JAMA. 1963.\n- Lawton MP, Brody EM. *Assessment of older people: self-maintaining and\n  instrumental activities of daily living.* The Gerontologist. 1969.\n\nFull provenance is recorded in `datasets/SOURCES.md`, and every `source_url`\ncell in `home_care_services_canada.csv` points at a specific page within\nthese portals.\n\n---\n\n## Project Structure\n\n```\nhome-care-cost-model/\n├── datasets/\n│   ├── pull_sources.py                         # raw source fetcher\n│   ├── SOURCES.md                              # provenance manifest\n│   ├── sources/                                # raw files + .source.json sidecars\n│   ├── generate_home_care_services_canada.py   # reference table 2a\n│   ├── generate_home_care_tax_parameters.py    # reference table 2b\n│   ├── generate_home_care_subsidy_programs.py  # reference table 2c\n│   ├── generate_home_care_scenarios.py         # derived 3a\n│   ├── generate_home_care_per_province_rate_bands.py   # derived 3b\n│   ├── generate_home_care_cost_model_archetypes.py     # derived 3c\n│   ├── generate_home_care_tax_relief_sensitivity.py    # derived 3d\n│   ├── generate_home_care_subsidy_gap.py               # derived 3e\n│   ├── home_care_services_canada.csv           # ~112 rows\n│   ├── home_care_tax_parameters_2026.csv       # ~40 rows\n│   ├── home_care_subsidy_programs.csv          # ~25 rows\n│   ├── home_care_scenarios.csv                 # 5,000 rows\n│   ├── home_care_per_province_rate_bands.csv   # ~650 rows\n│   ├── home_care_cost_model_archetypes.csv     # ~2,500 rows\n│   ├── home_care_tax_relief_sensitivity.csv    # ~3,500 rows\n│   └── home_care_subsidy_gap.csv               # ~390 rows\n├── engines/\n│   ├── python/engine.py                        # reference implementation\n│   ├── rust/                                   # port\n│   ├── java/                                   # port\n│   ├── ruby/                                   # port\n│   ├── elixir/                                 # port\n│   ├── php/                                    # port\n│   └── go/                                     # port\n├── notebooks/\n│   └── home_care_cost_analysis.ipynb           # Jupyter analysis\n├── pdfs/\n│   ├── generate_pdfs.py                        # PDF working paper generator\n│   └── home-care-cost-model-guide.pdf          # 28-page working paper\n├── kaggle/                                     # Kaggle dataset + kernel\n├── observable/                                 # Observable notebook\n├── scribd/                                     # Scribd metadata\n├── docs/                                       # Sphinx documentation\n├── public/                                     # Minimal PHP web frontend\n└── scripts/\n    └── parity_check.sh                         # cross-language verification\n```\n\n---\n\n## License\n\nMIT License for code. CC BY 4.0 for datasets and the PDF working paper. See\n[LICENSE](LICENSE) for the MIT text; the CC BY 4.0 attribution is specified\nin `datasets/README.md` and on the PDF cover page.\n\n---\n\nMaintained by Dave Cook — [Binx Professional Cleaning](https://www.binx.ca/residential.php), North Bay and Sudbury, Ontario.\n","readmeFilename":"README.md","_rev":"1-ab3d9cb5447bb175a6f4b85986a2de12"}