Sha256: 59c1b62080abf8706dd02b762d534d6207c6c4ddc6e6e894ac48cb8c00ed29f1
Contents?: true
Size: 626 Bytes
Versions: 54
Compression:
Stored size: 626 Bytes
Contents
# frozen_string_literal: true module Renalware extend SeedsHelper log "Adding POS-S Renal Survey" do survey = Surveys::Survey.create(name: "PROM", code: "prom", description: "Patient health status") file_path = File.join(File.dirname(__FILE__), "pos_s_questions.csv") questions = [] CSV.foreach(file_path, headers: true) do |row| questions << Surveys::Question.new( survey: survey, code: row["code"], position: row["position"], label: row["label"], validation_regex: row["validation_regex"] ) end Surveys::Question.import! questions end end
Version data entries
54 entries across 54 versions & 1 rubygems