Class: OrcaApi::PatientService::AccidentInsurance
- Defined in:
- lib/orca_api/patient_service/accident_insurance.rb
Overview
患者労災・自賠責保険情報を扱うサービス
Defined Under Namespace
Classes: UnselectedError
Instance Attribute Summary
Attributes inherited from Service
Instance Method Summary collapse
-
#fetch(id) ⇒ Object
取得(ロックなし).
-
#get(id) ⇒ Object
取得.
-
#update(id, params) ⇒ Object
登録・更新・削除.
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) ⇒ Object
取得(ロックなし)
33 34 35 |
# File 'lib/orca_api/patient_service/accident_insurance.rb', line 33 def fetch(id) call_00(id) end |
#get(id) ⇒ Object
取得
22 23 24 25 26 27 28 |
# File 'lib/orca_api/patient_service/accident_insurance.rb', line 22 def get(id) res = call_01(id) if !res.locked? unlock(res) end res end |
#update(id, params) ⇒ Object
登録・更新・削除
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/orca_api/patient_service/accident_insurance.rb', line 38 def update(id, params) res = call_01(id) if !res.locked? locked_result = res end if !res.ok? return res end res = call_02(params, res) if !res.ok? return res end res = call_03_with_answer(params, res) if res.ok? locked_result = nil end res ensure unlock(locked_result) end |