Sha256: 493d25e178c5df5fbaa265bec612959865002753e5ccd9da912b972681500195

Contents?: true

Size: 749 Bytes

Versions: 142

Compression:

Stored size: 749 Bytes

Contents

# frozen_string_literal: true

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

142 entries across 142 versions & 1 rubygems

Version Path
renalware-core-2.0.127 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.126 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.125 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.124 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.123 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.121 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.120 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.119 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.118 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.117 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.116 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.115 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.113 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.112 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.111 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.110 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.109 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.108 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.106 app/controllers/renalware/clinical/allergy_statuses_controller.rb
renalware-core-2.0.105 app/controllers/renalware/clinical/allergy_statuses_controller.rb