npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cursorversinc/medical-ai-boundary-kit

v2.0.0

Published

医療AI境界判定キット — 3省2ガイドライン準拠チェッカー + 監査証跡 + 文書生成

Downloads

37

Readme

Medical AI Boundary Kit v2

開業医と医療機関向けに作り直した、生成AIの境界判定キットです。

v1 からの大きな変更

  1. 初学者向けの安全側デフォルト
  2. unknown を明示的に扱う三値ロジック
  3. 消費者向けブラウザ AI への患者情報直貼りをハードブロック
  4. 診断系と画像系をスコアより先に強いルールで扱う
  5. サービス仕様適合開示書、SLA、障害時連絡先を確認項目に追加
  6. JSON モードで純 JSON を保証
  7. 監査ログに簡易ロックを追加
  8. 判定ハッシュを常に出力
  9. 利用申請票の事前記入版などを自動生成

対象

  • これからバイブコーディングを学ぶ開業医
  • 小規模医療機関の情報管理責任者
  • まずは安全な題材から始めたい医師
  • note 記事からそのままコピペで動かしたい読者

使い方

まずはプリセットを見る

node kit-v2.mjs --mode presets

安全寄りの題材で判定する

node kit-v2.mjs --mode check --preset patient-handout-no-phi
node kit-v2.mjs --mode check --preset referral-draft-domestic

自分の JSON で判定する

node kit-v2.mjs --mode check --input ./examples/intake-template.json
node kit-v2.mjs --mode check --input ./examples/intake-template.json --json

判定と同時に文書を生成する

node kit-v2.mjs --mode check --preset soap-polish-domestic --docs-dir ./generated

生成されるもの

  • decision-pack.md
  • application-prefill.md
  • vendor-memo.md
  • manager-brief.md
  • decision.json

監査ログを検証する

node kit-v2.mjs --mode verify --audit-log ./logs/audit-log.jsonl

監査マニフェストを生成する

node kit-v2.mjs --mode manifest --audit-log ./logs/audit-log.jsonl --json

PHI マスキング補助

node kit-v2.mjs --mode mask --text "患者名: 山田太郎 住所: 東京都..."

注意

  • これは送信前の補助チェックです
  • 完全匿名化や法的適合を保証しません
  • 残存する自由記述は必ず人が確認してください

なぜこの設計に変えたか

1. 初学者は unknown が多い

v1 は true と false だけで組んでいたため、未確認と不適合が混ざっていました。v2 では unknown を分け、わからないこと自体をリスクとして扱います。

2. 小規模医療機関は事業者確認が要点

小規模医療機関では、事業者からの説明資料、責任分界、非常時の連絡体制を明確にすることが重要です。そこで、サービス仕様適合開示書、SLA、障害時連絡先を入力項目にしました。

3. 診断系は最初の題材に向かない

診断候補提案や画像解析は、単なる文書下書きより患者安全と規制の論点が強く出ます。v2 はそこで無理に green を出さず、まず用途を下げる設計にしています。

4. 判定だけでは現場が動かない

判定後に必要なのは、申請票、ベンダー確認、管理者説明です。なので v2 は docs モードで文書まで出します。

入力スキーマ

{
  "name": "紹介状の下書き",
  "workflowType": "referral_draft",
  "dataSensitivity": "pseudonymized",
  "destination": "domestic_vendor",
  "reviewer": "physician",
  "automationLevel": "copy_paste_manual",
  "distribution": "internal_only",
  "vendor": {
    "name": "Vendor Name",
    "plan": "Enterprise",
    "noTraining": "yes",
    "domesticRegion": "yes",
    "serviceSpecDisclosure": "yes",
    "securityDisclosure": "unknown",
    "sla": "yes",
    "incidentContact": "yes",
    "retention": "short"
  },
  "controls": {
    "phiMinimization": "yes",
    "maskingBeforeSend": "yes",
    "outputLabeledDraft": "yes",
    "auditLog": "yes",
    "accessControl": "yes",
    "fallbackPlan": "yes",
    "policyApproved": "yes",
    "trainingCompleted": "unknown"
  }
}

verdict の意味

  • allowed
    • 初学者でも比較的始めやすい
  • allowed_with_controls
    • 条件を整えれば始められる
  • escalation_required
    • 院長、情報管理責任者、外部専門家の確認が先
  • blocked
    • 今の形ではやらない

プリセットの考え方

おすすめの学習順

  1. patient-handout-no-phi
  2. admin-faq
  3. referral-draft-domestic
  4. soap-polish-domestic
  5. billing-support
  6. diagnosis-suggestion
  7. xray-external-sale は読むだけ

テスト

node --test

免責

  • 法的助言ではありません
  • PMDA 該当性や国外提供の最終判断を代替しません
  • PHI マスキングは補助であり、完全匿名化ではありません
  • ロック付き監査ログは単一ホストのローカルファイル運用を想定しています