Sha256: cdcc23d66b76fa0c04a39e486b91295d81d2f3d4b2bc900dfa0e5c1c39b4bbdf

Contents?: true

Size: 719 Bytes

Versions: 8

Compression:

Stored size: 719 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

8 entries across 8 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta11 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta10 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta9 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta8 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta7 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta6 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta5 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.0.pre.beta4 app/controllers/renalware/clinical/allergy_statuses_controller.rb