Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tds-test-ja with all npm packages installed. Try it out:

var tdsTestJa = require("tds-test-ja")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tds-test-ja v1.0.0

TDS (Tobacco Dependence Screener) in Japanese

tds-test-ja

日本語のTDS (Tobacco Dependence Screener) の質問票の文言と点数計算

install

npm install tds-test-ja

usage

var TDS = require('tds-test-ja');

質問一覧を取得

TDS.getQuestions();

質問の選択肢を取得

TDS.getChoices(0); // Q1の選択肢の配列
TDS.getChoices(4); // Q5の選択肢の配列

点数を計算

// 引数はQ1~Q10 の回答の配列 "はい" が 0, "いいえ" が 1
TDS.calculate([1,0,0,1,1,1,0,1,0,1]); // 4 を返す。

補足情報

TDS.getQ4Symptoms(); // Q4の補足情報として必要な症状のリスト

TDS.getQ8Supplement(); // Q8の補足情報の文言

LICENSE

MIT

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free