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

@mecatoncheir/gaf

v1.0.0

Published

GAF (Global Assessment of Functioning) scale implementation for psychiatric assessment - Limited version with 12 sample episodes

Readme

@mecatoncheir/gaf

GAF (Global Assessment of Functioning) 尺度実装パッケージ - 制限版

GAF尺度は、精神科における成人の社会的・職業的・心理的機能を1-100点で評価する、厚生労働省推奨の標準化された数値スケールです。このパッケージでは基本機能と制限版エピソードデータベース(12例)を提供し、将来のAPI拡張に対応した設計となっています。

📋 特徴

  • GAF尺度準拠: 厚生労働省推奨基準に基づく実装
  • 12のサンプルエピソード: 各階層(100-91点〜10-1点)のサンプル
  • 制限版機能: 1エピソード選択によるGAF計算
  • API拡張対応: 将来のフル機能版への移行に対応
  • Web統合対応: ブラウザでの使用可能
  • TypeScript対応: 型定義ファイル同梱予定

🚀 インストール

npm install @mecatoncheir/gaf

📖 基本的な使用方法

基本的なGAF計算

const { MecatoncheirGAF } = require('@mecatoncheir/gaf');

// GAFインスタンス作成
const gaf = new MecatoncheirGAF();

// 利用可能なエピソード一覧取得
const episodes = gaf.getAvailableEpisodes();
console.log(`エピソード数: ${episodes.length}`);

// エピソード詳細表示
const episodeDetail = gaf.displayEpisode('gaf_sample_006');
console.log(`タイトル: ${episodeDetail.title}`);
console.log(`基準点: ${episodeDetail.baseScore}`);

// GAF計算実行
const result = gaf.calculateGAF('gaf_sample_006');
console.log(`最終GAF点数: ${result.finalScore}`);

階層別エピソード取得

// 特定階層のエピソード取得
const severeTier = gaf.getEpisodesByTier('50-41');
console.log(`50-41点階層のエピソード数: ${severeTier.length}`);

// 全階層一覧
const availableTiers = gaf.episodeSelector.getAvailableTiers();
console.log('利用可能階層:', availableTiers);

Web統合例

<!DOCTYPE html>
<html>
<head>
    <title>GAF計算</title>
</head>
<body>
    <div id="gaf-calculator"></div>
    
    <script src="path/to/bundled/gaf.js"></script>
    <script>
        const gaf = new MecatoncheirGAF();
        const episodes = gaf.getAvailableEpisodes();
        
        // UI表示ロジック
        episodes.forEach(episode => {
            // エピソード選択UIの実装
        });
    </script>
</body>
</html>

🏗️ API リファレンス

MecatoncheirGAF クラス

getAvailableEpisodes()

利用可能なエピソード一覧を取得します。

戻り値: Array<Object> - エピソード表示用データの配列

getEpisodesByTier(tier)

指定された階層のエピソードを取得します。

パラメータ:

  • tier (string) - 階層名 (例: "50-41")

戻り値: Array<Object> - 該当エピソードの配列

displayEpisode(episodeId)

エピソードの詳細情報を取得します。

パラメータ:

  • episodeId (string) - エピソードID

戻り値: Object - エピソード詳細情報

calculateGAF(episodeId)

GAF計算を実行します(制限版:1エピソードのみ)。

パラメータ:

  • episodeId (string) - 選択エピソードID

戻り値: Object - 計算結果

{
  episodeId: string,
  episodeTitle: string,
  baseScore: number,
  adjustment: number,
  finalScore: number,
  tier: string,
  severity: string,
  type: string,
  isLimitedVersion: boolean,
  upgradeMessage: string
}

getUpgradeInfo()

フル機能版へのアップグレード情報を取得します。

戻り値: Object - アップグレード情報

📊 サンプルエピソード

制限版では以下の12例のエピソードが利用可能です:

| 階層 | タイプ | タイトル | 基準点 | |------|---------|----------|--------| | 100-91 | 機能 | 優秀な社会機能 | 95 | | 90-81 | 機能 | 良好な社会機能 | 85 | | 80-71 | 機能 | 軽度の機能制限 | 75 | | 70-61 | 機能 | 中等度の機能困難 | 65 | | 60-51 | 機能 | 重度の機能障害 | 55 | | 50-41 | 機能/症状 | 重大な機能障害/症状 | 45/42 | | 40-31 | 機能/症状 | 粗大な機能欠陥/現実検討欠陥 | 35/38 | | 30-21 | 症状 | 妄想・幻覚の影響 | 25 | | 20-11 | 症状 | 自他害の危険 | 15 | | 10-1 | 症状 | 持続的危険状態 | 5 |

🔧 開発者向け

テスト実行

npm test

サンプル実行

npm run example

プロジェクト構造

@mecatoncheir/gaf/
├── package.json
├── README.md
├── LICENSE
├── DISCLAIMER.md
├── index.js (メインエントリーポイント)
├── lib/
│   ├── gaf-calculator-limited.js
│   ├── episode-selector.js
├── data/
│   └── sample-episodes.js (12例)
├── examples/
│   ├── basic-usage.js
│   └── web-integration.html
└── test/
    ├── calculator.test.js
    └── episodes.test.js

⬆️ フル機能版へのアップグレード

制限版の制約

  • エピソード選択: 1個まで(フル版: 3個)
  • エピソードデータ: 12例(フル版: 200例)
  • 機能: 基本計算のみ(フル版: 詳細分析・レポート)

アップグレード方法

MecatoncheirプラットフォームでAPI機能を有効化することで、フル機能版をご利用いただけます。

📄 ライセンス

MIT License - 詳細は LICENSE ファイルをご覧ください。

⚠️ 免責事項

このパッケージは教育・研究目的での使用を想定しています。実際の医療現場での使用については、必ず医療従事者の監督のもとで行ってください。詳細は DISCLAIMER.md をお読みください。

📞 サポート


Mecatoncheir Project | GAF尺度の標準化と普及を支援します