Sha256: ae78601702b7138004645e2a5a0bdd343be8a6a2d5516b8a931738908c1144bf

Contents?: true

Size: 718 Bytes

Versions: 27

Compression:

Stored size: 718 Bytes

Contents

require_dependency "renalware/clinical"

module Renalware
  module Clinical
    class AllergyStatusesController < Clinical::BaseController
      def update
        authorize patient
        form = AllergyStatusForm.new(allergy_status_params)
        if form.save(patient, current_user)
          redirect_back fallback_location: patient_clinical_profile_path(patient),
                        notice: "Allergy status updated"
        else
          # we use client-side validation so will not get here
          raise NotImplementedError
        end
      end

      private

      def allergy_status_params
        params.require(:clinical_allergy_status_form).permit(:no_known_allergies)
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.15 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.14 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.13 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.12 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.11 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.9 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.8 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.7 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.5 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.4 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.3 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.2 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.1 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.rc9 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.rc8 app/controllers/renalware/clinical/allergy_statuses_controller.rb