システム状態の取得
メニュー
更新履歴
概要
POSTメソッドによりシステム状態の取得を行います。
リクエストおよびレスポンスデータはxml2形式になります。
テスト方法
- 参考提供されている sample_system_state_v2.rb 内の変数HOST等を接続環境に合わせます。
- sample_system_state_v2.rb 内のリクエスト日時を接続先の日レセの環境に合わせます。
- ruby sample_system_state_v2.rb により接続。
リクエスト(POSTリクエスト)サンプル
POST : /api01rv2/systeminfv2 Content-Type: application/xml
application/xml の場合の文字コードは UTF-8 とします。
<data>
<private_objects type="record">
<Request_Date type="string">2014-10-23</Request_Date>
<Request_Time type="string">16:52:00</Request_Time>
</private_objects>
</data>
処理概要
日レセのデータベース構造バージョン、マスタ更新情報、プログラム更新情報を返却します。
処理詳細
- 基準日の歴日チェック
レスポンスサンプル
<xmlio2>
<private_objects type="record">
<Information_Date type="string">2014-10-23</Information_Date>
<Information_Time type="string">16:59:11</Information_Time>
<Api_Result type="string">0000</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Jma_Receipt_Version type="string">040700-1</Jma_Receipt_Version>
<Database_Information type="record">
<Local_Version type="string">S-040700-1-20140527-2</Local_Version>
<New_Version type="string">S-040700-1-20140527-2</New_Version>
</Database_Information>
<Master_Update_Information type="record">
<Last_Update_Date type="string">2014-10-02</Last_Update_Date>
<Master_Version_Information type="array">
<Master_Version_Information_child type="record">
<Name type="string">点数マスタ</Name>
<Local_Version type="string">R-040700-1-20140930-1</Local_Version>
<New_Version type="string">R-040700-1-20140930-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">保険番号マスタ</Name>
<Local_Version type="string">R-040200-1-20140128-1</Local_Version>
<New_Version type="string">R-040200-1-20140128-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">システム管理マスタ</Name>
<Local_Version type="string">R-040200-1-20140724-1</Local_Version>
<New_Version type="string">R-040200-1-20140724-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">病名マスタ</Name>
<Local_Version type="string">R-040600-1-20140611-2</Local_Version>
<New_Version type="string">R-040600-1-20140611-2</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">チェックマスタ</Name>
<Local_Version type="string">R-040200-1-20140410-2</Local_Version>
<New_Version type="string">R-040200-1-20140410-2</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">一般老人置換マスタ</Name>
<Local_Version type="string">R-040200-1-20140919-1</Local_Version>
<New_Version type="string">R-040200-1-20140919-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">検査分類マスタ</Name>
<Local_Version type="string">R-040200-1-20140905-2</Local_Version>
<New_Version type="string">R-040200-1-20140905-2</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">相互作用マスタ</Name>
<Local_Version type="string">R-020200-3-20060217-3</Local_Version>
<New_Version type="string">R-020200-3-20060217-3</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">症状措置マスタ</Name>
<Local_Version type="string">R-020200-3-20060217-4</Local_Version>
<New_Version type="string">R-020200-3-20060217-4</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">保険者マスタ</Name>
<Local_Version type="string">R-020200-3-20041025-1</Local_Version>
<New_Version type="string">R-020200-3-20041025-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">住所マスタ</Name>
<Local_Version type="string">R-040600-1-20140911-1</Local_Version>
<New_Version type="string">R-040600-1-20140911-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">適応病名マスタ</Name>
<Local_Version type="string">R-040200-1-20140701-2</Local_Version>
<New_Version type="string">R-040200-1-20140701-2</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">一般名マスタ</Name>
<Local_Version type="string">R-040200-1-20140902-2</Local_Version>
<New_Version type="string">R-040200-1-20140902-2</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">包括チェックマスタ</Name>
<Local_Version type="string">R-040500-1-20121012-5</Local_Version>
<New_Version type="string">R-040500-1-20121012-5</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">包括診療コードマスタ</Name>
<Local_Version type="string">R-040600-1-20140718-3</Local_Version>
<New_Version type="string">R-040600-1-20140718-3</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">統計メモマスタ</Name>
<Local_Version type="string">R-040700-1-20140625-3</Local_Version>
<New_Version type="string">R-040700-1-20140625-3</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">オプションマスタ</Name>
<Local_Version type="string">R-040700-1-20140307-3</Local_Version>
<New_Version type="string">R-040700-1-20140307-3</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">感染症判定マスタ</Name>
<Local_Version type="string">R-040500-1-20120706-1</Local_Version>
<New_Version type="string">R-040500-1-20120706-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">入院基本料マスタ</Name>
<Local_Version type="string">R-040500-1-20140307-2</Local_Version>
<New_Version type="string">R-040500-1-20140307-2</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">入院料加算チェックマスタ</Name>
<Local_Version type="string">R-040500-1-20140923-1</Local_Version>
<New_Version type="string">R-040500-1-20140923-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">入院レセプト記載略称マスタ</Name>
<Local_Version type="string">R-040500-1-20140728-1</Local_Version>
<New_Version type="string">R-040500-1-20140728-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">同義語マスタ</Name>
<Local_Version type="string">R-040600-1-20101027-1</Local_Version>
<New_Version type="string">R-040600-1-20101027-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">電子点数表マスタ</Name>
<Local_Version type="string">R-040600-1-20140924-6</Local_Version>
<New_Version type="string">R-040600-1-20140924-6</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">労働基準監督署マスタ</Name>
<Local_Version type="string">R-040700-1-20111001-1</Local_Version>
<New_Version type="string">R-040700-1-20111001-1</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">最低薬価マスタ</Name>
<Local_Version type="string">R-040500-1-20140902-3</Local_Version>
<New_Version type="string">R-040500-1-20140902-3</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">介護保険者マスタ</Name>
<Local_Version type="string">R-040700-1-00000000-0</Local_Version>
<New_Version type="string">R-040700-1-00000000-0</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">選定療養費一般コード振替マスタ</Name>
<Local_Version type="string">R-040700-1-20140316-3</Local_Version>
<New_Version type="string">R-040700-1-20140316-3</New_Version>
</Master_Version_Information_child>
<Master_Version_Information_child type="record">
<Name type="string">入院料置換マスタ</Name>
<Local_Version type="string">R-040700-1-20140924-7</Local_Version>
<New_Version type="string">R-040700-1-20140924-7</New_Version>
</Master_Version_Information_child>
</Master_Version_Information>
</Master_Update_Information>
<Program_Update_Information type="array">
<Program_Update_Information_child type="record">
<Date type="string">2014-10-02</Date>
<Comment type="string">提供されている最新の状態でした。</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-09-29</Date>
<State type="string">済</State>
<Comment type="string">第54回 平成26年 9月29日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-09-24</Date>
<State type="string">済</State>
<Comment type="string">第53回 平成26年 9月24日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-09-01</Date>
<State type="string">済</State>
<Comment type="string">第52回 平成26年 9月 1日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-08-27</Date>
<State type="string">済</State>
<Comment type="string">第51回 平成26年 8月27日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-08-01</Date>
<State type="string">済</State>
<Comment type="string">第50回 平成26年 8月 1日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-07-29</Date>
<State type="string">済</State>
<Comment type="string">第49回 平成26年 7月29日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-07-24</Date>
<State type="string">済</State>
<Comment type="string">第48回 平成26年 7月24日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-06-25</Date>
<State type="string">済</State>
<Comment type="string">第47回 平成26年 6月25日</Comment>
</Program_Update_Information_child>
<Program_Update_Information_child type="record">
<Date type="string">2014-06-04</Date>
<State type="string">済</State>
<Comment type="string">第46回 平成26年 6月 4日</Comment>
</Program_Update_Information_child>
</Program_Update_Information>
</private_objects>
</xmlio2>
リクエスト一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Request_Date | リクエスト日 | 2014-10-23 | 必須 |
2 | Request_Time | リクエスト時間 (時:分:秒) | 16:52:00 | 必須 (24時間制で設定) |
レスポンス一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2014-10-23 | |
2 | Information_Time | 実施時間 | 16:59:11 | |
3 | Api_Result | 結果コード(ゼロ以外エラー) | 0000 | |
4 | Api_Result_Message | エラーメッセージ | 処理終了 | |
5 | Jma_Receipt_Version | 日レセバージョン ((M96)マスタ更新管理一覧画面のDB管理情報 ORCAver) | 040700-1 | |
6 | Database_Information | データベース情報 | ||
6-1 | Local_Version | (M96)マスタ更新管理一覧画面のDB更新管理情報 構造Ver(自) | S-040700-1-20140527-2 | |
6-2 | New_Version | (M96)マスタ更新管理一覧画面のDB更新管理情報 構造Ver(ORCA) | S-040700-1-20140527-2 | |
7 | Master_Update_Information | マスタ更新情報 | ||
7-1 | Last_Update_Date | 直近のマスタ更新実施日 | 2014-10-02 | 取得出来ない場合は「0000-00-00」を設定 |
7-2 | Master_Version_Information | マスタ構造情報 (繰り返し 99) | ||
7-2-1 | Name | (M96)マスタ更新管理一覧画面のマスタ更新管理情報 マスタ | 点数マスタ | |
7-2-2 | Local_Version | (M96)マスタ更新管理一覧画面のマスタ更新管理情報 レコードver(自) | R-040700-1-20140930-1 | |
7-2-3 | New_Version | (M96)マスタ更新管理一覧画面のマスタ更新管理情報 レコードver(ORCA) | R-040700-1-20140930-1 | |
8 | Program_Update_Information | プログラム更新情報 (繰り返し 10) | ※1 | |
8-1 | Date | (M97)プログラム更新管理一覧 提供日 | 2014-10-02 | |
8-2 | State | (M97)プログラム更新管理一覧 処理状態 | 済 | |
8-3 | Comment | (M97)プログラム更新管理一覧 内容 | 提供されている最新の状態でした。 |
※1:(M97)プログラム更新管理一覧 コラムリストより最大10件返却します。
Rubyによるリクエストサンプルソース
Rubyのバージョンが1.9.2以前の環境の場合、HTTPのバージョン指定を1.1に変更する必要があります。
Rubyのバージョンを確認後、以下のように該当箇所を変更して下さい。
- Ruby1.9.2以降の場合
Net::HTTP.version_1_2
- Ruby1.9.2以前の場合
Net::HTTP.version_1_1
Rubyのバージョンが1.9.1以降の環境(日レセ4.8以降の環境)ではソースファイル内の文字コードの指定が必要になります。
サンプルソース内に以下の一行が記述されていることを確認して下さい。
# -*- coding: utf-8 -*-
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
#------ システム情報取得
require 'uri'
require 'net/http'
Net::HTTP.version_1_2
HOST = "localhost"
PORT = "8000"
USER = "ormaster"
PASSWD = "ormaster"
CONTENT_TYPE = "application/xml"
req = Net::HTTP::Post.new("/api01rv2/systeminfv2")
BODY = <<EOF
<data>
<private_objects type="record">
<Request_Date type="string">2014-10-20</Request_Date>
<Request_Time type="string">17:43:00</Request_Time>
</private_objects>
</data>
EOF
req.content_length = BODY.size
req.content_type = CONTENT_TYPE
req.body = BODY
req.basic_auth(USER, PASSWD)
puts req.body
Net::HTTP.start(HOST, PORT) {|http|
res = http.request(req)
puts res.body
}
エラーメッセージ一覧
エラーコード | エラーメッセージ |
---|---|
0001 | リクエスト日付の設定に誤りがあります |
0002 | リクエスト時間の設定に誤りがあります |
0003 | DB管理情報が取得できません |
0004 | マスタ更新情報が取得できません |
0005 | リクエスト時間が受付時間より進んでいます |
0006 | リクエスト時間と受付時間に30分以上のずれがあります |
0089 | 職員情報が取得できません |
医療機関情報が取得できません | |
システム日付が取得できません | |
患者番号構成情報が取得できません | |
グループ医療機関が不整合です。処理を終了して下さい | |
システム項目が設定できません | |
0097 | 送信内容に誤りがあります |
0098 | 送信内容の読込ができませんでした |
0099 | ユーザIDが未登録です |
その他 | 返却情報の編集でエラーが発生しました |