renalware-core 2.0.160 → 2.0.161
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/javascripts/renalware/rollup_compiled.js +768 -201
- data/app/components/renalware/medications/tabbed_prescriptions_list_component.html.slim +2 -2
- data/app/components/renalware/pathology/sparkline_component.html.slim +1 -1
- data/app/components/renalware/pd/pet_results_component.html.slim +4 -4
- data/app/javascript/renalware/controllers/modal_controller.js +1 -1
- data/app/models/renalware/virology/vaccination.rb +10 -2
- data/app/models/renalware/virology/vaccination_type.rb +16 -0
- data/app/views/renalware/admin/playgrounds/show.html.slim +2 -2
- data/app/views/renalware/hd/prescription_administrations/_form.html.slim +2 -2
- data/app/views/renalware/medications/home_delivery/events/_edit.html.slim +4 -4
- data/app/views/renalware/medications/prescriptions/_form.html.slim +3 -3
- data/app/views/renalware/system/view_metadata/edit.html.slim +6 -6
- data/app/views/renalware/virology/vaccinations/_inputs.html.slim +2 -1
- data/app/views/renalware/virology/vaccinations/_toggled_cell.html.slim +1 -1
- data/db/migrate/20210105163944_create_virology_vaccination_types.rb +13 -0
- data/db/seeds/default/seeds.rb +1 -0
- data/db/seeds/default/virology/seeds.rb +3 -0
- data/db/seeds/default/virology/vaccination_types.rb +25 -0
- data/lib/renalware/version_number.rb +1 -1
- data/spec/factories/virology/vaccination_types.rb +8 -0
- metadata +8 -3
@@ -2,11 +2,11 @@ div(data-controller="tabs" data-tabs-active-tab="active")
|
|
2
2
|
.tabs-container
|
3
3
|
ul.list-reset.sub-nav
|
4
4
|
- groups.each do |group|
|
5
|
-
li(data-target="
|
5
|
+
li(data-tabs-target="tab" data-action="click->tabs#change")
|
6
6
|
a(class="" href="#" data-trigger-masonry-refresh="true")= group.title
|
7
7
|
|
8
8
|
- groups.each do |group|
|
9
|
-
.hidden(data-target="
|
9
|
+
.hidden(data-tabs-target="panel")
|
10
10
|
table.prescriptions-list
|
11
11
|
thead
|
12
12
|
tr
|
@@ -6,7 +6,7 @@
|
|
6
6
|
/ This is the stimulusjs version. See sparklines_controller.js
|
7
7
|
div(data-controller="pathology-sparklines"
|
8
8
|
data-pathology-sparklines-chart-data='[["2010-06-03T16:37:00.000+01:00","106"], ["2011-06-03T16:37:00.000+01:00","110"]]')
|
9
|
-
div(data-target="
|
9
|
+
div(data-pathology-sparklines-target="chart")
|
10
10
|
- else
|
11
11
|
/ This implementation uses ChartKick to insert the chart javascript into the
|
12
12
|
/ page. It works fine, but when there are 50 path results on screen, we are
|
@@ -7,12 +7,12 @@
|
|
7
7
|
.flex.justify-end
|
8
8
|
|
9
9
|
.inline-flex
|
10
|
-
a.reset.opacity-50.bg-white.m-05.pt-px.pb-0.px-1(href="#" data-target="
|
10
|
+
a.reset.opacity-50.bg-white.m-05.pt-px.pb-0.px-1(href="#" data-tabs-target="tab"
|
11
11
|
data-action="click->tabs#change")
|
12
12
|
svg.h-6.w-6.fill-current.text-black xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"
|
13
13
|
path d="M1 4h2v2H1V4zm4 0h14v2H5V4zM1 9h2v2H1V9zm4 0h14v2H5V9zm-4 5h2v2H1v-2zm4 0h14v2H5v-2z"
|
14
14
|
|
15
|
-
a.reset.opacity-50.bg-white.m-0.pt-px.px-2(data-target="
|
15
|
+
a.reset.opacity-50.bg-white.m-0.pt-px.px-2(data-tabs-target="tab" href="#"
|
16
16
|
data-action="click->tabs#change")
|
17
17
|
svg.h-6.w-6.stroke-current.text-black viewBox="0 0 24 26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"
|
18
18
|
path d="M12 20V10M18 20V4M6 20v-4"
|
@@ -20,7 +20,7 @@
|
|
20
20
|
= link_to "Show all", renalware.patient_pd_pet_results_path(patient), remote: true, class: "float-none button flex-initial secondary"
|
21
21
|
= link_to "Add", renalware.new_patient_pd_pet_result_path(patient), class: "float-none button flex-initial"
|
22
22
|
|
23
|
-
div#pet-results-table data-target="
|
23
|
+
div#pet-results-table data-tabs-target="panel"
|
24
24
|
|
25
25
|
= render "renalware/pd/pet_results/table",
|
26
26
|
patient: patient,
|
@@ -28,7 +28,7 @@
|
|
28
28
|
pagination: pagination,
|
29
29
|
current_user: current_user
|
30
30
|
|
31
|
-
.chart.hidden.mt-5 data-target="
|
31
|
+
.chart.hidden.mt-5 data-tabs-target="panel"
|
32
32
|
div(style="display:block; position:relative; height: 400px; width: 100%; text-align: center; margin-bottom: 20px")
|
33
33
|
#containerx(data-controller="pd-pet-chart"
|
34
34
|
data-pd-pet-chart-url=renalware.patient_pd_pet_results_path(patient, format: :json)
|
@@ -11,7 +11,7 @@
|
|
11
11
|
// <span>Open Modal</span>
|
12
12
|
// </a>
|
13
13
|
// <!-- Modal Container -->
|
14
|
-
// <div data-target="
|
14
|
+
// <div data-modal-target="container" data-action="click->modal#closeBackground keyup@window->modal#closeWithKeyboard" class="hidden animated fadeIn fixed inset-0 overflow-y-auto flex items-center justify-center" style="z-index: 9999;">
|
15
15
|
// <!-- Modal Inner Container -->
|
16
16
|
// <div class="max-h-screen w-full max-w-lg relative">
|
17
17
|
// <!-- Modal Card -->
|
@@ -17,12 +17,20 @@ module Renalware
|
|
17
17
|
end
|
18
18
|
|
19
19
|
class Document < Document::Embedded
|
20
|
-
attribute :type
|
20
|
+
attribute :type # This used to be a ::Document::Enum but now we load options from the db
|
21
21
|
attribute :drug, String
|
22
22
|
validates :type, presence: true
|
23
23
|
|
24
24
|
def to_s
|
25
|
-
[
|
25
|
+
[type_name, drug].reject(&:blank?).join(" - ")
|
26
|
+
end
|
27
|
+
|
28
|
+
# Try and find the proper name for the vaccination type - we only store the vaccination
|
29
|
+
# type code in the jsonb document. If no match found just display the code eg 'hbv_booster'.
|
30
|
+
# The Type mighjt have been deleted (has a deleted_at date) but we still want to display the
|
31
|
+
# actual name depite this, we include deleted rows when searching.
|
32
|
+
def type_name
|
33
|
+
VaccinationType.with_deleted.find_by(code: type)&.name || type
|
26
34
|
end
|
27
35
|
end
|
28
36
|
has_document
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_dependency "renalware/virology"
|
4
|
+
|
5
|
+
module Renalware
|
6
|
+
module Virology
|
7
|
+
class VaccinationType < ApplicationRecord
|
8
|
+
validates :name, presence: true, uniqueness: true
|
9
|
+
validates :code, presence: true, uniqueness: true
|
10
|
+
|
11
|
+
acts_as_paranoid
|
12
|
+
|
13
|
+
scope :ordered, -> { order(position: :asc, name: :asc) }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -34,7 +34,7 @@ css:
|
|
34
34
|
url: pathology_chart_data_admin_playground_path,
|
35
35
|
wrapper: nil,
|
36
36
|
method: :get,
|
37
|
-
data: { target
|
37
|
+
data: { "charts-target" => "form", action: "ajax:success->charts#redisplay" }) do |f|
|
38
38
|
|
39
39
|
= f.input :patient_id,
|
40
40
|
collection: [[form.patient_id, form.patient_id]],
|
@@ -52,7 +52,7 @@ css:
|
|
52
52
|
include_blank: false
|
53
53
|
= f.submit "Refresh", class: :button
|
54
54
|
|
55
|
-
#chart1 style="height: 300px; width: 500px" data-target="
|
55
|
+
#chart1 style="height: 300px; width: 500px" data-charts-target="chart"
|
56
56
|
|
57
57
|
/ To test tailwindcss
|
58
58
|
.max-w-sm.rounded.overflow-hidden.shadow-lg
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
= fpa.input :prescription_id, as: :hidden
|
18
18
|
|
19
|
-
.hd-drug-administration(data-
|
19
|
+
.hd-drug-administration(data-hd-prescription-administration-target="container")
|
20
20
|
.summary
|
21
21
|
.hd-drug
|
22
22
|
.hd-drug--name= prescription.drug_name
|
@@ -40,7 +40,7 @@
|
|
40
40
|
label: false,
|
41
41
|
input_html: { \
|
42
42
|
data: { \
|
43
|
-
|
43
|
+
"hd-prescription-administration-target" => "radio",
|
44
44
|
action: "change->hd-prescription-administration#toggleAdministered",
|
45
45
|
} \
|
46
46
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
remote: true,
|
8
8
|
authenticity_token: true,
|
9
9
|
method: :patch,
|
10
|
-
data: {
|
10
|
+
data: { "home-delivery-modal-target" => "form" },
|
11
11
|
as: :event) do |f|
|
12
12
|
|
13
13
|
.modal__header
|
@@ -24,7 +24,7 @@
|
|
24
24
|
/ - the first is initially displayed and has the print options and a print button
|
25
25
|
/ - the second is displayed once Print has been clicked, and asked asks for feedback as to
|
26
26
|
/ whether printing was successful or not. It it was successful we set
|
27
|
-
.form-fields data-
|
27
|
+
.form-fields data-home-delivery-modal-target="printOptions"
|
28
28
|
- homecare_forms = Renalware::Drugs::HomecareForm.all
|
29
29
|
= f.association :drug_type,
|
30
30
|
collection: Renalware::Drugs::Type.where(id: homecare_forms.map(&:drug_type_id)),
|
@@ -32,7 +32,7 @@
|
|
32
32
|
input_html: { \
|
33
33
|
data: { \
|
34
34
|
action: "change->home-delivery-modal#refreshForm", \
|
35
|
-
|
35
|
+
"home-delivery-modal-target" => "drugtype" \
|
36
36
|
} \
|
37
37
|
},
|
38
38
|
wrapper: :horizontal_medium
|
@@ -59,7 +59,7 @@
|
|
59
59
|
data: { action: "click->home-delivery-modal#askForPrintFeedback" },
|
60
60
|
**disabled_args
|
61
61
|
|
62
|
-
.show-after-printing.visuallyhidden data-
|
62
|
+
.show-after-printing.visuallyhidden data-home-delivery-modal-target="printFeedback"
|
63
63
|
|
64
64
|
h2 Was printing successful?
|
65
65
|
.right
|
@@ -38,16 +38,16 @@ ruby:
|
|
38
38
|
required: false,
|
39
39
|
wrapper: :horizontal_datepicker
|
40
40
|
|
41
|
-
span(data-target= "
|
41
|
+
span(data-prescriptions-target= "providers")
|
42
42
|
= f.input :provider,
|
43
43
|
collection: provider_codes,
|
44
44
|
as: :inline_radio_buttons,
|
45
45
|
label_method: :to_label,
|
46
46
|
wrapper: :horizontal_medium,
|
47
|
-
input_html: { data: { action: "change->prescriptions#toggleDeliveryDates", target
|
47
|
+
input_html: { data: { action: "change->prescriptions#toggleDeliveryDates", "prescriptions.target" => "providers"} }
|
48
48
|
|
49
49
|
/ Only show this if home_delivery provider is active/selected. See prescriptions stimulus controller.
|
50
|
-
.home_delivery_dates(style="display:none" data-target="
|
50
|
+
.home_delivery_dates(style="display:none" data-prescriptions-target="homeDeliveryDates")
|
51
51
|
.row
|
52
52
|
.small-12.medium-4.large-3.columns
|
53
53
|
.small-12.medium-8.large-9.columns
|
@@ -38,18 +38,18 @@ ruby:
|
|
38
38
|
/ Tabs - see also js stimulus tabs-controller
|
39
39
|
div(data-controller="tabs" data-tabs-active-tab="-mb-px border-l border-t border-r rounded-t")
|
40
40
|
ul.list-reset.flex.border-b.ml-0
|
41
|
-
li.-mb-px.mr-1(data-target="
|
41
|
+
li.-mb-px.mr-1(data-tabs-target="tab" data-action="click->tabs#change")
|
42
42
|
a.bg-white.inline-block.py-2.px-4.text-blue-500.hover:text-blue-700.font-semibold.no-underline(href="#") Columns
|
43
|
-
li.-mb-px.mr-1(data-target="
|
43
|
+
li.-mb-px.mr-1(data-tabs-target="tab" data-action="click->tabs#change")
|
44
44
|
a.bg-white.inline-block.py-2.px-4.text-blue-500.hover:text-blue-700.font-semibold.no-underline(href="#") Filters
|
45
|
-
li.-mb-px.mr-1(data-target="
|
45
|
+
li.-mb-px.mr-1(data-tabs-target="tab" data-action="click->tabs#change")
|
46
46
|
a.bg-white.inline-block.py-2.px-4.text-blue-500.hover:text-blue-700.font-semibold.no-underline(href="#") Previous versions
|
47
47
|
|
48
|
-
.hidden.py-4.px-4.border-l.border-b.border-r(data-target="
|
48
|
+
.hidden.py-4.px-4.border-l.border-b.border-r(data-tabs-target="panel")
|
49
49
|
= render "columns_table", view: view
|
50
|
-
.hidden.py-4.px-4.border-l.border-b.border-r(data-target="
|
50
|
+
.hidden.py-4.px-4.border-l.border-b.border-r(data-tabs-target="panel")
|
51
51
|
= render "filters_form", view: view
|
52
|
-
.hidden.py-4.px-4.border-l.border-b.border-r(data-target="
|
52
|
+
.hidden.py-4.px-4.border-l.border-b.border-r(data-tabs-target="panel")
|
53
53
|
= render "versions", view: view
|
54
54
|
|
55
55
|
.modal__footer
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/ See Vaccination.to_partial_path etc
|
2
2
|
/ Pulled into the New Event form via a js get to EventsController#new
|
3
3
|
= f.simple_fields_for :document, event.document do |fd|
|
4
|
-
|
4
|
+
/= fd.input :type, wrapper: :horizontal_medium
|
5
|
+
= fd.input :type, wrapper: :horizontal_medium, collection: Renalware::Virology::VaccinationType.ordered.pluck(:name, :code)
|
5
6
|
= fd.input :drug, wrapper: :horizontal_medium, collection: Renalware::Drugs::Drug.for(:vaccine).pluck(:name, :name)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
dl.dl-horizontal
|
5
5
|
dt= attr_name(document, :type, suffix: ":")
|
6
|
-
dd= document.
|
6
|
+
dd= document.type_name.presence || t("unspecified")
|
7
7
|
dt= attr_name(document, :drug, suffix: ":")
|
8
8
|
dd= document.drug.presence || t("unspecified")
|
9
9
|
dt= attr_name(event, :notes, suffix: ":")
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateVirologyVaccinationTypes < ActiveRecord::Migration[5.2]
|
2
|
+
within_renalware_schema do
|
3
|
+
def change
|
4
|
+
create_table :virology_vaccination_types do |t|
|
5
|
+
t.string :code, null: false, index: { unique: true }
|
6
|
+
t.string :name, null: false, index: { unique: true }
|
7
|
+
t.integer :position, null: false, default: 0
|
8
|
+
t.datetime :deleted_at
|
9
|
+
t.timestamps null: false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/db/seeds/default/seeds.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Renalware
|
4
|
+
module Virology
|
5
|
+
log "Adding virology vaccination types" do
|
6
|
+
{
|
7
|
+
hbv1: "HBV Vaccination 1",
|
8
|
+
hbv2: "HBV Vaccination 2",
|
9
|
+
hbv3: "HBV Vaccination 3",
|
10
|
+
hbv4: "HBV Vaccination 4",
|
11
|
+
hbv_booster: "HBV Booster",
|
12
|
+
influenza: "Influenza",
|
13
|
+
pneumococcus: "Pneumococcus",
|
14
|
+
covid19_1: "COVID-19 1",
|
15
|
+
covid19_2: "COVID-19 2",
|
16
|
+
patient_refused: "Patient Refused",
|
17
|
+
patient_refused_covid19: "Patient refused Covid-19 vaccine",
|
18
|
+
patient_refused_covid19_pfizer: "Patient refused Covid-19 vaccine Pfizer",
|
19
|
+
patient_refused_covid19_astrazenica: "Patient refused Covid-19 vaccine Astra Zeneca"
|
20
|
+
}.each do |code, name|
|
21
|
+
VaccinationType.find_or_create_by!(code: code, name: name)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renalware-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.161
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-import
|
@@ -2205,6 +2205,7 @@ files:
|
|
2205
2205
|
- app/models/renalware/virology/patient.rb
|
2206
2206
|
- app/models/renalware/virology/profile.rb
|
2207
2207
|
- app/models/renalware/virology/vaccination.rb
|
2208
|
+
- app/models/renalware/virology/vaccination_type.rb
|
2208
2209
|
- app/models/renalware/virology/version.rb
|
2209
2210
|
- app/models/renalware/zip_archive.rb
|
2210
2211
|
- app/pdfs/renalware/events/event_pdf.rb
|
@@ -4076,6 +4077,7 @@ files:
|
|
4076
4077
|
- db/migrate/20201023092859_remove_unused_indexes.rb
|
4077
4078
|
- db/migrate/20201105153422_update_medication_current_prescriptions_view.rb
|
4078
4079
|
- db/migrate/20201112152752_update_pd_mdm_patients_view1.rb
|
4080
|
+
- db/migrate/20210105163944_create_virology_vaccination_types.rb
|
4079
4081
|
- db/seeds.rb
|
4080
4082
|
- db/seeds/default/accesses/access_pd_catheter_insertion_techniques.csv
|
4081
4083
|
- db/seeds/default/accesses/access_pd_catheter_insertion_techniques.rb
|
@@ -4167,6 +4169,8 @@ files:
|
|
4167
4169
|
- db/seeds/default/ukrdc/modality_codes.csv
|
4168
4170
|
- db/seeds/default/ukrdc/modality_codes.rb
|
4169
4171
|
- db/seeds/default/ukrdc/seeds.rb
|
4172
|
+
- db/seeds/default/virology/seeds.rb
|
4173
|
+
- db/seeds/default/virology/vaccination_types.rb
|
4170
4174
|
- db/seeds/seeds_helper.rb
|
4171
4175
|
- db/triggers/feed_messages_preprocessing_trigger_v01.sql
|
4172
4176
|
- db/triggers/update_current_observation_set_trigger_v01.sql
|
@@ -4442,6 +4446,7 @@ files:
|
|
4442
4446
|
- spec/factories/transplants/rejection_treatments.rb
|
4443
4447
|
- spec/factories/ukrdc/modality_codes.rb
|
4444
4448
|
- spec/factories/virology/patients.rb
|
4449
|
+
- spec/factories/virology/vaccination_types.rb
|
4445
4450
|
- spec/factories/virology/vaccinations.rb
|
4446
4451
|
- spec/support/ajax_helpers.rb
|
4447
4452
|
- spec/support/capybara_helper.rb
|
@@ -4530,7 +4535,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
4530
4535
|
- !ruby/object:Gem::Version
|
4531
4536
|
version: '0'
|
4532
4537
|
requirements: []
|
4533
|
-
rubygems_version: 3.
|
4538
|
+
rubygems_version: 3.1.4
|
4534
4539
|
signing_key:
|
4535
4540
|
specification_version: 4
|
4536
4541
|
summary: Renalware core functionality as a mountable engine.
|