lib/health-data-standards/models/encounter.rb in health-data-standards-3.1.1 vs lib/health-data-standards/models/encounter.rb in health-data-standards-3.2.0
- old
+ new
@@ -21,6 +21,17 @@
alias :discharge_time= :dischargeTime=
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
\ No newline at end of file