Class: Dcm4chee::Api::V1::TrashedPatientsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Dcm4chee::ApplicationController
- BaseController
- Dcm4chee::Api::V1::TrashedPatientsController
- Defined in:
- app/controllers/dcm4chee/api/v1/trashed_patients_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Move a patient to the trash including the related studies, series, instances and files.
-
#destroy ⇒ Object
Delete a patient from the trash.
-
#index ⇒ Object
Search for patients from the trash.
Instance Method Details
#create ⇒ Object
Move a patient to the trash including the related studies, series, instances and files.
59 60 61 62 63 64 |
# File 'app/controllers/dcm4chee/api/v1/trashed_patients_controller.rb', line 59 def create patient = Patient.get!(params[:patient_id]) patient.move_to_trash head :created end |
#destroy ⇒ Object
Delete a patient from the trash.
75 76 77 78 79 80 |
# File 'app/controllers/dcm4chee/api/v1/trashed_patients_controller.rb', line 75 def destroy patient = TrashedPatient.get!(params[:id]) patient.remove_from_trash head :ok end |
#index ⇒ Object
Search for patients from the trash. Supported querying conditions:
name
pid
pid_issuer
trashed_studies.accession_no
trashed_studies.series.source_aet
Check DataMapper::Searcher::ClassMethods for supported querying operators.
41 42 43 44 45 |
# File 'app/controllers/dcm4chee/api/v1/trashed_patients_controller.rb', line 41 def index patients = TrashedPatient.search(params[:q]) respond_with trashed_patients: patients end |