Class: OrcaApi::AcceptanceService
- Defined in:
- lib/orca_api/acceptance_service.rb
Overview
受付業務を扱うクラス
Defined Under Namespace
Classes: AcceptanceBuilder, ListResult
Instance Attribute Summary
Attributes inherited from Service
Instance Method Summary collapse
- #create(acceptance) ⇒ Object
- #destroy(acceptance_id, patient_id) ⇒ Object
- #list(klass: "03", base_date: nil, department_code: nil, physician_code: nil, medical_information: nil) ⇒ Object
- #new_builder ⇒ Object
-
#update(acceptance_id, acceptance) ⇒ OrcaApi::Result
新規患者の受付更新(患者番号設定).
Methods inherited from Service
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_builder ⇒ Object
92 93 94 |
# File 'lib/orca_api/acceptance_service.rb', line 92 def new_builder AcceptanceBuilder.new end |
#update(acceptance_id, acceptance) ⇒ OrcaApi::Result
新規患者の受付更新(患者番号設定)
患者氏名のみを指定して登録した受付情報に患者番号を設定する。
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 |