患者病名登録2

メニュー

更新履歴

 2018-10-25 転帰区分に「P:中止」を追加、削除条件から疑いフラグ、急性フラグを除外。 

 2018-05-28 「リクエスト一覧」に項目を追加、変更。
       「レスポンス一覧」に項目を追加。

概要

POSTメソッドによる該当患者の病名データの追加、変更および削除を行います。

日レセ Ver.5.0.0[第14回パッチ適用] 以降

リクエストおよびレスポンスデータはxml2形式になります。

 

テスト方法

  1. 参考提供されている sample_diseasev3.rb 内の変数HOST等を接続環境に合わせます。
  2. sample_diseasev3.rb 内の患者番号等を接続先の日レセの環境に合わせます。
  3. ruby sample_diseasev3.rb により接続します。

 

リクエスト(POSTリクエスト)サンプル

POST : /orca22/diseasev3

Content-Type: application/xml

application/xml の場合の文字コードは UTF-8 とします。

 

<data>
<diseasereq type="record">
<Patient_ID type="string">07009</Patient_ID>
<Base_Month type="string">2017-03</Base_Month>
<Perform_Date type="string">2016-02-11</Perform_Date>
<Perform_Time type="string"></Perform_Time>
<Diagnosis_Information type="record">
<Department_Code type="string">01</Department_Code>
</Diagnosis_Information>
<Disease_Information type="array">
<Disease_Information_child type="record">
<Disease_Insurance_Class type="string"></Disease_Insurance_Class>
<Disease_Code type="string">3089002</Disease_Code>
<Disease_Name type="string"></Disease_Name>
<Disease_Single type="array">
<Disease_Single_child type="record">
<Disease_Single_Code type= "string"></Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
</Disease_Single>
<Disease_Supplement_Name type= "string">不安、緊張</Disease_Supplement_Name>
<Disease_Supplement_Single type="array">
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type= "string"></Disease_Supplement_Single_Code>
</Disease_Supplement_Single_child>
</Disease_Supplement_Single>
<Disease_InOut type="string">O</Disease_InOut>
<Disease_Category type="string"></Disease_Category>
<Disease_SuspectedFlag type="string"></Disease_SuspectedFlag>
<Disease_StartDate type="string">2017-08-21</Disease_StartDate>
<Disease_EndDate type="string"></Disease_EndDate>
<Disease_OutCome type="string"></Disease_OutCome>
<Disease_Karte_Name type="string"></Disease_Karte_Name>
<Disease_Class type="string"></Disease_Class>
<Insurance_Combination_Number type="string"></Insurance_Combination_Number>
<Disease_Receipt_Print type="string"></Disease_Receipt_Print>
<Disease_Receipt_Print_Period type="string"></Disease_Receipt_Print_Period>
<Insurance_Disease type="string"></Insurance_Disease>
<Discharge_Certificate type="string"></Discharge_Certificate>
<Main_Disease_Class type="string"></Main_Disease_Class>
<Sub_Disease_Class type="string"></Sub_Disease_Class>
</Disease_Information_child>
</Disease_Information>
</diseasereq>
</data>

 

処理概要

該当患者の病名データの追加、変更および削除を行います。

処理詳細

  1. 送信されたユーザID(職員情報)の妥当性チェック
  2. 送信された患者番号による患者の存在チェック
  3. 該当患者の排他チェック(他端末で展開中の有無)
  4. 診療科の存在チェック
  5. 補足コメントコードおよび文字列の妥当性チェック
  6. システム管理「9000 CLAIM」の集約、同期は対応しない
  7. 入外の更新については、
    入院A病名に対し、外来A病名を送信した場合は、外来A病名を追加
    外来A病名に対し、入外空白A病名を送信した場合は、A病名を入外空白で更新

 

レスポンスサンプル

<xmlio2>
<diseaseres type="record">
<Information_Date type="string">2017-08-31</Information_Date>
<Information_Time type="string">11:59:44</Information_Time>
<Api_Result type="string">000</Api_Result>
<Api_Result_Message type="string">処理実施終了</Api_Result_Message>
<Reskey type="string">Acceptance_Info</Reskey>
<Perform_Date type="string">2016-02-11</Perform_Date>
<Perform_Time type="string">11:59:44</Perform_Time>
<Department_Code type="string">01</Department_Code>
<Department_Name type="string">第一内科</Department_Name>
<Patient_ID type="string">07009</Patient_ID>
<Base_Month type="string">2017-03</Base_Month>
<Disease_Unmatch_Information type="record">
<Disease_Unmatch_Information_Overflow type="string">False</Disease_Unmatch_Information_Overflow>
<Disease_Unmatch_Info type="array">
<Disease_Unmatch_Info_child type="record">
<Disease_Code type="string">0000999</Disease_Code>
<Disease_Name type="string">かぜ</Disease_Name>
<Disease_Supplement_Name type="string">右片側</Disease_Supplement_Name>
<Disease_Supplement_Single type="array">
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type="string">ZZZ2056</Disease_Supplement_Single_Code>
<Disease_Supplement_Single_Name type="string">右</Disease_Supplement_Single_Name>
</Disease_Supplement_Single_child>
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type="string">ZZZ2054</Disease_Supplement_Single_Code>
<Disease_Supplement_Single_Name type="string">片側</Disease_Supplement_Single_Name>
</Disease_Supplement_Single_child>
</Disease_Supplement_Single>
<Disease_Category type="string">PD</Disease_Category>
<Disease_StartDate type="string">2002-02-01</Disease_StartDate>
<Disease_EndDate type="string">2017-05-19</Disease_EndDate>
<Disease_OutCome type="string">1</Disease_OutCome>
</Disease_Unmatch_Info_child>
<Disease_Unmatch_Info_child type="record">
<Disease_Code type="string">7840024</Disease_Code>
<Disease_Name type="string">頭痛</Disease_Name>
<Disease_StartDate type="string">2014-10-01</Disease_StartDate>
</Disease_Unmatch_Info_child>
<Disease_Unmatch_Info_child type="record">
<Disease_Code type="string">2049.7274039.8002</Disease_Code>
<Disease_Name type="string">左膝ガングリオンの疑い</Disease_Name>
<Disease_Supplement_Name type="string">左膝ガングリオン鼻アレルギー胃CA</Disease_Supplement_Name>
<Disease_Supplement_Single type="array">
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type="string">11111</Disease_Supplement_Single_Code>
<Disease_Supplement_Single_Name type="string">左膝ガングリオン</Disease_Supplement_Single_Name>
</Disease_Supplement_Single_child>
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type="string">22222</Disease_Supplement_Single_Code>
<Disease_Supplement_Single_Name type="string">鼻アレルギー</Disease_Supplement_Single_Name>
</Disease_Supplement_Single_child>
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type="string">33333</Disease_Supplement_Single_Code>
<Disease_Supplement_Single_Name type="string">胃CA</Disease_Supplement_Single_Name>
</Disease_Supplement_Single_child>
</Disease_Supplement_Single>
<Disease_SuspectedFlag type="string">1</Disease_SuspectedFlag>
<Disease_StartDate type="string">2017-03-10</Disease_StartDate>
</Disease_Unmatch_Info_child>
</Disease_Unmatch_Info>
</Disease_Unmatch_Information>
</diseaseres>
</xmlio2>
 

 

リクエスト一覧

番号項目名内容備考
1
Patient_ID
患者番号
07009
必須
2
Base_Month
基準月
(空白時はシステム日の属する月)
 レスポンス※3 参照
3
Perform_Date
実施年月日
2017-03-01
 
4
Perform_Time
実施時間
01:01:01
 
5
Diagnosis_Information
診療科情報
  
5-1
Department_Code
診療科
01
 
6
Disease_Information
病名情報(繰り返し 50)
 必須
6-1Disease_Insurance_Class
保険区分
(1:医保(自費)以外、
1以外:医保(自費))
1
 
6-2
Disease_Code
一連病名コード
2500014
必須 ※1
6-3
Disease_Name
一連病名
 必須 ※1
6-4
Disease_Single
単独病名情報(繰り返し 21)
 必須 ※1

変更(最大 6 → 21)
(2018-05-28)
6-4-1
Disease_Single_Code
単独病名コード
  
6-4-2
Disease_Single_Name
単独病名
  
6-5
Disease_Supplement_Name
補足コメント情報
 ※2
6-6Disease_Supplement_Single補足コメントコード情報(繰り返し 3) ※2
6-6-1
Disease_Supplement_Single_Code補足コメントコード  
6-7Disease_InOut
入外区分
(I:入院、O:入院外、空白:入外)
O
 
6-8
Disease_Category
主病フラグ
(PD:主疾患)
  
6-9
Disease_SuspectedFlag
疑いフラグ
(S:疑い)
  
6-10
Disease_AcuteFlag
急性フラグ
(A:急性)
 追加
(2018-05-28)
6-11
Disease_StartDate
開始日
2017-02-28
必須
6-12
Disease_EndDate
転帰日
  
6-13
Disease_OutCome
転帰区分
 ※6
6-14
Disease_Karte_Name
カルテ病名
 ※3
6-15
Disease_Class疾患区分
(03:皮膚科特定疾患指導管理料(1)、
04:皮膚科特定疾患指導管理料(2)、
05::特定疾患療養管理料、
07:てんかん指導料、
08:特定疾患療養管理料又はてんかん指導料、
09:難病外来指導管理料)
Auto
※4
6-16
Insurance_Combination_Number
保険組合せ番号
0003
労災、公害、自賠責、第三者行為は必須    ※5
6-17
Disease_Receipt_Print
レセプト表示
(1:表示しない)
1
※3
6-18
Disease_Receipt_Print_Period
レセプト表示期間
(00〜99)
99
※3
6-19
Insurance_Disease
保険病名
(1:保険病名)
1
※3
6-20Discharge_Certificate
退院証明書
(空白または0:記載しない、1:記載する)
0
※3
6-21Main_Disease_Class
原疾患区分
(01:原疾患ア、02:原疾患イ、
03:原疾患ウ、04:原疾患エ、
05:原疾患オ)
02
※3
6-22Sub_Disease_Class
合併症区分
(01:アの合併症、02:イの合併症、
03:ウの合併症、04:エの合併症、
05:オの合併症)
03※3

※1:単独病名か一連病名のいずれかの設定が必要です。両方に設定がある場合は単独病名を優先します。
   病名コード、病名の両方に設定がある場合は病名コードを優先します。

※2:補足コメントコード、補足コメント名称の両方に設定がある場合は補足コメントコードを優先します。

※3:「None」が設定してある場合、新規時は初期値を設定、更新(削除)時は更新(削除)対象としません。

※4:「None」が設定してある場合、新規時は初期値を設定、更新時は更新対象としません。
   「Auto」が設定してある場合、病名コードまたは病名から自動判定した値を設定します(なければ空白と同様)。

※5:「None」が設定してある場合、新規時は初期値を設定、更新時は更新対象としません。
   設定された保険組合せ番号が削除分の場合、新規または保険組合せ番号の更新時はエラーとします。
   Disease_Insurance_Classが「1」のとき、未設定または「None」はエラーとします。

※6:転帰区分の取り扱いについては日レセの転帰区分にあわせて以下のように置き換えます。
    O:削除     開始日、病名、補足コメント名称、転帰日、入外区分、保険組合せ番号等完全一致したものに対し、削除フラグを設定します。(但し、疑いフラグ、急性フラグの値は一致条件から外します(2018-10-25))
    D:死亡     2(死亡)
    F:完治     1(治ゆ)
    N:不変     3(中止)
    R:軽快     3(中止)
    S:後遺症残   3(中止)
    U:不明     3(中止)
    W:悪化     3(中止)
    P:中止     3(中止)
    上記以外     1(治ゆ)
    (※P:中止は、J-MIXの転記区分には定義されていません。本システム固有の定義となります。)

※システム管理「9000 CLAIM」の集約、同期は対応しません。

※「の疑い」(コードでの設定も同様)は、該当病名に対する更新処理となります。
 胃炎に対し「胃炎の疑い」を送信した場合、胃炎を胃炎の疑いとして更新します。
 胃炎の疑いに対し、胃炎を送信した場合、胃炎の疑いを胃炎として更新します。

 

レスポンス一覧

番号項目名
内容備考
1Information_Date
処理日付
2017-05-18
 
2Information_Time
処理時間14:35:31
 
3Api_Result
処理区分
000
※1
4Api_Result_Message
処理メッセージ処理実施終了
 
5Reskey
 Acceptance_Info
 
6
Perform_Date
実施日付
2017-05-18
 
7
Perform_Time
実施時間
01:01:01
 
8
Department_Code
診療科コード
01
 
9
Department_Name
診療科名内科
 
10
Patient_ID
患者番号
00126
 
11
Base_Month
基準月
(空白時はシステム日の属する月)
2017-05
※3 参照
12
Disease_Message_Information
病名登録結果(繰り返し 50) ※2
12-1
Disease_Result
病名結果コード
  
12-2
Disease_Result_Message
病名結果メッセージ
廃止・移行先・推奨のある病名が存在します。
 
12-3
Disease_Warning_Info
病名警告情報
  
12-3-1
Disease_Warning
病名警告コード
W01
 
12-3-2
Disease_Warning_Message
病名警告メッセージ
廃止・移行先・推奨のある病名が存在します。
 
12-3-3
Disease_Warning_Item_Position
連番
02 
12-3-4
Disease_Warning_StartDate
警告対象の開始日
2017-03-10
 
12-3-5
Disease_Warning_Name
警告対象の病名左膝ガングリオンの疑い
 
12-3-6
Disease_Warning_Code
警告対象の病名コード
2049.7274039.8002
 
12-3-7
Disease_Warning_Change
廃止、移行先、推奨
(01:移行先、02:廃止、03:推奨)
01
※5
13Disease_Unmatch_Information
不一致病名情報 ※3
13-1
Disease_Unmatch_Information_Overflow
不一致病名情報オーバーフラグ
 ※4
13-2
Disease_Unmatch_Info
不一致病名一覧(繰り返し 50)  
13-2-1Disease_Code一連病名コード
5609002
 
13-2-2
Disease_Name
一連病名
亜イレウス
 
13-2-3
Disease_Supplement_Name
補足コメント名称  
13-2-4Disease_Supplement_Single補足コメントコード情報(繰り返し 3)ZZZ2056
 
13-2-4-1Disease_Supplement_Single_Code補足コメントコード  
13-2-4-2Disease_Supplement_Single_Name補足コメントZZZ2054 
13-2-5Disease_InOut
入外区分
(I:入院、O:入院外、空白:入外)
  
13-2-6
Disease_Category
主病フラグ
(PD:主疾患)
  
13-2-7
Disease_SuspectedFlag
疑いフラグ
  
13-2-8
Disease_AcuteFlag
急性フラグ
(A:急性)
 ※6

追加
(2018-05-28)
13-2-9Disease_StartDate
開始日
2015-01-15
 
13-2-10
Disease_EndDate
転帰日
  
13-2-11
Disease_OutCome転帰区分
  
13-2-12
Disease_Karte_Name
カルテ病名
  
13-2-13
Disease_Class
疾患区分
  
13-2-14
Insurance_Combination_Number
保険組合せ番号
  
13-2-15
Disease_Receipt_Print
レセプト表示
  
13-2-16
Disease_Receipt_Print_Period
レセプト表示期間
  
13-2-17Insurance_Disease
保険病名
  
13-2-18
Discharge_Certificate
退院証明書
  
13-2-19
Main_Disease_Class
原疾患区分
  
13-2-20Sub_Disease_Class
合併症区分
  

※1 正常終了:【000】、エラーあり:【EXX】、ワーニングあり:【WXX】

※2 エラー又は警告があった病名を返却します。

※3 基準月に有効な病名でリクエスト内に設定されていない日レセの病名情報を返却します。
   (日レセにのみ存在する病名)

※4 不一致病名が51件以上ある場合:True それ以外:False

※5 該当があれば新規登録時のみ返却します。

※6 日レセ上で、疑いフラグの値が「2」または「3」のときは「A」(急性)を返却します。

 

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_diseasev3.rb

 

#!/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("/orca22/diseasev3?class=01")
# class :01 患者病名登録
# <Disease_Code type="string">7808004.(101.2057.1045.C001.2057.1066.C001.7207.(201</Disease_Code>
#
#
BODY = <<EOF
<data>
<diseasereq type="record">
<Patient_ID type="string">07009</Patient_ID>
<Base_Month type="string"></Base_Month>
<Perform_Date type="string">2018-05-01</Perform_Date>
<Perform_Time type="string">01:01:01</Perform_Time>
<Diagnosis_Information type="record">
<Department_Code type="string">27</Department_Code>
</Diagnosis_Information>
<Disease_Information type="array">
<Disease_Information_child type="record">
<Disease_Insurance_Class type="string"></Disease_Insurance_Class>
<Disease_Name type="string"></Disease_Name>
<Disease_Single type="array">
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">7808004</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">(101</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">2057</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">1045</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">C001</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">2057</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">1066</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">C001</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">7207</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
<Disease_Single_child type="record">
<Disease_Single_Code type= "string">(201</Disease_Single_Code>
<Disease_Single_Name type= "string"></Disease_Single_Name>
</Disease_Single_child>
</Disease_Single>
<Disease_Supplement_Name type="string"></Disease_Supplement_Name>
<Disease_Supplement_Single type="array">
<Disease_Supplement_Single_child type="record">
<Disease_Supplement_Single_Code type= "string"></Disease_Supplement_Single_Code>
</Disease_Supplement_Single_child>
</Disease_Supplement_Single>
<Disease_InOut type="string"></Disease_InOut>
<Disease_Category type="string"></Disease_Category>
<Disease_SuspectedFlag type="string"></Disease_SuspectedFlag>
<Disease_AcuteFlag type="string">A</Disease_AcuteFlag>
<Disease_StartDate type="string">2018-05-01</Disease_StartDate>
<Disease_EndDate type="string"></Disease_EndDate>
<Disease_OutCome type="string"></Disease_OutCome>
<Disease_Karte_Name type="string"></Disease_Karte_Name>
<Disease_Class type="string"></Disease_Class>
<Insurance_Combination_Number type="string"></Insurance_Combination_Number>
<Disease_Receipt_Print type="string"></Disease_Receipt_Print>
<Disease_Receipt_Print_Period type="string"></Disease_Receipt_Print_Period>
<Insurance_Disease type="string"></Insurance_Disease>
<Discharge_Certificate type="string"></Discharge_Certificate>
<Main_Disease_Class type="string"></Main_Disease_Class>
<Sub_Disease_Class type="string"></Sub_Disease_Class>
</Disease_Information_child>
</Disease_Information>

</diseasereq>
</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
}

 

エラーメッセージ一覧

エラーコード
エラーメッセージ
 E01 患者番号が未設定です。
 E04 電子カルテUIDが未設定です。
 E05 オルカUIDが未設定です。
 E10 患者番号に該当する患者が存在しません。
 E13 診療科が存在しません。
 E16 開始日が暦日ではありません。
 E17 転帰日が暦日ではありません。
 E18 医保分でしか設定できない値です。
 E19 保険組合せ番号が存在しません。
 E20 保険区分の設定と異なる保険組合せ番号です。
 E21 保険区分の設定と異なる保険組合せ番号です。
 E22 保険組合せ番号の設定に誤りがあります。(数値以外他)
 E23 同名の病名がXXXに複数存在します。
 E24 同名の病名がXXXに3件以上存在します。
 E25 第三者行為が存在しません。
 E26 開始日が第三者行為の適用日の範囲外です。
 E27 開始日が保険組合せ番号の適用日の範囲外です。
 E28 保険組合せ番号が存在しません。
 E29 第三者行為が存在しません。
 E31 同名の病名がXXXXXXXXXXXに存在します。(転帰日等を確認して下さい)。
 E33 病名コードが不正です。
 E34 補足コメントコードが不正です。
 E36 削除対象の病名がありません。
 E40 警告がある病名が存在します。
 E41 病名の設定がありません。
 E42 登録出来ない病名が存在します。
 E89 職員情報が取得できません。
 医療機関情報が取得できません。
 システム日付が取得できません。
 患者番号構成情報が取得できません。
 グループ医療機関が不整合です。処理を終了して下さい。
 システム項目が設定できません。
 E90 他端末で使用中です。
 E91 リクエスト番号が不正です。
 E97 送信内容に誤りがあります。
 E98 送信内容の読込ができませんでした。
 E99 ユーザIDが未登録です。

 

警告メッセージ一覧

エラーコード
警告メッセージ
 W01 廃止・移行先・推奨のある病名が存在します。
 W02 単独使用禁止病名です。
 W03 全角チェックでエラーとなる文字が病名に存在します。
 W04 病名に改行コードが存在します。
 W05 全角チェックでエラーとなる文字が補足コメントに存在します。
 W06 補足コメントに改行コードが存在します。
 W07 全角チェックでエラーとなる文字がカルテ病名に存在します。
 W08 カルテ病名に改行コードが存在します。

 

 

このページのトップへ