Sha256: 2d94f27babc2d5311d24ad2e0a4c5be735530997e9861950d564640da6b0ef54
Contents?: true
Size: 807 Bytes
Versions: 11
Compression:
Stored size: 807 Bytes
Contents
require_dependency "renalware/pd" module Renalware module PD class ExitSiteInfection < ApplicationRecord include PatientScope belongs_to :patient, class_name: "Renalware::Patient", touch: true has_many :prescriptions, as: :treatable, class_name: "Renalware::Medications::Prescription" has_many :medication_routes, through: :prescriptions has_many :patients, through: :prescriptions, as: :treatable has_many :infection_organisms, as: :infectable has_many :organism_codes, -> { uniq }, through: :infection_organisms, as: :infectable validates :patient, presence: true validates :diagnosis_date, presence: true scope :ordered, -> { order(diagnosis_date: :desc) } def self.policy_class BasePolicy end end end end
Version data entries
11 entries across 11 versions & 1 rubygems