Sha256: ce057ffcf35a270f3289ebdee8bffb106ae7d24fdc595d9a406bba737c18edbe
Contents?: true
Size: 910 Bytes
Versions: 5
Compression:
Stored size: 910 Bytes
Contents
class Encounter < Entry field :admitType, as: :admit_type, type: Hash field :dischargeDisposition, as: :discharge_disposition, type: Hash field :admitTime, as: :admit_time, type: Integer field :dischargeTime, as: :discharge_time, type: Integer embeds_one :transferTo, class_name: "Transfer" embeds_one :transferFrom, class_name: "Transfer" embeds_one :facility embeds_one :reason, class_name: "Entry" belongs_to :performer, class_name: "Provider" alias :transfer_to :transferTo alias :transfer_to= :transferTo= alias :transfer_from :transferFrom alias :transfer_from= :transferFrom= def shift_dates(date_diff) super if self.facility self.facility.shift_dates(date_diff) end self.admitTime = (self.admitTime.nil?) ? nil : self.admitTime + date_diff self.dischargeTime = (self.dischargeTime.nil?) ? nil : self.dischargeTime + date_diff end end
Version data entries
5 entries across 5 versions & 1 rubygems