Sha256: e6a4917c6aa811844c8c18d839dec8b3c5c4bac1c20e0bba0c9066181183ca98
Contents?: true
Size: 918 Bytes
Versions: 16
Compression:
Stored size: 918 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/clinical" require "document/base" module Renalware module Clinical class DryWeight < ApplicationRecord include PatientScope include Accountable belongs_to :patient, class_name: "Renalware::Clinical::Patient", touch: true belongs_to :assessor, class_name: "User", foreign_key: "assessor_id" has_paper_trail class_name: "Renalware::Clinical::Version", on: [:create, :update, :destroy] scope :ordered, -> { order(assessed_on: :desc, created_at: :desc) } validates :patient, presence: true validates :assessor, presence: true validates :weight, presence: true, "renalware/patients/weight" => true validates :assessed_on, presence: true validates :assessed_on, timeliness: { type: :date, allow_blank: false } def self.policy_class BasePolicy end end end end
Version data entries
16 entries across 16 versions & 1 rubygems