室料差額登録
メニュー
更新履歴
2018-03-26 「レスポンス一覧」の項目を修正。
概要
POSTメソッドにより入院患者の室料差額登録を行います。
リクエストの診療日以降の室料差額の登録を行います。リクエストに終了日の設定がある場合、診療日〜終了日の期間の室料差額の登録を行います。
日レセ Ver.5.0.0[第17回パッチ適用] 以降
リクエストおよびレスポンスデータはxml2形式になります。
入院会計が作成されていない診療日のリクエストが送信された場合、入院会計を作成後登録を行います。
※ リクエストの診療日がシステム日付の属する診療年月からその3ヶ月後の診療年月の間に含まれる場合に限ります。
例) 入院日 :平成29年8月20日
作成済み入院会計 :平成29年8月〜平成29年10月
システム日付 :平成29年11月1日
登録可能期間 平成29年8月20日〜平成30年2月28日
(11月から2月はリクエスト時に診療日の属する診療年月の入院会計を作成)
※ 外泊、食事が未設定の入院会計を作成します。
※ 前月以前の入院会計が未作成の場合、入院会計作成APIより入院会計の作成を行ってください。
※ 入院会計の作成状況は入院会計未作成チェックAPIより確認が可能です。
テスト方法
- 参考提供されている sample_hsacctmodv2_sagaku.rb 内の変数HOST等を接続環境に合わせます。
- sample_hsacctmodv2_sagaku.rb 内の患者番号等を接続先の日レセの環境に合わせます。
- ruby sample_hsacctmodv2_sagaku.rb により接続します。
リクエスト(POSTリクエスト)サンプル
POST : /orca31/hsacctmodv2
Request_Number:
3: 室料差額登録
Content-Type: application/xml
application/xml の場合の文字コードは UTF-8 とします。
<data>
<private_objects type ="record">
<Save_Request type ="string">1</Save_Request>
<Request_Number type ="string">3</Request_Number>
<Patient_ID type ="string">1</Patient_ID>
<Admission_Date type ="string">2017-11-25</Admission_Date>
<Perform_Date type ="string">2017-11-25</Perform_Date>
<Room_Charge type ="string">6100</Room_Charge>
</private_objects>
</data>
処理概要
該当入院患者の室料差額の登録を行います。
レスポンスサンプル
<?xml version="1.0" encoding="UTF-8"?>
<xmlio2>
<private_objects type="record">
<Information_Date type="string">2017-12-01</Information_Date>
<Information_Time type="string">08:55:00</Information_Time>
<Api_Results type="array">
<Api_Results_child type="record">
<Api_Result type="string">00</Api_Result>
</Api_Results_child>
</Api_Results>
<Request_Number type="record">
<Label type="string">リクエスト番号</Label>
<Data type="string">3</Data>
<Name type="string">室料差額</Name>
</Request_Number>
<Patient_Information type="record">
<Patient_ID type="string">00001</Patient_ID>
<WholeName type="string">日医 太郎</WholeName>
<WholeName_inKana type="string">ニチイ タロウ</WholeName_inKana>
<BirthDate type="string">1958-01-10</BirthDate>
<Sex type="string">1</Sex>
</Patient_Information>
<Admission_Discharge_Date type="array">
<Admission_Discharge_Date_child type="record">
<Admission_Date type="string">2017-11-25</Admission_Date>
<Discharge_Date type="string">9999-12-31</Discharge_Date>
</Admission_Discharge_Date_child>
</Admission_Discharge_Date>
<Perform_Month type="string">2017-11</Perform_Month>
<Monthly_Information type="array">
<Monthly_Information_child type="record">
<Perform_Date type="string">2017-11-25</Perform_Date>
<Department_Code type="record">
<Label type="string">診療科</Label>
<Data type="string">01</Data>
<Name type="string">内科</Name>
</Department_Code>
<Ward_Number type="record">
<Label type="string">病棟番号</Label>
<Data type="string">01</Data>
</Ward_Number>
<Ward_Name type="record">
<Label type="string">病棟名</Label>
<Data type="string">2階病棟</Data>
</Ward_Name>
<Room_Number type="record">
<Label type="string">病室番号</Label>
<Data type="string">101</Data>
</Room_Number>
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<Patient_Status type="record">
<Label type="string">外泊・他医療機関受診情報等</Label>
<Data type="string">00</Data>
<Name type="string">入院中</Name>
</Patient_Status>
<Morning_Meal type="record">
<Label type="string">朝食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Morning_Meal>
<Lunch_Meal type="record">
<Label type="string">昼食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Lunch_Meal>
<Evening_Meal type="record">
<Label type="string">夕食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Evening_Meal>
<Room_Charge type="record">
<Label type="string">室料差額</Label>
<Data type="string"> 6100</Data>
<Name type="string">円</Name>
</Room_Charge>
</Monthly_Information_child>
<Monthly_Information_child type="record">
<Perform_Date type="string">2017-11-26</Perform_Date>
<Department_Code type="record">
<Label type="string">診療科</Label>
<Data type="string">01</Data>
<Name type="string">内科</Name>
</Department_Code>
<Ward_Number type="record">
<Label type="string">病棟番号</Label>
<Data type="string">01</Data>
</Ward_Number>
<Ward_Name type="record">
<Label type="string">病棟名</Label>
<Data type="string">2階病棟</Data>
</Ward_Name>
<Room_Number type="record">
<Label type="string">病室番号</Label>
<Data type="string">101</Data>
</Room_Number>
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<Patient_Status type="record">
<Label type="string">外泊・他医療機関受診情報等</Label>
<Data type="string">00</Data>
<Name type="string">入院中</Name>
</Patient_Status>
<Morning_Meal type="record">
<Label type="string">朝食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Morning_Meal>
<Lunch_Meal type="record">
<Label type="string">昼食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Lunch_Meal>
<Evening_Meal type="record">
<Label type="string">夕食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Evening_Meal>
<Room_Charge type="record">
<Label type="string">室料差額</Label>
<Data type="string"> 6100</Data>
<Name type="string">円</Name>
</Room_Charge>
</Monthly_Information_child>
<Monthly_Information_child type="record">
<Perform_Date type="string">2017-11-27</Perform_Date>
<Department_Code type="record">
<Label type="string">診療科</Label>
<Data type="string">01</Data>
<Name type="string">内科</Name>
</Department_Code>
<Ward_Number type="record">
<Label type="string">病棟番号</Label>
<Data type="string">01</Data>
</Ward_Number>
<Ward_Name type="record">
<Label type="string">病棟名</Label>
<Data type="string">2階病棟</Data>
</Ward_Name>
<Room_Number type="record">
<Label type="string">病室番号</Label>
<Data type="string">101</Data>
</Room_Number>
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<Patient_Status type="record">
<Label type="string">外泊・他医療機関受診情報等</Label>
<Data type="string">00</Data>
<Name type="string">入院中</Name>
</Patient_Status>
<Morning_Meal type="record">
<Label type="string">朝食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Morning_Meal>
<Lunch_Meal type="record">
<Label type="string">昼食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Lunch_Meal>
<Evening_Meal type="record">
<Label type="string">夕食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Evening_Meal>
<Room_Charge type="record">
<Label type="string">室料差額</Label>
<Data type="string"> 6100</Data>
<Name type="string">円</Name>
</Room_Charge>
</Monthly_Information_child>
<Monthly_Information_child type="record">
<Perform_Date type="string">2017-11-28</Perform_Date>
<Department_Code type="record">
<Label type="string">診療科</Label>
<Data type="string">01</Data>
<Name type="string">内科</Name>
</Department_Code>
<Ward_Number type="record">
<Label type="string">病棟番号</Label>
<Data type="string">01</Data>
</Ward_Number>
<Ward_Name type="record">
<Label type="string">病棟名</Label>
<Data type="string">2階病棟</Data>
</Ward_Name>
<Room_Number type="record">
<Label type="string">病室番号</Label>
<Data type="string">101</Data>
</Room_Number>
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<Patient_Status type="record">
<Label type="string">外泊・他医療機関受診情報等</Label>
<Data type="string">00</Data>
<Name type="string">入院中</Name>
</Patient_Status>
<Morning_Meal type="record">
<Label type="string">朝食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Morning_Meal>
<Lunch_Meal type="record">
<Label type="string">昼食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Lunch_Meal>
<Evening_Meal type="record">
<Label type="string">夕食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Evening_Meal>
<Room_Charge type="record">
<Label type="string">室料差額</Label>
<Data type="string"> 6100</Data>
<Name type="string">円</Name>
</Room_Charge>
</Monthly_Information_child>
<Monthly_Information_child type="record">
<Perform_Date type="string">2017-11-29</Perform_Date>
<Department_Code type="record">
<Label type="string">診療科</Label>
<Data type="string">01</Data>
<Name type="string">内科</Name>
</Department_Code>
<Ward_Number type="record">
<Label type="string">病棟番号</Label>
<Data type="string">01</Data>
</Ward_Number>
<Ward_Name type="record">
<Label type="string">病棟名</Label>
<Data type="string">2階病棟</Data>
</Ward_Name>
<Room_Number type="record">
<Label type="string">病室番号</Label>
<Data type="string">101</Data>
</Room_Number>
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<Patient_Status type="record">
<Label type="string">外泊・他医療機関受診情報等</Label>
<Data type="string">00</Data>
<Name type="string">入院中</Name>
</Patient_Status>
<Morning_Meal type="record">
<Label type="string">朝食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Morning_Meal>
<Lunch_Meal type="record">
<Label type="string">昼食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Lunch_Meal>
<Evening_Meal type="record">
<Label type="string">夕食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Evening_Meal>
<Room_Charge type="record">
<Label type="string">室料差額</Label>
<Data type="string"> 6100</Data>
<Name type="string">円</Name>
</Room_Charge>
</Monthly_Information_child>
<Monthly_Information_child type="record">
<Perform_Date type="string">2017-11-30</Perform_Date>
<Department_Code type="record">
<Label type="string">診療科</Label>
<Data type="string">01</Data>
<Name type="string">内科</Name>
</Department_Code>
<Ward_Number type="record">
<Label type="string">病棟番号</Label>
<Data type="string">01</Data>
</Ward_Number>
<Ward_Name type="record">
<Label type="string">病棟名</Label>
<Data type="string">2階病棟</Data>
</Ward_Name>
<Room_Number type="record">
<Label type="string">病室番号</Label>
<Data type="string">101</Data>
</Room_Number>
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<Patient_Status type="record">
<Label type="string">外泊・他医療機関受診情報等</Label>
<Data type="string">00</Data>
<Name type="string">入院中</Name>
</Patient_Status>
<Morning_Meal type="record">
<Label type="string">朝食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Morning_Meal>
<Lunch_Meal type="record">
<Label type="string">昼食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Lunch_Meal>
<Evening_Meal type="record">
<Label type="string">夕食</Label>
<Data type="string">01</Data>
<Name type="string">食事あり</Name>
</Evening_Meal>
<Room_Charge type="record">
<Label type="string">室料差額</Label>
<Data type="string"> 6100</Data>
<Name type="string">円</Name>
</Room_Charge>
</Monthly_Information_child>
</Monthly_Information>
<Insurance_Information type="array">
<Insurance_Information_child type="record">
<Insurance_Combination_Number type="string">0001</Insurance_Combination_Number>
<InsuranceProvider_Class type="string">009</InsuranceProvider_Class>
<InsuranceProvider_Number type="string">01130012</InsuranceProvider_Number>
<InsuranceProvider_WholeName type="string">協会</InsuranceProvider_WholeName>
<HealthInsuredPerson_Symbol type="string">99010101</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">990001</HealthInsuredPerson_Number>
</Insurance_Information_child>
</Insurance_Information>
</private_objects>
</xmlio2>
リクエスト一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Save_Request | リクエスト保持区分 (日レセにリクエストの情報を保持するか否かを指定) 0:残さない 1:残す | 1 | 未設定時初期値[0] |
2 | Request_Number | リクエスト番号 | 3 | 必須(3) |
3 | Patient_ID | 患者番号 | 00001 | 必須 |
4 | Admission_Date | 入院日 | 2017-11-01 | 必須 |
5 | Perform_Date | 診療日 | 2017-11-15 | 未設定時はシステム日付 |
6 | End_Date | 終了日 | 2017-11-20 | ※1 |
7 | Room_Charge | 室料差額 | 1100 | 必須 ※2 |
※1 設定がない場合、診療日以降の入院期間の室料差額を登録し、次月以降の入院会計も室料差額の設定を引き継ぎます。
(情報引継ぎのため、入院履歴情報の室料差額の更新を行います。)
設定がある場合、診療日から終了日までの室料差額を登録します。
※2 システム管理[5005 室料差額設定]に設定のある室料差額を設定します。
登録済みの室料差額を取り消す場合、""0""を設定してください。
レスポンス一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2017-12-01 | |
2 | Information_Time | 実施時間 | 10:00:00 | |
3 | Api_Results | 結果情報(繰り返し 10) | ||
3-1 | Api_Result | 結果コード(ゼロ以外エラー) | 00 | |
3-2 | Api_Result_Message | エラーメッセージ | ||
4 | Request_Number | リクエスト番号 | ||
4-1 | Label | 内容の名称を返却 | リクエスト番号 | |
4-2 | Data | リクエスト番号を返却 | 3 | |
4-3 | Name | リクエスト番号の名称を返却 | 室料差額 | |
5 | Patient_Information | 患者情報 | ||
5-1 | Patient_ID | 患者番号 | 00001 | |
5-2 | WholeName | 漢字氏名 | 日医 一郎 | |
5-3 | WholeName_inKana | カナ氏名 | ニチイ イチロウ | |
5-4 | BirthDate | 生年月日 | 1990-01-01 | |
5-5 | Sex | 性別(1:男性、2:女性) | 1 | |
6 | Admission_Discharge_Date | 診療年月にかかる入退院日情報(繰り返し 最大5) | ||
6-1 | Admission_Date | 入院日 | 2017-12-01 | |
6-2 | Discharge_Date | 退院日 | 9999-12-31 | |
7 | Perform_Month | 診療年月 | 2017-12 | |
8 | Monthly_Information | カレンダー情報(繰り返し 最大31) | ||
8-1 | Perform_Date | 診療日 | 2017-12-01 | |
8-2 | Department_Code | 診療科 | ||
8-2-1 | Label | 内容の名称を返却 | 診療科 | |
8-2-2 | Data | 診療科コードを返却 | 01 | |
8-2-3 | Name | 診療科の名称を返却 | 内科 | |
8-3 | Ward_Number | 病棟番号 | ||
8-3-1 | Label | 内容の名称を返却 | 病棟番号 | |
8-3-2 | Data | 病棟番号を返却 | 01 | |
8-4 | Ward_Name | 病棟名 | ||
8-4-1 | Label | 内容の名称を返却 | 病棟名 | |
8-4-2 | Data | 病棟名を返却 | 一般病棟 | |
8-5 | Room_Number | 病室番号 | ||
8-5-1 | Label | 内容の名称を返却 | 病室番号 | |
8-5-2 | Data | 病室番号を返却 | 101 | |
8-6 | Insurance_Combination_Number | 保険組合せ | 0002 | |
8-7 | Patient_Status | 外泊・他医療機関受診情報等 | ||
8-7-1 | Label | 内容の名称を返却 | 外泊・他医療機関受診情報等 | |
8-7-2 | Data | コード | 00 | |
8-7-3 | Name | 名称 (コード:名称) (Data:Name) 診療年月が平成30年4月以降の場合 00:入院中 01:外泊 02:治療の為の外泊 03:選定入院中の外泊 04:他医療機関受診40%減算 05:他医療機関受診10%減算 06:他医療機関受診20%減算 08:特定時間退院減算 09:特定曜日入退院減算 13:特定曜日入退院減算+他医療機関受診10%減算 14:他医療機関受診5%減算 15:他医療機関受診35%減算 16:他医療機関受診15%減算 17:特定曜日入退院減算+他医療機関受診5%減算 診療年月が平成30年3月以前の場合 00:入院中 01:外泊 02:治療の為の外泊 03:選定入院中の外泊 04:他医療機関受診40%減算 05:他医療機関受診10%減算 06:他医療機関受診20%減算 08:特定時間退院減算 09:特定曜日入退院減算 13:特定曜日入退院減算+他医療機関受診10%減算 | 入院中 | 変更(2018-03-26) |
8-8 | Morning_Meal | 朝食 | ||
8-8-1 | Label | 内容の名称を返却 | 朝食 | |
8-8-2 | Data | Data:Name 00:食事なし 01:食事あり 02:食事あり(特別食) | 01 | |
8-8-3 | Name | 食事あり | ||
8-9 | Lunch_Meal | 昼食 | ||
8-9-1 | Label | 内容の名称を返却 | 昼食 | |
8-9-2 | Data | Data:Name 00:食事なし 01:食事あり 02:食事あり(特別食) | 01 | |
8-9-3 | Name | 食事あり | ||
8-10 | Evening_Meal | 夕食 | ||
8-10-1 | Label | 内容の名称を返却 | 夕食 | |
8-10-2 | Data | Data:Name 00:食事なし 01:食事あり 02:食事あり(特別食) | 02 | |
8-10-3 | Name | 食事あり(特別食) | ||
8-11 | Room_Charge | 室料差額 | ||
8-11-1 | Label | 内容の名称を返却 | 室料差額 | |
8-11-2 | Data | 室料差額を返却 | 3000 | |
8-11-3 | Name | “円”を返却 | 円 | |
9 | Insurance_Information | 保険組合せ詳細(繰り返し 最大10) | ||
9-1 | Insurance_Combination_Number | 保険組合せ | 00002 | |
9-2 | InsuranceProvider_Class | 保険の種類 | 060 | |
9-3 | InsuranceProvider_Number | 保険者番号 | 138057 | |
9-4 | InsuranceProvider_WholeName | 保険の制度名称 | 国保 | |
9-5 | HealthInsuredPerson_Symbol | 記号 | 01 | |
9-6 | HealthInsuredPerson_Number | 番号 | 1234567 | |
9-7 | PublicInsurance_Information | 公費情報(繰り返し 最大4) | ||
9-7-1 | PublicInsurance_Class | 公費の種類 | 019 | |
9-7-2 | PublicInsurance_Name | 公費の制度名称 | 原爆一般 | |
9-7-3 | PublicInsurer_Number | 負担者番号 | 119113760 | |
9-7-4 | PublicInsuredPerson_Number | 受給者番号 | 1234567 |
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("/orca31/hsacctmodv2")
#
#
BODY = <<EOF
<data>
<private_objects type ="record">
<Save_Request type ="string">1</Save_Request>
<Request_Number type ="string">3</Request_Number>
<Patient_ID type ="string">1</Patient_ID>
<Admission_Date type ="string">2017-11-25</Admission_Date>
<Room_Charge type ="string">6100</Room_Charge>
</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
}
エラーメッセージ一覧
入院登録(https://www.orca.med.or.jp/receipt/tec/api/hospentry.html#errmsg)を参照。