lib/health-data-standards/models/entry.rb in health-data-standards-3.3.0 vs lib/health-data-standards/models/entry.rb in health-data-standards-3.4.0
- old
+ new
@@ -13,11 +13,10 @@
field :specifics, type: String
field :time, type: Integer
field :start_time, type: Integer
field :end_time, type: Integer
field :status_code, type: Hash
- field :free_text, type: String
field :mood_code, type: String, default: "EVN"
field :negationInd, type: Boolean
field :negationReason, type: Hash
field :oid, type: String
field :reason, type: Hash
@@ -202,8 +201,16 @@
def shift_dates(date_diff)
self.start_time = self.start_time.nil? ? nil : (self.start_time + date_diff)
self.end_time = self.end_time.nil? ? nil : (self.end_time + date_diff)
self.time = self.time.nil? ? nil : (self.time + date_diff)
+ end
+
+ def identifier
+ if respond_to?(:cda_identifier) && self.cda_identifier.present?
+ self.cda_identifier
+ else
+ self.id
+ end
end
end
\ No newline at end of file