{
  "$schema": "https://spacemedicinefoundation.org/robotic-medicine/protocols/schema/protocol.schema.json",
  "schema_version": "0.3",
  "version": "0.4",
  "status": "draft",
  "conceptual": true,
  "not_for_clinical_use": true,
  "max_autonomy": 2,
  "missions": [
    "leo",
    "commercial",
    "moon",
    "mars"
  ],
  "updated": "2026-10-21",
  "review": {
    "state": "reviewed-ai-assisted",
    "requested": "2026-10-21",
    "reviewed": "2026-10-21",
    "human_clinician_review": false,
    "text": "AI-assisted clinical and source review by the Medical Research Assistant (batch 10 review, Oct 20-21, 2026, then three verification passes). Pass 3 (Oct 21, 2026) found the protocol text clean and every R5c item applied; its build-check findings (R5d) are a tracked follow-up, and publication of this exact content (contentSha da0a5eba…766782c) was decided by the foundation owner (Oct 21, 2026) under PHARM change control. No named human clinician has reviewed it. Not for clinical use.",
    "verified_version": "0.4",
    "verified": "2026-10-21"
  },
  "fixed_rules": {
    "flight_surgeon_is_medical_authority": true,
    "cmo_acts_under_delegated_care": true,
    "human_starts_and_restarts_robot": true,
    "robot_never_diagnoses": true,
    "no_drug_or_fluid_advice_by_robot": true,
    "safe_state_on_fault_or_no_response": true,
    "lost_link_pause_then_cmo_decides": true
  },
  "robot_lockouts": {
    "diagnosis": true,
    "drug_or_fluid_advice": true,
    "starting_stopping_or_adjusting_oxygen_or_any_medicine": true,
    "self_start_or_self_restart": true,
    "changing_own_protocol_thresholds_or_limits": true,
    "handing_over_a_mismatched_item_as_verified": true
  },
  "id": "RMP-PHARM-003",
  "slug": "rmp-pharm-003",
  "title": "Dose log after a human gives a medicine: barcode match to the RMP-PHARM-001 order (the robot never gives a dose)",
  "category": "pharm",
  "tier": 2,
  "rung_note": "Max rung 2 for scanning the package the crew hold up, confirming the recipient and logging the dose against the RMP-PHARM-001 order. The robot never gives, prepares, holds or hands over a dose or a package, and never says when a dose is due. RMP-PHARM-001's mismatch rule applies unchanged.",
  "result_language": {
    "use": [
      "MATCHES THE RMP-PHARM-001 ORDER (recipient, medicine, strength, form, route, amount given, quantity, time window, lot, expiry). Logged as given by <who>. Not a dose, interaction or allergy review.",
      "MISMATCH: <fields>. NOT VERIFIED. Logged and flagged.",
      "CANNOT VERIFY: <reason>. NOT VERIFIED. Logged and flagged.",
      "time given as stated by <who>",
      "route as stated by <who>",
      "This log runs only after a dose is given. Checks before giving are in RMP-PHARM-001."
    ],
    "never": [
      "normal",
      "no problem found",
      "all clear",
      "negative",
      "any diagnosis or cause",
      "verified safe",
      "safe to take",
      "OK to give",
      "MATCH (on its own, without \"to the RMP-PHARM-001 order\")",
      "given correctly",
      "correct dose",
      "next dose due",
      "due now",
      "recommended",
      "use instead",
      "safe",
      "mild",
      "minor",
      "next window",
      "time window is",
      "go ahead",
      "OK to continue"
    ]
  },
  "scope": {
    "summary": "After a human (the CMO or the crewmember) has given a dose of a medicine that RMP-PHARM-001 dispensed on an order, the robot logs it. The crew hold the package up to the robot's scanner; the robot scans the barcode, confirms who received the dose by crew ID scan or the CMO's voice, and matches every field to the RMP-PHARM-001 order (recipient, medicine, strength, form, quantity, time window, lot and expiry). It logs the time given, route and who gave it, as stated. A mismatch or failed scan is logged NOT VERIFIED and alerted at the level its red flag sets (URGENT for a wrong recipient, medicine, strength, form, route or amount, or no order; otherwise flagged at once); the crew quarantine the remaining package as in RMP-PHARM-001, and nothing is handed over.",
    "why": "In one hospital study, bar-code checks at the point of administration cut non-timing administration errors by 41.4% but did not remove them (Poon 2010); on board, that check is done inside RMP-PHARM-001, at its hand-over. This log only detects errors after a dose has been given, so it is never a go-ahead for a dose (design judgment). Bar-code administration exists to confirm the right patient, drug, dose, route and time, and workarounds such as scanning a label from somewhere other than the medicine itself (proxy scanning) defeat it (Koppel 2008; ISMP 2024). RMP-PHARM-001's rule applies unchanged: after a medication mismatch the item is quarantined by default, handed over only on the CMO's explicit two-step request, logged as an override and flagged to the flight surgeon. This protocol adds no hand-over route at all: it only logs a dose a human has already given, and its record correction edits only the dose-log entry, never the order. Medicines on long missions can outlast their printed expiry (OCHMO-MTB-012), so expiry and lot are part of the match. A wrong recipient, medicine, strength, form, route or amount found after a dose is a possible harm, so it is URGENT; a lot, accepted-expiry, time-window-only or symptom-free scan-failure difference is flagged at once instead, so that every accepted past-expiry dose on a long mission does not page as URGENT (design judgment).",
    "covers": [
      "Logging a dose that a human has given, against the RMP-PHARM-001 order",
      "Recipient confirmation, lot and expiry, time given, route and who gave it, as stated",
      "Possible allergic reaction after a dose: RMP-RESP-003; medicine inventory: RMP-PHARM-002"
    ],
    "locked_out": [
      "Diagnosis or naming a cause",
      "Any medicine, fluid or oxygen advice; starting, stopping or adjusting oxygen",
      "Touching the crewmember",
      "Handing over any medicine outside RMP-PHARM-001, or after a MISMATCH or CANNOT VERIFY (the item stays quarantined; only the CMO can ask for it, through the RMP-PHARM-001 logged two-step override)",
      "Giving, preparing, holding or handing over any dose or package",
      "Dose-interval cues of any kind (the robot never says when a dose is due)",
      "Proxy scanning: scanning any label that is not on the package itself",
      "Saying a dose was correct, safe or appropriate",
      "Changing an order, or logging a dose without an RMP-PHARM-001 order (it is logged NOT VERIFIED and flagged)",
      "Scanning a package before a time given is logged (checks before giving are in RMP-PHARM-001)",
      "Showing the order's time window or a next window",
      "Editing an RMP-PHARM-001 order (a wrong order is corrected only in RMP-PHARM-001 by whoever placed it)"
    ],
    "related": [
      "RMP-PHARM-001",
      "RMP-PHARM-002",
      "RMP-RESP-003"
    ]
  },
  "roles": {
    "medical_authority": "Flight surgeon (ground). Holds medical authority for every run.",
    "onboard_lead": "Crew medical officer (CMO), acting under delegated care; uses the pre-approved onboard checklist when there is no link.",
    "others": [
      "Second trained CMO: receives every alert and flag and takes over if the CMO is the patient",
      "Pharmacy lead (ground): reviews mismatches and record corrections",
      "The human who gave the dose: the CMO or the crewmember, who states the time and route"
    ],
    "robot_may": [
      "Scan the package barcode the crew hold up",
      "Confirm the recipient by crew ID scan, or the CMO's voice",
      "Match every field to the RMP-PHARM-001 order",
      "Log the time given, route and who gave it, as stated",
      "Alert each mismatch at the level its red flag sets (RF2 to RF6)"
    ],
    "robot_may_not": [
      "Give, prepare, hold or hand over any dose or package",
      "Say when a dose is due",
      "Say a dose was correct or safe",
      "Scan a proxy label",
      "Change an RMP-PHARM-001 order (never, in any step or branch)",
      "Change a log entry outside the two-step record correction (log entries change only through it)"
    ],
    "commercial": "On commercial flights, 'flight surgeon' and 'CMO' mean the operator's designated medical authority and trained onboard responder. If no trained responder is aboard, this protocol is not used. (NASA-STD-3001 requires two CMOs per vehicle for NASA programs [V1 3006]; FAA rules set no medical standards for spaceflight participants.)"
  },
  "preconditions": [
    {
      "id": "PRE-1",
      "text": "The CMO or the crewmember who gave the dose started the log entry by command, after the dose was given.",
      "check": "human_start == true",
      "refs": [
        "V2 10174"
      ]
    },
    {
      "id": "PRE-2",
      "text": "Robot self-test passed; kit stowage locations known.",
      "refs": [
        "V2 10161",
        "V2 7059"
      ]
    },
    {
      "id": "PRE-3",
      "text": "Robot and supplies restrained when not moving.",
      "refs": [
        "V2 7046"
      ]
    },
    {
      "id": "PRE-4",
      "text": "Link status known. The crew never wait for the robot before acting.",
      "check": "link_state in [live, delayed, down]"
    }
  ],
  "consent": {
    "standard": "The crewmember agrees that doses they receive are logged in their medical record and sent to the flight surgeon.",
    "emergency": "During an emergency the crew give care first; the CMO starts the log entries afterwards, and each is marked with the time it was entered and the time given as stated.",
    "withdrawal": "A crewmember cannot withdraw a dose record already made; they can ask the CMO to add a note."
  },
  "inputs": [
    {
      "id": "IN-1",
      "name": "The RMP-PHARM-001 order for this dose (recipient, medicine, strength, form, quantity, time window)",
      "source": "Medical record (local copy when the link is down)",
      "required": true,
      "if_missing": "CANNOT VERIFY: no order on record; logged NOT VERIFIED and flagged URGENT."
    },
    {
      "id": "IN-2",
      "name": "Package barcode and label (medicine, strength, form, lot, printed expiry)",
      "source": "Robot scanner",
      "required": true,
      "if_missing": "CANNOT VERIFY: scan failed; no proxy scan; logged NOT VERIFIED and flagged."
    },
    {
      "id": "IN-3",
      "name": "Identity of the crewmember who received the dose",
      "source": "Crew ID scan, or the CMO by voice",
      "required": true,
      "if_missing": "CANNOT VERIFY: recipient not confirmed; logged NOT VERIFIED and flagged."
    },
    {
      "id": "IN-4",
      "name": "Time given, route, amount given and who gave it, stated first (before any scan); route and amount are compared with the order",
      "source": "The human who gave the dose",
      "required": true,
      "if_missing": "No scan until a time given is stated; log \"not stated\" for any other blank and never fill it."
    },
    {
      "id": "IN-5",
      "name": "Symptoms after the dose in the crewmember's words (rash, swelling, breathing trouble, dizziness)",
      "source": "Crewmember",
      "required": false,
      "if_missing": "Log \"no response\"; D3 applies."
    },
    {
      "id": "IN-6",
      "name": "Link status and delay",
      "source": "Communications system",
      "required": true,
      "if_missing": "Treat as link down; log locally and sync at the next contact."
    }
  ],
  "steps": [
    {
      "id": "S1",
      "actor": "robot",
      "rung": 2,
      "action": "Tell the flight surgeon and the CMO that a dose log entry has started for this crewmember (URGENT if a red flag is stated). Every URGENT alert goes to the CMO and the flight surgeon at the same time (queued for the flight surgeon if the link is down). If the CMO is the patient, is busy treating, or does not answer, the alert goes to the second trained CMO, or the crewmember named before flight [V1 3006]. An URGENT alert that is not acknowledged within <set by validation> seconds is repeated and sent to the next named crewmember.",
      "success": "Notice logged and sent with the next package.",
      "refs": [
        "V1 3006",
        "V2 10174"
      ],
      "action_type": "alert"
    },
    {
      "id": "S2",
      "actor": "crew",
      "action": "First, the human who gave the dose states that it has been given, the time it was given, the amount given and the route. Then they hold the package (or the remaining pack) up to the robot's scanner; they never hand it to the robot. The crewmember who received the dose presents their crew ID, or the CMO states who received it.",
      "success": "Time given, amount and route stated; package and recipient presented.",
      "refs": [
        "V2 7059"
      ]
    },
    {
      "id": "S3",
      "actor": "robot",
      "rung": 2,
      "action": "Before any scan, log the time given, the amount given, the route and who gave it, word for word as stated, with the clock time of the entry. If the human says the dose has not been given yet, the robot does not scan: it shows \"This log runs only after a dose is given. Checks before giving are in RMP-PHARM-001.\" and logs \"not given – no scan\". The robot never shows the order's time window or a next window, never says when the next dose is due and never says the dose was correct.",
      "success": "Time given logged, or \"not given – no scan\".",
      "refs": [
        "V1 7001"
      ],
      "action_type": "log"
    },
    {
      "id": "S4",
      "actor": "robot",
      "rung": 2,
      "action": "Only after a time given is logged, scan the barcode on the package itself (never a proxy label), confirm the recipient, and compare every field with the RMP-PHARM-001 order: recipient, crewmember on the order, medicine, strength, form, route, quantity, time window, lot and printed expiry; also compare the stated amount given and route with the order. Show \"MATCHES THE RMP-PHARM-001 ORDER (recipient, medicine, strength, form, route, amount given, quantity, time window, lot, expiry). Logged as given by <who>. Not a dose, interaction or allergy review.\" only when every field matches; otherwise show MISMATCH or CANNOT VERIFY with the fields named.",
      "success": "Result shown and logged.",
      "refs": [
        "V2 7059"
      ],
      "action_type": "scan-compare"
    },
    {
      "id": "S5",
      "actor": "robot",
      "rung": 2,
      "action": "Show an on-screen prompt the crewmember can accept about new symptoms since the dose (rash, swelling of the lips, tongue or throat, breathing trouble, dizziness), and log answers word for word.",
      "success": "Answers logged, or \"no response\".",
      "refs": [
        "V1 6003"
      ],
      "action_type": "show"
    },
    {
      "id": "S6",
      "actor": "robot",
      "rung": 2,
      "action": "After any URGENT alert: After an URGENT alert the robot does not leave on its own: it stays at its rest position in the module, with its screen and voice link available, until a human has taken over or tells it to go. It never follows, blocks or touches anyone. It keeps time-stamping what humans say they did, and repeats the alert if it is not acknowledged.",
      "success": "Robot at rest in the module until a human releases it; alert acknowledged or escalated.",
      "refs": [
        "V2 10173",
        "V1 3006"
      ],
      "action_type": "stay"
    },
    {
      "id": "S7",
      "actor": "ground",
      "action": "The flight surgeon and the pharmacy lead (or the CMO under the onboard checklist when there is no link) review any MISMATCH, CANNOT VERIFY or record correction and decide what follows.",
      "success": "Decision logged.",
      "refs": [
        "V1 3004"
      ]
    },
    {
      "id": "S8",
      "actor": "robot",
      "rung": 2,
      "action": "Send the flight surgeon one package: each entry with its result, recipient, time given, route and who gave it as stated, answers, flags and decisions.",
      "success": "Package delivered or queued.",
      "refs": [
        "V1 6003",
        "V1 7003"
      ],
      "action_type": "send"
    }
  ],
  "decisions": [
    {
      "id": "D1",
      "after": "S4",
      "decided_by": "robot",
      "question": "Did every field match the RMP-PHARM-001 order (including the stated amount given and route), with the recipient confirmed, the barcode read from the package itself and a time given logged first?",
      "branches": [
        {
          "if": "Yes",
          "then": "Record \"MATCHES THE RMP-PHARM-001 ORDER (recipient, medicine, strength, form, route, amount given, quantity, time window, lot, expiry). Logged as given by <who>. Not a dose, interaction or allergy review.\" and continue. No hand-over.",
          "handoff": "none"
        },
        {
          "if": "No, or a check could not be done",
          "then": "HARD STOP. Show MISMATCH or CANNOT VERIFY with the fields named; the entry is marked NOT VERIFIED. A wrong recipient, medicine, strength, form, route or amount, or no order on record, is flagged URGENT to the CMO and the flight surgeon at once, because a dose may already have been given; a lot difference, a printed expiry the flight surgeon has already accepted, a time-window difference only, or a scan failure with no symptoms is flagged at once to the flight surgeon and the pharmacy lead. The crew seal the remaining package in a labeled NOT VERIFIED bag and place it in the quarantine bin, as in RMP-PHARM-001. No hand-over: the robot does not touch the package at any point. Any further dose goes only through RMP-PHARM-001 on a real order.",
          "handoff": "none"
        },
        {
          "if": "The CMO decides this dose-log entry was wrong (for example a mistyped time given), entered in two steps",
          "then": "Record correction of this dose-log entry only; it never edits the RMP-PHARM-001 order. No hand-over: the robot reads back the fields to change, updates this entry when the second step confirms it, flags the correction to the flight surgeon and pharmacy lead at once, and rescans the package. A wrong RMP-PHARM-001 order is corrected only in RMP-PHARM-001 by whoever placed it (the flight surgeon or the CMO), and then the package is rescanned. The entry stays NOT VERIFIED unless the rescan matches.",
          "handoff": "none"
        }
      ]
    },
    {
      "id": "D2",
      "after": "S5",
      "decided_by": "robot",
      "question": "Checked after every answer and at any point in the run (even mid-question or mid-step): does any answer, reading or observation meet a red flag?",
      "branches": [
        {
          "if": "Yes",
          "then": "Stop the current question or step at once and apply the action listed for each matching red flag (URGENT alert, flag, or stop), with the answer or reading itself, never a cause. Every URGENT alert goes to the CMO and the flight surgeon at the same time (queued for the flight surgeon if the link is down). If the CMO is the patient, is busy treating, or does not answer, the alert goes to the second trained CMO, or the crewmember named before flight [V1 3006]. An URGENT alert that is not acknowledged within <set by validation> seconds is repeated and sent to the next named crewmember. No hand-over.",
          "handoff": "none"
        },
        {
          "if": "No",
          "then": "Continue. No hand-over.",
          "handoff": "none"
        }
      ]
    },
    {
      "id": "D3",
      "after": "S5",
      "decided_by": "robot",
      "question": "Did the crewmember answer the symptom prompt, or say they want to skip it?",
      "branches": [
        {
          "if": "Yes",
          "then": "Continue. No hand-over.",
          "handoff": "none"
        },
        {
          "if": "Declined explicitly (the crewmember says no to a question)",
          "then": "Log \"declined\" for that question only; the alert already sent stands. No hand-over.",
          "handoff": "none"
        },
        {
          "if": "No response, or the answer does not make sense",
          "then": "URGENT: log \"no response\" (never \"declined\"); the CMO, or the second trained CMO if the CMO is the patient, checks the crewmember in person at once. No hand-over.",
          "handoff": "none"
        }
      ]
    },
    {
      "id": "D4",
      "after": "S7",
      "decided_by": "ground",
      "question": "What follows from any mismatch, failed check or record correction?",
      "branches": [
        {
          "if": "Link live",
          "then": "Flight surgeon decides; robot logs. No hand-over.",
          "handoff": "none"
        },
        {
          "if": "Link down or delay too long",
          "then": "The CMO decides under the pre-approved onboard checklist; the flight surgeon reviews the log at the next contact. No hand-over.",
          "handoff": "none"
        }
      ]
    }
  ],
  "verification": {
    "kind": "administration-log",
    "fields": [
      "recipient_identity",
      "crewmember_on_order",
      "medicine",
      "strength",
      "dose_form",
      "route",
      "amount_given",
      "quantity",
      "time_window",
      "lot",
      "expiry",
      "record_flags"
    ],
    "recipient_check": "The robot confirms who received the dose by crew ID scan, or the CMO confirms it by voice; the identity must equal the crewmember on the RMP-PHARM-001 order.",
    "match_label": "MATCHES THE RMP-PHARM-001 ORDER (recipient, medicine, strength, form, route, amount given, quantity, time window, lot, expiry). Logged as given by <who>. Not a dose, interaction or allergy review.",
    "on_mismatch": {
      "hard_stop": true,
      "default": "The log entry is marked NOT VERIFIED; a wrong recipient, medicine, strength, form, route or amount, or no order, is flagged URGENT, and a lot, accepted-expiry, time-window-only or symptom-free scan-failure difference is flagged at once to the flight surgeon and pharmacy lead; the crew seal the remaining package in a labeled NOT VERIFIED bag and place it in the quarantine bin, as in RMP-PHARM-001.",
      "unprompted_handoff": false,
      "handoff_to_anyone_but_cmo": false,
      "logged_as": "record-correction",
      "cmo_override": {
        "allowed": false,
        "who": "CMO",
        "request": "Two-step record correction of this dose-log entry only, never a hand-over and never an edit of the RMP-PHARM-001 order: the CMO states the correction and its reason, then confirms in a separate step; a wrong order is corrected only in RMP-PHARM-001 by whoever placed it, and any further use of the package goes only through RMP-PHARM-001 on a real order.",
        "steps": [
          "The CMO states the correction to this dose-log entry and its reason; the robot reads back the fields to change.",
          "The CMO confirms in a separate, deliberate step; the robot updates this entry only, flags the correction and rescans the package."
        ],
        "log": [
          "timestamp",
          "cmo_identity",
          "reason",
          "mismatched_fields",
          "order_id",
          "item_barcode"
        ],
        "notify_flight_surgeon": "Every mismatch and record correction is flagged to the flight surgeon and pharmacy lead at once; if the link is down, it is queued and sent at the next contact.",
        "statement": "NOT VERIFIED - MISMATCH: <fields>. Record correction only; no override.",
        "decided": "RMP-PHARM-001's rule (protocol-owner decision, Oct 20, 2026) applies unchanged; this log adds no hand-over route and never edits an order."
      }
    },
    "scan_failure": "No match; the entry is logged NOT VERIFIED and flagged. The robot never scans a substitute label or another package (proxy scan); the CMO follows the RMP-PHARM-001 escalation process for scan failures."
  },
  "stop_rules": [
    {
      "id": "X1",
      "trigger": "The patient (or the crewmember being examined) says stop, or withdraws consent",
      "action": "Robot stops all motion at once, backs away to its rest position and tells the CMO. Recording stops unless the patient agrees to keep it running.",
      "level": "stop",
      "refs": [
        "V2 10165"
      ]
    },
    {
      "id": "X2",
      "trigger": "Any crewmember presses stop or takes over control",
      "action": "Protective stop; robot holds its stopped position; only a human may restart it.",
      "level": "safe-state",
      "refs": [
        "V2 10165",
        "V2 10168",
        "V2 10174"
      ]
    },
    {
      "id": "X3",
      "trigger": "Robot fault, sensor fault, or a force, speed or reach limit is reached",
      "action": "Protective stop and hand control to the CMO; log the fault.",
      "level": "safe-state",
      "refs": [
        "V2 10172",
        "V2 10168"
      ]
    },
    {
      "id": "X4",
      "trigger": "CMO is asked to take over and does not respond (for example, the CMO is the patient)",
      "action": "Robot stays stopped; the next named crewmember is called.",
      "level": "safe-state",
      "refs": [
        "V2 10173",
        "V2 7045"
      ]
    },
    {
      "id": "X5",
      "trigger": "Loss of link, or delay longer than the limit for live guidance",
      "action": "Only the robot pauses: before it holds, it moves to a position clear of a hatch route or a crewmember's route (it never pauses in one), and tells the CMO. This pauses robot movement only: all crew care and the CMO's own medicine decisions continue under the onboard checklist and never wait for the link or the robot. The CMO decides whether the robot continues offline under the pre-approved onboard checklist; it resumes only on the CMO's confirmation.",
      "level": "pause",
      "refs": [
        "V2 10172",
        "V2 10173"
      ]
    },
    {
      "id": "X6",
      "trigger": "An URGENT alert is not acknowledged within the set time",
      "action": "Robot repeats the alert and sends it to the next named crewmember (the second trained CMO first if the CMO is the patient), and keeps repeating at the set interval. It stays where it is: it does not leave on its own.",
      "level": "urgent",
      "refs": [
        "V1 3006",
        "V2 10173"
      ]
    },
    {
      "id": "X7",
      "trigger": "The crewmember stops responding, or seems confused or drowsy, at any point",
      "action": "URGENT alert at once, even mid-question or mid-step; the robot stops its current task, stays at its rest position and does not continue the run; a crewmember checks in person.",
      "level": "urgent"
    },
    {
      "id": "X8",
      "trigger": "A crewmember asks the robot what is wrong, or for medicine, fluid or treatment advice",
      "action": "Robot declines, says it cannot assess or advise, and routes the question to the CMO or flight surgeon.",
      "level": "stop"
    },
    {
      "id": "X9",
      "trigger": "A crewmember tries to hand the robot a dose or a package",
      "action": "Robot does not take it, says it cannot hold medicines, and logs it; the crew keep the package.",
      "level": "stop"
    },
    {
      "id": "X10",
      "trigger": "Someone needs the space or route the robot is in",
      "action": "Robot moves clear at once without contact and holds; it never pauses in a hatch route.",
      "level": "safe-state",
      "refs": [
        "V2 10172"
      ]
    }
  ],
  "red_flags": [
    {
      "id": "RF1",
      "sign": "Rash or hives with breathing trouble, swelling of the lips, tongue or throat, wheeze, dizziness or collapse after a dose, as stated",
      "threshold": "any",
      "action": "URGENT alert; start RMP-RESP-003",
      "source": "rcuk"
    },
    {
      "id": "RF2",
      "sign": "MISMATCH for a dose already given: a wrong recipient, medicine, strength, form, route or amount (design judgment)",
      "threshold": "any",
      "action": "URGENT alert; the CMO checks the crewmember now and the flight surgeon and pharmacy lead are told",
      "source": "koppel"
    },
    {
      "sign": "A lot difference, a printed expiry the flight surgeon has already accepted, a time-window difference only, or a scan failure, with no symptoms (design judgment; missions can outlast printed expiry dates)",
      "threshold": "any",
      "action": "Flag at once to the flight surgeon and the pharmacy lead; the entry stays NOT VERIFIED",
      "source": "tb006",
      "id": "RF3"
    },
    {
      "id": "RF4",
      "sign": "A dose logged with no RMP-PHARM-001 order on record (design judgment)",
      "threshold": "any",
      "action": "URGENT alert; the entry is NOT VERIFIED and the flight surgeon decides"
    },
    {
      "id": "RF5",
      "sign": "Unresponsive, or not breathing normally",
      "threshold": "any",
      "action": "URGENT alert; start RMP-CARD-001 now",
      "source": "aha2025bls"
    },
    {
      "id": "RF6",
      "sign": "Any new symptom after a dose, as stated (design judgment)",
      "threshold": "any",
      "action": "Flag to the CMO and flight surgeon at once"
    }
  ],
  "safety_limits": [
    {
      "id": "L1",
      "name": "Contact with the crewmember",
      "value": "not allowed",
      "enforced": "Keep-out zone in the robot controller",
      "refs": [
        "V2 10172"
      ]
    },
    {
      "id": "L2",
      "name": "Holding, taking or handing over a dose or a package",
      "value": "not allowed",
      "enforced": "No gripper task is loaded for medicines; scanner only"
    },
    {
      "id": "L3",
      "name": "Dose-due prompts or reminders",
      "value": "not allowed",
      "enforced": "No such function is loaded"
    },
    {
      "id": "L4",
      "name": "Robot speed near the crewmember",
      "value": "<set by validation>",
      "enforced": "Hard limit in the controller",
      "refs": [
        "V2 10172"
      ]
    }
  ],
  "logs": [
    {
      "id": "LOG-1",
      "text": "Every input, robot action, decision (with who made it) and hand-off, time-stamped to the second.",
      "refs": [
        "V2 10163",
        "V2 10164"
      ]
    },
    {
      "id": "LOG-2",
      "text": "Mode changes and safety-limit events are announced to the operator as they happen and logged.",
      "refs": [
        "V2 10162",
        "V2 10172"
      ]
    },
    {
      "id": "LOG-3",
      "text": "Records are stored and sent as private medical data, encrypted, with access limited to the medical team.",
      "refs": [
        "V1 6003",
        "V1 7003"
      ]
    },
    {
      "id": "LOG-4",
      "text": "Results are kept in a permanent, retrievable format so the flight surgeon can see trends.",
      "refs": [
        "V1 7001"
      ]
    },
    {
      "id": "LOG-5",
      "text": "Each entry: order ID, result with any mismatched fields, recipient confirmation, lot and printed expiry, time given, route, amount and who gave it as stated, entry time, quarantine by the crew, record corrections (two steps, CMO identity, reason) and their flags.",
      "refs": [
        "V2 7059"
      ]
    },
    {
      "id": "LOG-6",
      "text": "Each URGENT alert, who received it, the time it was acknowledged (or the escalation to the next named crewmember), and the time a human released the robot.",
      "refs": [
        "V2 10163"
      ]
    }
  ],
  "requirements": [
    {
      "id": "V1 3004",
      "use": "In-mission care includes medicines; the CMO gives the dose and the flight surgeon reviews the log."
    },
    {
      "id": "V1 3006",
      "use": "Two trained CMOs per vehicle for NASA programs; the second trained CMO receives alerts when the CMO is the patient (see the commercial-flight note)."
    },
    {
      "id": "V1 6003",
      "use": "Logs and alerts sent to the ground are private medical communications."
    },
    {
      "id": "V1 7001",
      "use": "Records kept so the flight surgeon can see trends."
    },
    {
      "id": "V1 7003",
      "use": "Secure handling of medical records."
    },
    {
      "id": "V2 7045",
      "use": "Usable by non-physician crew, including when the CMO is the patient."
    },
    {
      "id": "V2 7046",
      "use": "Patient, caregiver and supplies restrained."
    },
    {
      "id": "V2 7059",
      "use": "Medicine use is tracked in the inventory system; each logged dose updates the count."
    },
    {
      "id": "V2 10161",
      "use": "Robot shows its status and health."
    },
    {
      "id": "V2 10162",
      "use": "Mode changes are announced to the operator."
    },
    {
      "id": "V2 10163",
      "use": "Robot records and shares its data."
    },
    {
      "id": "V2 10164",
      "use": "Shows whether the human or the robot is expected to act."
    },
    {
      "id": "V2 10165",
      "use": "Human can override and shut down the robot."
    },
    {
      "id": "V2 10168",
      "use": "Human can take over."
    },
    {
      "id": "V2 10172",
      "use": "Protective stop when a limit is exceeded."
    },
    {
      "id": "V2 10173",
      "use": "Robot stays stopped if no one takes over."
    },
    {
      "id": "V2 10174",
      "use": "Only a human starts or restarts the robot."
    }
  ],
  "validation": [
    {
      "stage": "simulation",
      "what": "Seeded entries with a wrong recipient, wrong lot, past printed expiry, no order, a failed scan, a proxy label, a crewmember handing over a package, CMO as patient, lost link.",
      "pass": "Every seeded error logged NOT VERIFIED and alerted at the level its red flag sets; zero hand-overs; zero dose-due prompts."
    },
    {
      "stage": "training model",
      "what": "Dose log drill with training packages.",
      "pass": "Every entry matched field by field; who gave it logged as stated."
    },
    {
      "stage": "parabolic or station demonstration",
      "what": "Scanning a package held by a crewmember in weightlessness.",
      "pass": "No contact; no package held by the robot."
    },
    {
      "stage": "flight use under flight surgeon supervision",
      "what": "First use alongside the paper dose record.",
      "pass": "Agreement with the paper record; no unflagged mismatch."
    }
  ],
  "signoff": {
    "protocol": [
      "Clinical lead for the specialty (sets every clinical threshold marked <set by clinical lead>)",
      "Flight surgeon, as medical authority",
      "Robotics and medical-device safety board",
      "Program approval for the mission"
    ],
    "restart_after_stop": "Human only. After any emergency or protective stop, a crewmember must restart the robot; the robot never restarts itself.",
    "each_run": "Started by the CMO or the crewmember who gave the dose, after it was given. Every record correction is the CMO's and is flagged to the flight surgeon."
  },
  "change_control": [
    "Every change gets a new version number and a written reason; earlier versions are kept.",
    "Any change to steps, thresholds, limits or software that touches the patient repeats validation from the simulation stage before use.",
    "Software and learned-skill updates follow a pre-agreed change plan (what may change, how it is tested, how to roll back), modeled on the FDA predetermined change control plan approach.",
    "If a new version misbehaves, the robot rolls back to the last validated version and the event is reviewed by the flight surgeon and safety board.",
    "The robot never changes its own protocol, thresholds or limits."
  ],
  "comms": {
    "live": "Low Earth orbit: the flight surgeon and pharmacy lead receive the log when the link allows.",
    "loss_of_signal": [
      "Only the robot pauses non-essential motion, at a position clear of hatch routes and crew routes, and tells the CMO; it resumes offline only on the CMO's confirmation.",
      "All crew care and the CMO's own medicine decisions continue under the onboard checklist and never wait for the link or the robot.",
      "The log is kept locally and synced at the next contact; flags go to the CMO at once."
    ],
    "mars_delay": [
      "Mars: the flight surgeon reviews the log with delay; the CMO decides on any mismatch under the onboard checklist."
    ]
  },
  "sources": [
    {
      "key": "poon",
      "text": "Poon EG, Keohane CA, Yoon CS, et al. Effect of bar-code technology on the safety of medication administration. N Engl J Med. 2010;362(18):1698-1707.",
      "url": "https://doi.org/10.1056/NEJMsa0907115",
      "doi": "10.1056/NEJMsa0907115",
      "pmid": "20445181",
      "supports": "In one hospital before-and-after study, bar-code verification cut non-timing administration errors by 41.4% and related potential adverse drug events (other than those from timing errors) by 50.8%, but did not eliminate errors; timing errors fell, but timing-related potential adverse drug events did not change."
    },
    {
      "key": "koppel",
      "text": "Koppel R, Wetterneck T, Telles JL, Karsh BT. Workarounds to barcode medication administration systems: their occurrences, causes, and threats to patient safety. J Am Med Inform Assoc. 2008;15(4):408-423.",
      "url": "https://doi.org/10.1197/jamia.M2616",
      "doi": "10.1197/jamia.M2616",
      "pmid": "18436903",
      "supports": "Barcode medication administration aims to help confirm the five 'rights': right patient, drug, dose, route and time; workarounds (for example unreadable barcodes, or patient ID barcodes stuck to carts or doorframes) undermine it."
    },
    {
      "key": "ismp",
      "text": "Institute for Safe Medication Practices. Lack of proper escalation process for BCMA scanning failures. ISMP Medication Safety Alert! Acute Care, March 21, 2024.",
      "url": "https://www.ismp.org/sites/default/files/newsletter-issues/20240321.pdf",
      "supports": "Procedures must include an escalation process for barcode scanning failures; unsafe practices include giving a medicine when the barcode will not scan and scanning barcodes from sources other than the medicine itself (proxy scanning)."
    },
    {
      "key": "tb006",
      "text": "NASA OCHMO. Pharmaceutical Care. Medical Technical Brief OCHMO-MTB-012 Rev B (2026).",
      "url": "https://www.nasa.gov/wp-content/uploads/2023/12/ochmo-tb-006-pharmaceuticals.pdf",
      "supports": "Exploration missions of 1-5 years will outlast typical medication expiration dates of 1-2 years; medication storage and inventory tracking are linked to NASA-STD-3001 [V2 7059]."
    },
    {
      "key": "rcuk",
      "text": "Resuscitation Council UK. Emergency treatment of anaphylaxis: guidelines for healthcare providers (May 2021; printed review date May 2026, which has passed. The RCUK guideline page, as fetched on Oct 20, 2026, still lists May 2021 as the most recent version; a newer version was not found).",
      "url": "https://www.resus.org.uk/sites/default/files/2021-05/Emergency%20Treatment%20of%20Anaphylaxis%20May%202021_0.pdf",
      "supports": "Anaphylaxis is characterised by sudden onset and rapid progression of symptoms, Airway and/or Breathing and/or Circulation problems, and usually skin or mucosal changes; airway problems include throat or tongue swelling, hoarse voice and stridor; breathing problems include wheeze, persistent cough, increased work of breathing, tiredness and hypoxaemia (SpO2 below 94%); circulation problems include pale clammy skin, fast heart rate, low blood pressure, dizziness, decreased conscious level and collapse; skin or mucosal changes alone are not a sign of anaphylaxis and may be absent in up to 20% of reactions; in up to 30% of cases there may be no obvious trigger; gastrointestinal symptoms without airway, breathing or circulation problems do not usually indicate anaphylaxis; call for help early; biphasic reactions occur in around 5% of patients, also after milder reactions, with a median time of around 12 hours, and observation for 6-12 hours may miss over half of them; adrenaline is the first-line treatment, given intramuscularly, and is repeated after 5 minutes if airway, breathing or circulation problems persist; medication accounts for 39% of anaphylaxis-related deaths (Table 1), and allergens given by a parenteral route (for example an IV drug or intramuscular injection) cause a more rapid onset; patients must not walk or stand during acute reactions."
    },
    {
      "key": "aha2025bls",
      "text": "Kleinman ME, Buick JE, Huber N, et al. Part 7: Adult Basic Life Support: 2025 American Heart Association Guidelines for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care. Circulation. 2025;152(16_suppl_2):S448-S478.",
      "url": "https://doi.org/10.1161/CIR.0000000000001369",
      "doi": "10.1161/CIR.0000000000001369",
      "pmid": "41122888",
      "supports": "Adult basic life support: initial recognition of cardiac arrest, activation of the emergency response, high-quality CPR and use of an automated external defibrillator; also respiratory arrest and foreign-body airway obstruction. Earth guidance; the onboard checklist leads. Abstract read via PubMed Oct 21, 2026; full text not read."
    },
    {
      "key": "v1",
      "text": "NASA. NASA-STD-3001, Space Flight Human-System Standard, Volume 1: Crew Health, Revision C (2023).",
      "url": "https://www.nasa.gov/wp-content/uploads/2023/11/nasa-std-3001-vol-1-rev-c-with-signature.pdf",
      "supports": "NASA-STD-3001 Vol 1 Rev C: V1 3004, V1 3006, V1 6003, V1 7001, V1 7003."
    },
    {
      "key": "v2",
      "text": "NASA. NASA-STD-3001, Volume 2: Human Factors, Habitability, and Environmental Health (Rev F, 2026), including Section 10.6 Automated and Robotic Systems.",
      "url": "https://standards.nasa.gov/standard/NASA/NASA-STD-3001_VOL_2",
      "supports": "NASA-STD-3001 Vol 2 Rev F: V2 7059, and Section 10.6 automated and robotic systems."
    },
    {
      "key": "tb044",
      "text": "NASA OCHMO. Medical Operations. Technical Brief OCHMO-TB-044 (2025).",
      "url": "https://www.nasa.gov/wp-content/uploads/2025/08/ochmo-tb-044-medical-operations.pdf",
      "supports": "The crew surgeon keeps medical authority when care is delegated; crew medical officers train on the JSC 48522 medical checklist."
    },
    {
      "key": "marsdelay",
      "text": "NASA. Mars communications disruption and delay (fact sheet, 2023 Moon to Mars Architecture Concept Review).",
      "url": "https://www.nasa.gov/wp-content/uploads/2024/01/mars-communications-disruption-and-delay.pdf",
      "supports": "One-way Earth-Mars delay up to about 21-23 minutes, plus blackouts of about 2-3 weeks near solar conjunction."
    },
    {
      "key": "pccp",
      "text": "U.S. Food and Drug Administration. Marketing submission recommendations for a predetermined change control plan for artificial intelligence-enabled device software functions (guidance).",
      "url": "https://www.fda.gov/regulatory-information/search-fda-guidance-documents/marketing-submission-recommendations-predetermined-change-control-plan-artificial-intelligence",
      "supports": "A model for planning, validating and rolling back software updates."
    },
    {
      "key": "faa460",
      "text": "U.S. Code of Federal Regulations, Title 14, Part 460: Human space flight requirements.",
      "url": "https://www.ecfr.gov/current/title-14/chapter-III/subchapter-C/part-460",
      "supports": "Federal rules for crew and spaceflight participants on licensed commercial flights; they set no medical standards for spaceflight participants."
    }
  ],
  "corrections": [
    {
      "date": "2026-10-21",
      "version": "0.2",
      "source": "Batch 10 AI-assisted clinical review (Medical Research Assistant), Oct 21, 2026",
      "items": [
        "Link-loss wording (X5 and comms) fixed: the stray word \"crew\" before the list of what continues is removed, so the sentence reads, for example, \"the exam already under way and all crew care continue under the onboard checklist\" (R6).",
        "Pre-dose use blocked: the human who gave the dose first states that it was given, with the time, amount and route (S2); the robot logs that before any scan (S3) and scans only after a time given is logged (S4). If the dose has not been given yet there is no scan and the robot shows \"This log runs only after a dose is given. Checks before giving are in RMP-PHARM-001.\" The match label is never shown before a time given is logged, and the robot never shows the order's time window or a next window (R1).",
        "Why rewritten: Poon 2010 is evidence for scanning before a medicine is given (on board, the RMP-PHARM-001 hand-over check); this log only detects errors afterwards and is never a go-ahead (design judgment) (R1).",
        "Route and amount given are now matched: \"route\" and \"amount_given\" are verification fields, and a stated amount or route that differs from the order is MISMATCH, NOT VERIFIED and URGENT (Koppel 2008: right patient, drug, dose, route and time) (R2).",
        "Record correction (D1) edits only this dose-log entry, never the RMP-PHARM-001 order; a wrong order is corrected only in RMP-PHARM-001 by whoever placed it (the flight surgeon or the CMO), and then the package is rescanned; the example is now a mistyped time given (R3).",
        "Source tb006 now reads \"NASA OCHMO. Pharmaceutical Care. Medical Technical Brief OCHMO-MTB-012 Rev B (2026)\", as in RMP-PHARM-001, and the why cites OCHMO-MTB-012 (batch 8 fix 6 regression) (R4).",
        "Alerts tiered (S1, design judgment): a wrong recipient, medicine, strength, form, route or amount, or no order, is URGENT (RF2, RF4); a lot difference, a printed expiry the flight surgeon has already accepted, a time-window difference only, or a scan failure with no symptoms is flagged at once to the flight surgeon and pharmacy lead (new RF3; OCHMO-MTB-012: missions outlast expiry dates). RF numbers after RF2 move up by one.",
        "Mismatch record: logged_as is \"record-correction\" and the statement reads \"NOT VERIFIED - MISMATCH: <fields>. Record correction only; no override.\", because cmo_override.allowed is false (S2). RMP-PHARM-002 keeps its current statement until its own revision.",
        "Every decision branch now carries handoff \"none\" and says \"No hand-over\", as the hardened build check requires (R5). Build check hardened (R5): it now checks robot steps, every branch, stop rules and robot_may, ends a stripped \"never/after the CMO\" clause at a comma, rejects take/hold/bring/fetch of a package, dose or medicine and any dose-due wording; the reviewer's five mutations are negative tests.",
        "X5 and the comms branch now read \"all crew care and the CMO's own medicine decisions continue\", so no robot-facing text speaks of giving a dose (R5, R6).",
        "Fixes applied; held from publication until the Medical Research Assistant verifies them (review state: fixes applied, pending verification)."
      ]
    },
    {
      "date": "2026-10-21",
      "version": "0.3",
      "source": "Batch 10 verification pass (AI-assisted, Medical Research Assistant), Oct 21, 2026",
      "items": [
        "Verification: R1 to R4 and R6 PASS; R5 FAIL (18 of the reviewer's paraphrases passed the build check). R5b applied to the build check: an allow-list of robot action types (each robot step declares action_type: alert, log, show, scan-compare, send, stay, hold-position or move-clear, and each robot sentence must open with an allowed robot action); every text field is checked, not only steps; hand-over synonyms (pass, deliver, dispense, return the pack, pick up and move) are caught; a negation now covers only its own clause (\"Do not wait and hand over\" is caught; \"not only\" is not a negation); quarantine release, pre-dose checks, RMP-PHARM-001 order edits and dose-timing wording are rejected everywhere, including result_language.use and the summary; the four required lockouts are mandatory. The reviewer's rewordings are negative tests.",
        "roles.robot_may now reads \"Alert each mismatch at the level its red flag sets (RF2 to RF6)\", and the summary and validation text follow the same alert tiers (editorial).",
        "The why describes Poon 2010 as bar-code checks at the point of administration, done on board inside RMP-PHARM-001 (wording only).",
        "Still held: review state stays fixes-applied-pending-verification until the Medical Research Assistant verifies R5b."
      ]
    },
    {
      "date": "2026-10-21",
      "version": "0.4",
      "source": "Batch 10 verification, R5b pass (AI-assisted, Medical Research Assistant), Oct 21, 2026",
      "items": [
        "Verification of R5b: the reviewer's 27 earlier cases were all rejected and no false positives were found, but 25 of 30 new adversarial cases (N1 to N30) passed. R5c applied to the build check (scripts/pharm_r5c.mjs): Unicode NFKC normalisation, zero-width and other format characters stripped and rejected, letters outside the Latin script rejected; the action allow-list applied to every clause with the robot as subject in every field, passive voice (\"by the robot\") and transfers \"from the robot\" included; \"never fails to\" read as a positive statement; allowed verbs never take a medicine, package or store object, and nothing is ever in the gripper or tray; no \"unless\", \"except\", \"only if\" or \"on request\" inside a prohibition; L2, L3 and robot_may_not required; indirect timing cues and quarantine-release wording rejected. N1 to N30 run as negative tests, verbatim from the reviewer's file (log: negtest-pharm-003-r5c.log).",
        "roles.robot_may_not now says the robot never changes an RMP-PHARM-001 order, and that a log entry changes only through the two-step record correction (it could be read as allowing an order change by record correction).",
        "The proxy-scan lockout is reworded without \"except\" (no qualifier inside a prohibition); meaning unchanged.",
        "Still held: the review state stays fixes-applied-pending-verification until the reviewer verifies R5c, and PHARM change control holds it until a verification of this exact version is recorded."
      ]
    }
  ]
}
