トップ > 日医標準レセプトソフト > 技術情報 > 日医標準レセプトソフト API > 日医標準レセプトソフト API 受付一覧

指定された日付の受付一覧返却

メニュー

更新履歴

2023-02-27    「リクエスト一覧」に項目(Sel_Offset)を追加。

2021-01-27    「レスポンス一覧」に項目を追加。

2019-06-25   「リクエスト一覧」「レスポンス一覧」に項目を追加

2018-11-27   「レスポンス一覧」に項目を追加

2017-04-26   「レスポンス一覧」に項目を追加

2016-10-20   「レスポンスサンプル」に項目を追加
       「レスポンス一覧」に項目を追加

2014-06-02   「エラーメッセージ一覧」を追加

2013-08-27   「レスポンス一覧」に項目(Acceptance_Id)を追加


概要

POSTメソッドによる受付一覧取得を行います。

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

テスト方法

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

 

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

POST : /api01rv2/acceptlstv2?class=01
class = 01 は受付中(会計待ち対象)
class = 02 は会計済(会計済み対象)
class = 03 は全受付対象

Content-Type: application/xml

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


<data>
       
<acceptlstreq type="record">
               
<Acceptance_Date type="string">2012-12-05</Acceptance_Date>
               
<Department_Code type="string">01</Department_Code>
               
<Physician_Code type="string">10001</Physician_Code>
               
<Medical_Information type="string"></Medical_Information>
                <Display_Order_Sort type="string">True</Display_Order_Sort>
       
</acceptlstreq>
</data>

 

処理概要

受付一覧リクエストにより指定日の受付一覧の情報を返却します。

処理詳細

  1. 受付日妥当性チェック
  2. 診療科コードの存在チェック(※)
  3. ドクターコードの存在チェック(※)
  4. 診療内容区分の存在チェック(※)

    (※2,3,4の条件については、設定されていれば対象のもののみ返却します)

 

レスポンスサンプル

<xmlio2>
<acceptlstres type="record">
<Information_Date type="string">2011-03-13</Information_Date>
<Information_Time type="string">10:50:00</Information_Time>
<Api_Result type="string">00</Api_Result>
<Api_Result_Message type="string">処理終了</Api_Result_Message>
<Reskey type="string">Patient Info</Reskey>
<Acceptance_Date type="string">2011-03-15</Acceptance_Date>
<Acceptlst_Information type="array">
<Acceptlst_Information_child type="record">
<Acceptance_Time type="string">15:30:00</Acceptance_Time>
<Acceptance_Id type="string">00001</Acceptance_Id>
<Department_Code type="string">01</Department_Code>
<Department_WholeName type="string">内科</Department_WholeName>
<Physician_Code type="string">10001</Physician_Code>
<Physician_WholeName type="string">日本 一</Physician_WholeName>
<Medical_Information type="string">01</Medical_Information>
<Claim_Infometion type="string">0</Claim_Infometion>
<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>
<HealthInsurance_Information type="record">
<Insurance_Combination_Number type="string">0001</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">01</HealthInsuredPerson_Symbol>
<HealthInsuredPerson_Number type="string">1234567</HealthInsuredPerson_Number>
<HealthInsuredPerson_Assistance type="string">3</HealthInsuredPerson_Assistance>
<RelationToInsuredPerson type="string">1</RelationToInsuredPerson>
<HealthInsuredPerson_WholeName type="string">日医 太郎</HealthInsuredPerson_WholeName>
<Certificate_StartDate type="string">2010-05-01</Certificate_StartDate>
<Certificate_ExpiredDate type="string">9999-12-31</Certificate_ExpiredDate>
<PublicInsurance_Information type="array">
<PublicInsurance_Information_child type="record">
<PublicInsurance_Class type="string">010</PublicInsurance_Class>
<PublicInsurance_Name type="string">感37の2</PublicInsurance_Name>
<PublicInsurer_Number type="string">10131142</PublicInsurer_Number>
<PublicInsuredPerson_Number type="string">1234566</PublicInsuredPerson_Number>
<Rate_Admission type="string">0.05</Rate_Admission>
<Money_Admission type="string"> 0</Money_Admission>
<Rate_Outpatient type="string">0.05</Rate_Outpatient>
<Money_Outpatient type="string"> 0</Money_Outpatient>
<Certificate_IssuedDate type="string">2010-05-01</Certificate_IssuedDate>
<Certificate_ExpiredDate type="string">9999-12-31</Certificate_ExpiredDate>
</PublicInsurance_Information_child>
</PublicInsurance_Information>
</HealthInsurance_Information>
<Patient_Memo_Information type="record">
<Patient_Memo_Department_00 type="string">3</Patient_Memo_Department_00>
<Patient_Memo_Department type="string">2</Patient_Memo_Department>
</Patient_Memo_Information>
<Display_Order type="record">
<Display_Order_Number type="string">9999</Display_Order_Number>
</Display_Order>
</Acceptlst_Information_child>
</Acceptlst_Information>
</acceptlstres>
</xmlio2>

 

リクエスト一覧

番号項目名内容備考
1Acceptance_Date受付日2010-12-20 
2Department_Code診療科コード ※1
(01:内科)
01※2
3Physician_Codeドクターコード10001※2
4Medical_Information診療内容区分 ※3
(01:診察1、 02:薬のみ、 03:注射のみ、 04:検査のみ、 05:リハビリテーション、 06:健康診断、 07:予防注射、 99:該当なし)
01※2
5
Display_Order_Sort
受付画面順指示
True
※4

追加
(2019-06-25)
6
Sel_Offset
開始位置
1500
※5
WebORCAのみ
追加
(2023-02-27)

※1:システム管理マスタの診療科目情報の診療科コードを参照して下さい。

※2:設定があれば一致する受付を対象とし、未設定であれば全てを対象とします。

※3:システム管理マスタの診療内容情報の診療内容コードを参照して下さい。

※4:class=01 の時のみ有効、この値をTrue とした場合、受付画面(受付一覧)にて並びを変更した場合に、その並びで情報を返却します。

※5:class=03 の時のみ有効。


レスポンス一覧

番号項目名内容備考
1Information_Date実施日2011-03-13 
2Information_Time実施時間10:50:00 
3Api_Result結果コード(ゼロ以外エラー)00 
4Api_Result_Messageエラーメッセージ処理終了 
5Reskey Patient Info 
6Acceptance_Date受付日2011-03-15 
7Acceptlst_Information受付一覧情報 (繰り返し 1000)
※WebORCAは1500
  
7-1Acceptance_Time受付時間15:30:00 
7-2
Acceptance_Id
受付ID00001
 
7-3Department_Code診療科コード ※4
(01:内科)
01 
7-4Department_WholeName診療科名称内科 
7-5Physician_Codeドクターコード10001 
7-6Physician_WholeNameドクター名日本 一 
7-7Medical_Information診療内容区分 ※5
(01:診察1、 02:薬のみ、 03:注射のみ、 04:検査のみ、 05:リハビリテーション、 06:健康診断、 07:予防注射、 99:該当なし)
01 
7-8Claim_Infometionclaim情報0 
7-9Account_Time会計時間 ※6
15:50:00

 

7-10Appointment_Time
予約時間
11:00:00
追加
(2017-04-26)
7-11Appointment_Id予約ID
02
追加
(2017-04-26)
7-12Patient_Information患者基本情報  
7-12-1Patient_ID患者番号00012 
7-12-2WholeName患者氏名日医 太郎 
7-12-3WholeName_inKana患者カナ氏名ニチイ タロウ 
7-12-4BirthDate生年月日1975-01-01 
7-12-5Sex性別
(1:男性、2:女性)
1 
7-13HealthInsurance_Information保険組合せ情報  
7-13-1Insurance_Combination_Number保険組合せ番号0001追加
(2016-10-20)
7-13-2
Insurance_Nondisplay保険組合せ非表示区分
(O:外来非表示、I:入院非表示、N:非表示無し)
O追加
(2017-04-26)
7-13-3InsuranceProvider_Class保険の種類060 
7-13-4InsuranceProvider_Number保険者番号138057 
7-13-5InsuranceProvider_WholeName保険の制度名称国保 
7-13-6HealthInsuredPerson_Symbol記号01 
7-13-7HealthInsuredPerson_Number番号1234567 
7-13-8
HealthInsuredPerson_Branch_Number
枝番
00
追加
(2021-01-27)
7-13-9HealthInsuredPerson_Continuation継続区分
(1:継続療養、 2:任意継続)
  
7-13-10HealthInsuredPerson_Assistance補助区分
(詳細については、「日医標準レセプトソフトデータベーステーブル定義書」を参照して下さい。)
3 
7-13-11RelationToInsuredPerson本人家族区分
(1:本人、 2:家族)
1 
7-13-12HealthInsuredPerson_WholeName被保険者名日医 太郎 
7-13-13Certificate_StartDate適用開始日2010-05-01 
7-13-14Certificate_ExpiredDate適用終了日9999-12-31 
7-13-15PublicInsurance_Information公費情報(繰り返し 4)  
7-13-15-1PublicInsurance_Class公費の種類010 
7-13-15-2PublicInsurance_Name公費の制度名称感37の2 
7-13-15-3PublicInsurer_Number負担者番号10131142 
7-13-15-4PublicInsuredPerson_Number受給者番号1234566 
7-13-15-5Rate_Admission 入院ー負担率(割)0.05 
7-13-15-6Money_Admission入院ー固定額0 
7-13-15-7Rate_Outpatient外来ー負担率(割)0.05 
7-13-15-8Money_Outpatient外来ー固定額0 
7-13-15-9Certificate_IssuedDate適用開始日2010-05-01 
7-13-15-10Certificate_ExpiredDate 適用終了日9999-12-31 
7-14Patient_Memo_Information
メモ登録情報
 追加
(2018-11-27)
7-14-1
Patient_Memo_Department_00
メモ登録区分(診療科=00)
(1:メモ1のみの登録、
2:メモ2のみの登録、
3:メモ1,メモ2の登録)
 追加
(2018-11-27)
7-14-2
Patient_Memo_Department
メモ登録区分
(1:メモ1のみの登録、
2:メモ2のみの登録、
3:メモ1,メモ2の登録)
 追加
(2018-11-27)
7-15
Display_Order
並び順情報
 追加
(2019-06-25)
7-15-1
Display_Order_Number
画面上の並び順の値
 ※7、※8

追加
(2019-06-25)
7-15-2
Display_Order_Mark
並びを変更した場合は、「True」を設定
 ※7、※8

追加
(2019-06-25)

※4:システム管理マスタの診療科目情報の診療科コードを参照して下さい。

※5:システム管理マスタの診療内容情報の診療内容コードを参照して下さい。

※6:class = 02:会計済(会計済み対象)、class = 03:全受付対象を指定時に返却

※7:当日、並びをまったく変更していない場合、各受付一覧情報にDisplay_Order_Numberは9999を返却し、Display_Order_Markは値なしのため返却しません。

※8:Display_Order_Mark=Trueとなるのは画面で並び順を変えた患者のみであり、例えば3番目の患者を1番目に移動した場合、その患者のみがDisplay_Order_Mark=True となり、以下を返却します。

<Display_Order type="record">
<Display_Order_Number type="string">1</Display_Order_Number>
<Display_Order_Mark type="string">True</Display_Order_Mark>
</Display_Order>

並びを変更していない患者は、Display_Order_Number のみ返却します。上の例の時、2番目の患者は以下を返却します。

<Display_Order type="record">
<Display_Order_Number type="string">2</Display_Order_Number>
</Display_Order>

 

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_acceptlst_v2.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("/api01rv2/acceptlstv2?class=01")
# class :01 受付中(会計待ち対象)
# class :02 会計済(会計済み対象)
# class :03 全受付対象
#
#
BODY = <<EOF
<data>
<acceptlstreq type="record">
<Acceptance_Date type="string">2012-12-05</Acceptance_Date>
<Department_Code type="string">01</Department_Code>
<Physician_Code type="string">10001</Physician_Code>
<Medical_Information type="string"></Medical_Information>
</acceptlstreq>
</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
 
}
 

C#によるリクエストサンプルソース

Windowsでの実行環境

  • Microsoft Visual Studio 2008以降
  • .NET Framework 2.0 SDK(C#コンパイラを含む.NET Frameworkの開発ツール)
    (Microsoft Visual Studioに含まれています)

Ubuntuでの実行環境

  • MonoDevelop 2.2(1.0でも実行可能)
  • mono-gmcs(C#コンパイラ)
    (MonoDevelopと一緒にインストールされます)

sample_acceptlst_v2.cs

using System;
using System.IO;
using System.Net;
using System.Text;

namespace Acceptlst
{
  class AcceptlstMain
  {
    public static void Main(string[] args)
    {

      string HOST = "localhost";
      string PORT = "8000";
      string USER = "ormaster";
      string PASSWD = "ormaster";
      string CONTENT_TYPE = "application/xml";

      string URL = "http://" + HOST + ":" + PORT + "/api01rv2/acceptlstv2?class=01";
/* class = 01 は受付中(会計待ち対象) class = 02 は会計済(会計済み対象) class = 03 は全受付対象 1.受付日 Acceptance_Date (IMPLIED) 2.診療科コード Department_Code (IMPLIED) 3.ドクターコード Physician_Code (IMPLIED) 4.診療内容区分 Medical_Information (IMPLIED) REQUIRED : 必須 IMPLIED : 任意 */ DateTime dtime = DateTime.Now; string BODY = @"
<data>
<acceptlstreq type=""record"">
<Acceptance_Date type=""string"">" + dtime.ToString("yyyy-MM-dd") + @"</Acceptance_Date>
<Department_Code type=""string"">01</Department_Code>
<Physician_Code type=""string"">10001</Physician_Code>
<Medical_Information type=""string""></Medical_Information>
</acceptlstreq>
</data> ";
      byte[] record_in_byte = Encoding.UTF8.GetBytes(BODY);

      HttpWebRequest req = (HttpWebRequest) HttpWebRequest.Create(URL);
      //req.ProtocolVersion = HttpVersion.Version11;

      req.Method = "POST";
      req.ContentType = CONTENT_TYPE;
      req.ContentLength = record_in_byte.Length;
      req.Credentials = new NetworkCredential(USER, PASSWD);

      Console.WriteLine(BODY);

      HttpWebResponse res = null;
      try
      {
        Stream reqstream = req.GetRequestStream();

        reqstream.Write(record_in_byte, 0, record_in_byte.Length);
        reqstream.Close();

        res = (HttpWebResponse) req.GetResponse();

        Console.WriteLine(res.ResponseUri);
        Console.WriteLine(res.StatusDescription);
      }
      catch (WebException exc)
      {
        if (exc.Status == WebExceptionStatus.ProtocolError)
        {
          HttpWebResponse err = (HttpWebResponse) exc.Response;

          int errcode = (int) err.StatusCode;

          Console.WriteLine(err.ResponseUri);
          Console.WriteLine("{0}:{1}", errcode, err.StatusDescription);

          err.Close();
        }
        else
        {
          Console.WriteLine(exc.Message);
        }
      }

      if (res != null)
      {
        Stream str = res.GetResponseStream();
        StreamReader strread = new StreamReader(str);

        string FOO = strread.ReadToEnd();
        string FILE_NAME = "foo.xml";
        File.WriteAllText(FILE_NAME, FOO);

        strread.Close();
        str.Close();

        res.Close();
      }
    }
  }
}

 

エラーメッセージ一覧

 エラーコード エラーメッセージ
 11 受付日が暦日ではありません
 12 診療科が存在しません
 13 ドクターが存在しません
 14 診療内容情報がありません
 20 受付対象件数が500件以上あります
 21 対象の受付はありませんでした
 89 職員情報が取得できません
 医療機関情報が取得できません
 システム日付が取得できません
 患者番号構成情報が取得できません
 グループ医療機関が不整合です。処理を終了して下さい
 システム項目が設定できません
 90 他端末使用中
 91 処理区分未設定
 97 送信内容に誤りがあります
 98 送信内容の読込ができませんでした
 99 ユーザID未登録

 

 

トップ > 日医標準レセプトソフト > 技術情報 > 日医標準レセプトソフト API > 日医標準レセプトソフト API 受付一覧

このページのトップへ