Sha256: 119dd40f1125e5ae7a969b35a2ddff502087a835da1d8ecf44bfc46e1493959c
Contents?: true
Size: 1.03 KB
Versions: 28
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true require_dependency "renalware/medications" module Renalware module Medications module Delivery # Represents a prescription associated with for example a home_delivery print event. # Usually creating a home delivery prescriptions print event will mean we create a row for # drug types esa, immunosupressant or both. In the future other drug types may be associated # with the printing of prescriptions for a particular provider, so while this approach seems # a bit overkill, being normalised like this (as opposed to just say storing the drug type ids # or their codes in an array on medication_delivery_events) is more flexible and also provides # more scope for reporting. class EventPrescription < ApplicationRecord belongs_to :event, class_name: "Delivery::Event" belongs_to :prescription, class_name: "Medications::Prescription" validates :event, presence: true validates :prescription, presence: true end end end end
Version data entries
28 entries across 28 versions & 1 rubygems