Class: OrcaApi::AcceptanceService

Inherits:
Service
  • Object
show all
Defined in:
lib/orca_api/acceptance_service.rb

Overview

受付業務を扱うクラス

Defined Under Namespace

Classes: AcceptanceBuilder, ListResult

Instance Attribute Summary

Attributes inherited from Service

#orca_api

Instance Method Summary collapse

Methods inherited from Service

#initialize, reuse_session

Constructor Details

This class inherits a constructor from OrcaApi::Service

Constructor Details

This class inherits a constructor from OrcaApi::Service

Instance Method Details

#create(acceptance) ⇒ Object



36
37
38
39
40
41
# File 'lib/orca_api/acceptance_service.rb', line 36

def create(acceptance)
  req = acceptance.merge(
    "Request_Number" => "01"
  )
  call_acceptance(req)
end

#destroy(acceptance_id, patient_id) ⇒ Object



83
84
85
86
87
88
89
90
# File 'lib/orca_api/acceptance_service.rb', line 83

def destroy(acceptance_id, patient_id)
  req = {
    "Request_Number" => "02",
    "Acceptance_Id" => acceptance_id,
    "Patient_ID" => patient_id
  }
  call_acceptance(req)
end

#list(klass: "03", base_date: nil, department_code: nil, physician_code: nil, medical_information: nil) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/orca_api/acceptance_service.rb', line 14

def list(klass: "03", base_date: nil, department_code: nil, physician_code: nil, medical_information: nil)
  api_path = "/api01rv2/acceptlstv2"
  req_name = "acceptlstreq"

  params = {
    class: klass
  }

  request = {}
  request["Acceptance_Date"] = base_date if base_date
  request["Department_Code"] = department_code if department_code
  request["Physician_Code"] = physician_code if physician_code
  request["Medical_Information"] = medical_information if medical_information

  body = {
    req_name => request
  }

  ListResult.new(orca_api.call(api_path, params: params, body: body))
end

#new_builderObject



92
93
94
# File 'lib/orca_api/acceptance_service.rb', line 92

def new_builder
  AcceptanceBuilder.new
end

#update(acceptance_id, acceptance) ⇒ OrcaApi::Result

新規患者の受付更新(患者番号設定)

患者氏名のみを指定して登録した受付情報に患者番号を設定する。

Parameters:

  • acceptance_id (String)

    受付ID

  • acceptance (Hash)
    • "Acceptance_Date" (String) 受付日付。YYYY-mm-dd形式。
    • "Acceptance_Time" (String) 受付時間。HH:MM:SS形式。
    • "Patient_ID" (String) 患者番号
    • "Department_Code" (String) 診療科コード。 システム管理マスタの診療科目情報の診療科コードを参照。
    • "Physician_Code" (String) ドクターコード。
    • "Medical_Information" (String) 診療内容区分。 システム管理マスタの診療内容情報の診療内容コードを参照。 診療内容コード例)01:診察1、02:薬のみ、03:注射のみ、04:検査のみ、05:リハビリテーション、 06:健康診断、07:予防注射、99:該当なし
    • "HealthInsurance_Information" (Hash) 保険組合せ情報
      • "Insurance_Combination_Number" (String) 保険組合せ番号

Returns:

See Also:



74
75
76
77
78
79
80
# File 'lib/orca_api/acceptance_service.rb', line 74

def update(acceptance_id, acceptance)
  req = acceptance.merge(
    "Request_Number" => "03",
    "Acceptance_Id" => acceptance_id
  )
  call_acceptance(req)
end