診療情報の返却
メニュー
- 更新履歴
- 概要
- テスト方法
- リクエスト(POSTリクエスト)サンプル
- リクエスト一覧
- レスポンス一覧(受診履歴一覧)
- レスポンス一覧(診療行為剤内容詳細)
- レスポンス一覧(診療月診療コード情報)
- レスポンス一覧(診療区分別剤点数)
- Rubyによるリクエストサンプルソース
- エラーメッセージ一覧
- 警告メッセージ一覧
更新履歴
2021-01-27 「リクエスト一覧」に項目を追加。
「レスポンス一覧(受診履歴一覧)」に項目を追加。
「レスポンス一覧(診療行為剤内容詳細)」に項目を追加。
「レスポンス一覧(診療区分別剤点数)」に項目を追加。
2020-11-25 「レスポンス一覧(診療行為剤内容詳細)」に項目を追加。
2020-06-25 「レスポンス一覧(診療行為剤内容詳細)」に項目を追加。
2018-01-23 (Ver5.0.0以降のみ)「リクエスト一覧」に項目を追加。
2017-11-27 「レスポンス一覧(診療行為剤内容詳細)」に項目を追加。
2017-08-24 診療・収納API連携強化対応。
「リクエスト一覧」に項目を追加。
「レスポンス一覧(診療行為剤内容詳細)」に項目を追加。
2015-12-21 受診履歴伝票番号追加対応。
「レスポンス一覧(受診履歴一覧)」に項目を追加。
2015-08-26 入院患者の診療情報の返却対応。
「リクエスト一覧」に項目を追加。
「Rubyによるリクエストサンプルソース」を修正。
診療情報の単位返却対応。
「レスポンス一覧(診療行為剤内容詳細)」に項目を追加。
「レスポンス一覧(診療月診療コード情報)」に項目を追加。
「レスポンス一覧(診療区分別剤点数)」に項目を追加。
2015-01-27 すべての来院日取得対応。
「リクエスト(POSTリクエスト)サンプル」にすべての来院日取得対応に関する説明を追加。
「リクエスト一覧」に項目を追加。
「エラーメッセージ一覧」を修正。
「Rubyによるリクエストサンプルソース」を修正。
概要
POSTメソッドによる外来分診療情報の返却を行います。
診療区分別剤点数は日レセVer4.7.0[第25回パッチ適用]以降
リクエストおよびレスポンスデータはxml2形式になります。
テスト方法
- 参考提供されている sample_medical_info.rb 内の変数HOST等を接続環境に合わせます。
- sample_medical_info.rb 内の患者番号等を接続先の日レセの環境に合わせ、送信したい情報を設定します。
- ruby sample_medical_info.rb により接続します。
リクエスト(POSTリクエスト)サンプル
POST : /api01rv2/medicalgetv2?class=01 class = 01 (受診履歴一覧取得) ※診療年月の受診履歴日の取得 class = 02 (診療行為剤内容詳細取得) ※診療日付と診療科の診療行為内容の剤内容を取得 class = 03 (診療月診療コード情報取得) ※診療年月の診療行為内容の診療コード内容を取得
class = 04 (診療区分別剤点数取得)(xml2のみ)
※診療年月の剤点数を算定日・診療区分順に取得
Content-Type: application/xml
application/xml の場合の文字コードは UTF-8 とします。
<data>
<medicalgetreq type="record">
<InOut type="string">I</InOut>
<Patient_ID type="string">12</Patient_ID>
<Perform_Date type="string">2014-01-06</Perform_Date>
<For_Months type="string">12</For_Months>
<Medical_Information type="record">
<Department_Code type="string">01</Department_Code>
<Sequential_Number type="string"></Sequential_Number>
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<HealthInsurance_Information type="record">
<InsuranceProvider_Class type="string">060</InsuranceProvider_Class>
<InsuranceProvider_WholeName type="string">国保</InsuranceProvider_WholeName>
<InsuranceProvider_Number type="string">138057</InsuranceProvider_Number>
<HealthInsuredPerson_Symbol type="string">01</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">1234567</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">1234566</PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
</Medical_Information>
</medicalgetreq>
</data>
処理概要
患者番号、診療年月等のリクエストにより診療情報を返却します。
処理詳細
受診履歴一覧(class=01)、診療行為剤内容詳細(class=02)、診療月診療コード情報(class=03)
- 機能として以下の三つを用意します。
・該当患者の一ヶ月の受診日(診療科、保険情報を含む)を返却します。
・該当患者の指定された受診日(診療科、保険)の詳細診療情報を返却します。
・該当患者の指定された月の診療情報内容を返却します。 - 患者番号の存在をチェックします。
- 診療年月(日)の妥当性をチェックします。
- 保険情報の妥当性、存在をチェックします(入力がある場合)。
受診履歴一覧(class=01)(すべての来院日取得対応)
- 月数(For_Months)を指定した場合は診療年月から「診療年月 − 月数」の受診履歴を降順に返却します。
月数は1から12まで指定可能で、0(未設定)は1月とします。
なお、99を設定した場合は全履歴を対象として診療年月から受診履歴の降順に150件を返却します。 - 返却件数が150件以上存在した場合はその旨を返却します。
診療区分別剤点数(class=04)(xml2のみ)
- 診療年月で診療会計テーブルを検索し、算定日・診療区分順に剤点数(金額)を返却します。
- 診療科・保険組合せ情報の設定があれば指定されたデータのみを対象とします。
- 保険組合せ情報の設定がない場合は、労災・自賠責・自費保険以外の保険のデータのみを対象とします。
労災・自賠責・自費保険は保険指定を行なって下さい。
診療行為剤内容詳細(class=02) (2017-08-24 パッチ適用以降)
- 検索条件にInvoice_Number(伝票番号)を追加
患者番号、診療日付、伝票番号での検索を可能とします。 - 返却値にもInvoice_Number を追加
リクエスト一覧
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | InOut | 入外区分 (I:入院) | I | 追加 (2015-08-26) |
2 | Patient_ID | 患者番号 | 12 | 必須 |
3 | Perform_Date | 診療日 | 2014-01-06 | 未設定時はシステム日付を設定 ※1 |
4 | For_Months | 月数 | 12 | 追加 (2015-01-27) |
5 | Medical_Information | 診療情報 | ||
5-1 | Department_Code | 診療科コード ※3 (01:内科) | 01 | class=02のみ必須 |
5-2 | Sequential_Number | 連番 | 2 | class=02のみ、未設定は1 |
5-3 | Insurance_Combination_Number | 保険組合せ番号 | 0002 | ※2 |
5-4 | HealthInsurance_Information | 保険組合せ情報 | ||
5-4-1 | InsuranceProvider_Class | 保険の種類 | 060 | ※2 |
5-4-2 | InsuranceProvider_WholeName | 保険の制度名称 | 国保 | ※2 |
5-4-3 | InsuranceProvider_Number | 保険者番号 | 138057 | ※2 |
5-4-4 | HealthInsuredPerson_Symbol | 記号 | 01 | |
5-4-5 | HealthInsuredPerson_Number | 番号 | 1234567 | |
5-4-6 | HealthInsuredPerson_Branch_Number | 枝番 | 追加 (2021-01-27) | |
5-4-7 | PublicInsurance_Information | 公費情報(繰り返し 4) | ||
5-4-7-1 | PublicInsurance_Class | 公費の種類 | 019 | ※2 |
5-4-7-2 | PublicInsurance_Name | 公費の制度名称 | 原爆一般 | ※2 |
5-4-7-3 | PublicInsurer_Number | 負担者番号 | 19113760 | ※2 |
5-4-7-4 | PublicInsuredPerson_Number | 受給者番号 | 1234566 | ※2 |
5-5 | Invoice_Number | 伝票番号 | 追加 (2017-08-24) | |
5-6 | Contain_Migration | 含む移行(レセ電データから移行した情報を含むか否か) (False:含まない) | Ver5.0.0以降のみ追加 (2018-01-23) |
※1:診療年月指定時は、日のチェックは行いません。暦日チェックは日=1で行います。
※2:保険組合せ番号を優先とします。保険組合せ番号の設定がない時だけ保険組合せ情報より保険組合せ番号を決定します。
※3:システム管理マスタの診療科目情報の診療科コードを参照して下さい。
レスポンス一覧(受診履歴一覧)
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2014-01-15 | |
2 | Information_Time | 実施時間 | 11:15:55 | |
3 | Api_Result | エラーコード | 00 | |
4 | Api_Result_Message | メッセージ | 処理終了 | |
5 | Reskey | Medical Info | ||
6 | Patient_Information | 患者情報 | ||
6-1 | Patient_ID | 患者番号 | 00012 | |
6-2 | WholeName | 漢字氏名 | 日医 太郎 | |
6-3 | WholeName_inKana | カナ氏名 | ニチイ タロウ | |
6-4 | BirthDate | 生年月日 | 1975-01-01 | |
6-5 | Sex | 性別 (1:男性、2:女性) | 1 | |
7 | Medical_List_Information | 受診履歴情報(繰り返し 150) | ||
7-1 | Perform_Date | 診療年月日 | 2014-01-06 | |
7-2 | Department_Code | 診療科コード (01:内科) | 01 | ※1 |
7-3 | Department_Name | 診療科名称 | 内科 | |
7-4 | Sequential_Number | 連番 (診療科毎の同日連番) | 1 | |
7-5 | Insurance_Combination_Number | 保険組合せ番号 | 0002 | |
7-6 | HealthInsurance_Information | 保険組合せ情報 | ||
7-6-1 | InsuranceProvider_Class | 保険の種類 | 060 | |
7-6-2 | InsuranceProvider_WholeName | 保険の制度名称 | 国保 | |
7-6-3 | InsuranceProvider_Number | 保険者番号 | 138057 | |
7-6-4 | HealthInsuredPerson_Symbol | 記号 | 01 | |
7-6-5 | HealthInsuredPerson_Number | 番号 | 1234567 | |
7-6-6 | HealthInsuredPerson_Branch_Number | 枝番 | 00 | 追加 (2021-01-27) |
7-6-7 | PublicInsurance_Information | 公費情報(繰り返し 4) | ||
7-6-7-1 | PublicInsurance_Class | 公費の種類 | 019 | |
7-6-7-2 | PublicInsurance_Name | 公費の制度名称 | 原爆一般 | |
7-6-7-3 | PublicInsurer_Number | 負担者番号 | 19113760 | |
7-6-7-4 | PublicInsuredPerson_Number | 受給者番号 | 1234566 | |
7-7 | Invoice_Number | 伝票番号 | 外来のみ 追加 (2015-12-21) |
※診療年月の受診履歴テーブル内容を編集します。(診療行為画面の受診履歴と同様です。)
※患者番号・診療年月以外の内容は使用しません。150件以上存在したときはメッセージを返却します。
※1:システム管理マスタの診療科目情報の診療科コードを参照して下さい。
レスポンスサンプル
<xmlio2>
<medicalget01res type="record">
<Information_Date type="string">2014-01-15</Information_Date>
<Information_Time type="string">11:15:55</Information_Time>
<Api_Result type="string">00</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<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>
<Medical_List_Information type="array">
<Medical_List_Information_child type="record">
<Perform_Date type="string">2014-01-06</Perform_Date>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">内科</Department_Name>
<Sequential_Number type="string">1</Sequential_Number>
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<HealthInsurance_Information type="record">
<InsuranceProvider_Class type="string">060</InsuranceProvider_Class>
<InsuranceProvider_WholeName type="string">国保</InsuranceProvider_WholeName>
<InsuranceProvider_Number type="string">138057</InsuranceProvider_Number>
<HealthInsuredPerson_Symbol type="string">01</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">1234567</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">1234566</PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
</Medical_List_Information_child>
<Medical_List_Information_child type="record">
<Perform_Date type="string">2014-01-07</Perform_Date>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">内科</Department_Name>
<Sequential_Number type="string">1</Sequential_Number>
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<HealthInsurance_Information type="record">
<InsuranceProvider_Class type="string">060</InsuranceProvider_Class>
<InsuranceProvider_WholeName type="string">国保</InsuranceProvider_WholeName>
<InsuranceProvider_Number type="string">138057</InsuranceProvider_Number>
<HealthInsuredPerson_Symbol type="string">01</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">1234567</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">1234566</PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
</Medical_List_Information_child>
</Medical_List_Information>
</medicalget01res>
</xmlio2>
レスポンス一覧(診療行為剤内容詳細)
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2015-08-18 | |
2 | Information_Time | 実施時間 | 18:36:51 | |
3 | Api_Result | エラーコード | 00 | |
4 | Api_Result_Message | メッセージ | 処理終了 | |
5 | Reskey | Medical Info | ||
6 | Patient_Information | 患者情報 | ||
6-1 | Patient_ID | 患者番号 | 00017 | |
6-2 | WholeName | 漢字氏名 | 日医 太郎 | |
6-3 | WholeName_inKana | カナ氏名 | ニチイ タロウ | |
6-4 | BirthDate | 生年月日 | 1975-01-01 | |
6-5 | Sex | 性別 (1:男性、2:女性) | 1 | |
7 | Perform_Date | 診療年月日 | 2015-08-18 | |
8 | Department_Code | 診療科コード (01:内科) | 10 | ※1 |
9 | Department_Name | 診療科名称 | 外科 | |
10 | Sequential_Number | 連番 (診療科毎の同日連番、未設定は1) | 1 | |
11 | Medical_List_Information | 受診履歴情報(繰り返し 5) | ||
11-1 | Insurance_Combination_Number | 保険組合せ番号 | 0002 | |
11-2 | HealthInsurance_Information | 保険組合せ情報 | ||
11-2-1 | InsuranceProvider_Class | 保険の種類 | 060 | |
11-2-2 | InsuranceProvider_WholeName | 保険の制度名称 | 国保 | |
11-2-3 | InsuranceProvider_Number | 保険者番号 | 138057 | |
11-2-4 | HealthInsuredPerson_Symbol | 記号 | 01 | |
11-2-5 | HealthInsuredPerson_Number | 番号 | 1234567 | |
11-2-6 | HealthInsuredPerson_Branch_Number | 枝番 | 00 | 追加 (2021-01-27) |
11-2-7 | PublicInsurance_Information | 公費情報(繰り返し 4) | ||
11-2-7-1 | PublicInsurance_Class | 公費の種類 | 019 | |
11-2-7-2 | PublicInsurance_Name | 公費の制度名称 | 原爆一般 | |
11-2-7-3 | PublicInsurer_Number | 負担者番号 | 19113760 | |
11-2-7-4 | PublicInsuredPerson_Number | 受給者番号 | 1234566 | |
11-3 | Invoice_Number | 伝票番号 | 追加 (2017-08-24) | |
11-4 | Medical_Information | 診療内容剤情報(繰り返し 135) | ||
11-4-1 | Medical_Class | 診療種別区分 | 400 | |
11-4-2 | Medical_Class_Name | 診療種別区分名称 | 処置行為 | |
11-4-3 | Medical_Class_Number | 回数 | 1 | |
11-4-4 | Medical_Class_Point | 剤点数(マイナス編集) | 2 | |
11-4-5 | Medical_Class_Money | 剤金額 (自費金額、労災の円) | 0 | |
11-4-6 | Medical_Class_code | 剤区分 (1:包括分、2:薬評(治験)) | 1 | |
11-4-7 | Medical_Inclusion_Class | 包括剤区分 (True:包括対象) | True | 追加 (2015-08-26) |
11-4-8 | Medical_Examination_Count | 包括検査項目数 | 07 | 追加 (2017-11-27) |
11-4-9 | Medication_info | 診療行為詳細(繰り返し 50) | ||
11-4-9-1 | Medication_Code | コード | 620811502 | |
11-4-9-2 | Medication_Name | 名称 | ワルファリンK錠1mg「F」 | |
11-4-9-3 | Medication_Name_Input_Value | コメント入力値 | 短期検査の実施 | 追加 (2020-06-25) |
11-4-9-4 | Medication_Number | 数量 (薬剤・器材の数量、きざみ値以外は1) | 2 | |
11-4-9-5 | Unit_Code | 単位 | 016 | ※2 追加 (2015-08-26) |
11-4-9-6 | Unit_Code_Name | 単位名称 | 錠 | ※2 追加 (2015-08-26) |
11-4-9-7 | Medication_Input_Info | コメント埋め込み値内容 | 追加 (2020-11-25) | |
11-4-9-7-1 | Medication_Input_Code | コメント埋め込み値 | ※4 追加 (2020-11-25) | |
11-4-9-8 | Medication_Point_Class | 点数識別 (1:金額 3:点数 etc) | 3 | ※3 追加 (2017-11-27) |
11-4-9-9 | Medication_Point | 点数 | 97 | ※3 追加 (2017-11-27) |
11-4-9-10 | Medication_Refer_Point | 参考点数(点数に数量・回数を反映した値) | ※5 追加 (2020-11-25) |
※診療年月日・診療科・連番から受診履歴を決定し、登録されている剤の内容を編集します。
※保険組合せ番号が設定されていれば該当の保険組合せ番号のみ対象とします。保険組合せは保険組合せ番号を指定するようにして下さい。
※診療行為訂正時と同じ順番で編集します。
※0086〜のコメントコード以外はすべて対象とします。
※1:システム管理マスタの診療科目情報の診療科コードを参照して下さい。
※2:薬剤・器材コードは、単位=000も返却しますが、診療コード、商品コード(058)、特定器材コード(059)は、単位がある時のみ返却します。
※3: 診療行為コード、薬剤、器材のみ点数識別と点数を返却します。
※4:コメントコードまたは服用コードなど、数値を入力し名称に変換するコードに数値入力があれば内容を返却します。
※5:点数マスタの金額(点数)に数量と回数を反映した点数を返却します。
レスポンスサンプル
<xmlio2>
<medicalget02res type="record">
<Information_Date type="string">2015-08-18</Information_Date>
<Information_Time type="string">18:36:51</Information_Time>
<Api_Result type="string">00</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00017</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>
<Perform_Date type="string">2015-08-18</Perform_Date>
<Department_Code type="string">10</Department_Code>
<Department_Name type="string">外科</Department_Name>
<Sequential_Number type="string">1</Sequential_Number>
<Medical_List_Information type="array">
<Medical_List_Information_child type="record">
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<HealthInsurance_Information type="record">
<InsuranceProvider_Class type="string">060</InsuranceProvider_Class>
<InsuranceProvider_WholeName type="string">国保</InsuranceProvider_WholeName>
<InsuranceProvider_Number type="string">138057</InsuranceProvider_Number>
<HealthInsuredPerson_Symbol type="string">01</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">1234567</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">1234566</PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
<Medical_Information type="array">
<Medical_Information_child type="record">
<Medical_Class type="string">400</Medical_Class>
<Medical_Class_Name type="string">処置行為</Medical_Class_Name>
<Medical_Class_Number type="string">1</Medical_Class_Number>
<Medical_Class_Point type="string">2</Medical_Class_Point>
<Medical_Class_Money type="string">0</Medical_Class_Money>
<Medical_Class_code type="string">1</Medical_Class_code>
<Medical_Inclusion_Class type="string">True</Medical_Inclusion_Class>
<Medication_info type="array">
<Medication_info_child type="record">
<Medication_Code type="string">099999908</Medication_Code>
<Medication_Name type="string">包括算定(剤)</Medication_Name>
<Medication_Number type="string">1</Medication_Number>
</Medication_info_child>
<Medication_info_child type="record">
<Medication_Code type="string">620811502</Medication_Code>
<Medication_Name type="string">ワルファリンK錠1mg「F」</Medication_Name>
<Medication_Number type="string">2</Medication_Number>
<Unit_Code type="string">016</Unit_Code>
<Unit_Code_Name type="string">錠</Unit_Code_Name>
</Medication_info_child>
</Medication_info>
</Medical_Information_child>
<Medical_Information_child type="record">
<Medical_Class type="string">700</Medical_Class>
<Medical_Class_Name type="string">画像診断</Medical_Class_Name>
<Medical_Class_Number type="string">1</Medical_Class_Number>
<Medical_Class_Point type="string">4580</Medical_Class_Point>
<Medical_Class_Money type="string">0</Medical_Class_Money>
<Medical_Class_code type="string">0</Medical_Class_code>
<Medication_info type="array">
<Medication_info_child type="record">
<Medication_Code type="string">728580000</Medication_Code>
<Medication_Name type="string">血管造影用カテーテル(心臓マルチパーパス型)</Medication_Name>
<Medication_Number type="string">2</Medication_Number>
<Unit_Code type="string">007</Unit_Code>
<Unit_Code_Name type="string">本</Unit_Code_Name>
</Medication_info_child>
<Medication_info_child type="record">
<Medication_Code type="string">170012410</Medication_Code>
<Medication_Name type="string">造影剤注入(静脈造影カテーテル法)</Medication_Name>
<Medication_Number type="string">1</Medication_Number>
</Medication_info_child>
</Medication_info>
</Medical_Information_child>
</Medical_Information>
</Medical_List_Information_child>
</Medical_List_Information>
</medicalget02res>
</xmlio2>
レスポンス一覧(診療月診療コード情報)
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2015-08-18 | |
2 | Information_Time | 実施時間 | 19:15:16 | |
3 | Api_Result | エラーコード | 00 | |
4 | Api_Result_Message | メッセージ | 処理終了 | |
5 | Reskey | Medical Info | ||
6 | Patient_Information | 患者情報 | ||
6-1 | Patient_ID | 患者番号 | 00017 | |
6-2 | WholeName | 漢字氏名 | 日医 太郎 | |
6-3 | WholeName_inKana | カナ氏名 | ニチイ タロウ | |
6-4 | BirthDate | 生年月日 | 1975-01-01 | |
6-5 | Sex | 性別 (1:男性、2:女性) | 1 | |
7 | Perform_Date | 診療年月 | 2015-08 | |
8 | Medical_List_Information | 診療行為情報(繰り返し 400) | ||
8-1 | Medical_Class | 診療種別区分 | 40 | |
8-2 | Medical_Class_Name | 診療種別区分名称 | 処置行為 | |
8-3 | Medication_Code | コード | 620811502 | |
8-4 | Medication_Name | 名称 | ワルファリンK錠1mg「F」 | |
8-5 | Unit_Code | 単位 | 016 | ※3 追加 (2015-08-26) |
8-6 | Unit_Code_Name | 単位名称 | 錠 | ※3 追加 (2015-08-26) |
8-7 | Medical_Class_code | 包括区分 (1:包括分) | 1 | |
8-8 | Medical_Inclusion_Class | 包括剤区分 (True:包括対象) | True | 追加 (2015-08-26) |
8-9 | Perform_Total_Number | 算定合計数 (算定した日の合計(最大31日)) | 01 | |
8-10 | Perform_Calendar | 算定日区分 | 0000000000000000010000000000000 | ※1 |
8-11 | Perform_Day_Information | 薬剤・器材数量(繰り返し 31) | ※2 | |
8-11-1 | Perform_Day | 算定日 | 18 | |
8-11-2 | Perform_Day_Number | 1日の合計数量 | 2 |
※診療年月で算定した診療行為・薬剤・器材のコード毎に算定した日を編集します。薬剤・器材は算定した日とその日の数量×回数を集計した合計数量も編集します。
※診療科・保険組合せ番号に指定があれば該当分のみ対象とします。
※保険組合せ 9999包括分入力については、保険組合せ番号を9999と指定した時のみ対象とします。
※診療コードは告示区分1=1、3、5(手技料)かつ点数識別区分=1、3、4を対象とします。
※診療区分=95、96(保険外)、薬評の剤は対象外とします。
※1:算定した日に1を、それ以外の日に0を編集します。
(2日にのみ算定であれば 0100000000000000000000000000000)
※2:算定した日をテーブルの1番目から編集します。
※3:薬剤・器材コードは、単位=000も返却しますが、診療コード、商品コード(058)、特定器材コード(059)は、単位がある時のみ返却します。
レスポンスサンプル
<xmlio2>
<medicalget03res type="record">
<Information_Date type="string">2015-08-18</Information_Date>
<Information_Time type="string">19:15:16</Information_Time>
<Api_Result type="string">00</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00017</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>
<Perform_Date type="string">2015-08</Perform_Date>
<Medical_List_Information type="array">
<Medical_List_Information_child type="record">
<Medical_Class type="string">40</Medical_Class>
<Medical_Class_Name type="string">処置行為</Medical_Class_Name>
<Medication_Code type="string">620811502</Medication_Code>
<Medication_Name type="string">ワルファリンK錠1mg「F」</Medication_Name>
<Unit_Code type="string">016</Unit_Code>
<Unit_Code_Name type="string">錠</Unit_Code_Name>
<Medical_Class_code type="string">1</Medical_Class_code>
<Medical_Inclusion_Class type="string">True</Medical_Inclusion_Class>
<Perform_Total_Number type="string">01</Perform_Total_Number>
<Perform_Calendar type="string">0000000000000000010000000000000</Perform_Calendar>
<Perform_Day_Information type="array">
<Perform_Day_Information_child type="record">
<Perform_Day type="string">18</Perform_Day>
<Perform_Day_Number type="string">2</Perform_Day_Number>
</Perform_Day_Information_child>
</Perform_Day_Information>
</Medical_List_Information_child>
<Medical_List_Information_child type="record">
<Medical_Class type="string">70</Medical_Class>
<Medical_Class_Name type="string">画像診断</Medical_Class_Name>
<Medication_Code type="string">728580000</Medication_Code>
<Medication_Name type="string">血管造影用カテーテル(心臓マルチパーパス型)</Medication_Name>
<Unit_Code type="string">007</Unit_Code>
<Unit_Code_Name type="string">本</Unit_Code_Name>
<Medical_Class_code type="string">0</Medical_Class_code>
<Perform_Total_Number type="string">01</Perform_Total_Number>
<Perform_Calendar type="string">0000000000000000010000000000000</Perform_Calendar>
<Perform_Day_Information type="array">
<Perform_Day_Information_child type="record">
<Perform_Day type="string">18</Perform_Day>
<Perform_Day_Number type="string">2</Perform_Day_Number>
</Perform_Day_Information_child>
</Perform_Day_Information>
</Medical_List_Information_child>
<Medical_List_Information_child type="record">
<Medical_Class type="string">70</Medical_Class>
<Medical_Class_Name type="string">画像診断</Medical_Class_Name>
<Medication_Code type="string">170012410</Medication_Code>
<Medication_Name type="string">造影剤注入(静脈造影カテーテル法)</Medication_Name>
<Medical_Class_code type="string">0</Medical_Class_code>
<Perform_Total_Number type="string">01</Perform_Total_Number>
<Perform_Calendar type="string">0000000000000000010000000000000</Perform_Calendar>
</Medical_List_Information_child>
<Medical_List_Information_child type="record">
<Medical_Class type="string">70</Medical_Class>
<Medical_Class_Name type="string">画像診断</Medical_Class_Name>
<Medication_Code type="string">728490000</Medication_Code>
<Medication_Name type="string">血管内超音波プローブ(標準(1))</Medication_Name>
<Unit_Code type="string">000</Unit_Code>
<Medical_Class_code type="string">0</Medical_Class_code>
<Perform_Total_Number type="string">01</Perform_Total_Number>
<Perform_Calendar type="string">0000000000000000010000000000000</Perform_Calendar>
<Perform_Day_Information type="array">
<Perform_Day_Information_child type="record">
<Perform_Day type="string">18</Perform_Day>
<Perform_Day_Number type="string">1</Perform_Day_Number>
</Perform_Day_Information_child>
</Perform_Day_Information>
</Medical_List_Information_child>
</Medical_List_Information>
</medicalget03res>
</xmlio2>
レスポンス一覧(診療区分別剤点数)
診療区分別剤点数はxml2のみ返却します。
番号 | 項目名 | 内容 | 例 | 備考 |
---|---|---|---|---|
1 | Information_Date | 実施日 | 2015-08-18 | |
2 | Information_Time | 実施時間 | 18:41:50 | |
3 | Api_Result | エラーコード | 00 | |
4 | Api_Result_Message | メッセージ | 処理終了 | |
5 | Reskey | Medical Info | ||
6 | Patient_Information | 患者情報 | ||
6-1 | Patient_ID | 患者番号 | 00017 | |
6-2 | WholeName | 漢字氏名 | 日医 太郎 | |
6-3 | WholeName_inKana | カナ氏名 | ニチイ タロウ | |
6-4 | BirthDate | 生年月日 | 1975-01-01 | |
6-5 | Sex | 性別 | 1 | |
7 | Perform_Date | 診療年月 | 2015-08 | |
8 | Department_Code | 診療科 | 10 | |
9 | Department_Name | 診療科名称 | 外科 | |
10 | Medical_List_Information | 保険組合せ情報(繰り返し 5) | ※1 | |
10-1 | Insurance_Combination_Number | 保険組合せ番号 | 0002 | |
10-2 | HealthInsurance_Information | 保険組合せ情報 | ||
10-2-1 | InsuranceProvider_Class | 保険の種類 | 060 | |
10-2-2 | InsuranceProvider_WholeName | 保険の制度名称 | 国保 | |
10-2-3 | InsuranceProvider_Number | 保険者番号 | 138057 | |
10-2-4 | HealthInsuredPerson_Symbol | 記号 | 01 | |
10-2-5 | HealthInsuredPerson_Number | 番号 | 1234567 | |
10-2-6 | HealthInsuredPerson_Branch_Number | 枝番 | 00 | 追加 (2021-01-27) |
10-2-7 | PublicInsurance_Information | 公費情報(繰り返し 4) | ||
10-2-7-1 | PublicInsurance_Class | 公費の種類 | 019 | |
10-2-7-2 | PublicInsurance_Name | 公費の制度名称 | 原爆一般 | |
10-2-7-3 | PublicInsurer_Number | 負担者番号 | 19113760 | |
10-2-7-4 | PublicInsuredPerson_Number | 受給者番号 | 1234566 | |
11 | Medical_Information | 診療行為情報(繰り返し 31) | ||
11-1 | Medical_Day | 算定日 | 18 | ※2 |
11-2 | Medical_Information2 | 診療行為情報2(繰り返し 40) | ||
11-2-1 | Medical_Class | 診療区分 | 40 | ※3 |
11-2-2 | Medical_Class2 | 診療種別区分 | 400 | ※4 |
11-2-3 | Medical_Class_Name | 診療種別区分名称 | 処置行為 | |
11-2-4 | Medication_info | 剤情報(繰り返し 100) | ※5 | |
11-2-4-1 | Medical_Class_Point | 剤点数 | 2 | |
11-2-4-2 | Medical_Class_Money | 剤金額 | ※6 | |
11-2-4-3 | Medical_Class_Number | 算定回数 | 1 | |
11-2-4-4 | Medical_Class_code | 包括区分 (1:包括分) | 1 | |
11-2-4-5 | Medical_Inclusion_Class | 包括剤区分 (True:包括対象) | True | 追加 (2015-08-26) |
※診療年月で診療会計テーブルを検索し、算定日・診療区分順に剤毎の剤点数(金額)を返却します。
※診療科・保険の設定があれば指定されたデータのみを対象とします。
※保険の指定がない場合、労災・自賠責・自費保険以外の保険のデータのみを対象とします。
労災・自賠責・自費保険は、保険の指定を行って下さい。
※1:対象となった保険組合せの情報を最大5件まで表示します。
※2:1から31まで算定のある日のみ返却します。
※3:11(初診)から96(保険外(消費税あり)(診療会計テーブルの診療区分))
※4:診療区分80(その他)は診療種別区分を800(リハビリ)から890(入院料(外来))で返却します。(診療行為テーブルの診療種別区分)
診療区分80(その他)以外は、診療区分+0を診療種別区分とします。(診療行為テーブルの診療種別区分ではありません)
※5:対象の剤点数を検索順に表示します。(診療科・診療区分・剤番号順)
※6:労災の金額または、自費の金額となります。
レスポンスサンプル
<xmlio2>
<medicalget04res type="record">
<Information_Date type="string">2015-08-18</Information_Date>
<Information_Time type="string">18:41:50</Information_Time>
<Api_Result type="string">00</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00017</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>
<Perform_Date type="string">2015-08</Perform_Date>
<Department_Code type="string">10</Department_Code>
<Department_Name type="string">外科</Department_Name>
<Medical_List_Information type="array">
<Medical_List_Information_child type="record">
<Insurance_Combination_Number type="string">0002</Insurance_Combination_Number>
<HealthInsurance_Information type="record">
<InsuranceProvider_Class type="string">060</InsuranceProvider_Class>
<InsuranceProvider_WholeName type="string">国保</InsuranceProvider_WholeName>
<InsuranceProvider_Number type="string">138057</InsuranceProvider_Number>
<HealthInsuredPerson_Symbol type="string">01</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">1234567</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">1234566</PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
</Medical_List_Information_child>
</Medical_List_Information>
<Medical_Information type="array">
<Medical_Information_child type="record">
<Medical_Day type="string">18</Medical_Day>
<Medical_Information2 type="array">
<Medical_Information2_child type="record">
<Medical_Class type="string">40</Medical_Class>
<Medical_Class2 type="string">400</Medical_Class2>
<Medical_Class_Name type="string">処置行為</Medical_Class_Name>
<Medication_info type="array">
<Medication_info_child type="record">
<Medical_Class_Point type="string">2</Medical_Class_Point>
<Medical_Class_Number type="string">1</Medical_Class_Number>
<Medical_Class_code type="string">1</Medical_Class_code>
<Medical_Inclusion_Class type="string">True</Medical_Inclusion_Class>
</Medication_info_child>
</Medication_info>
</Medical_Information2_child>
<Medical_Information2_child type="record">
<Medical_Class type="string">70</Medical_Class>
<Medical_Class2 type="string">700</Medical_Class2>
<Medical_Class_Name type="string">画像診断</Medical_Class_Name>
<Medication_info type="array">
<Medication_info_child type="record">
<Medical_Class_Point type="string">4580</Medical_Class_Point>
<Medical_Class_Number type="string">1</Medical_Class_Number>
</Medication_info_child>
</Medication_info>
</Medical_Information2_child>
</Medical_Information2>
</Medical_Information_child>
</Medical_Information>
</medicalget04res>
</xmlio2>
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/medicalgetv2?class=03")
# class :01 受診履歴取得
# class :02 日別診療情報取得
# class :03 月別診療情報取得
# class :04 区分別剤点数情報取得
#
# 入外区分 InOut (IMPLIED)
# 患者番号 Patient_ID (REQUIRED)
# 診療年月日 Perform_Date (IMPLIED)
# 月数 For_Months (IMPLIED)
# 診療科コード Department_Code (REQUIRED)
# 連番 Sequential_Number (IMPLIED)
# 保険組合せ番号 Insurance_Combination_Number (IMPLIED)
# 保険の種類 InsuranceProvider_Class (IMPLIED)
# 保険の制度名称 InsuranceProvider_WholeName (IMPLIED)
# 保険者番号 InsuranceProvider_Number (IMPLIED)
# 公費の種類 PublicInsurance_Class (IMPLIED)
# 公費の制度名称 PublicInsurance_Name (IMPLIED)
# 負担者番号 PublicInsurer_Number (IMPLIED)
# 受給者番号 PublicInsuredPerson_Number (IMPLIED)
#
# REQUIRED : 必須 IMPLIED : 任意
#
BODY = <<EOF
<data>
<medicalgetreq type="record">
<InOut type="string">I</InOut>
<Patient_ID type="string">2</Patient_ID>
<Perform_Date type="string">2012-06-12</Perform_Date>
<For_Months type="string">12</For_Months>
<Medical_Information type="record">
<Department_Code type="string">02</Department_Code>
<Sequential_Number type="string">1</Sequential_Number>
<Insurance_Combination_Number type="string">0015</Insurance_Combination_Number>
<HealthInsurance_Information type="record">
<InsuranceProvider_Class type="string">009</InsuranceProvider_Class>
<InsuranceProvider_WholeName type="string">協会</InsuranceProvider_WholeName>
<InsuranceProvider_Number type="string"> </InsuranceProvider_Number>
<HealthInsuredPerson_Symbol type="string"> </HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string"> </HealthInsuredPerson_Number>
<PublicInsurance_Information type="array">
<PublicInsurance_Information_child type="record">
<PublicInsurance_Class type="string">051</PublicInsurance_Class>
<PublicInsurance_Name type="string"></PublicInsurance_Name>
<PublicInsurer_Number type="string">51020001</PublicInsurer_Number>
<PublicInsuredPerson_Number type="string"></PublicInsuredPerson_Number>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
</Medical_Information>
</medicalgetreq>
</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 }
エラーメッセージ一覧
エラーコード | エラーメッセージ |
---|---|
01 | 患者番号の設定がありません |
02 | 診療科の設定がありません |
10 | 患者番号に該当する患者が存在しません |
11 | 診療日が暦日ではありません |
12 | 保険組合せ番号の設定が違います |
13 | 診療科が存在しません |
14 | 対象が150件以上存在します |
15 | 対象がありません |
16 | 月数は0〜12、99を設定して下さい |
20 | 該当する保険組合せがありません |
21 | 対象の保険組合せが5件以上あります |
89 | 職員情報が取得できません |
医療機関情報が取得できません | |
システム日付が取得できません | |
患者番号構成情報が取得できません | |
グループ医療機関が不整合です。処理を終了して下さい | |
システム項目が設定できません | |
90 | 他端末使用中 |
91 | 処理区分未設定 |
97 | 送信内容に誤りがあります |
98 | 送信内容の読込ができませんでした |
99 | ユーザID未登録 |
警告メッセージ一覧
エラーコード | 警告メッセージ |
---|---|
K1 | 診療日を設定しました |