Module: PatientChild

Included in:
AbstractResult, AdvanceDirective, Allergy, Condition, Encounter, Immunization, InformationSource, InsuranceProvider, Language, MedicalEquipment, Medication, PatientIdentifier, Procedure, Provider, RegistrationInformation, Support
Defined in:
lib/patient_child.rb

Overview

This module is included by models that represent a subsection of a patient record.

Class Method Summary (collapse)

Class Method Details

+ (Object) included(base)



5
6
7
8
9
10
# File 'lib/patient_child.rb', line 5

def self.included(base)
  base.class_eval do
    belongs_to :patient
    after_save { |r| r.patient.update_attributes(:updated_at => DateTime.now) }
  end
end