Class: OrcaApi::PatientService::PiEtcMoney
- Inherits:
-
PiMoneyCommon
- Object
- Service
- PiMoneyCommon
- OrcaApi::PatientService::PiEtcMoney
- Defined in:
- lib/orca_api/patient_service/pi_etc_money.rb
Overview
他一部負担額情報を扱うサービス
Instance Attribute Summary
Attributes inherited from Service
Instance Method Summary collapse
-
#get(id, pi_id, number, start_date) ⇒ OrcaApi::Result
他一部負担額一覧を取得する.
-
#update(id, pi_id, number, start_date, args) ⇒ 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
#get(id, pi_id, number, start_date) ⇒ OrcaApi::Result
他一部負担額一覧を取得する
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/orca_api/patient_service/pi_etc_money.rb', line 27 def get(id, pi_id, number, start_date) res = call_01(id) if !res.ok? return res end res = call_02(pi_id, res) if !res.ok? return res end res = call_04(number, start_date, res) res ensure unlock(res) end |
#update(id, pi_id, number, start_date, args) ⇒ OrcaApi::Result
他一部負担額を更新する
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/orca_api/patient_service/pi_etc_money.rb', line 76 def update(id, pi_id, number, start_date, args) locked_result = res = call_01(id) if !res.ok? return res end res = call_02(pi_id, res) if !res.ok? return res end res = call_04(number, start_date, res) if !res.ok? return res end res = call_05(args, res) if res.ok? locked_result = nil end res ensure unlock(locked_result) end |