初診算定日登録

メニュー

初診算定日登録(URL:/api21/medicalmodv23)

初診算定日の登録がない患者に対し初診算定日の登録を可能とします。

Request_Numberにより、検索・登録・削除の指示が可能です。

検索機能   Request_Number=00

患者番号を設定することにより、その患者の初診算定日、初回来院日(受診履歴の最初の日)、最終来院日を取得しその値を返却します。
 (検索機能では、リクエストNo および患者番号のみの設定が必須となります。)

該当患者に初診算定日(初診料の算定履歴登録)が登録済の場合は、登録不可の旨をメッセージ設定し返却します。

リクエストサンプル

<data>
<medicalv2req3 type="record">
<Request_Number type="string">00</Request_Number>
<Patient_ID type="string">105</Patient_ID>
<Department_Code type="string"></Department_Code>
<First_Calculation_Date type="string"></First_Calculation_Date>
<FirstVisit_Date type="string"></FirstVisit_Date>
<LastVisit_Date type="string"></LastVisit_Date>
</medicalv2req3>
</data>

レスポンスサンプル(正常終了)

<?xml version="1.0" encoding="UTF-8"?>
<xmlio2>
<medicalv2res3 type="record">
<Information_Date type="string">2018-10-22</Information_Date>
<Information_Time type="string">14:49:22</Information_Time>
<Api_Result type="string">000</Api_Result>
<Api_Result_Message type="string">検索処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00105</Patient_ID>
<WholeName type="string">テスト コウヒ3</WholeName>
<WholeName_inKana type="string">テスト コウヒ3</WholeName_inKana>
<BirthDate type="string">1983-01-01</BirthDate>
<Sex type="string">1</Sex>
</Patient_Information>
</medicalv2res3>
</xmlio2>

レスポンスサンプル(初診算定日が登録済の場合)

<?xml version="1.0" encoding="UTF-8"?>
<xmlio2>
<medicalv2res3 type="record">
<Information_Date type="string">2018-10-22</Information_Date>
<Information_Time type="string">14:58:43</Information_Time>
<Api_Result type="string">WK1</Api_Result>
<Api_Result_Message type="string">初診料が算定済みです。初診算定日の登録はできません。</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00105</Patient_ID>
<WholeName type="string">テスト コウヒ3</WholeName>
<WholeName_inKana type="string">テスト コウヒ3</WholeName_inKana>
<BirthDate type="string">1983-01-01</BirthDate>
<Sex type="string">1</Sex>
</Patient_Information>
<First_Calculation_Date type="string">2018-08-01</First_Calculation_Date>
<LastVisit_Date type="string">2018-08-01</LastVisit_Date>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">内科</Department_Name>
</medicalv2res3>
</xmlio2>

登録機能   Request_Number=01

患者番号、初診算定日、診療科、最終来院日を設定します。

この時点で、他端末での使用確認のため排他チェックを行います。

最終来院日は、初回来院日がない場合(受診履歴が1件も存在しない)のみ有効となります。
初回来院日がなく最終来院日の送信もない時は、初診算定日を最終来院日として設定します。

診療科が必要となるのは、初回来院日・最終来院日のない場合のみとなります。
設定されたした診療科で診療科履歴を登録します。
初回来院日、最終来院日があれば登録済みの診療科履歴の初回算定日を変更し登録します。

初診算定日 > 初回来院日は登録できないのでエラーとします。
(初回来院日より後の日付で初診料算定日を設定する場合は初診料ダミーのみ診療行為から登録します。)

更新処理を行います。
初診算定日で初診料ダミーを算定履歴に登録します。
診療科履歴の更新処理を行います。

登録後の初診算定日、最終来院日を返却します。

リクエストサンプル

<data>
<medicalv2req3 type="record">
<Request_Number type="string">01</Request_Number>
<Patient_ID type="string">105</Patient_ID>
<Department_Code type="string">01</Department_Code>
<First_Calculation_Date type="string">2018-08-01</First_Calculation_Date>
<FirstVisit_Date type="string">2018-07-10</FirstVisit_Date>
<LastVisit_Date type="string">2018-08-01</LastVisit_Date>
</medicalv2req3>
</data>

レスポンスサンプル(正常終了)

<?xml version="1.0" encoding="UTF-8"?>
<xmlio2>
<medicalv2res3 type="record">
<Information_Date type="string">2018-10-22</Information_Date>
<Information_Time type="string">14:57:19</Information_Time>
<Api_Result type="string">000</Api_Result>
<Api_Result_Message type="string">登録処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00105</Patient_ID>
<WholeName type="string">テスト コウヒ3</WholeName>
<WholeName_inKana type="string">テスト コウヒ3</WholeName_inKana>
<BirthDate type="string">1983-01-01</BirthDate>
<Sex type="string">1</Sex>
</Patient_Information>
<First_Calculation_Date type="string">2018-08-01</First_Calculation_Date>
<LastVisit_Date type="string">2018-08-01</LastVisit_Date>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">内科</Department_Name>
</medicalv2res3>
</xmlio2>

削除機能   Request_Number=02

患者番号のみを設定します。

この時点で、他端末での使用確認のため排他チェックを行います。

初診料の算定履歴が1件しか存在しない場合のみ、初診料の削除を行います。

※ 削除できるのは、Request_Number=01で登録した初診算定日、またはデータ移行した初診算定日のみです。

算定履歴の初診料コードが診療行為情報に登録されている場合には削除できません。

削除処理を行います。
算定履歴の初診料コードを削除後、診療科履歴の更新処理を行います。

リクエストサンプル

<data>
<medicalv2req3 type="record">
<Request_Number type="string">02</Request_Number>
<Patient_ID type="string">105</Patient_ID>
<Department_Code type="string"></Department_Code>
<First_Calculation_Date type="string"></First_Calculation_Date>
<FirstVisit_Date type="string"></FirstVisit_Date>
<LastVisit_Date type="string"></LastVisit_Date>
</medicalv2req3>
</data>

レスポンスサンプル(正常終了)

<?xml version="1.0" encoding="UTF-8"?>
<xmlio2>
<medicalv2res3 type="record">
<Information_Date type="string">2018-10-22</Information_Date>
<Information_Time type="string">15:00:01</Information_Time>
<Api_Result type="string">000</Api_Result>
<Api_Result_Message type="string">削除処理終了</Api_Result_Message>
<Reskey type="string">Medical Info</Reskey>
<Patient_Information type="record">
<Patient_ID type="string">00105</Patient_ID>
<WholeName type="string">テスト コウヒ3</WholeName>
<WholeName_inKana type="string">テスト コウヒ3</WholeName_inKana>
<BirthDate type="string">1983-01-01</BirthDate>
<Sex type="string">1</Sex>
</Patient_Information>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">内科</Department_Name>
</medicalv2res3>
</xmlio2>

レイアウト資料(PDF)

api21_medicalmodv23.pdf
api21_medicalmodv23_err.pdf

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 -*-

sample_medicalmodv23_request00.rb
sample_medicalmodv23_request01.rb
sample_medicalmodv23_request02.rb

このページのトップへ