renalware-core 2.0.72 → 2.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/renalware/partials/_errors.scss +2 -1
- data/app/assets/stylesheets/renalware/partials/_tables.scss +10 -0
- data/app/controllers/renalware/clinics/clinic_visits_controller.rb +2 -1
- data/app/controllers/renalware/clinics/visits_controller.rb +1 -1
- data/app/helpers/renalware/definition_list_helper.rb +2 -2
- data/app/models/renalware/pathology/lab.rb +4 -0
- data/app/models/renalware/pathology/observation_requests_attributes_builder.rb +5 -2
- data/app/models/renalware/patient.rb +7 -1
- data/app/presenters/renalware/clinics/clinic_visit_presenter.rb +14 -0
- data/app/views/renalware/admissions/requests/destroy.js.erb +1 -1
- data/app/views/renalware/patients/patients/_form.html.slim +7 -6
- data/app/views/renalware/patients/patients/edit.html.slim +2 -5
- data/app/views/renalware/patients/patients/new.html.slim +2 -4
- data/config/initializers/routing_draw.rb +9 -0
- data/config/routes.rb +29 -512
- data/config/routes/accesses.rb +11 -0
- data/config/routes/admin.rb +9 -0
- data/config/routes/admissions.rb +13 -0
- data/config/routes/api.rb +22 -0
- data/config/routes/clinical.rb +11 -0
- data/config/routes/clinics.rb +8 -0
- data/config/routes/directory.rb +9 -0
- data/config/routes/drugs.rb +11 -0
- data/config/routes/events.rb +29 -0
- data/config/routes/fallbacks.rb +12 -0
- data/config/routes/hd.rb +53 -0
- data/config/routes/hospitals.rb +10 -0
- data/config/routes/letters.rb +45 -0
- data/config/routes/low_clearance.rb +16 -0
- data/config/routes/medications.rb +24 -0
- data/config/routes/messaging.rb +16 -0
- data/config/routes/modalities.rb +10 -0
- data/config/routes/pathology.rb +30 -0
- data/config/routes/patients.rb +40 -0
- data/config/routes/pd.rb +31 -0
- data/config/routes/renal.rb +22 -0
- data/config/routes/reporting.rb +6 -0
- data/config/routes/research.rb +7 -0
- data/config/routes/snippets.rb +11 -0
- data/config/routes/system.rb +40 -0
- data/config/routes/transplants.rb +45 -0
- data/config/routes/virology.rb +12 -0
- data/db/migrate/20190315125638_add_timestamps_to_pathology_description_tables.rb +10 -0
- data/db/seeds/default/system/countries.rb +5 -2
- data/lib/renalware/version.rb +1 -1
- metadata +60 -16
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :accesses do
|
5
|
+
resource :dashboard, only: :show
|
6
|
+
resources :assessments, except: [:index, :destroy]
|
7
|
+
resources :procedures, except: [:index, :destroy]
|
8
|
+
resources :profiles, except: [:index, :destroy]
|
9
|
+
resources :plans, except: [:index, :destroy]
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
resources :admissions, only: [:index], controller: "admissions/patient_admissions"
|
5
|
+
end
|
6
|
+
|
7
|
+
namespace :admissions do
|
8
|
+
resources :requests, except: :show do
|
9
|
+
post :sort, on: :collection
|
10
|
+
end
|
11
|
+
resources :consults, except: :show
|
12
|
+
resources :admissions, except: :show
|
13
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :api do
|
4
|
+
# The UKRDC XML API
|
5
|
+
namespace :ukrdc, defaults: { format: :xml } do
|
6
|
+
resources :patients,
|
7
|
+
only: :show,
|
8
|
+
constraints: { format: :xml }
|
9
|
+
end
|
10
|
+
# The JSON API
|
11
|
+
namespace :v1, constraints: { format: :json }, defaults: { format: :json } do
|
12
|
+
resources :patients, only: [:show, :index], controller: "patients/patients" do
|
13
|
+
resources :prescriptions, controller: "medications/prescriptions", only: [:index]
|
14
|
+
namespace :hd do
|
15
|
+
resource :current_profile,
|
16
|
+
only: :show,
|
17
|
+
path: "/profiles/current",
|
18
|
+
controller: "current_profile"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :clinical do
|
5
|
+
resources :allergies, only: [:create, :destroy]
|
6
|
+
resource :allergy_status, only: [:update]
|
7
|
+
resource :profile, only: [:show, :edit, :update]
|
8
|
+
resources :dry_weights, only: [:new, :create, :index]
|
9
|
+
resources :body_compositions, except: :destroy
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
resources :clinic_visits, controller: "clinics/clinic_visits"
|
5
|
+
end
|
6
|
+
|
7
|
+
resources :appointments, controller: "clinics/appointments", only: [:new, :create, :index]
|
8
|
+
resources :clinic_visits, only: :index, controller: "clinics/visits"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
resources :events, only: [:new, :create, :index], controller: "events/events"
|
5
|
+
constraints(format: /(pdf)/) do
|
6
|
+
resources :events, only: :show, controller: "events/events"
|
7
|
+
end
|
8
|
+
|
9
|
+
resources :swabs,
|
10
|
+
only: [:new, :create, :edit, :update],
|
11
|
+
controller: "events/swabs",
|
12
|
+
defaults: { slug: :swabs }
|
13
|
+
|
14
|
+
resources :investigations,
|
15
|
+
only: [:new, :create, :edit, :update],
|
16
|
+
controller: "events/investigations",
|
17
|
+
defaults: { slug: :investigations }
|
18
|
+
|
19
|
+
# Here we could enable new event by any other slug
|
20
|
+
# eg patient_new_specific_event(slug: "transplant_biopsies")
|
21
|
+
# get "events/:slug/new",
|
22
|
+
# to: "events/events#new",
|
23
|
+
# as: :new_specific_event
|
24
|
+
# or we could hardwire routes as we do for swabs.
|
25
|
+
end
|
26
|
+
|
27
|
+
namespace :events do
|
28
|
+
resources :types, except: :show
|
29
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Some safety-net routes in case we happen to fall through the above routes without a match.
|
4
|
+
# For example, redirect to the HD dashboard if they hit just /hd/
|
5
|
+
# In theory we should only ever hit these routes if the user manually edits/enters the URL.
|
6
|
+
get "/patients/:id/hd", to: redirect("/patients/%{id}/hd/dashboard")
|
7
|
+
get "/patients/:id/pd", to: redirect("/patients/%{id}/pd/dashboard")
|
8
|
+
get "/patients/:id/transplants", to: redirect("/patients/%{id}")
|
9
|
+
get "/patients/:id/transplants/donor",
|
10
|
+
to: redirect("/patients/%{id}/transplants/donor/dashboard")
|
11
|
+
get "/patients/:id/transplants/recipient",
|
12
|
+
to: redirect("/patients/%{id}/transplants/recipient/dashboard")
|
data/config/routes/hd.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :hd do
|
5
|
+
resource :mdm, only: :show, controller: "mdm"
|
6
|
+
resource :dashboard, only: :show
|
7
|
+
resource :protocol,
|
8
|
+
only: :show,
|
9
|
+
constraints: { format: /(pdf)/ },
|
10
|
+
defaults: { format: :pdf }
|
11
|
+
resource :preference_set, only: [:edit, :update]
|
12
|
+
resource :current_profile,
|
13
|
+
only: [:show, :edit, :update],
|
14
|
+
path: "/profiles/current",
|
15
|
+
controller: "current_profile"
|
16
|
+
resources :historical_profiles,
|
17
|
+
only: [:index, :show],
|
18
|
+
path: "/profiles/historical"
|
19
|
+
resources :sessions
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
namespace :hd do
|
24
|
+
scope format: true, constraints: { format: :json } do
|
25
|
+
get "patients_dialysing_at_unit" => "patients#dialysing_at_unit"
|
26
|
+
get "patients_dialysing_at_hospital" => "patients#dialysing_at_hospital"
|
27
|
+
end
|
28
|
+
|
29
|
+
resources :transmission_logs, only: [:show, :index]
|
30
|
+
resources :cannulation_types, except: :show
|
31
|
+
resources :dialysers, except: :show
|
32
|
+
resources :dialysates, except: :show
|
33
|
+
resource :ongoing_sessions, only: :show
|
34
|
+
resources :mdm_patients, only: :index
|
35
|
+
resources :mdm_patients, only: :index
|
36
|
+
constraints(named_filter: /(on_worryboard)/) do
|
37
|
+
get "mdm_patients/:named_filter", to: "mdm_patients#index", as: :filtered_mdm_patients
|
38
|
+
end
|
39
|
+
resources :unmet_preferences, only: :index
|
40
|
+
resources :units, only: [] do
|
41
|
+
resources :stations do
|
42
|
+
post :sort, on: :collection
|
43
|
+
end
|
44
|
+
resources :diaries, only: [:index, :show]
|
45
|
+
get "diaries/:year/:week_number/edit", to: "diaries#edit", as: :edit_diary
|
46
|
+
end
|
47
|
+
resources :diaries, only: [] do
|
48
|
+
resources :slots, except: :show, controller: :diary_slots
|
49
|
+
get "slots/day/:day_of_week/period/:diurnal_period_code_id/station/:station_id",
|
50
|
+
to: "diary_slots#show",
|
51
|
+
as: :refresh_slot
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :letters do
|
5
|
+
resources :contacts, only: [:index, :new, :create, :edit, :update]
|
6
|
+
resources :letters do
|
7
|
+
resource :pending_review, controller: "pending_review_letters", only: :create
|
8
|
+
resource :rejected, controller: "rejected_letters", only: :create
|
9
|
+
resource :approved, controller: "approved_letters", only: :create
|
10
|
+
resource :completed, controller: "completed_letters", only: [:new, :create]
|
11
|
+
resource :formatted, controller: "formatted_letters", only: :show
|
12
|
+
resource :printable,
|
13
|
+
controller: "printable_letters",
|
14
|
+
only: :show,
|
15
|
+
constraints: { format: /(pdf)/ },
|
16
|
+
defaults: { format: :pdf }
|
17
|
+
collection do
|
18
|
+
get :contact_added
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
namespace :letters do
|
25
|
+
resource :pdf_letter_cache, only: [:destroy], controller: "pdf_letter_cache"
|
26
|
+
resources :descriptions, only: :search do
|
27
|
+
collection do
|
28
|
+
get :search
|
29
|
+
end
|
30
|
+
end
|
31
|
+
resource :list, only: :show
|
32
|
+
resources :letters, only: [] do
|
33
|
+
resources :electronic_receipts, only: [] do
|
34
|
+
patch :mark_as_read, on: :member
|
35
|
+
end
|
36
|
+
end
|
37
|
+
resources :electronic_receipts, only: [] do
|
38
|
+
collection do
|
39
|
+
get :unread
|
40
|
+
get :read
|
41
|
+
get :sent
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
get "authors/:author_id/letters", to: "letters/letters#author", as: "author_letters"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :low_clearance do
|
5
|
+
resource :dashboard, only: :show
|
6
|
+
resource :profile, only: [:edit, :update]
|
7
|
+
resource :mdm, only: :show, controller: "mdm"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
namespace :low_clearance do
|
12
|
+
resources :mdm_patients, only: :index
|
13
|
+
constraints(named_filter: /#{Renalware::LowClearance::MDM_FILTERS.join("|")}/) do
|
14
|
+
get "mdm_patients/:named_filter", to: "mdm_patients#index", as: :filtered_mdm_patients
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
resources :prescriptions, controller: "medications/prescriptions", except: [:destroy]
|
5
|
+
namespace :medications do
|
6
|
+
namespace :home_delivery do
|
7
|
+
resources :prescriptions,
|
8
|
+
only: [:index],
|
9
|
+
constraints: { format: /(pdf)/ },
|
10
|
+
defaults: { format: :pdf }
|
11
|
+
end
|
12
|
+
resources :prescriptions, only: [] do
|
13
|
+
resource :termination, only: [:new, :create]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
namespace :medications do
|
19
|
+
# medications_esa_prescriptions => /medications/esa_prescriptions
|
20
|
+
resources :esa_prescriptions,
|
21
|
+
only: :index,
|
22
|
+
drug_type_name: :esa,
|
23
|
+
controller: "drug_types/prescriptions"
|
24
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :messaging do
|
4
|
+
namespace :internal do
|
5
|
+
resources :messages, only: [:new, :create] do
|
6
|
+
resources :receipts, only: [] do
|
7
|
+
patch :mark_as_read, on: :member
|
8
|
+
end
|
9
|
+
end
|
10
|
+
scope :messages do
|
11
|
+
get "inbox", to: "receipts#unread", as: :inbox
|
12
|
+
get "read", to: "receipts#read", as: :read_receipts
|
13
|
+
get "sent", to: "receipts#sent", as: :sent_messages
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
resources :modalities, only: [:new, :create, :index], controller: "modalities/modalities"
|
5
|
+
end
|
6
|
+
|
7
|
+
namespace :modalities do
|
8
|
+
resources :descriptions, except: [:show]
|
9
|
+
resources :reasons, only: [:index]
|
10
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :pathology do
|
5
|
+
get "observations/current",
|
6
|
+
to: "current_observation_results#index",
|
7
|
+
as: "current_observations"
|
8
|
+
get "observations/recent",
|
9
|
+
to: "recent_observation_results#index",
|
10
|
+
as: "recent_observations"
|
11
|
+
get "observations/historical",
|
12
|
+
to: "historical_observation_results#index",
|
13
|
+
as: "historical_observations"
|
14
|
+
resources :observation_requests, only: [:index, :show]
|
15
|
+
resources :patient_rules
|
16
|
+
get "descriptions/:description_id/observations",
|
17
|
+
to: "observations#index",
|
18
|
+
as: "observations"
|
19
|
+
resources :required_observations, only: :index
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
namespace :pathology do
|
24
|
+
namespace :requests do
|
25
|
+
# NOTE: This needs to be POST since the params may exceed url char limit in GET
|
26
|
+
post "requests/new", to: "requests#new", as: "new_request"
|
27
|
+
resources :requests, only: [:create, :index, :show]
|
28
|
+
resources :rules, only: :index
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :patients do
|
4
|
+
resources :primary_care_physicians
|
5
|
+
resources :practices, only: [] do
|
6
|
+
collection do
|
7
|
+
get :search
|
8
|
+
end
|
9
|
+
resources :primary_care_physicians,
|
10
|
+
only: :index,
|
11
|
+
controller: "practices/primary_care_physicians"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
resources :bookmarks, controller: "patients/bookmarks", only: [:destroy, :index]
|
16
|
+
resource :dashboard, only: :show, controller: "dashboard/dashboards"
|
17
|
+
resource :worryboard, only: :show, controller: "patients/worryboard"
|
18
|
+
resources :deaths, only: :index, as: :patient_deaths
|
19
|
+
|
20
|
+
resources :patients, except: [:destroy], controller: "patients/patients" do
|
21
|
+
collection do
|
22
|
+
get :search
|
23
|
+
end
|
24
|
+
|
25
|
+
resource :clinical_summary, only: :show, controller: "patients/clinical_summaries"
|
26
|
+
resource :death, only: [:edit, :update]
|
27
|
+
resource :primary_care_physician,
|
28
|
+
controller: "patients/primary_care_physician",
|
29
|
+
only: [:edit, :update]
|
30
|
+
|
31
|
+
resources :bookmarks, only: :create, controller: "patients/bookmarks"
|
32
|
+
resources :alerts, only: [:new, :create, :destroy], controller: "patients/alerts"
|
33
|
+
resource :worry, only: [:create, :destroy], controller: "patients/worry"
|
34
|
+
|
35
|
+
# Problems
|
36
|
+
resources :problems, controller: "problems/problems" do
|
37
|
+
post :sort, on: :collection
|
38
|
+
resources :notes, only: [:index, :new, :create], controller: "problems/notes"
|
39
|
+
end
|
40
|
+
end
|
data/config/routes/pd.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :pd do
|
5
|
+
resource :dashboard, only: :show
|
6
|
+
resources :apd_regimes,
|
7
|
+
controller: "regimes",
|
8
|
+
type: "PD::APDRegime",
|
9
|
+
only: [:new, :create, :edit, :update, :show]
|
10
|
+
resources :capd_regimes,
|
11
|
+
controller: "regimes",
|
12
|
+
type: "PD::CAPDRegime",
|
13
|
+
only: [:new, :create, :edit, :update, :show]
|
14
|
+
resources :regimes, only: [:new, :create, :edit, :update, :show]
|
15
|
+
resources :peritonitis_episodes, only: [:new, :create, :show, :edit, :update]
|
16
|
+
resources :exit_site_infections, only: [:new, :create, :show, :edit, :update]
|
17
|
+
resources :pet_adequacy_results, except: [:destroy]
|
18
|
+
resources :assessments, except: [:index, :destroy]
|
19
|
+
resources :training_sessions, except: [:index, :destroy]
|
20
|
+
resource :mdm, only: :show, controller: "mdm"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
namespace :pd do
|
25
|
+
resources :bag_types, except: [:show]
|
26
|
+
resources :infection_organisms
|
27
|
+
resources :mdm_patients, only: :index
|
28
|
+
constraints(named_filter: /(on_worryboard)/) do
|
29
|
+
get "mdm_patients/:named_filter", to: "mdm_patients#index", as: :filtered_mdm_patients
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
resources :patients, only: [] do
|
4
|
+
namespace :renal do
|
5
|
+
resource :profile, only: [:show, :edit, :update]
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace :renal do
|
10
|
+
resources :prd_descriptions, only: [:search] do
|
11
|
+
collection do
|
12
|
+
get :search
|
13
|
+
end
|
14
|
+
end
|
15
|
+
resources :aki_alerts, only: [:edit, :update, :index]
|
16
|
+
resources :registry_preflight_checks, only: [] do
|
17
|
+
collection do
|
18
|
+
get :patients
|
19
|
+
get :deaths
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|