renalware-core 2.0.71 → 2.0.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/renalware/checkbox-empty.png +0 -0
- data/app/assets/stylesheets/renalware/medications_pdf.scss +206 -0
- data/app/controllers/renalware/medications/home_delivery/prescriptions_controller.rb +51 -0
- data/app/mailers/renalware/ukrdc/summary_mailer.rb +1 -1
- data/app/models/renalware/renal/aki_alert.rb +2 -0
- data/app/presenters/renalware/ukrdc/pathology_observation_presenter.rb +7 -1
- data/app/views/renalware/api/ukrdc/patients/_address.xml.builder +1 -1
- data/app/views/renalware/api/ukrdc/patients/_patient.xml.builder +6 -2
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_result_item.xml.builder +15 -20
- data/app/views/renalware/layouts/pdf.pdf.slim +2 -0
- data/app/views/renalware/medications/home_delivery/prescriptions/index.pdf.slim +93 -0
- data/app/views/renalware/medications/prescriptions/_extended_patient_details.html.slim +13 -0
- data/app/views/renalware/medications/prescriptions/_patient_details.html.slim +10 -0
- data/app/views/renalware/medications/prescriptions/index.html.slim +8 -1
- data/app/views/renalware/medications/prescriptions/index.pdf.slim +33 -142
- data/config/routes.rb +6 -0
- data/lib/renalware/engine.rb +2 -0
- data/lib/renalware/version.rb +1 -1
- data/spec/factories/drugs/drug.rb +6 -0
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e283c0fb737a52927b551762ea2204f875ef28cd5673206fc9e8c8d5d85500f
|
4
|
+
data.tar.gz: fbb0521235f06ac34c8a53c145bd11bb66e4bc64418c3b876733ce380397b987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf8c3050912034740b3909f03f4282e3c195361a25d84db3a0989184ef812e318be6d2bfd8a444674f402656827260512539fade7d56f764753edb902d358fdb
|
7
|
+
data.tar.gz: cc6d16506b95182555b76cb4432ef8ac4945080543a0ba994798ea75d3fb72b951b3ce39b51313129df74261f4f597fc748c386c22113fc7469bee7ca572c9cc
|
Binary file
|
@@ -0,0 +1,206 @@
|
|
1
|
+
html {
|
2
|
+
overflow: hidden;
|
3
|
+
font-family: Helvetica, Arial;
|
4
|
+
font-size: 11px;
|
5
|
+
}
|
6
|
+
|
7
|
+
ul {
|
8
|
+
padding-left: 0;
|
9
|
+
list-style-position: inside;
|
10
|
+
line-height: 1.3em;
|
11
|
+
list-style-type: none;
|
12
|
+
}
|
13
|
+
|
14
|
+
dl {
|
15
|
+
margin-top: 0;
|
16
|
+
margin-bottom: 0;
|
17
|
+
line-height: 1.3em;
|
18
|
+
|
19
|
+
p {
|
20
|
+
padding-left: 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
dt,
|
24
|
+
dd {
|
25
|
+
font-weight: normal;
|
26
|
+
}
|
27
|
+
|
28
|
+
dt {
|
29
|
+
font-weight: bold;
|
30
|
+
float: left;
|
31
|
+
width: 9rem;
|
32
|
+
overflow: hidden;
|
33
|
+
clear: left;
|
34
|
+
text-overflow: ellipsis;
|
35
|
+
white-space: nowrap;
|
36
|
+
margin-bottom: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
dd {
|
40
|
+
margin-left: 9rem + 1rem;
|
41
|
+
margin-bottom: 0;
|
42
|
+
|
43
|
+
&:before {
|
44
|
+
content: " ";
|
45
|
+
display: table;
|
46
|
+
}
|
47
|
+
|
48
|
+
&:after {
|
49
|
+
content: " ";
|
50
|
+
display: table;
|
51
|
+
clear: both;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
heading {
|
57
|
+
text-align: right;
|
58
|
+
|
59
|
+
.our-ref {
|
60
|
+
float: left;
|
61
|
+
font-weight: normal;
|
62
|
+
font-size: 0.8em;
|
63
|
+
color: #666;
|
64
|
+
}
|
65
|
+
|
66
|
+
.trust {
|
67
|
+
float: right;
|
68
|
+
margin-right: 1em;
|
69
|
+
.title {
|
70
|
+
font-size: 1.5em;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
.logo {
|
75
|
+
float: right;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
main {
|
80
|
+
clear: both;
|
81
|
+
display: block;
|
82
|
+
padding-top: 1em;
|
83
|
+
|
84
|
+
h1 {
|
85
|
+
margin-bottom: 0.2em;
|
86
|
+
padding-bottom: 0em;
|
87
|
+
}
|
88
|
+
|
89
|
+
section {
|
90
|
+
margin: 2em 0;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
.prescriptions {
|
95
|
+
|
96
|
+
table {
|
97
|
+
width: 100%;
|
98
|
+
}
|
99
|
+
|
100
|
+
th, td {
|
101
|
+
padding: .5rem .5rem .3rem 0;
|
102
|
+
|
103
|
+
&.date {
|
104
|
+
width: 6rem;
|
105
|
+
white-space: nowrap;
|
106
|
+
}
|
107
|
+
|
108
|
+
&.dose {
|
109
|
+
min-width: 5rem;
|
110
|
+
}
|
111
|
+
|
112
|
+
&.route {
|
113
|
+
min-width: 5rem;
|
114
|
+
}
|
115
|
+
&.drug {
|
116
|
+
min-width: 12rem;
|
117
|
+
}
|
118
|
+
|
119
|
+
&.freq {
|
120
|
+
min-width: 5rem;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
td {
|
125
|
+
border-top: solid 1px #ddd;
|
126
|
+
border-bottom: solid 1px #ddd;
|
127
|
+
}
|
128
|
+
|
129
|
+
.prescription {
|
130
|
+
font-weight: normal;
|
131
|
+
|
132
|
+
&.recently_changed {
|
133
|
+
font-weight: bold;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
.allergies {
|
139
|
+
th, td {
|
140
|
+
padding: .3rem .2rem .2rem 0;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
.checks {
|
145
|
+
th, td {
|
146
|
+
vertical-align: middle;
|
147
|
+
padding: 0 1rem 0 0;
|
148
|
+
}
|
149
|
+
|
150
|
+
th {
|
151
|
+
white-space: nowrap;
|
152
|
+
padding-right: 1rem;
|
153
|
+
}
|
154
|
+
|
155
|
+
td {
|
156
|
+
min-width: 7rem;
|
157
|
+
}
|
158
|
+
|
159
|
+
img {
|
160
|
+
height: 1.2rem;
|
161
|
+
vertical-align: middle;
|
162
|
+
margin: 0 0 0.3rem 0.5rem;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
.signoff {
|
167
|
+
border-bottom: 1px solid #ddd;
|
168
|
+
padding-top: 30px;
|
169
|
+
padding-bottom: 5px;
|
170
|
+
|
171
|
+
table {
|
172
|
+
width: 100%;
|
173
|
+
|
174
|
+
td.prescriber {
|
175
|
+
width: 30rem;
|
176
|
+
}
|
177
|
+
|
178
|
+
td.signature {
|
179
|
+
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
.consultant {
|
185
|
+
span {
|
186
|
+
width: 30rem;
|
187
|
+
border-bottom: solid 1px #ccc;
|
188
|
+
display: inline-block;
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
|
193
|
+
.order-number {
|
194
|
+
table {
|
195
|
+
width: 100%;
|
196
|
+
// border: 1px solid #ddd;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
table {
|
201
|
+
border-collapse: collapse;
|
202
|
+
|
203
|
+
thead, th {
|
204
|
+
text-align: left;
|
205
|
+
}
|
206
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_dependency "renalware/medications"
|
4
|
+
|
5
|
+
module Renalware
|
6
|
+
module Medications
|
7
|
+
module HomeDelivery
|
8
|
+
class PrescriptionsController < BaseController
|
9
|
+
include Renalware::Concerns::PdfRenderable
|
10
|
+
include PresenterHelper
|
11
|
+
|
12
|
+
def index
|
13
|
+
respond_to do |format|
|
14
|
+
format.pdf do
|
15
|
+
authorize prescriptions
|
16
|
+
render_index_pdf prescriptions
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def prescriptions
|
24
|
+
@prescriptions ||= begin
|
25
|
+
patient
|
26
|
+
.prescriptions
|
27
|
+
.current
|
28
|
+
.where(provider: :home_delivery)
|
29
|
+
.includes(:medication_route, :drug)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def render_index_pdf(prescriptions)
|
34
|
+
options = default_pdf_options.merge!(
|
35
|
+
pdf: pdf_filename,
|
36
|
+
layout: "renalware/layouts/letter",
|
37
|
+
locals: {
|
38
|
+
patient: patient,
|
39
|
+
prescriptions: present(prescriptions, PrescriptionPresenter)
|
40
|
+
}
|
41
|
+
)
|
42
|
+
render options
|
43
|
+
end
|
44
|
+
|
45
|
+
def pdf_filename
|
46
|
+
"#{patient.local_patient_id} prescriptions-for-home-delivery"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -8,7 +8,7 @@ module Renalware
|
|
8
8
|
def export_summary(to: "dev@airslie.com", **args)
|
9
9
|
mail(
|
10
10
|
to: Array(to),
|
11
|
-
subject: "
|
11
|
+
subject: "UKRDC export summary #{I18n.l(Time.zone.today)}"
|
12
12
|
) do |format|
|
13
13
|
format.text { render(locals: args) }
|
14
14
|
format.html { render(locals: args) }
|
@@ -18,6 +18,8 @@ module Renalware
|
|
18
18
|
scope :today, ->{ where(created_at: Time.zone.today.all_day) }
|
19
19
|
scope :hotlist, ->{ where(hotlist: true) }
|
20
20
|
|
21
|
+
has_paper_trail class_name: "Renalware::Renal::Version", on: [:create, :update, :destroy]
|
22
|
+
|
21
23
|
ransacker :created_at_casted do |_parent|
|
22
24
|
Arel.sql("date(renal_aki_alerts.created_at)")
|
23
25
|
end
|
@@ -8,11 +8,17 @@ module Renalware
|
|
8
8
|
# For non-HD patients, all the tests are NA
|
9
9
|
def pre_post(patient_is_on_hd:)
|
10
10
|
if patient_is_on_hd
|
11
|
-
description_code.casecmp("UREP")
|
11
|
+
description_code.casecmp("UREP").zero? ? "POST" : "PRE"
|
12
12
|
else
|
13
13
|
"NA"
|
14
14
|
end
|
15
15
|
end
|
16
|
+
|
17
|
+
# Truncate long result text to satisfy XSD validation - it might be notes
|
18
|
+
# like eg "No recent Urea result"
|
19
|
+
def result
|
20
|
+
(super || "")[0..19]
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
@@ -9,7 +9,7 @@ xml.Address(use: "H") do
|
|
9
9
|
xml.Street address.street
|
10
10
|
xml.Town address.town
|
11
11
|
xml.County address.county
|
12
|
-
xml.Postcode address.postcode
|
12
|
+
xml.Postcode address.postcode&.strip
|
13
13
|
xml.Country do
|
14
14
|
xml.CodingStandard "ISO3166-1"
|
15
15
|
xml.Code address&.country&.alpha3
|
@@ -50,8 +50,12 @@ xml.Patient do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
xml.FamilyDoctor do
|
53
|
-
|
54
|
-
|
53
|
+
if patient.practice.present?
|
54
|
+
xml.GPPracticeId patient.practice.code
|
55
|
+
end
|
56
|
+
if patient.primary_care_physician.present?
|
57
|
+
xml.GPId patient.primary_care_physician.code
|
58
|
+
end
|
55
59
|
end
|
56
60
|
|
57
61
|
if patient.ethnicity.present?
|
@@ -3,27 +3,22 @@
|
|
3
3
|
xml = builder
|
4
4
|
observation = Renalware::Pathology::ObservationPresenter.new(observation)
|
5
5
|
observation = Renalware::UKRDC::PathologyObservationPresenter.new(observation)
|
6
|
-
result = observation.result || ""
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
xml.Code observation.description_loinc_code
|
19
|
-
else
|
20
|
-
xml.CodingStandard "LOCAL"
|
21
|
-
xml.Code observation.description_code
|
22
|
-
end
|
23
|
-
xml.Description observation.description_name
|
7
|
+
xml.ResultItem do
|
8
|
+
xml.EnteredOn observation.updated_at&.iso8601
|
9
|
+
xml.PrePost observation.pre_post(patient_is_on_hd: patient.current_modality_hd?)
|
10
|
+
xml.ServiceId do
|
11
|
+
if observation.description_loinc_code.present?
|
12
|
+
xml.CodingStandard "PV"
|
13
|
+
xml.Code observation.description_loinc_code
|
14
|
+
else
|
15
|
+
xml.CodingStandard "LOCAL"
|
16
|
+
xml.Code observation.description_code
|
24
17
|
end
|
25
|
-
xml.
|
26
|
-
xml.ResultValueUnits observation.measurement_unit_name
|
27
|
-
xml.ObservationTime observation.observed_at&.iso8601
|
18
|
+
xml.Description observation.description_name
|
28
19
|
end
|
20
|
+
|
21
|
+
xml.ResultValue observation.result
|
22
|
+
xml.ResultValueUnits observation.measurement_unit_name
|
23
|
+
xml.ObservationTime observation.observed_at&.iso8601
|
29
24
|
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
- clinical_patient = Renalware::Clinical.cast_patient(patient)
|
2
|
+
|
3
|
+
html
|
4
|
+
meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" /
|
5
|
+
meta charset="utf-8" /
|
6
|
+
|
7
|
+
head
|
8
|
+
= wicked_pdf_stylesheet_link_tag "renalware/medications_pdf"
|
9
|
+
heading
|
10
|
+
.our-ref= "RW ref: #{patient.hospital_identifier}"
|
11
|
+
span.logo= wicked_pdf_image_tag "renalware/NHS-Black.jpg", width: 50
|
12
|
+
main
|
13
|
+
h1 Home Delivery Medication List
|
14
|
+
= "As at #{l(Time.zone.now)}"
|
15
|
+
|
16
|
+
section.extended_patient_details
|
17
|
+
- with_format(:html) do
|
18
|
+
= render "renalware/medications/prescriptions/extended_patient_details", patient: patient
|
19
|
+
|
20
|
+
section.prescriptions
|
21
|
+
table
|
22
|
+
thead
|
23
|
+
th.date Date
|
24
|
+
th.drug Drug
|
25
|
+
th.dose Dose
|
26
|
+
th.route Route
|
27
|
+
th.freq Freq
|
28
|
+
th.comments Pharmacy comments
|
29
|
+
tbody
|
30
|
+
- prescriptions.each do |prescription|
|
31
|
+
tr
|
32
|
+
td.date= l(prescription.prescribed_on)
|
33
|
+
td= prescription.drug.name
|
34
|
+
td= prescription.dose
|
35
|
+
td= prescription.medication_route.code
|
36
|
+
td= prescription.frequency
|
37
|
+
td
|
38
|
+
|
39
|
+
section.allergies
|
40
|
+
table
|
41
|
+
thead
|
42
|
+
th
|
43
|
+
= clinical_patient.allergy_status&.text
|
44
|
+
- if clinical_patient.allergy_status_updated_at
|
45
|
+
span.allergy_status_updated_at
|
46
|
+
|
|
47
|
+
= l(clinical_patient.allergy_status_updated_at&.to_date)
|
48
|
+
tbody
|
49
|
+
- clinical_patient.allergies.each do |allergy|
|
50
|
+
tr
|
51
|
+
td= allergy.description
|
52
|
+
|
53
|
+
section.checks
|
54
|
+
table
|
55
|
+
tbody
|
56
|
+
tr
|
57
|
+
th Repeat prescription for
|
58
|
+
td
|
59
|
+
span 3 months
|
60
|
+
= wicked_pdf_image_tag "renalware/checkbox-empty"
|
61
|
+
td
|
62
|
+
span 6 months
|
63
|
+
= wicked_pdf_image_tag "renalware/checkbox-empty"
|
64
|
+
tr
|
65
|
+
th Frequency of deliveries
|
66
|
+
td
|
67
|
+
span 3 months
|
68
|
+
= wicked_pdf_image_tag "renalware/checkbox-empty"
|
69
|
+
td
|
70
|
+
span 6 months
|
71
|
+
= wicked_pdf_image_tag "renalware/checkbox-empty"
|
72
|
+
|
73
|
+
section.consultant
|
74
|
+
p
|
75
|
+
b Consultant:
|
76
|
+
span
|
77
|
+
section.signoff
|
78
|
+
table
|
79
|
+
tr
|
80
|
+
td Prescriber:
|
81
|
+
td
|
82
|
+
td
|
83
|
+
tr
|
84
|
+
td.prescriber= [current_user.signature, current_user.professional_position].compact.join(", ")
|
85
|
+
td.signature Signature:
|
86
|
+
td Date:
|
87
|
+
|
88
|
+
section.order-number
|
89
|
+
table
|
90
|
+
thead
|
91
|
+
th Order number:
|
92
|
+
p
|
93
|
+
b Other pharmacy comments:
|
@@ -0,0 +1,13 @@
|
|
1
|
+
dl
|
2
|
+
dt Name
|
3
|
+
dd= patient.to_s
|
4
|
+
dt Modality
|
5
|
+
dd= patient.current_modality
|
6
|
+
dt Date of Birth
|
7
|
+
dd= l(patient.born_on)
|
8
|
+
dt NHS Number
|
9
|
+
dd= patient.nhs_number
|
10
|
+
dt Hospital no
|
11
|
+
dd= patient.hospital_identifier
|
12
|
+
dt Address
|
13
|
+
dd= Renalware::AddressPresenter.new(patient.current_address).to_a.join("<br>").html_safe
|
@@ -7,9 +7,16 @@
|
|
7
7
|
= link_to patient_prescriptions_path(@patient,
|
8
8
|
treatable,
|
9
9
|
format: :pdf),
|
10
|
-
class: "button secondary with-icon"
|
10
|
+
class: "button secondary with-icon",
|
11
|
+
target: :blank do
|
11
12
|
i.fas.fa-print
|
12
13
|
| Print
|
14
|
+
|
|
15
|
+
= link_to patient_medications_home_delivery_prescriptions_path(@patient),
|
16
|
+
class: "button secondary with-icon",
|
17
|
+
target: :blank do
|
18
|
+
i.fa.fa-print
|
19
|
+
| Print home delivery drugs
|
13
20
|
|
14
21
|
= within_patient_layout(title: "Prescriptions") do
|
15
22
|
= render "filter_form", search: current_search, drug_types: drug_types, treatable: treatable
|
@@ -1,148 +1,39 @@
|
|
1
|
-
|
2
|
-
html
|
3
|
-
|
4
|
-
font-family: Helvetica, Arial;
|
5
|
-
font-size: 13px;
|
6
|
-
}
|
1
|
+
html
|
2
|
+
meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" /
|
3
|
+
meta charset="utf-8" /
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
list-style-position: inside;
|
11
|
-
line-height: 1.3em;
|
12
|
-
list-style-type: none;
|
13
|
-
}
|
5
|
+
head
|
6
|
+
= wicked_pdf_stylesheet_link_tag "renalware/medications_pdf"
|
14
7
|
|
15
|
-
|
16
|
-
|
17
|
-
margin-bottom: 0;
|
18
|
-
line-height: 1.3em;
|
8
|
+
heading
|
9
|
+
.our-ref= "RW ref: #{patient.hospital_identifier}"
|
19
10
|
|
20
|
-
|
21
|
-
padding-left: 0;
|
22
|
-
}
|
11
|
+
span.logo= wicked_pdf_image_tag "renalware/NHS-Black.jpg", width: 50
|
23
12
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}
|
13
|
+
main
|
14
|
+
h1 Medication List
|
15
|
+
= "As at #{l(Time.zone.now)}"
|
28
16
|
|
29
|
-
dt {
|
30
|
-
font-weight: bold;
|
31
|
-
float: left;
|
32
|
-
width: 9rem;
|
33
|
-
overflow: hidden;
|
34
|
-
clear: left;
|
35
|
-
text-overflow: ellipsis;
|
36
|
-
white-space: nowrap;
|
37
|
-
margin-bottom: 0;
|
38
|
-
}
|
39
|
-
|
40
|
-
dd {
|
41
|
-
margin-left: 9rem + 1rem;
|
42
|
-
margin-bottom: 0;
|
43
|
-
|
44
|
-
&:before {
|
45
|
-
content: " ";
|
46
|
-
display: table;
|
47
|
-
}
|
48
|
-
|
49
|
-
&:after {
|
50
|
-
content: " ";
|
51
|
-
display: table;
|
52
|
-
clear: both;
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
heading {
|
58
|
-
text-align: right;
|
59
|
-
|
60
|
-
.our-ref {
|
61
|
-
float: left;
|
62
|
-
font-weight: normal;
|
63
|
-
font-size: 0.8em;
|
64
|
-
color: #666;
|
65
|
-
}
|
66
|
-
|
67
|
-
.trust {
|
68
|
-
float: right;
|
69
|
-
margin-right: 1em;
|
70
|
-
.title {
|
71
|
-
font-size: 1.5em;
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
.logo {
|
76
|
-
float: right;
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
main {
|
81
|
-
clear: both;
|
82
|
-
display: block;
|
83
|
-
padding-top: 1em;
|
84
|
-
|
85
|
-
h1 {
|
86
|
-
margin-bottom: 0.2em;
|
87
|
-
padding-bottom: 0em;
|
88
|
-
}
|
89
|
-
|
90
|
-
section {
|
91
|
-
margin: 2em 0;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
.prescriptions {
|
96
|
-
.prescription {
|
97
|
-
font-weight: normal;
|
98
|
-
|
99
|
-
&.recently_changed {
|
100
|
-
font-weight: bold;
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
heading
|
106
|
-
.our-ref= "RW ref: #{patient.hospital_identifier}"
|
107
|
-
|
108
|
-
span.logo= wicked_pdf_image_tag "renalware/NHS-Black.jpg", width: 50
|
109
|
-
/ .trust
|
110
|
-
/ .title Barts and the London
|
111
|
-
/ span NHS Trust
|
112
|
-
|
113
|
-
main
|
114
|
-
|
115
|
-
h1 Medication List
|
116
|
-
= "As at #{l(Time.zone.now)}"
|
117
|
-
|
118
|
-
section
|
119
|
-
dl
|
120
|
-
dt Name
|
121
|
-
dd= patient.to_s
|
122
|
-
dt Date of Birth
|
123
|
-
dd= l(patient.born_on)
|
124
|
-
dt NHS Number
|
125
|
-
dd= patient.nhs_number
|
126
|
-
dt Hospital no
|
127
|
-
dd= patient.hospital_identifier
|
128
|
-
|
129
|
-
section
|
130
|
-
h3 Allergies
|
131
|
-
- allergies = Renalware::Clinical.cast_patient(patient).allergies
|
132
|
-
- if allergies.any?
|
133
|
-
ul.allergies
|
134
|
-
- allergies.each do |allergy|
|
135
|
-
li= allergy.description
|
136
|
-
- else
|
137
|
-
p None
|
138
|
-
|
139
|
-
section.prescriptions
|
140
|
-
- with_format(:html) do
|
141
|
-
= render "current",
|
142
|
-
prescriptions: current_prescriptions,
|
143
|
-
recently_changed: recently_changed_prescriptions
|
144
|
-
|
145
|
-
section.prescriptions
|
146
17
|
- with_format(:html) do
|
147
|
-
= render "
|
148
|
-
|
18
|
+
= render "patient_details", patient: patient
|
19
|
+
|
20
|
+
section
|
21
|
+
h3 Allergies
|
22
|
+
- allergies = Renalware::Clinical.cast_patient(patient).allergies
|
23
|
+
- if allergies.any?
|
24
|
+
ul.allergies
|
25
|
+
- allergies.each do |allergy|
|
26
|
+
li= allergy.description
|
27
|
+
- else
|
28
|
+
p None
|
29
|
+
|
30
|
+
section.prescriptions
|
31
|
+
- with_format(:html) do
|
32
|
+
= render "current",
|
33
|
+
prescriptions: current_prescriptions,
|
34
|
+
recently_changed: recently_changed_prescriptions
|
35
|
+
|
36
|
+
section.prescriptions
|
37
|
+
- with_format(:html) do
|
38
|
+
= render "recently_stopped",
|
39
|
+
prescriptions: recently_stopped_prescriptions
|
data/config/routes.rb
CHANGED
@@ -372,6 +372,12 @@ Renalware::Engine.routes.draw do
|
|
372
372
|
# Medications
|
373
373
|
resources :prescriptions, controller: "medications/prescriptions", except: [:destroy]
|
374
374
|
namespace :medications do
|
375
|
+
namespace :home_delivery do
|
376
|
+
resources :prescriptions,
|
377
|
+
only: [:index],
|
378
|
+
constraints: { format: /(pdf)/ },
|
379
|
+
defaults: { format: :pdf }
|
380
|
+
end
|
375
381
|
resources :prescriptions, only: [] do
|
376
382
|
resource :termination, only: [:new, :create]
|
377
383
|
end
|
data/lib/renalware/engine.rb
CHANGED
@@ -127,6 +127,8 @@ module Renalware
|
|
127
127
|
app.config.assets.precompile += %w(renalware/iframeResizer.contentWindow.js)
|
128
128
|
app.config.assets.precompile += %w(renalware/pdf.css renalware/watermark.css)
|
129
129
|
app.config.assets.precompile += %w(renalware/protocol_pdf.css)
|
130
|
+
app.config.assets.precompile += %w(renalware/medications_pdf.css)
|
131
|
+
app.config.assets.precompile += %w(renalware/medications/prescriptions_pdf.css)
|
130
132
|
app.config.assets.precompile += %w(renalware/hd_diary_pdf.css)
|
131
133
|
app.config.assets.precompile += %w(renalware/table_pdf.css)
|
132
134
|
app.config.assets.precompile += %w(
|
data/lib/renalware/version.rb
CHANGED
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.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_type
|
@@ -949,6 +949,7 @@ files:
|
|
949
949
|
- app/assets/images/renalware/NHS-Black.jpg
|
950
950
|
- app/assets/images/renalware/ajax-loader.gif
|
951
951
|
- app/assets/images/renalware/barts_health_nhs_logo.png
|
952
|
+
- app/assets/images/renalware/checkbox-empty.png
|
952
953
|
- app/assets/images/renalware/chosen-sprite.png
|
953
954
|
- app/assets/images/renalware/chosen-sprite@2x.png
|
954
955
|
- app/assets/images/renalware/clippy.svg
|
@@ -1014,6 +1015,7 @@ files:
|
|
1014
1015
|
- app/assets/stylesheets/renalware/lib/_clockpicker.css
|
1015
1016
|
- app/assets/stylesheets/renalware/lib/_foundation_and_overrides.scss
|
1016
1017
|
- app/assets/stylesheets/renalware/lib/_select2-foundation5-overrides.scss
|
1018
|
+
- app/assets/stylesheets/renalware/medications_pdf.scss
|
1017
1019
|
- app/assets/stylesheets/renalware/modules/_admissions.scss
|
1018
1020
|
- app/assets/stylesheets/renalware/modules/_clinical.scss
|
1019
1021
|
- app/assets/stylesheets/renalware/modules/_clinical_summaries.scss
|
@@ -1160,6 +1162,7 @@ files:
|
|
1160
1162
|
- app/controllers/renalware/mdm_controller.rb
|
1161
1163
|
- app/controllers/renalware/mdm_patients_controller.rb
|
1162
1164
|
- app/controllers/renalware/medications/drug_types/prescriptions_controller.rb
|
1165
|
+
- app/controllers/renalware/medications/home_delivery/prescriptions_controller.rb
|
1163
1166
|
- app/controllers/renalware/medications/prescriptions_controller.rb
|
1164
1167
|
- app/controllers/renalware/medications/terminations_controller.rb
|
1165
1168
|
- app/controllers/renalware/messaging/internal/messages_controller.rb
|
@@ -2410,11 +2413,14 @@ files:
|
|
2410
2413
|
- app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
|
2411
2414
|
- app/views/renalware/medications/drug_types/prescriptions/_table.html.slim
|
2412
2415
|
- app/views/renalware/medications/drug_types/prescriptions/index.html.slim
|
2416
|
+
- app/views/renalware/medications/home_delivery/prescriptions/index.pdf.slim
|
2413
2417
|
- app/views/renalware/medications/prescriptions/_current.html.slim
|
2418
|
+
- app/views/renalware/medications/prescriptions/_extended_patient_details.html.slim
|
2414
2419
|
- app/views/renalware/medications/prescriptions/_filter_form.html.slim
|
2415
2420
|
- app/views/renalware/medications/prescriptions/_form.html.slim
|
2416
2421
|
- app/views/renalware/medications/prescriptions/_index.html.slim
|
2417
2422
|
- app/views/renalware/medications/prescriptions/_options.html.slim
|
2423
|
+
- app/views/renalware/medications/prescriptions/_patient_details.html.slim
|
2418
2424
|
- app/views/renalware/medications/prescriptions/_prescription.html.slim
|
2419
2425
|
- app/views/renalware/medications/prescriptions/_recently_stopped.html.slim
|
2420
2426
|
- app/views/renalware/medications/prescriptions/_table.html.slim
|
@@ -3787,8 +3793,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3787
3793
|
- !ruby/object:Gem::Version
|
3788
3794
|
version: '0'
|
3789
3795
|
requirements: []
|
3790
|
-
|
3791
|
-
rubygems_version: 2.7.6
|
3796
|
+
rubygems_version: 3.0.3
|
3792
3797
|
signing_key:
|
3793
3798
|
specification_version: 4
|
3794
3799
|
summary: Renalware core functionality as a mountable engine.
|