summaryrefslogtreecommitdiff
path: root/rvh/app
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-15 15:27:57 -0600
committermo khan <mo.khan@gmail.com>2020-03-15 15:27:57 -0600
commitfac25fd9d8220c3aaee2534831e3843a2dd5a706 (patch)
tree7bdc245dcf3bf1e5c40827ee77a2e6d3d2ddd527 /rvh/app
parent028f041d32cc39efcfd5ddec29e14fbd60a06fd6 (diff)
Rename employee to more specific role
Diffstat (limited to 'rvh/app')
-rw-r--r--rvh/app/models/patient.rb2
-rw-r--r--rvh/app/models/treatment.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/rvh/app/models/patient.rb b/rvh/app/models/patient.rb
index 05bf8e9..ce7f17d 100644
--- a/rvh/app/models/patient.rb
+++ b/rvh/app/models/patient.rb
@@ -1,5 +1,7 @@
class Patient < ApplicationRecord
belongs_to :account
+ belongs_to :physician, class_name: Physician.name, foreign_key: :physician_id
+ belongs_to :referring_physician, class_name: Physician.name, foreign_key: :referring_physician_id
has_one :bed
has_many :treatments
end
diff --git a/rvh/app/models/treatment.rb b/rvh/app/models/treatment.rb
index 8c28da1..c7f6ea3 100644
--- a/rvh/app/models/treatment.rb
+++ b/rvh/app/models/treatment.rb
@@ -1,4 +1,4 @@
class Treatment < ApplicationRecord
- belongs_to :employee
+ belongs_to :physician
belongs_to :patient
end