{
  "spec": "pcd-e/0.1",
  "name": "PCD-E Sandbox Ingest",
  "specification": "https://aimedagent.net/epoch.html",
  "direction": "inbound only",
  "doors": {
    "POST /device/hl7": {
      "accepts": "application/hl7-v2",
      "transactions": [
        "PCD-01",
        "PCD-10",
        "PCD-04"
      ],
      "note": "Send what your gateway already emits, unchanged. One message or a window of them in a single body."
    },
    "POST /device/epoch": {
      "accepts": "application/json",
      "note": "Samples or a pre-computed summary. Schema in the specification."
    },
    "POST /device/key": {
      "accepts": "application/json",
      "body": {
        "organization": "your company or team name",
        "interval_seconds": "optional, 60 to 600, default 300"
      },
      "note": "Mints your own key immediately. No approval, no email, no waiting. Nobody is in the loop."
    }
  },
  "epoch": {
    "interval_seconds": {
      "min": 60,
      "max": 600,
      "default": 300
    },
    "configurable": "you choose it when you mint your key"
  },
  "terminology": {
    "source": "IHE DEV TF-3 Rev 10.0 sections 7.1 and 7.2",
    "unverified_terms": "carried and flagged, never assigned a code"
  },
  "conformance": {
    "what": "Every response to POST /device/hl7 carries a 'conformance' block reporting what you actually sent, measured against the published IPEC tables. It is not a verdict and nothing in it can fail. A validator asks whether one message is legal. This reports what a system does across a window.",
    "reports": [
      "which of the nine IPEC events you sent, against Table X.1.2-1 of IPEC Rev 1.4",
      "every MDC_PUMP_STAT and MDC_PUMP_MODE value, classified as current (Rev 1.4), superseded (Rev 1.1), vendor, or untraceable",
      "whether your MSH-21 profile assertion agrees with your trigger event",
      "your delivery events correlated into pairs: rate change, secondary start, secondary-to-primary, KVO transition, or a possible genuine ending"
    ],
    "two_encodings": "IPEC Rev 1.4 carries KVO in MDC_PUMP_MODE. Shipping products carry it in MDC_PUMP_STAT. Both are handled and the observed convention is reported.",
    "inference_notice": "Pair classifications are this sandbox's reading, not the standard's. IPEC Rev 1.4 Table X.1.2.1-3 is titled 'Clinical Scenarios' and is illustrative. Nothing in the supplement requires a receiver to correlate a Stop with a following Start.",
    "sources": [
      "IPEC Rev 1.4 TI 2014-06-26",
      "IPEC Rev 1.1 TI 2011-08-12",
      "Final Text in IHE PCD TF Rev 9.0, 2019-12-12"
    ]
  },
  "data_policy": {
    "synthetic_only": true,
    "retention": "none",
    "logging": "counts only, never payloads"
  },
  "auth": "Bearer token, which you mint yourself at POST /device/key. Free, instant, nothing to sign, no approval step and no human in the loop. SMART Backend Services accepted but not required.",
  "notice": "Research demonstration. Advisory only. Not a medical device. Not for clinical use. Synthetic data only."
}