Class: Dcm4chee::TrashedInstance
- Inherits:
-
Object
- Object
- Dcm4chee::TrashedInstance
- Includes:
- DataMapper::Resource, DataMapper::Searcher, HasDicomObject
- Defined in:
- app/models/dcm4chee/trashed_instance.rb
Class Method Summary collapse
Instance Method Summary collapse
- #as_json(opts = {}) ⇒ Object
-
#created_at ⇒ DateTime
Created time.
-
#id ⇒ Integer
Primary key.
- #remove_from_trash ⇒ Object
- #restore_from_trash ⇒ Object
- #series_iuid ⇒ Object
-
#sop_iuid ⇒ String
DICOM SOP Instance UID(0008,0018).
- #study_iuid ⇒ Object
-
#trashed_series_id ⇒ Integer
Foreign key of Series.
Methods included from HasDicomObject
Class Method Details
Instance Method Details
#as_json(opts = {}) ⇒ Object
44 45 46 47 48 49 50 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 44 def as_json(opts = {}) opts[:methods] ||= [] opts[:methods] << :series_iuid opts[:methods] << :study_iuid super(opts) end |
#created_at ⇒ DateTime
Returns created time.
18 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 18 property :created_at, DateTime, field: 'created_time' |
#id ⇒ Integer
Returns primary key.
12 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 12 property :id, Serial, field: 'pk' |
#remove_from_trash ⇒ Object
32 33 34 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 32 def remove_from_trash Dcm4chee.content_edit_service.delete_instance(id) end |
#restore_from_trash ⇒ Object
28 29 30 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 28 def restore_from_trash Dcm4chee.content_edit_service.undelete_instance(id) end |
#series_iuid ⇒ Object
40 41 42 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 40 def series_iuid trashed_series.series_iuid end |
#sop_iuid ⇒ String
Returns DICOM SOP Instance UID(0008,0018).
21 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 21 property :sop_iuid, Text, field: 'sop_iuid' |
#study_iuid ⇒ Object
36 37 38 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 36 def study_iuid trashed_series.trashed_study.study_iuid end |
#trashed_series_id ⇒ Integer
Returns foreign key of Series.
15 |
# File 'app/models/dcm4chee/trashed_instance.rb', line 15 property :trashed_series_id, Integer, field: 'series_fk' |