カルテ1号紙(入院)印刷API

メニュー

更新履歴

2019-10-28   帳票のPDF作成機能を追加。

概要

  • リクエスト項目に該当するカルテ1号紙(入院)の印刷および、レスポンスとして帳票データの返却を行います。
  • 標準帳票の「ORCHCN01」に準じたレイアウトで印刷を行います。
  • 帳票の編集にあたって、システム管理マスタ「1910 プログラムオプション情報」の「ORCHCN01」の設定を参照します。

テスト方法

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

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

POST : /api01rv2/karteno1hv2

Content-Type: application/xml

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

<data>
<karte_no1_hv2req type ="record">
<Request_Number type ="string">01</Request_Number>
<Order_Class type ="string">1</Order_Class>
<Patient_ID type ="string">1</Patient_ID>
<Admission_Date type ="string">2018-07-01</Admission_Date>
<Discharge_Date type ="string"></Discharge_Date>
<Department_Code type ="string">01</Department_Code>
<Doctor_Code type ="array">
<Doctor_Code_child type ="string">10001</Doctor_Code_child>
</Doctor_Code>
<Insurance_Combination_Number type ="string">0001</Insurance_Combination_Number>
</karte_no1_hv2req>
</data>

レスポンスサンプル

JSON形式で返却を行います。

{
"Information_Date": "2018-08-01",
"Information_Time": "13:35:33",
"Api_Result": "0000",
"Api_Result_Message": "処理終了",
"Form_ID": "karte_no1_n",
"Form_Name": "カルテ1号紙(入院)",
"Print_Date": "2018-08-01",
"Print_Time": "13:35:33",
"Patient": {
"ID": "00001",
"Name": "日医 太郎",
"KanaName": "ニチイ タロウ",
"BirthDate": "1958-01-10",
"Sex": "1"
},
"Forms": [
{
"data": {
"Form_ID": "karte_no1_n",
"Printer": "PDF",
"Order_Class": "1",
"Admission_Date": "2018-07-01",
"Patient": {
"ID": "00001",
"Name": "日医 太郎",
"KanaName": "ニチイ タロウ",
"BirthDate": "1958-01-10",
"Sex": "1",
"Condition": [
"該当なし",
"該当なし",
"該当なし"
],
"Ragistration_Date": "2017-09-25",
"HouseHolder_Name": "上尾 太郎",
"Home_Address": {
"Address": [
"東京都新宿区二十騎町",
"99−1−1"
],
"ZipCode": "1620855",
"PhoneNumber": "03-9999-0805"
}
},
"Insurance_Combination_Information": {
"Number": "0001",
"Rate_Admission": "030",
"Rate_Outpatient": "030",
"InsuranceProvider_Class": "009",
"InsuranceProvider_Name": "協会",
"HealthInsuredPerson_Age": "060",
"HealthInsuredPerson_Rate": "030",
"HealthInsurance_Information": {
"InsuranceProvider_Name": "全国健康保険協会東京支部",
"InsuranceProvider_Number": "01130012",
"InsuranceProvider_Address": [
"中野区中野4−10−2",
"中野セントラルパークサウス"
],
"InsuranceProvider_PhoneNumber": "03-6853-6111",
"HealthInsuredPerson_Symbol": "99010101",
"HealthInsuredPerson_Number": "990001",
"RelationToInsuredPerson": "1",
"HealthInsuredPerson_Name": "日医 太郎",
"Certificate_StartDate": "2008-04-01",
"Certificate_ExpiredDate": "9999-12-31"
}
},
"Hospital": {
"Name": "ORCA病院"
},
"Doctor": [
{
"Code": "10001",
"Name": "日本 一",
"KanaName": "ヒノモト ハジメ"
},
{
},
{
}
],
"Department_Code": "01",
"Department_Name": "内科",
"Disease_Information": [
{
"Name": "急性上気道炎の疑い",
"SuspectedFlag": "3",
"StartDate": "2018-07-24"
},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},
{},{},{},{},{},{},{},{},{}
]
}
}
]
}

リクエスト一覧

karte_no1_n_req.pdf

レスポンス一覧

karte_no1_n.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_karte_no1_h_v2.rb

帳票印刷APIエラーメッセージ一覧

report_api_err.pdf

このページのトップへ