Class: OrcaApi::PatientService::IncomeCommon

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

Overview

所得者情報・旧姓履歴・特記事項・患者個別情報を扱うサービスの共通処理

Direct Known Subclasses

Income, Maiden, Pension, Personally, SpecialNotes

Direct Known Subclasses

Income, Maiden, Pension, Personally, SpecialNotes

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

#get(id) ⇒ Object

取得



9
10
11
12
13
14
15
# File 'lib/orca_api/patient_service/income_common.rb', line 9

def get(id)
  res = call_01(id)
  if !res.locked?
    unlock(res)
  end
  res
end

#update(id, params) ⇒ Object

更新・削除



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/orca_api/patient_service/income_common.rb', line 18

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?
    locked_result = nil
  end
  res
ensure
  unlock(locked_result)
end