みーの医学

医学生の「みー」が,医学に関してまとめています. 2016年3月に110回医師国家試験に合格しました.

このブログでは,みー(=運営者)は医学的助言を一切おこなっていません.情報の利用は自己責任でお願いします.間違いや意見がありましたら,該当記事のコメント欄に書き込んでください.

トップ / 記事一覧 / カテゴリ / はじめに / ゴロ合わせ一覧

Sponsored Links

QB online API リファレンス

医師国家試験の過去問サイトである QB online の非公式リファレンスです.

QB online API を使うことで,医師国家試験の過去問を系統的に分析することができます.

目次

Syntax

https://qb-online.com/qb/api/[version]/[...]

プロトコルはhttp, https両方とも対応しています.

versionは現在(2016.1)では 1 のみです.

loginだけは,Payloadをpostする必要がありますが,他のAPIはgetです.

Responseはjson形式です.

Login

最初にログインする必要があります.

https://qb-online.com/qb/api/1/auth/login
# Payload
{
account: "xxxxx@xxx.com"
autologin: false
password: "xxxxx"
}

以降では,この時のCookiesを使ってアクセスします.

ユーザー情報

customer_idやuser_idなど,以降のアクセスに必要な情報を取得します.各シリアルコードの有効期限やビデオ口座の認証キーも取得できます.

https://qb-online.com/qb/api/1/auth/login_info
# Response
{
  "result": true,
  "user_info": {
    "authorized": true,
    "account": "xxxxx@xxxx.com",
    "customer_id": "xxxx",
    "user_id": "xxxx",
    "grade": "6",
    "nickname": "xxxx",
    "icon": "/upload/icon/iconxxxx.png",
    "reg_year": 2015,
    "expired": false,
    "expiration": "20xx-xx-xx 00:00:00",
    "contents": {
      "01": {
        "year": 2015,
        "expired": true
      },
      "02": {
        "year": 2015,
        "expiration": "20xx-xx-xx 00:00:00",
        "expired": false
      },
      "03": {
        "year": 2016,
        "expiration": "20xx-xx-xx 00:00:00",
        "expired": false
      },
      "04": {
        "year": 2016,
        "expiration": "20xx-xx-xx 00:00:00",
        "expired": false
      },
      "05": {
        "year": 2014,
        "expiration": "20xx-xx-30T15:00:00.000Z",
        "expired": false
      },
      "09": {
        "year": 0,
        "expiration": "1970-01-01T00:00:00.000Z",
        "expired": false
      }
    }
  },
  "videog_credential": {
    "VDGID": "xxxxxxxxxxxxxxxxxxxxxxxxx",
    "ACCOUNT": "xxxxxxxxxxxxxxxxxxxxxxxxx",
    "PASS": "xxxxxxxxxxxxxxxxxxxxxxxxx",
    "KEY": "xxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

ユーザー情報

続きからスタートの情報や,検索設定などを取得します.

https://qb-online.com/qb/api/1/user_data
# Response
{
  "result": true,
  "user_data": {
    "resume_data": {
      "mode": 0,
      "question_no": "xxxAxx",
      "condition": {
        "search_type": "note",
        "keyword": "",
        "and_or": "and",
        "first_round": [
          true,
          true
        ],
        "img": [
          true,
          true
        ],
        "result": [
          true,...
        ],
        "level": [
          true,...
        ],
        "cr_range": [
          0,
          100
        ],
        "no_cr": true,
        "chapters": [
          true,...
        ],
        "kind": [
          true,....
        ],
        "required": [
          true,
          true
        ],
        "exam_times": [
          true,....
        ],
        "on_qb": [
          true,
          true
        ],
        "orderby": "-date"
      },
      "state": {
        "bookmark": false,
        "first_round": false,
        "required": false,
        "img": false,
        "shuffle": false,
        "kind": 0,
        "result": 0,
        "sort": "date",
        "order": {
          "qno": 1,
          "date": -1,
          "page": 1
        }
      },
      "exercise_result": {
        "xxxxxxxxxxx": 3
      }
    }
  }
}

サマリー

演習した問題の正答率や達成率などを取得します.

http://qb-online.com/qb/api/1/summary
# Response
{
  "result": true,
  "exams": [
    {
      "eno": *0*, #
      "essential_perfect": *00,
      "essential_passing": **0,
      "general_perfect": *00,
      "general_passing": ***,
      "clinical_perfect": *00,
      "clinical_passing": *0*,
      "cre": false,
      "essential": {
        .....
        },
        "evaluation_detail": [
          .....
        ]
      },
      "general": {
        "correct_rate": **.*,
        "completion": {
          ....
        },
        "evaluation_detail": [
          ....
        ]
      },
      "clinical": {
        ....
      },
      "total": {
        .....
      }
    }, ......
  ],
  "qb": [
    {
      "chapter_name": "A",
      "chapter_title": "消化管",
      "general": {
        "correct_rate": **.**********0***,
        "completion": {
          "done": ***,
          "all": ***
        },
        "evaluation_detail": [
          **.***********0**,
          *.0******0*******,
          *0.*******0*0****,
          0
        ]
      },
      "clinical": {
        "correct_rate": **.**************,
        "completion": {
          "done": ***,
          "all": ***
        },
        "evaluation_detail": [
          **.**************,
          *.****************,
          **.***************,
          0
        ]
      },
      "first_round": "complete",
      "cre": true
    }, ....
  ],
  "total": { ....
    }
  },
  "video": {
    "chapters": [
      {
        "chapter": "A",
        "chapter_no": *,
        "title": "消化管",
        "sections": [
          ...
        ]
      }, ...
    ]
  }
}

問題一覧

問題一覧を取得します.クエリーで条件を指定できます.

https://qb-online.com/qb/api/1/questions?chapter=[chapter]&search_type=qb&and_or=and&no_cr=1&chapters=A&orderby=%2Bpage.
# Query
[chapter]: AからZで指定します.
# Response
{
  questions: [,...],
  search_id: null,
  total: 322,
}

questions: {
{
  "serial_no": 1,
  "bookmark": null,
  "required": 0,
  "first_round": true,
  "explanation": true,
  "has_image": true,
  "qid": xxxxxxx,
  "question_no": "***D***",
  "text": "xxxxxxxxxx…",
  "last_date": "20**-**-**T03:17:32.000Z",
  "answers": [
    {
      "id": *******,
      "qid0": *******,
      "qid": *********,
      "result": 3,
      "createdAt": "20**-**-**T03:17:32.000Z"
    }
  ],
  "page": "*-*",
  "note": null
}, ...

問題の取得

指定した問題を取得します.答えや画像のURLや演習状況も分かります. たくさんのkeyがありますが,要点としては,diagで診断,questionで問題本文,imagesで画像を取得,essentialで解説,pointで要点,choicesで選択肢,commentsで選択しの解説です.

https://qb-online.com/qb/api/1/questions/[Question]
# Query
[Question]: 104A25などと指定.year-chapter-noの順番.
# Response 
{
  "result": true,
  "main": {
    "id": xxxxxxx,
    "eno": xxx,
    "qno": "xxxx",
    "qno_class": 4,
    "qid0": "",
    "question_no": "xxxxxx",
    "question_suffix": 0,
    "question_id": "xxxxx",
    "first_print_year": xxxx,
    "is_q": 1,
    "kind": 2,
    "required": 0,
    "basic": 1,
    "basics": "2016,2015,2014,2013,2012",
    "book": "A",
    "page": 55,
    "bps": [
      "2015 A-6"
    ],
    "note": 0,
    "notes": "2016-0,2015-0,2014-0",
    "arrives": "2015-A",
    "books": 1,
    "qcnt": 1,
    "preface": "",
    "img": 1,
    "diag": "xxxxxxx",
    "level": 1,
    "question": "xxxxxx",
    "essential": "xxxxxxx",
    "anslist": "a",
    "anspat": 0,
    "ansn": 0,
    "essential_refpage": "",
    "essential_refid": "",
    "keyword1": ":xxxxx::::",
    "keyword2": "",
    "keyword3": "",
    "keyword4": "",
    "question_basic": "",
    "finding": "xxx",
    "intention": "xxxx",
    "keyword": "xxxxxx",
    "page_sort": 1,
    "page_sort_lastyear": 1,
    "basic_lastyear": 1,
    "question_basic_lastyear": "",
    "note_lastyear": "0",
    "book_prev": "A",
    "correct_rate": "",
    "createdAt": "0000-00-00 00:00:00",
    "updatedAt": "0000-00-00 00:00:00",
    "imagediagnosis": "xxxxxxxxx",
    "supplement": "",
    "reference": "",
    "point": "xxxxx",
    "comment": "",
    "topics": "",
    "voice": "",
    "to_next": "",
    "refs_essential": [
      {
        "page": "xxxx",
        "refid": "xxxxxxxxxxxx",
        "label": "xx",
        "abbrev": "xx"
      },...
    ],
    "last_answers": [
      {
        "id": xxxxxxx,
        "user_id": xxxxxxxx,
        "date": "xxxxxxxx",
        "qid0": xxxxxx,
        "qid": xxxxxxxx,
        "question_no": null,
        "answer": "a",
        "result": 3,
        "createdAt": "xxxxxxxx",
        "updatedAt": "xxxxxxxxx",
        "judge": 3
      }, ...
    ],
    "images": [
      {
        "path": "img/xxx/xxxx/xxxxxxx.jpg",
        "name": "xxxxxxx"
      }
    ],
    "numofans": 1,
    "choices": [
      "a xxxxx",
      "b xxxxx",
      "c xxxxx",
      "d xxxxx",
      "e xxxxx"
    ],
    "comments": [
      "○a xxxxx",
      "×b xxxxx",
      "×c xxxxx",
      "×d xxxxx",
      "×e xxxxx"
    ],
    "refs": [
      [],
      [],
      [],
      [],
      []
    ],
    "choicerates": [
      "",
      "",
      "",
      "",
      ""
    ],
    "cre": true,
    "myquestion": {},
    "first_round": true
  },
  "series": []
}

ノート

qidとnoteを指定することで,ノートを保存できます.保存に成功したら,trueが返ります.

https://qb-online.com/qb/api/1/myquestions/[Question]
# Query
[Question]: 104A25などと指定.year-chapter-noの順番.
# Payload
{
  "qid":[qid],
  "note":"[note]"
}
# Response
{
  "result": true,
  "myq_id": xxxxxxx
}

以上です.