Class: OrcaApi::PatientService::HealthPublicInsuranceCommon
- Defined in:
- lib/orca_api/patient_service/health_public_insurance_common.rb
Overview
患者保険・公費情報を扱うサービスの共通処理
Direct Known Subclasses
Direct Known Subclasses
Defined Under Namespace
Classes: Result, UnselectedError
Instance Attribute Summary
Attributes inherited from Service
Instance Method Summary collapse
-
#fetch(id, base_date = nil) ⇒ Result
患者保険・公費情報を取得する(ロックなし).
-
#get(id) ⇒ Result
患者保険・公費情報を取得する.
-
#update(id, args) ⇒ Result, UnselectedError
患者保険・公費情報を更新する.
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
#fetch(id, base_date = nil) ⇒ Result
患者保険・公費情報を取得する(ロックなし)
72 73 74 |
# File 'lib/orca_api/patient_service/health_public_insurance_common.rb', line 72 def fetch(id, base_date = nil) call_00(id, base_date) end |
#get(id) ⇒ Result
患者保険・公費情報を取得する
55 56 57 58 59 |
# File 'lib/orca_api/patient_service/health_public_insurance_common.rb', line 55 def get(id) res = call_01(id) unlock(res) res end |
#update(id, args) ⇒ Result, UnselectedError
患者保険・公費情報を更新する
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/orca_api/patient_service/health_public_insurance_common.rb', line 170 def update(id, args) res = call_01(id) if !res.locked? locked_result = res end if !res.ok? && res.api_result != "E50" return res end res = call_02(args, res) if !res.ok? return res end res = call_03_with_answer(args, res) if res.ok? locked_result = nil end res ensure unlock(locked_result) end |