summaryrefslogtreecommitdiff
path: root/rvh/app
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-15 12:36:18 -0600
committermo khan <mo.khan@gmail.com>2020-03-15 12:36:18 -0600
commit1751eb5048052a73b486b651d302e7e9fdf738c0 (patch)
tree3375b7094f69770c0e6e73b29711fc394770e5d6 /rvh/app
parent7c69e5022d3d11b8d727498d21ac804a0797913c (diff)
Record treatments
Diffstat (limited to 'rvh/app')
-rw-r--r--rvh/app/models/employee.rb2
-rw-r--r--rvh/app/models/patient.rb1
-rw-r--r--rvh/app/models/treatment.rb4
3 files changed, 7 insertions, 0 deletions
diff --git a/rvh/app/models/employee.rb b/rvh/app/models/employee.rb
index d5e0233..b9571d1 100644
--- a/rvh/app/models/employee.rb
+++ b/rvh/app/models/employee.rb
@@ -1,2 +1,4 @@
class Employee < ApplicationRecord
+ belongs_to :account
+ has_many :treatments
end
diff --git a/rvh/app/models/patient.rb b/rvh/app/models/patient.rb
index 7e2676f..05bf8e9 100644
--- a/rvh/app/models/patient.rb
+++ b/rvh/app/models/patient.rb
@@ -1,4 +1,5 @@
class Patient < ApplicationRecord
belongs_to :account
has_one :bed
+ has_many :treatments
end
diff --git a/rvh/app/models/treatment.rb b/rvh/app/models/treatment.rb
new file mode 100644
index 0000000..8c28da1
--- /dev/null
+++ b/rvh/app/models/treatment.rb
@@ -0,0 +1,4 @@
+class Treatment < ApplicationRecord
+ belongs_to :employee
+ belongs_to :patient
+end