Class: Dcm4chee::Api::V1::PatientsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Dcm4chee::ApplicationController
- BaseController
- Dcm4chee::Api::V1::PatientsController
- Defined in:
- app/controllers/dcm4chee/api/v1/patients_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Restore a patient from the trash.
-
#index ⇒ Object
Search for patients.
Instance Method Details
#create ⇒ Object
Restore a patient from the trash.
68 69 70 71 72 73 |
# File 'app/controllers/dcm4chee/api/v1/patients_controller.rb', line 68 def create trashed_patient = TrashedPatient.get!(params[:trashed_patient_id]) trashed_patient.restore_from_trash head :created end |
#index ⇒ Object
Search for patients. Supported querying conditions:
name
pid
pid_issuer
studies.study_at
studies.accession_no
studies.series.modality
studies.series.source_aet
Check DataMapper::Searcher::ClassMethods for supported querying operators.
pagination:
page # default 1
limit # default 20
50 51 52 53 54 55 |
# File 'app/controllers/dcm4chee/api/v1/patients_controller.rb', line 50 def index patients = Patient.search(params[:q]). page(params[:page] || 1, per_page: params[:limit] || 20) render json: { patients: patients, total: patients.pager.total } end |