Class: Dcm4chee::Api::V1::TrashedStudiesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Dcm4chee::ApplicationController
- BaseController
- Dcm4chee::Api::V1::TrashedStudiesController
- Defined in:
- app/controllers/dcm4chee/api/v1/trashed_studies_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Move a study to the trash including the related series, instances and files.
-
#destroy ⇒ Object
Delete a study from the trash.
-
#index ⇒ Object
Search for studies from the trash.
Instance Method Details
#create ⇒ Object
Move a study to the trash including the related series, instances and files.
55 56 57 58 59 60 |
# File 'app/controllers/dcm4chee/api/v1/trashed_studies_controller.rb', line 55 def create study = Study.get!(params[:study_id]) study.move_to_trash head :created end |
#destroy ⇒ Object
Delete a study from the trash.
71 72 73 74 75 76 |
# File 'app/controllers/dcm4chee/api/v1/trashed_studies_controller.rb', line 71 def destroy study = TrashedStudy.get!(params[:id]) study.remove_from_trash head :ok end |
#index ⇒ Object
Search for studies from the trash. Supported querying conditions:
trashed_patient_id
Check DataMapper::Searcher::ClassMethods for supported querying operators.
37 38 39 40 41 |
# File 'app/controllers/dcm4chee/api/v1/trashed_studies_controller.rb', line 37 def index studies = TrashedStudy.search(params[:q]) respond_with trashed_studies: studies end |