MediCafe
Project description
MediCafe
MediCafe is a mixed-runtime healthcare workflow automation repository. It combines the current XP-compatible clinic operator system (MediCafe, MediBot, MediLink, and xp_client), a local shadow/readiness path that validates future architecture against local evidence, and a Python 3.11+ GCP orchestration path in cloud/orchestrator.
This repository intentionally supports more than one runtime model. It is not a single deployable app with one entrypoint.
Runtime And Evidence Layers
| Layer | Primary code | Python | Primary use | Packaging posture |
|---|---|---|---|---|
| Production XP/local operator system | MediCafe, MediBot, MediLink, xp_client |
3.4.4-compatible package path | Clinic-side claims, eligibility, deductible, reconciliation, download, Medisoft-oriented automation, and XP-side cloud queue consumption | Packaged by setup.py for PyPI / XP install |
| Local shadow validation system | scripts/unified_model, selected MediCafe/cloud_readiness* helpers |
3.4.4-compatible local/package path | Shadow A→F pipeline, local relational validation, lineage, parity, Phase C/D/F evidence, and future-process proof | Selected scripts are packaged because XP invokes them by file path |
| Local cloud-readiness / evidence layer | MediCafe/cloud_readiness*, MediCafe/launcher_cloud_readiness_mixin.py, support/evidence helpers |
3.4.4-compatible local/package path | Operator system-health packs, run-evidence bundles, Layer 1 Readiness, recommendations, post-update validation, and support-send workflows | Packaged when used by XP/local launcher and support flows |
| GCP cloud orchestrator | cloud/orchestrator, cloud/orchestrator/tests |
3.11+ repo-run / GCP path | Gmail ingestion, queueing, preprocessor validation, alerting, setup, runtime operations, and future cloud deployment work | Source lives in git for dev/GCP work; it is not part of the XP/PyPI package payload |
setup.py packages the XP/local operator system plus XP-required shadow/readiness files. The GCP cloud orchestrator is maintained as repo-run Python 3.11+ source and should remain inert with respect to the clinic-side PyPI release.
Primary Entry Points
Package CLI:
medicafe launcher
python -m MediCafe launcher
Current routine package commands exposed by MediCafe/__main__.py:
medicafe launchermedicafe medibot [config_file]medicafe medilinkmedicafe claims_statusmedicafe deductiblemedicafe download_emailsmedicafe cloud_daemon [config_file]medicafe send_error_reportmedicafe send_queued_error_reportspython -m MediCafe cleanup_local_artifactsmedicafe docx_index_rebuildmedicafe preflightmedicafe reconcilemedicafe version
Support, analytics, and local evidence commands exposed by MediCafe/__main__.py:
medicafe send_cpt_dx_reviewmedicafe send_minutes_charge_reviewmedicafe build_service_line_charge_anchor_indexmedicafe local_failure_pattern_analyzermedicafe layer1_local_diagnosticsmedicafe docx_index_retry_failedmedicafe csv_metadata_index_rebuildmedicafe analyze_csv_excluded_insurance
medicafe deductible is kept as the advanced/compatibility checker. The normal operator path for the consolidated deductible form is inside MediLink Claims as Open deductible report (United, 90-day DOS).
Canonical cloud operator path:
py -3.11 cloud/orchestrator/validate_and_complete_setup.py
Repository Map
MediCafe/: shared package, CLI entrypoint, launcher, preflight, cloud-readiness helpers (including Layer 1 Readiness for operator system-health and run-evidence bundles; seeMediCafe/layer1_readiness_model.pyandAGENTS.md), API utilities, reconciliation, error reporting, and shared runtime helpersMediBot/: Medisoft-oriented local preprocessing and data-entry support scriptsMediLink/: claims, eligibility, deductible, remittance, Gmail helper, and Apps Script-related assetscloud/orchestrator/: Python 3.11+ Cloud Run service, auth/config/runtime helpers, preprocessor gate, watch/admin flows, setup scripts, and cloud tests; repo-run/dev/GCP source, not XP package payloadxp_client/: XP-side cloud queue consumer (medilink_cloud_daemon.py)tests/: main regression suite for package/local workflows, API helpers, launcher behavior, preflight, cloud-readiness, and integration coveragescripts/unified_model/: XP-compatible local shadow-pipeline and unified relational validation scripts; selected scripts are packaged as runtime data files because XP flows invoke them by pathsql/: SQL artifacts used by migration and validation workdocs/: maintained documentation surfacetools/: operator, build, audit, and verification helpers; only XP-required tools should be treated as runtime-critical
The workspace root also contains operational inputs, artifacts, and generated state such as input/, TEST_CLAIMS/, ERA_TEST_DUMP/, reports_queue/, archive/, build/, dist/, .pytest_cache/, and tmp*. Do not treat those folders as the canonical source layout.
Local artifact cleanup:
python -m MediCafe cleanup_local_artifacts
python -m MediCafe cleanup_local_artifacts --apply --purge-queue
The cleanup command preserves README markers, defaults to dry-run, and skips queued ZIP bundles unless queue purge or queue-age retention is explicitly requested.
Automatic cleanup runs only from a development checkout (.git present) and only when MEDICAFE_LOCAL_ARTIFACT_AUTOCLEAN is not disabled. It is checked at python -m MediCafe ... startup and before support bundle creation. Defaults: at most once every 6 hours; apply cleanup when generated artifacts exceed 200 files, 250 MB, or 50 queued ZIPs. Ordinary generated artifacts and queued ZIP bundles are pruned immediately once a threshold is crossed. Set MEDICAFE_LOCAL_ARTIFACT_AUTOCLEAN_QUEUE_MAX_AGE_DAYS to a positive value only if a machine needs delayed queue retention.
Configuration
Primary local configuration files:
json/config.jsonjson/crosswalk.jsonjson/medisoftconfig.json
Cloud/orchestrator runtime settings are managed through cloud/orchestrator/config.py, environment variables, and the validator/setup flow.
Testing
Main test surfaces:
tests/cloud/orchestrator/tests/
Canonical automated test entrypoint:
python3 -m pytest -v
Windows equivalent:
py -3.11 -m pytest -v
XP/Python 3.4.4 local test environments should install the runtime pins from requirements.txt when needed, then use the package test extras for the legacy pytest pins before running pytest-driven files:
py -3.4 -m pip install -r requirements.txt
py -3.4 -m pip install ".[test]"
py -3.4 -m pytest -q tests/test_json_io.py
pytest.ini collects tests/ and cloud/orchestrator/tests/, with manual excluded from recursion. For focused runs:
python3 -m pytest -q tests/test_preflight.py
python3 -m pytest -q tests/test_config_loader_diagnostics.py
python3 -m pytest -q tests/test_error_reporter_configloader_degraded.py
python3 -m pytest -q tests/test_launcher_next_step_orchestration.py
python3 -m pytest -q tests/test_cloud_readiness_health.py
python3 -m pytest -q tests/test_cloud_readiness_artifacts.py::TestLayer1ReadinessModel tests/test_cloud_readiness_artifacts.py::TestLayer1ReadinessSurfacesAndContract tests/test_cloud_readiness_artifacts.py::TestSystemHealthPackWiring::test_send_latest_system_health_pack_extra_meta_merges_layer1_readiness_shallow_keys tests/test_cloud_readiness_artifacts.py::TestRunCentricArtifactTools::test_send_latest_run_evidence_bundle_extra_meta_merges_layer1_readiness_shallow_keys tests/test_cloud_readiness_recommendations.py
python3 -m pytest -q tests/cloud_readiness/test_self_test_bundle_build_telemetry.py
python3 -m pytest -q cloud/orchestrator/tests
See docs/TESTING_GUIDE.md for the current suite shape, selector lanes, default excludes, and standalone script-style harnesses that are not part of the canonical pytest run.
Documentation
Start here:
docs/README.mddocs/MEDICAFE_MASTER_GUIDE.mddocs/TESTING_GUIDE.mddocs/MEDICAFE_API_ARCHITECTURE.mddocs/MEDILINK_CLOUD_MIGRATION.mddocs/architecture/CSV_DOCX_DAT_JOIN_SCAFFOLDING_INVENTORY.md(shadow CSV/DOCX/DAT correlation, cloud readiness read path, orchestrator context)cloud/orchestrator/README.md
Security and Repo Hygiene
- Avoid PHI in logs, reports, and committed artifacts.
- Use
send_error_reportandsend_queued_error_reportsfor diagnostics instead of ad hoc data exports. - Treat tokens, certificates, raw client secrets, build outputs, and downloaded artifacts as operational state, not documentation or source of truth.
License
MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file medicafe-0.260701.4.tar.gz.
File metadata
- Download URL: medicafe-0.260701.4.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbb6092c151492fc69a30826273c956db2377947d7c6332e0ebdfaf121a02775
|
|
| MD5 |
7dfb8bde668ea13db5f9936d13887f54
|
|
| BLAKE2b-256 |
a1e452c7e9e6245a9b7936b6ade71e025512112aeb9c6e7d8082584702fa51f6
|
Provenance
The following attestation bundles were made for medicafe-0.260701.4.tar.gz:
Publisher:
release-pypi.yml on katanada2/MediCafe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
medicafe-0.260701.4.tar.gz -
Subject digest:
cbb6092c151492fc69a30826273c956db2377947d7c6332e0ebdfaf121a02775 - Sigstore transparency entry: 2036146192
- Sigstore integration time:
-
Permalink:
katanada2/MediCafe@3c372787d4df4d3ec566958edaa8589c07df2053 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/katanada2
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@3c372787d4df4d3ec566958edaa8589c07df2053 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file medicafe-0.260701.4-py3-none-any.whl.
File metadata
- Download URL: medicafe-0.260701.4-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b8126de0f35d848bf2c6b5418d2c7f609152c4659a772a380438fa8883441a
|
|
| MD5 |
de8aff3812d29035c9b7effcdbe52096
|
|
| BLAKE2b-256 |
dc791c46e6aacff4d581ba6a25fa55c82558f24c4992f68a9cb8e503aed8785c
|
Provenance
The following attestation bundles were made for medicafe-0.260701.4-py3-none-any.whl:
Publisher:
release-pypi.yml on katanada2/MediCafe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
medicafe-0.260701.4-py3-none-any.whl -
Subject digest:
77b8126de0f35d848bf2c6b5418d2c7f609152c4659a772a380438fa8883441a - Sigstore transparency entry: 2036146466
- Sigstore integration time:
-
Permalink:
katanada2/MediCafe@3c372787d4df4d3ec566958edaa8589c07df2053 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/katanada2
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@3c372787d4df4d3ec566958edaa8589c07df2053 -
Trigger Event:
workflow_dispatch
-
Statement type: