API 収納情報返却
メニュー
更新履歴
2024-11-26 「レスポンス一覧」に項目を追加。
2021-01-27 「レスポンス一覧」に項目を追加。
2017-05-25 「レスポンス一覧」に項目を追加。
2014-07-03 「エラーメッセージ一覧」を追加。
概要
POSTメソッドによる収納情報の返却を行います。
日レセ Ver4.7.0[第23回パッチ適用]以降
リクエストおよびレスポンスデータはxml2形式になります。
テスト方法
- 参考提供されている sample_incomeinf_v2.rb 内の変数HOST等を接続環境に合わせます。
- sample_incomeinf_v2.rb 内の患者番号、診療年月日を接続先の日レセの環境に合わせます。
- ruby sample_incomeinf_v2.rb により接続。
リクエスト(POSTリクエスト)サンプル
POST : /api01rv2/incomeinfv2
Content-Type: application/xml
application/xml の場合の文字コードは UTF-8 とします。
<data>
<private_objects type="record">
<Patient_ID type="string">12</Patient_ID>
<Perform_Month type="string">2013-10</Perform_Month>
</private_objects>
</data>
処理概要
リクエストにより該当患者の収納情報の返却を行います。
処理詳細
- 基準日(月または年)の妥当性チェック
- 患者番号の存在チェック
レスポンスサンプル
<xmlio2>
<private_objects type="record">
<Information_Date type="string">2013-12-11</Information_Date>
<Information_Time type="string">12:21:52</Information_Time>
<Api_Result type="string">0000</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Patient_Information type="record">
<Patient_ID type="string">00012</Patient_ID>
<WholeName type="string">日医 太郎</WholeName>
<WholeName_inKana type="string">ニチイ タロウ</WholeName_inKana>
<BirthDate type="string">1975-01-01</BirthDate>
<Sex type="string">1</Sex>
</Patient_Information>
<Income_Information_Overflow type="string">false</Income_Information_Overflow>
<Income_Information type="array">
<Income_Information_child type="record">
<Perform_Date type="string">2013-10-01</Perform_Date>
<InOut type="string">2</InOut>
<Invoice_Number type="string">0000053</Invoice_Number>
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<Rate_Cd type="string"> 0</Rate_Cd>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">内科</Department_Name>
<Cd_Information type="record">
<Ac_Money type="string"> 0</Ac_Money>
<Ic_Money type="string"> 0</Ic_Money>
<Ai_Money type="string"> 0</Ai_Money>
<Oe_Money type="string"> 0</Oe_Money>
</Cd_Information>
<Ac_Point_Information type="record">
<Ac_Ttl_Point type="string"> 1800</Ac_Ttl_Point>
<Ac_Point_Detail type="array">
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">A00</AC_Point_Code>
<AC_Point_Name type="string">初・再診料</AC_Point_Name>
<AC_Point type="string"> 69</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">B00</AC_Point_Code>
<AC_Point_Name type="string">医学管理等</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">C00</AC_Point_Code>
<AC_Point_Name type="string">在宅療養</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">F00</AC_Point_Code>
<AC_Point_Name type="string">投薬</AC_Point_Name>
<AC_Point type="string"> 68</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">G00</AC_Point_Code>
<AC_Point_Name type="string">注射</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">J00</AC_Point_Code>
<AC_Point_Name type="string">処置</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">K00</AC_Point_Code>
<AC_Point_Name type="string">手術</AC_Point_Name>
<AC_Point type="string"> 1663</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">L00</AC_Point_Code>
<AC_Point_Name type="string">麻酔</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">D00</AC_Point_Code>
<AC_Point_Name type="string">検査</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">E00</AC_Point_Code>
<AC_Point_Name type="string">画像診断</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">H00</AC_Point_Code>
<AC_Point_Name type="string">リハビリ</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">I00</AC_Point_Code>
<AC_Point_Name type="string">精神科専門</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">M00</AC_Point_Code>
<AC_Point_Name type="string">放射線治療</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">N00</AC_Point_Code>
<AC_Point_Name type="string">病理診断</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">A10</AC_Point_Code>
<AC_Point_Name type="string">入院料</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
</Ac_Point_Detail>
</Ac_Point_Information>
</Income_Information_child>
<Income_Information_child type="record">
<Perform_Date type="string">2013-10-08</Perform_Date>
<Perform_End_Date type="string">2013-10-09</Perform_End_Date>
<InOut type="string">1</InOut>
<Invoice_Number type="string">0000001</Invoice_Number>
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<Rate_Cd type="string"> 0</Rate_Cd>
<Department_Code type="string">10</Department_Code>
<Department_Name type="string">外科</Department_Name>
<Cd_Information type="record">
<Ac_Money type="string"> 2000</Ac_Money>
<Ic_Money type="string"> 2000</Ic_Money>
<Ai_Money type="string"> 0</Ai_Money>
<Oe_Money type="string"> 2000</Oe_Money>
<Ml_Smoney type="string"> 0</Ml_Smoney>
</Cd_Information>
<Ac_Point_Information type="record">
<Ac_Ttl_Point type="string"> 4032</Ac_Ttl_Point>
<Ac_Point_Detail type="array">
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">A00</AC_Point_Code>
<AC_Point_Name type="string">初・再診料</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">B00</AC_Point_Code>
<AC_Point_Name type="string">医学管理等</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">C00</AC_Point_Code>
<AC_Point_Name type="string">在宅療養</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">F00</AC_Point_Code>
<AC_Point_Name type="string">投薬</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">G00</AC_Point_Code>
<AC_Point_Name type="string">注射</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">J00</AC_Point_Code>
<AC_Point_Name type="string">処置</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">K00</AC_Point_Code>
<AC_Point_Name type="string">手術</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">L00</AC_Point_Code>
<AC_Point_Name type="string">麻酔</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">D00</AC_Point_Code>
<AC_Point_Name type="string">検査</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">E00</AC_Point_Code>
<AC_Point_Name type="string">画像診断</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">H00</AC_Point_Code>
<AC_Point_Name type="string">リハビリ</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">I00</AC_Point_Code>
<AC_Point_Name type="string">精神科専門</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">M00</AC_Point_Code>
<AC_Point_Name type="string">放射線治療</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">N00</AC_Point_Code>
<AC_Point_Name type="string">病理診断</AC_Point_Name>
<AC_Point type="string"> 0</AC_Point>
</Ac_Point_Detail_child>
<Ac_Point_Detail_child type="record">
<AC_Point_Code type="string">A10</AC_Point_Code>
<AC_Point_Name type="string">入院料</AC_Point_Name>
<AC_Point type="string"> 4032</AC_Point>
</Ac_Point_Detail_child>
</Ac_Point_Detail>
</Ac_Point_Information>
<Ml_Cost type="string"> 0</Ml_Cost>
</Income_Information_child>
</Income_Information>
<Insurance_Information type="array">
<Insurance_Information_child type="record">
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<InsuranceProvider_Class type="string">060</InsuranceProvider_Class>
<InsuranceProvider_Number type="string">138057</InsuranceProvider_Number>
<InsuranceProvider_WholeName type="string">国保</InsuranceProvider_WholeName>
<HealthInsuredPerson_Symbol type="string">123</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">456</HealthInsuredPerson_Number>
<PublicInsurance_Information type="array">
<PublicInsurance_Information_child type="record">
<PublicInsurance_Class type="string">019</PublicInsurance_Class>
<PublicInsurance_Name type="string">原爆一般</PublicInsurance_Name>
<PublicInsurer_Number type="string">19113760</PublicInsurer_Number>
<PublicInsuredPerson_Number type="string">1234567</PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</Insurance_Information_child>
</Insurance_Information>
</private_objects>
</xmlio2>
リクエスト一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Patient_ID | 患者番号 | 12 | 必須 |
2 | Perform_Date | 診療日 | 2013-10-10 | 省略時はシステム日付 ※1 |
3 | Perform_Month | 診療月 | 2013-10 | ※1 |
4 | Perform_Year | 診療年 | 2013 | ※1 |
※1: 診療日、診療月、診療年のいずれかを指定。複数指定があった場合は診療日、診療月、診療年の順で指定があったものとみなします。
いずれも未指定の場合は診療日(システム日付)が設定されます。
レスポンス一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2013-12-11 | |
2 | Information_Time | 実施時間 | 12:21:52 | |
3 | Api_Result | 結果コード | 0000 | |
4 | Api_Result_Message | 結果メッセージ | 処理終了 | |
5 | Patient_Information | 患者情報 | ||
5-1 | Patient_ID | 患者番号 | 00012 | |
5-2 | WholeName | 患者氏名 | 日医 太郎 | |
5-3 | WholeName_inKana | 患者カナ氏名 | ニチイ タロウ | |
5-4 | BirthDate | 生年月日 | 1970-01-01 | |
5-5 | Sex | 性別 (1:男性、2:女性) | 1 | |
6 | Income_Information_Overflow | 請求情報オーバーフラグ | false | |
7 | Income_Information | 請求情報(繰り返し 200) (並び順は診療日の古い順) | ||
7-1 | Perform_Date | 外来:診療日/入院:請求開始日 | 2013-10-01 | |
7-2 | Perform_End_Date | 請求終了日(入院のみ。外来は非表示) | ||
7-3 | IssuedDate | 伝票発行日 | 2013-12-15 | 追加 (2017-05-25) |
7-4 | InOut | 入外区分 (1:入院、2:入院外) | 1 | |
7-5 | Invoice_Number | 伝票番号 | 0000053 | |
7-6 | Group_Invoice_Number | まとめ伝票番号 複数保険(診療科)入力時、それぞれの伝票番号を紐付ける伝 票番号 | 0000053 | 追加(2024-11-26) |
7-7 | Insurance_Combination_Number | 保険組合せ番号 | 0002 | |
7-8 | Rate_Cd | 負担割合(%) | 0 | |
7-9 | Department_Code | 診療科コード | 01 | |
7-10 | Department_Name | 診療科名称 | 内科 | |
7-11 | Cd_Information | 負担額情報 | ||
7-11-1 | Ac_Money | 請求金額 | 0 | |
7-11-2 | Tax_In_Ac_Money | 請求金額消費税再掲(ゼロは非表示) | 960 | 追加 (2017-05-25) |
7-11-3 | Ic_Money | 入金額 | 0 | |
7-11-4 | Ai_Money | 保険適用金額 負担金額(円)の保険分 | 0 | |
7-11-5 | Oe_Money | 自費金額 | 0 | |
7-11-6 | Dg_Smoney | 薬剤一部負担金(ゼロは非表示) | ||
7-11-7 | Om_Smoney | 老人一部負担金(ゼロは非表示) | ||
7-11-8 | Pi_Smoney | 公費一部負担金(ゼロは非表示) | ||
7-11-9 | Ml_Smoney | 食事・生活療養負担金(外来またはゼロは非表示) (食事療養負担金+生活療養負担金) | ||
7-11-10 | Meal_Smoney | 食事療養負担金(外来またはゼロは非表示) | 5460 | 追加 (2017-05-25) |
7-11-11 | Living_Smoney | 生活療養負担金(外来またはゼロは非表示) | 追加 (2017-05-25) | |
7-11-12 | Lsi_Total_Money_In_Ai_Money | 保険適用金額内労災診察等合計金額(ゼロは非表示。患者が負担する場合編集) 労災自賠責保険適用分(円)の集計値 (初診+再診+指導+その他) | 追加 (2017-05-25) | |
7-11-13 | Lsi_Total_Money | 労災合計金額(患者負担の有無にかかわらず、集計値を編集) 労災自賠責保険適用分(円)の集計値 (初診 + 再診 + 指導 + その他) (ゼロは非表示) | ||
7-11-14 | Dis_Money | 減免金額(ゼロは非表示) | ||
7-11-15 | Ad_Money1 | 調整金1(ゼロは非表示) | ||
7-11-16 | Ad_Money2 | 調整金2(ゼロは非表示) | ||
7-12 | Ac_Point_Information | 請求点数 | ||
7-12-1 | Ac_Ttl_Point | 合計点数 | 1800 | |
7-12-2 | Me_Ttl_Money | 保険適用外合計金額(ゼロは非表示) 負担金額(円)の自費分 | 1080 | 追加 (2017-05-25) |
7-12-3 | Tax_In_Me_Ttl_Money | 保険適用外合計金額消費税再掲(ゼロは非表示) | 80 | 追加 (2017-05-25) |
7-12-4 | Ac_Point_Detail | 点数詳細 (繰り返し 16) | ||
7-12-4-1 | AC_Point_Code | 識別コード (識別コード:名称、 A00:初・再診料、 B00:医学管理等、 C00:在宅療養、 F00:投薬、 G00:注射、 J00:処置、 K00:手術、 L00:麻酔、 D00:検査、 E00:画像診断、 H00:リハビリ、 I00:精神科専門、 M00:放射線治療、 N00:病理診断、 A10:入院料、 001:療養担当手当) | A00 | ※1 |
7-12-4-2 | AC_Point_Name | 名称 | 初・再診料 | |
7-12-4-3 | AC_Point | 点数 | 69 | ※1 |
7-12-4-4 | Me_Money | 保険適用外金額(ゼロは非表示) | 1080 | 追加 (2017-05-25) |
7-13 | Oe_Etc_Information | その他自費情報 | 追加 (2017-05-25) | |
7-13-1 | Oe_Etc_Ttl_Money_Non_Taxable | その他自費(非課税分)合計金額(ゼロは非表示) | 1000 | 追加 (2017-05-25) |
7-13-2 | Oe_Etc_Ttl_Money_Taxable | その他自費(課税分)合計金額(ゼロは非表示) | 1080 | 追加 (2017-05-25) |
7-13-3 | Tax_In_Oe_Etc_Ttl_Money_Taxable | その他自費(課税分)合計金額消費税再掲(ゼロは非表示) | 80 | 追加 (2017-05-25) |
7-13-4 | Oe_Etc_Detail | その他自費詳細(繰り返し 10) | 追加 (2017-05-25) | |
7-13-4-1 | Oe_Etc_Number | 番号 | 1 | 追加 (2017-05-25) |
7-13-4-2 | Oe_Etc_Name | 項目名 | 文書料 | 追加 (2017-05-25) |
7-13-4-3 | Oe_Etc_Money_Non_Taxable | 非課税金額(ゼロは非表示) | 1000 | 追加 (2017-05-25) |
7-13-4-4 | Oe_Etc_Money_Taxable | 課税金額(ゼロは非表示) | 1080 | 追加 (2017-05-25) |
7-14 | Lsi_Information | 労災自賠責保険適用分(円) | 追加 (2017-05-25) | |
7-14-1 | Lsi_Fv_Money | 初診(ゼロは非表示) | 追加 (2017-05-25) | |
7-14-2 | Lsi_Sv_Money | 再診(ゼロは非表示) | 追加 (2017-05-25) | |
7-14-3 | Lsi_Mm_Money | 指導(ゼロは非表示) | 追加 (2017-05-25) | |
7-14-4 | Lsi_Other_Money | その他(ゼロは非表示) | 追加 (2017-05-25) | |
7-15 | Ml_Cost | 食事・生活療養費(外来は非表示) (食事療養費+生活療養費+食事療養費(自費)+生活療養費(自費)) | ||
7-16 | Meal_Cost | 食事療養費(外来またはゼロは非表示) | 19200 | 追加 (2017-05-25) |
7-17 | Living_Cost | 生活療養費(外来またはゼロは非表示) | 追加 (2017-05-25) | |
7-18 | Oe_Meal_Cost | 食事療養費(自費)(外来またはゼロは非表示) | ※2 追加 (2017-05-25) | |
7-19 | Oe_Meal_Smoney | 生活療養費(自費)(外来またはゼロは非表示) | ※2 追加 (2017-05-25) | |
7-20 | Oe_Living_Cost | 食事療養負担金(自費)(外来またはゼロは非表示) | ※2 追加 (2017-05-25) | |
7-21 | Oe_Living_Smoney | 生活療養負担金(自費)(外来またはゼロは非表示) | ※2 追加 (2017-05-25) | |
7-22 | Room_Charge | 室料差額(外来またはゼロは非表示) | 10800 | 追加 (2017-05-25) |
7-23 | Tax_In_Room_Charge | 室料差額消費税再掲(外来またはゼロは非表示) | 800 | 追加 (2017-05-25) |
8 | Insurance_Information | 保険組合せ詳細(繰り返し 20) | ||
8-1 | Insurance_Combination_Number | 保険組合せ番号 | 0002 | |
8-2 | InsuranceProvider_Class | 保険の種類 | 060 | |
8-3 | InsuranceProvider_Number | 保険者番号 | 138057 | |
8-4 | InsuranceProvider_WholeName | 保険の制度名称 | 国保 | |
8-5 | HealthInsuredPerson_Symbol | 記号 | 123 | |
8-6 | HealthInsuredPerson_Number | 番号 | 456 | |
8-7 | HealthInsuredPerson_Branch_Number | 枝番 | 00 | 追加 (2021-01-27) |
8-8 | PublicInsurance_Information | 公費情報(繰り返し 4) | ||
8-8-1 | PublicInsurance_Class | 公費の種類 | 019 | |
8-8-2 | PublicInsurance_Name | 公費の制度名称 | 原爆一般 | |
8-8-3 | PublicInsurer_Number | 負担者番号 | 19113760 | |
8-8-4 | PublicInsuredPerson_Number | 受給者番号 | 1234567 | |
9 | Unpaid_Money_Total | 未収金額合計(0件の場合は非表示) | ※3 | |
10 | Unpaid_Money_Information_Overflow | 未収金情報オーバーフラグ (0件:非表示、1〜50件:false、50件超:true) | ※4 | |
11 | Unpaid_Money_Information | 個別の未収金情報(繰り返し 50) (診療日の新しい順) | ||
11-1 | Perform_Date | 診療日 | ||
11-2 | InOut | 入外区分 (1:入院、2:入院外) | ||
11-3 | Invoice_Number | 伝票番号 | ||
11-4 | Unpaid_Money | 未収金額 |
※1:療養担当手当(16)は、点数ゼロは編集なし。
初診・再診料〜入院料は、点数ゼロを編集。
※2 特別食加算を入院基本料とは異なる保険組合せで算定する際に、診療行為より".950"の診療種別で以下コードの入力が行われた場合に設定を行います。
197001210 食事療養標準負担額(他法等入院中)
197000470 特別食加算(食事療養)
197001570 特別食加算(生活療養)
※3:未収金合計はマイナス未収(過入金)も集計に含めて返却します。
※4:未収金情報が50件を超えた場合でも未収金額合計は超えた分も含めて計算を行います。
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/incomeinfv2")
#
# 1.患者番号 Patient_ID (REQUIRED)
# 2.診療日 Perform_Date (IMPLIED)
# 3.診療月 Perform_Month (IMPLIED)
# 4.診療年 Perform_Year (IMPLIED)
#
# REQUIRED : 必須 IMPLIED : 任意
#
BODY = <<EOF
<data>
<private_objects type="record">
<Patient_ID type="string">12</Patient_ID>
<Perform_Month type="string">2013-12</Perform_Month>
</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
}
エラーメッセージ一覧
エラーコード | エラーメッセージ |
---|---|
0000 | 処理終了 |
0001 | 診療日の設定に誤りがあります |
0002 | 診療月の設定に誤りがあります |
0003 | 診療年の設定に誤りがあります |
0004 | 患者番号の設定に誤りがあります |
0089 | 職員情報が取得できません |
医療機関情報が取得できません | |
システム日付が取得できません | |
患者番号構成情報が取得できません | |
グループ医療機関が不整合です。処理を終了して下さい | |
システム項目が設定できません | |
0097 | 送信内容に誤りがあります |
0098 | 送信内容の読込ができませんでした |
0099 | ユーザIDが未登録です |
それ以外 | 返却情報の編集でエラーが発生しました |