MEDICINE
SERVICE CONTRACT · VIEW: GOV
Axiom
Example
Constraints
MUST: Cite specific regulation (CFR, statute, or standard) for compliance claims MUST: Distinguish federal from state from international jurisdiction MUST NOT: Present clinical guidance without evidence level classification
COVERAGE: 255/255
SPEC
Domain Declaration
MEDICINE = HEALTHCARE_STANDARD × CANONIC
= Structure(healthcare) × (C1, C2, Temporal, Relational, C5)
= owned healthcare vertical
Lattice Formula
MEDICINE = C1 ∩ C2 ∩ Temporal ∩ Relational ∩ C5 ∩ C6
= ENTERPRISE (#63)
Healthcare is always full Enterprise because:
- C1: Clinical claims must be stated
- C2: Clinical evidence must be documented
- Temporal: Treatment timelines matter
- Relational: Jurisdictions (states, countries) govern
- C5: Enforcement (licensing, certification)
- C6: Data standards (FHIR, HL7)
Axioms
1. Patient Sovereignty
The patient owns their health data. All systems MUST respect patient consent and control.
Example: A patient requests export of all their oncology records. The system MUST provide complete data in a standard format (FHIR) within the legally required timeframe.
2. Evidence-Based Practice
Clinical decisions MUST be traceable to evidence (research, guidelines, protocols).
Example: A treatment recommendation for breast cancer MUST reference the supporting NCCN guideline version, relevant clinical trials, or institutional protocol.
3. Temporal Integrity
Medical records MUST maintain accurate timestamps. Retrospective edits MUST preserve original entries.
Example: A lab result entered at 14:32 on January 15 cannot be deleted. Corrections create new entries referencing the original, with audit trail.
4. Jurisdictional Compliance
Healthcare operations MUST comply with applicable jurisdictional requirements.
Example: A telemedicine platform operating in California and Texas MUST comply with both state medical board requirements, plus federal HIPAA.
5. C6 Interoperability
Health data MUST conform to recognized standards for exchange.
Example: Patient data shared between systems MUST use FHIR R4 resources. Legacy HL7v2 messages MUST be transformed to FHIR for storage.
Subdomains
| Subdomain | Standard | Formula | Description |
|---|---|---|---|
| Oncology | mCODE | ENTERPRISE | Cancer care data elements |
| Psychiatry | DSM-5/MBC | ENTERPRISE | Mental health care |
| Credentialing | CAQH/NPPES | BUSINESS | Provider verification |
| Pharmacy | NCPDP | BUSINESS | Prescription data |
| Laboratory | CLIA/LOINC | BUSINESS | Lab certification |
| Imaging | DICOM | (#34) | Medical imaging |
| Genomics | GA4GH | (#25) | Genomic data sharing |
Oncology Sub-subdomains
| Site | Standard | Apps |
|---|---|---|
| breast/ | mCODE + NCCN Breast | MAMMOCHAT |
| colon/ | mCODE + NCCN Colorectal | COLOCHAT |
| lung/ | mCODE + NCCN Lung | PULMOCHAT |
| liver/ | mCODE + NCCN Hepatobiliary | HEPACHAT |
| gastric/ | mCODE + NCCN Gastric | GASTROCHAT |
| pancreatic/ | mCODE + NCCN Pancreatic | PANCHAT |
Psychiatry Sub-subdomains
| Focus | Standard | Apps |
|---|---|---|
| anxiety/ | APA Anxiety Guidelines | PSYCHCHAT |
| depression/ | APA + CANMAT | PSYCHCHAT |
| trauma/ | VA/DoD PTSD CPG | PSYCHCHAT |
| psychosis/ | APA + PORT | PSYCHCHAT |
| substance/ | ASAM + 42 CFR Part 2 | PSYCHCHAT |
Regulatory Mapping
| Regulation | Lattice | Scope |
|---|---|---|
| HIPAA Privacy | 5 governance checks | Protected health information |
| HIPAA Security | 6 governance checks | Technical safeguards |
| 21 CFR Part 11 | 5 governance checks | Electronic records |
| HITECH Act | 5 governance checks | Health IT adoption |
| 42 CFR Part 2 | 5 governance checks | Substance abuse records |
| Stark Law | — | Physician referrals |
| Anti-Kickback | — | Financial arrangements |
Example: Oncology Vertical
DECLARE(Oncology) = mCODE × CANONIC
Where:
mCODE provides Structure:
- Patient demographics
- Cancer condition (diagnosis, histology)
- Staging (TNM)
- Treatment (surgery, radiation, systemic)
- Genomics (biomarkers, mutations)
- Outcomes (response, survival)
CANONIC provides Governance:
- C1: Claims in CANON.md
- C2: Proof in COVERAGE.md
- Temporal: Git commits
- Relational: Inheritance chain
- C5: Validators
Result:
Complete oncology vertical with:
- C6 compliance to mCODE
- Governance compliance to CANONIC
- Full auditability
- IP protection
Validators
| Validator | Checks | Example Failure |
|---|---|---|
| C1 | CANON.md exists with healthcare claims | Missing patient sovereignty axiom |
| C2 | COVERAGE.md with clinical evidence | Treatment without guideline reference |
| Temporal | Git history with timestamps | Backdated clinical entry |
| Relational | Inheritance to /MEDICINE/ | Orphan healthcare scope |
| C5 | All validators pass | Failed HIPAA check |
| C6 | FHIR/mCODE conformance | Invalid resource structure |
Application
To create a CANONIC healthcare vertical:
- Choose subdomain standard (mCODE, NCPDP, etc.)
- Create scope with CANON.md inheriting /MEDICINE/
- Define domain axioms specific to subdomain
- Map to FHIR resources for structural compliance
- Implement validators for domain-specific checks
- Document coverage with clinical evidence
Result: Owned healthcare vertical with complete governance.
Cross-Domain Compositions
MEDICINE × GENOMICS = Precision medicine (ACMG/AMP + mCODE + FHIR Genomics)
MEDICINE × ROBOTICS = Surgical robotics (IEC 62304 + ISO 10218)
MEDICINE × EDUCATION = Medical education (LCME + ACGME)
MEDICINE × DEFENSE = Combat medicine, TRICARE (DHA + HIPAA)
MEDICINE × FINANCE = Healthcare billing, revenue cycle (CPT/HCPCS + GAAP)
MEDICINE × LOGISTICS = Pharmaceutical supply chain (DSCSA + GDP)
MEDICINE × QUALITY = Clinical quality, HEDIS measures (NCQA + ISO 13485)
MEDICINE × AGRICULTURE = Food as medicine, nutrition genomics (USDA + mCODE)
MEDICINE × MANUFACTURING = Pharmaceutical manufacturing (21 CFR 211 + GMP)
MEDICINE × ENERGY = Medical device power safety (IEC 60601 + IEC 61508)
MEDICINE × REAL_ESTATE = Healthcare facility compliance (CMS CoP + building codes)
11 cross-domain compositions. Each strengthens PROV-001 and PROV-003 patent claims.
Live Proof — Hadley Lab
| Product | Subdomain | Standards | URL |
|---|---|---|---|
| MammoChat | Oncology / Breast | mCODE + NCCN Breast + ACR BI-RADS | hadleylab.org/TALKS/MAMMOCHAT/ |
| OncoChat | Oncology / Pan-cancer | mCODE + NCCN + AJCC staging | hadleylab.org/TALKS/ONCOCHAT/ |
| MedChat | General Medicine | Clinical guidelines + Surviving Sepsis | hadleylab.org/TALKS/MEDCHAT/ |
All three products compose INTEL + CHAT + COIN under MAGIC 255 governance. MammoChat is the reference deployment: 20,000+ governed encounters at AdventHealth, clinical trial NCT06604078.
Prior Art Landscape
| Competitor | Approach | MAGIC checkset Distinction |
|---|---|---|
| Epic Systems | Monolithic EHR, proprietary data model | Data storage, no governance language, no bitwise compliance |
| Tempus | Genomic + clinical data platform (oncology) | Analytics platform, no governance framework, no O(1) checking |
| Flatiron Health | Oncology-specific EHR + real-world data | RWD analytics, no governance gates, no cross-domain composition |
| Health Catalyst | Healthcare data warehouse + analytics | Data aggregation, no governance encoding |
| Cerner/Oracle Health | EHR + population health | Clinical workflow, no formal governance language |
Gap: No existing system provides governance-gated clinical operations with O(1) bitwise compliance checking across mCODE, FHIR, HIPAA, and cross-domain composition.
Patent Mapping
| PROV | Relevance | Claims |
|---|---|---|
| PROV-001 | PRIMARY | MAGIC private-check encoding for clinical governance verification |
| PROV-003 | PRIMARY | Federated clinical data governance across institutions |
| PROV-004 | Supporting | Transcompilation of mCODE/FHIR/HIPAA to governed executables |
| PROV-002 | Supporting | COIN=WORK for clinical attestation, counseling evidence |
LEARNING
ROADMAP
VOCAB
| Term | Definition |
|---|---|
| API | Governed term in this scope vocabulary. |
| CFR | Governed term in this scope vocabulary. |
| CLIA | Governed term in this scope vocabulary. |
| CMIA | Governed term in this scope vocabulary. |
| CMS | Governed term in this scope vocabulary. |
| CPT | Governed term in this scope vocabulary. |
| DEA | Governed term in this scope vocabulary. |
| DICOM | Governed term in this scope vocabulary. |
| DPIA | Governed term in this scope vocabulary. |
| DRG | Governed term in this scope vocabulary. |
| EHR | Governed term in this scope vocabulary. |
| EU | Governed term in this scope vocabulary. |
| FAERS | Governed term in this scope vocabulary. |
| FDA | Governed term in this scope vocabulary. |
| FHIR | Governed term in this scope vocabulary. |
| GDPR | Governed term in this scope vocabulary. |
| HCPCS | Governed term in this scope vocabulary. |
| HIA | Governed term in this scope vocabulary. |
| HIPAA | Governed term in this scope vocabulary. |
| HITECH | Governed term in this scope vocabulary. |
| ICH | Governed term in this scope vocabulary. |
| IEC | Governed term in this scope vocabulary. |
| IHE | Governed term in this scope vocabulary. |
| II | Governed term in this scope vocabulary. |
| III | Governed term in this scope vocabulary. |
| IRB | Governed term in this scope vocabulary. |
| ISO | Governed term in this scope vocabulary. |
| IV | Governed term in this scope vocabulary. |
| JCAHO | Governed term in this scope vocabulary. |
| MDR | Governed term in this scope vocabulary. |
| MEDICINE | Governed term in this scope vocabulary. |
| MHRL | Governed term in this scope vocabulary. |
| NDA | Governed term in this scope vocabulary. |
| ONC | Governed term in this scope vocabulary. |
| OSHA | Governed term in this scope vocabulary. |
| PHIPA | Governed term in this scope vocabulary. |
| PIPEDA | Governed term in this scope vocabulary. |
| PMA | Governed term in this scope vocabulary. |
| QMSR | Governed term in this scope vocabulary. |
| RCA | Governed term in this scope vocabulary. |
| SMART | Governed term in this scope vocabulary. |
| TEFCA | Governed term in this scope vocabulary. |
| USC | Governed term in this scope vocabulary. |
| USCDI | Governed term in this scope vocabulary. |
| VI | Governed term in this scope vocabulary. |
INHERITANCE CHAIN
INDUSTRIES
INDUSTRY is the variable. SERVICE = PRIMITIVE(s) + INDUSTRY. Each vertical defines INTEL, CHAT, COIN.
MUST: Every INDUSTRY wires INTEL + CHAT + COIN MUST: Standards mapped to governance dimensions MUST: LANGUAGE cascades from MAGIC — no per-industry DESIGN.md MUST NOT: Create INDUSTRY without SERVICE proof
MAGIC
INTEL. CHAT. COIN. — Three primitives. One governed economy.
MUST: CANON.md in every scope
MUST: Services compose primitives — never duplicate
MUST: Primitive structure is fixed — industry is the only variable
MUST: Primitives compose into services — never duplicate
MUST: Services connect through SHOP.md and VAULT.md projection files
MUST: SHOP.md = public projection file (filesystem-discoverable, UPPERCASE per LANGUAGE)
MUST: VAULT.md = private projection file (filesystem-discoverable, auth-gated, UPPERCASE per LANGUAGE)
MUST: Instance = service projected through user governance context
MUST: Instance directories live at USER scope ({USER}/{PLURAL}/), not nested in SERVICES/
MUST: Service directories (SERVICES/{SINGULAR}/) define schemas — instances hold content
MUST: Every .md compiles to .json with the same name (direct mapping)
MUST: CANON.md = axiom + universal constraints only (no service names, no paths, no implementation)
MUST: README.md = how to run the CANON only
MUST: {SCOPE}.md = SPEC — the interface (purpose, routes, projections, ecosystem)
MUST NOT: Hardcode service names in CANON constraints (law speaks universals)
MUST: Inheritance resolves upward — scopes compose by directories
MUST: Tier algebra is canonical — DESIGN.md is the single source (COMPLIANCE tier algebra)
MUST NOT: Expose dimension internals to users or developers
MUST NOT: Hardcode outside governed contracts
MUST: Nonprofits get enterprise for free
MUST: ORG is the container; USER is the repo (`github.com/{org}/{user}`; duplicates across orgs allowed)
MUST: MARKET/ SALES/ GTM/ exist (META self-closure; one primitive each)
MUST: Each META sub-scope maps exactly one primitive (INTEL, CHAT, COIN)
MUST NOT: Add META business knowledge outside MAGIC/ scope
MUST NOT: Remove META sub-scope without replacing its primitive coverage
MUST: `{SCOPE}.md` is the scope contract surface; it MUST NOT be treated as a generic filename placeholder
MUST: LEARNING.md is the terminal — governance evidence, patterns, epoch rotation
MUST: LEARNING/ is the IDF directory — machine-generated individual data files
MUST: LEARNING.md rotates at epoch boundaries — frozen epochs archive as LEARNING-{EPOCH}.md at scope root
MUST: LEARNING.md is always the current epoch — active, append-only
MUST: Epoch boundary = EVOLUTION signal in LEARNING.md (named, dated, sourced)
MUST NOT: Delete archived LEARNING epochs — append-only history
MUST: MAGIC defines the triad interface directly:
MUST: COMPLIANCE/ + GALAXY/ + SURFACE/
MUST NOT: Define conflicting tier algebra in downstream scopes; downstream must inherit this contract
FOUNDATION
SPEC = {SCOPE}. The LANGUAGE. The v0 discovery.
MUST: LANGUAGE defines all governance primitives MUST: Every scope inherits from FOUNDATION MUST: Triad (CANON.md + VOCAB.md + README.md) in every scope MUST NOT: Define terms outside VOCAB.md MUST NOT: Hardcode outside the kernel SHOULD: Vocabulary closure — every term resolves to a definition