{
 "use_case": "label-consistency-check",
 "title": "Label consistency: an invented medicine's CCDS, US PI and SmPC in English and German, with three drifts",
 "about": "Synthetic labels for Norvexa (tavorexin), an invented medicine. The US PI's liver-test interval says every 6 months where the CCDS says 3, the US PI has lost the depression and suicidal ideation warning, and the German SmPC has dropped the negation in 'must not be initiated in patients with an active serious infection'. The US-only indication and pregnancy wording are in the deviation log. The check must flag the drifts as likely errors, keep the logged differences out of the errors, leave the German QRD headings alone, attach a receipt to every model call and sign a record that verifies.",
 "licence": "Label texts written for this bundle (CC0); the medicine, company and every number are invented. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/ccds.txt",
   "what": "Company core data sheet (synthetic)."
  },
  {
   "file": "inputs/us_pi.txt",
   "what": "US Prescribing Information with two planted drifts (synthetic)."
  },
  {
   "file": "inputs/smpc_en.txt",
   "what": "EU SmPC, English (synthetic)."
  },
  {
   "file": "inputs/smpc_de.txt",
   "what": "EU SmPC, German, with a dropped negation (synthetic)."
  }
 ],
 "steps": [
  {
   "id": "check",
   "method": "POST",
   "path": "/label/check",
   "timeout": 600,
   "body": {
    "synthetic": true,
    "declared_deviations": [
     "US PI: the psoriatic arthritis indication is not approved in the US (FDA review ongoing) and is left out of the US PI.",
     "US PI: pregnancy is not a contraindication in the US PI; the risk is in 5.4 Embryo-Fetal Toxicity and 8.1 Pregnancy (FDA-agreed labeling, 2025)."
    ],
    "documents": [
     {
      "id": "ccds",
      "role": "ccds",
      "lang": "en",
      "text": {
       "$file": "inputs/ccds.txt"
      }
     },
     {
      "id": "us_pi",
      "role": "us_pi",
      "lang": "en",
      "text": {
       "$file": "inputs/us_pi.txt"
      }
     },
     {
      "id": "smpc_en",
      "role": "eu_smpc",
      "lang": "en",
      "text": {
       "$file": "inputs/smpc_en.txt"
      }
     },
     {
      "id": "smpc_de",
      "role": "eu_smpc",
      "lang": "de",
      "text": {
       "$file": "inputs/smpc_de.txt"
      }
     }
    ]
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "check.record"
    }
   }
  }
 ],
 "checks": [
  {
   "says": "the set is reported as drifted",
   "path": "check.status",
   "equals": "drift"
  },
  {
   "says": "the US PI against the CCDS has at least two likely errors in its warnings (the 6-month interval and the missing warning)",
   "path": "check.flags[pair~us_pi,section=warnings,judgement.label=likely_error]",
   "count_min": 2
  },
  {
   "says": "the dropped German negation is flagged in the translation",
   "path": "check.flags[kind=translation,subtype~negation]",
   "count_min": 1
  },
  {
   "says": "the logged US-only indication difference is not called an error",
   "path": "check.flags[section=indications].judgement.label",
   "all_in": [
    "likely_deliberate",
    "unclear"
   ]
  },
  {
   "says": "the German SmPC's QRD headings are all right",
   "path": "check.flags[kind=heading]",
   "count": 0
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 8
  },
  {
   "says": "the signed record verifies",
   "path": "verify.ok",
   "equals": true
  }
 ]
}
