renalware-core 2.0.104 → 2.0.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/assets/images/renalware/loading-gears-animation.gif +0 -0
- data/app/assets/javascripts/renalware/drugs.js +3 -4
- data/app/assets/javascripts/renalware/hd.js +108 -0
- data/app/assets/javascripts/renalware/letters.js +47 -2
- data/app/assets/pdf/blank_page.pdf +56 -0
- data/app/assets/stylesheets/renalware/modules/_hd.scss +204 -0
- data/app/assets/stylesheets/renalware/modules/_letters.scss +46 -0
- data/app/assets/stylesheets/renalware/partials/_tables.scss +2 -2
- data/app/controllers/renalware/admissions/consults_controller.rb +1 -1
- data/app/controllers/renalware/base_controller.rb +9 -2
- data/app/controllers/renalware/clinics/appointments_controller.rb +8 -3
- data/app/controllers/renalware/hd/prescription_administration_authorisations_controller.rb +27 -0
- data/app/controllers/renalware/hd/sessions_controller.rb +14 -3
- data/app/controllers/renalware/letters/batches_controller.rb +106 -0
- data/app/controllers/renalware/letters/completed_batches_controller.rb +32 -0
- data/app/controllers/renalware/letters/formatted_letters_controller.rb +5 -1
- data/app/controllers/renalware/letters/lists_controller.rb +34 -5
- data/app/controllers/renalware/pathology/requests/requests_controller.rb +1 -1
- data/app/documents/renalware/blood_group.rb +1 -1
- data/app/documents/renalware/hd/profile_document.rb +1 -1
- data/app/jobs/renalware/hd/update_rolling_patient_statistics_dj_job.rb +38 -0
- data/app/jobs/renalware/hd/update_rolling_patient_statistics_job.rb +4 -2
- data/app/jobs/renalware/letters/printing/batch_print_job.rb +27 -0
- data/app/jobs/renalware/letters/save_rtf_letter_to_file_job.rb +29 -0
- data/app/models/concerns/renalware/patients_ransack_helper.rb +1 -1
- data/app/models/concerns/renalware/using_temp_folder.rb +14 -0
- data/app/models/renalware/admissions/consult.rb +12 -0
- data/app/models/renalware/admissions/consult_query.rb +2 -2
- data/app/models/renalware/clinics/appointment.rb +2 -3
- data/app/models/renalware/clinics/appointment_query.rb +5 -1
- data/app/models/renalware/hd/mdm_patients_query.rb +1 -2
- data/app/models/renalware/hd/prescription_administration.rb +49 -0
- data/app/models/renalware/hd/prescription_administration_reason.rb +10 -0
- data/app/models/renalware/hd/profiles_in_date_range_query.rb +21 -16
- data/app/models/renalware/hd/session_factory.rb +4 -1
- data/app/models/renalware/hd/sessions/save_session.rb +12 -1
- data/app/models/renalware/hd/update_rolling_patient_statistics.rb +1 -1
- data/app/models/renalware/letters/batch.rb +37 -0
- data/app/models/renalware/letters/batch_item.rb +17 -0
- data/app/models/renalware/letters/lists/form.rb +101 -0
- data/app/models/renalware/letters/pdf_letter_cache.rb +1 -1
- data/app/models/renalware/letters/printing/batch_compile_pdfs.rb +121 -0
- data/app/models/renalware/letters/printing/complete_batch.rb +24 -0
- data/app/models/renalware/letters/printing/create_pdf_by_interleaving_address_sheet_and_letter_for_each_recipient.rb.dead +90 -0
- data/app/models/renalware/letters/printing/duplex_interleaved_pdf_renderer.rb +1 -1
- data/app/models/renalware/letters/printing/pdf_combining.rb +24 -21
- data/app/models/renalware/letters/rtf_renderer.rb +12 -19
- data/app/models/renalware/low_clearance/mdm_patients_query.rb +3 -3
- data/app/models/renalware/medications/medication_route.rb +3 -1
- data/app/models/renalware/pathology/{consultant.rb → consultant.rb.dead} +0 -0
- data/app/models/renalware/pathology/observations_grouped_by_date_query.rb +1 -1
- data/app/models/renalware/pathology/relevant_observation_description.rb +1 -1
- data/app/models/renalware/pathology/requests/global_rule/transplant_date_within_weeks.rb +1 -1
- data/app/models/renalware/pathology/requests/global_rule/transplant_registration_status.rb +3 -1
- data/app/models/renalware/pathology/requests/request.rb +1 -1
- data/app/models/renalware/pathology/requests/request_params_factory.rb +11 -12
- data/app/models/renalware/pathology/requests/sample_type.rb +18 -0
- data/app/models/renalware/patient.rb +3 -2
- data/app/models/renalware/pd/apd_regime.rb +6 -6
- data/app/models/renalware/pd/mdm_patients_query.rb +1 -2
- data/app/models/renalware/renal/consultant.rb +16 -0
- data/app/models/renalware/renal/registry/preflight_checks/deaths_query.rb +1 -2
- data/app/models/renalware/transplants/mdm_patients_query.rb +1 -2
- data/app/models/renalware/transplants/registrations/wait_list_query.rb +4 -10
- data/app/models/renalware/ukrdc/treatment_timeline/generator_factory.rb +3 -1
- data/app/models/renalware/ukrdc/treatment_timeline/hd/generator.rb +24 -10
- data/app/models/renalware/ukrdc/treatment_timeline/transplant/generator.rb +113 -0
- data/app/models/renalware/user.rb +13 -0
- data/app/pdfs/renalware/letters/printing/recipient_address_page_pdf.rb +50 -0
- data/app/policies/renalware/letters/batch_policy.rb +13 -0
- data/app/presenters/renalware/hd/session_presenter.rb +5 -0
- data/app/presenters/renalware/letters/recipient_presenter.rb +1 -1
- data/app/presenters/renalware/pathology/requests/request_presenter.rb +1 -1
- data/app/presenters/renalware/transplants/mdm_presenter.rb +1 -1
- data/app/presenters/renalware/ukrdc/patient_presenter.rb +5 -0
- data/app/presenters/renalware/virology/dashboard_presenter.rb +2 -1
- data/app/values/renalware/address.rb +4 -3
- data/app/views/renalware/admissions/consults/_form.html.slim +4 -0
- data/app/views/renalware/admissions/consults/_table.html.slim +12 -4
- data/app/views/renalware/api/ukrdc/patients/_clinic_visit_observation.xml.builder +16 -15
- data/app/views/renalware/api/ukrdc/patients/_hd_session_observations.xml.builder +14 -12
- data/app/views/renalware/api/ukrdc/patients/_lab_orders.xml.builder +38 -4
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder.dead +42 -0
- data/app/views/renalware/api/ukrdc/patients/lab_orders/{_result_item.xml.builder → _result_item.xml.builder.dead} +0 -0
- data/app/views/renalware/api/ukrdc/patients/treatments/_generic.xml.builder +5 -0
- data/app/views/renalware/clinics/appointments/index.html.slim +23 -10
- data/app/views/renalware/clinics/appointments/new.html.slim +5 -0
- data/app/views/renalware/hd/sessions/_form.html.slim +3 -12
- data/app/views/renalware/hd/sessions/_form_actions.html.slim +19 -18
- data/app/views/renalware/hd/sessions/form/_drugs_to_be_administered.html.slim +84 -0
- data/app/views/renalware/hospitals/units/index.html.slim +1 -1
- data/app/views/renalware/letters/batches/_create.html.slim +27 -0
- data/app/views/renalware/letters/batches/create.js.erb +3 -0
- data/app/views/renalware/letters/batches/index.html.slim +20 -0
- data/app/views/renalware/letters/batches/show.html.slim +7 -0
- data/app/views/renalware/letters/completed_batches/create.js.erb +9 -0
- data/app/views/renalware/letters/completed_batches/new.html.slim +26 -0
- data/app/views/renalware/letters/lists/_table.html.slim +1 -1
- data/app/views/renalware/letters/lists/_tabs.html.slim +9 -0
- data/app/views/renalware/letters/lists/index.html.slim.dead +101 -0
- data/app/views/renalware/letters/lists/index.html.slim.dead1 +90 -0
- data/app/views/renalware/letters/lists/show.html.slim +57 -11
- data/app/views/renalware/medications/prescriptions/_form.html.slim +1 -0
- data/app/views/renalware/medications/prescriptions/_patient_details.html.slim +10 -4
- data/app/views/renalware/medications/prescriptions/_table.html.slim +1 -1
- data/app/views/renalware/navigation/_super_admin.html.slim +1 -0
- data/app/views/renalware/pathology/patient_rules/_form.html.slim +3 -1
- data/app/views/renalware/pathology/requests/requests/_pdf_header.html.slim +2 -3
- data/app/views/renalware/pathology/requests/requests/index.html.slim +1 -1
- data/app/views/renalware/pathology/requests/requests/new.html.slim +0 -1
- data/app/views/renalware/transplants/registration_statuses/_list.html.slim +0 -8
- data/config/initializers/simple_form_foundation.rb +18 -0
- data/config/locales/loinc_codes.yml +4 -16
- data/config/locales/renalware/hd/prescription_administration.en.yml +5 -0
- data/config/locales/renalware/hd/profile.yml +8 -0
- data/config/locales/renalware/letters/letter.en.yml +5 -0
- data/config/locales/renalware/navigation/renal.en.yml +1 -1
- data/config/routes/hd.rb +1 -0
- data/config/routes/letters.rb +18 -1
- data/db/migrate/20190624130020_add_authentication_to_hd_prescription_administrations.rb +16 -0
- data/db/migrate/20190627141751_add_tokens_to_hd_prescription_administrations.rb +22 -0
- data/db/migrate/20190716125837_create_hd_prescription_administration_reasons.rb +17 -0
- data/db/migrate/20190830153416_create_letter_batches.rb +14 -0
- data/db/migrate/20190902085216_create_letter_batch_items.rb +13 -0
- data/db/migrate/20190909084425_add_columns_to_support_data_migration.rb +15 -0
- data/db/migrate/20190915071451_add_unique_index_to_medication_routes.rb +8 -0
- data/db/migrate/20190915083424_create_pathology_request_sample_types.rb +11 -0
- data/db/migrate/20190916160231_add_hd_type_to_ukrdc_treatments.rb +7 -0
- data/db/migrate/20190917124204_add_priority_to_admission_consults.rb +8 -0
- data/db/migrate/20190919073410_add_filepath_to_letter_batches.rb +7 -0
- data/db/migrate/20190920063447_add_status_to_letter_batch_items.rb +15 -0
- data/db/migrate/20190925104902_remove_user_from_appointments.rb +19 -0
- data/db/migrate/20190925130052_add_telephone_to_renal_consultants.rb +7 -0
- data/db/migrate/20190925161724_change_path_request_consultant_id.rb +19 -0
- data/db/migrate/20190925173849_renal_consultants_changes.rb +9 -0
- data/db/migrate/20190928131032_add_some_more_missing_indexes.rb +18 -0
- data/db/seeds/default/hd/prescription_administration_reasons.rb +16 -0
- data/db/seeds/default/hd/seeds.rb +1 -0
- data/db/views/hd_profile_for_modalities_v01.sql +1 -1
- data/db/views/pathology_observation_digests_v01.sql +1 -1
- data/lib/renalware/configuration.rb +4 -0
- data/lib/renalware/engine.rb +1 -0
- data/lib/renalware/version.rb +1 -1
- data/lib/tasks/demo_data.rake +66 -0
- data/lib/tasks/pd.rake +32 -0
- data/spec/factories/clinics/appointments.rb +1 -1
- data/spec/factories/medications/medication_route.rb +12 -4
- data/spec/factories/renal/consultants.rb +9 -0
- data/spec/factories/transplants/modality_descriptions.rb +7 -2
- data/spec/factories/ukrdc/modality_codes.rb +54 -0
- data/spec/support/pages/medications/prescription_fom.rb +54 -0
- metadata +65 -14
- data/app/models/renalware/letters/printing/create_pdf_by_interleaving_address_sheet_and_letter_for_each_recipient.rb +0 -140
- data/app/models/renalware/ukrdc/treatment_timeline/transplant/generator.rb.wip +0 -37
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder +0 -48
- data/spec/factories/pathology/consultant.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d299c658864be00fd2bb5e32766ca4bb07f92e4d1e3cac36536bbb351dc13132
|
4
|
+
data.tar.gz: d405e456e7f324d56d2d9b10cd4643dd7d20721967d1126461d4f287150b83e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22d08baf9693562abd1048245c849a2015d1210594b1f7821f78820a626ac58b21442f742c702add9798b4dde1ea33e2b423703dee6e94622aa340c0ce4a689d
|
7
|
+
data.tar.gz: fcb3ddb0e16d5bc177dace948ea795659523d196086967a0743b0a98843561b325bcc9b148b2f31123324a00d9817c13ca4575d4f5bc096cab95fc0469b23544
|
data/README.md
CHANGED
@@ -223,3 +223,9 @@ docker build -t renalware .
|
|
223
223
|
docker-compose run web rake db:create
|
224
224
|
docker-compose run web rake app:db:create
|
225
225
|
```
|
226
|
+
|
227
|
+
#### Browser testing
|
228
|
+
|
229
|
+
<a href="https://www.browserstack.com">
|
230
|
+
<img alt="Browserstack logo" src="doc/Browserstack-logo.svg" width="188" height="43">
|
231
|
+
</a>
|
Binary file
|
@@ -39,7 +39,7 @@ $(document).ready(function(){
|
|
39
39
|
data: { medication_switch: selectedMedicationType },
|
40
40
|
success: function(json) {
|
41
41
|
var $drugSelectBox = $medForm.find('.drug-select');
|
42
|
-
var option_template = "<option
|
42
|
+
var option_template = "<option value=<%=id%>><%=name%></option>"
|
43
43
|
|
44
44
|
$drugSelectBox.html('');
|
45
45
|
$drugSelectBox.append(_.template(option_template)({ id: null, name: 'Please select' }));
|
@@ -79,7 +79,7 @@ $(document).ready(function(){
|
|
79
79
|
if (query.length > 2) {
|
80
80
|
$.ajax({
|
81
81
|
url: '/drugs/drugs.json',
|
82
|
-
data: { q : {
|
82
|
+
data: { q : { name_or_drug_types_name_cont : query } },
|
83
83
|
success: function(json) {
|
84
84
|
$drugResults.html('').show();
|
85
85
|
for (var i = 0; i < json.length; i++) {
|
@@ -115,7 +115,7 @@ $(document).ready(function(){
|
|
115
115
|
$medForm.find('.selected-drug-id').val(selectedDrug);
|
116
116
|
}, delay);
|
117
117
|
|
118
|
-
$('.drug-select').change(function(e) {
|
118
|
+
$('.drug-select').unbind().change(function(e) {
|
119
119
|
var $bullet = $(e.currentTarget);
|
120
120
|
var $medForm = $bullet.closest('.med-form');
|
121
121
|
var selectedDrug = $medForm.find('.drug-select').val();
|
@@ -125,4 +125,3 @@ $(document).ready(function(){
|
|
125
125
|
});
|
126
126
|
|
127
127
|
});
|
128
|
-
|
@@ -0,0 +1,108 @@
|
|
1
|
+
/*
|
2
|
+
These are functions relating to the authorisation by nurse + witness of prescriptions
|
3
|
+
within the HD Session form.
|
4
|
+
TODO: This needs refactoring.
|
5
|
+
*/
|
6
|
+
$(document).ready(function() {
|
7
|
+
/*
|
8
|
+
If enter is pressed in a password field (out of habit as enter is oftern used when logging in,
|
9
|
+
after entering their password) throw it away. We could map it to a tab but frankly that gets
|
10
|
+
a bit complicated - see here:
|
11
|
+
https://stackoverflow.com/questions/2335553/jquery-how-to-catch-enter-key-and-change-event-to-tab
|
12
|
+
*/
|
13
|
+
$("input.user-password").on("keypress", function(e) {
|
14
|
+
if (e.keyCode == 13) { return false; }
|
15
|
+
});
|
16
|
+
|
17
|
+
$(".hd-drug-administered input[type='radio']").on("change", function(e) {
|
18
|
+
var checked = ($(this).val() == "true");
|
19
|
+
var container = $(this).closest(".hd-drug-administration");
|
20
|
+
$(container).toggleClass("administered", checked)
|
21
|
+
$(container).toggleClass("not-administered", !checked)
|
22
|
+
$(container).removeClass("undecided");
|
23
|
+
$(".authentication", container).toggle(checked)
|
24
|
+
$(".authentication", container).toggleClass("disabled-with-faded-overlay", !checked)
|
25
|
+
$(".reason-why-not-administered", container).toggle(!checked)
|
26
|
+
});
|
27
|
+
|
28
|
+
$(".hd-drug-administration .authentication-user-id").on("select2:select", function(e) {
|
29
|
+
var container = $(this).closest(".user-and-password");
|
30
|
+
var topContainer = $(container).closest(".hd-drug-administration")
|
31
|
+
$(container).find(".authentication-token").val("")
|
32
|
+
$("input.user-password", container).val("");
|
33
|
+
$(container).removeClass("authorised");
|
34
|
+
var tokenCount = $(topContainer).find(".authorised").length;
|
35
|
+
$(topContainer).attr("data-token-count", tokenCount);
|
36
|
+
});
|
37
|
+
|
38
|
+
|
39
|
+
// When a user clicks the link to clear the authorisation (they might have used the wrong user
|
40
|
+
// for instance) the clear the relevant token and password fields and classes.
|
41
|
+
$(".hd-drug-administration .user-and-password .user-and-password--clear").on("click", function(e) {
|
42
|
+
e.preventDefault();
|
43
|
+
var container = $(this).closest(".user-and-password");
|
44
|
+
var topContainer = $(container).closest(".hd-drug-administration")
|
45
|
+
$(container).find(".authentication-token").val("")
|
46
|
+
$("input.user-password", container).val("");
|
47
|
+
$(container).removeClass("authorised");
|
48
|
+
var tokenCount = $(topContainer).find(".authorised").length;
|
49
|
+
$(topContainer).attr("data-token-count", tokenCount);
|
50
|
+
});
|
51
|
+
|
52
|
+
// When the user has entered a password and leaves the password field, make an ajax POST to
|
53
|
+
// authenticate the user and on success return an authorisation token which is added to the html
|
54
|
+
// form - it will be validated when the form is submitted.
|
55
|
+
// TODO: also do this if enter pressed while in the password field.
|
56
|
+
$(".user-and-password input.user-password").on("blur", function(e) {
|
57
|
+
var container = $(this).closest(".user-and-password");
|
58
|
+
var topContainer = $(container).closest(".hd-drug-administration")
|
59
|
+
var authUrl = $(container).closest(".authentication").data("authentication-url");
|
60
|
+
var userSelect = $(container).find(".authentication-user-id");
|
61
|
+
var userId = $(userSelect).find("option:selected").val();
|
62
|
+
var authorisationTokenHiddenField = $(container).find(".authentication-token");
|
63
|
+
var password = $(this).val();
|
64
|
+
|
65
|
+
// Prevent the a 401 xhr code from redirecting us to the login page - see ajax_errors.js
|
66
|
+
$(document).off('ajaxError');
|
67
|
+
|
68
|
+
if (userId && password) {
|
69
|
+
$.ajax({
|
70
|
+
async: false, /* needed as if pwd field has focus and user clicks submit, it would not wait for ajax */
|
71
|
+
url: authUrl,
|
72
|
+
type: "POST",
|
73
|
+
data: "[user][id]=" + userId + "&[user][password]=" + password,
|
74
|
+
beforeSend: function() {
|
75
|
+
// Add a 'working' class during ajax operations so we can show a spinner for example
|
76
|
+
$(container).addClass("working");
|
77
|
+
$(container).removeClass("error");
|
78
|
+
// $(".hd-session-form button[type='submit]").prop("disabled", "disabled")
|
79
|
+
},
|
80
|
+
complete: function() {
|
81
|
+
$(container).removeClass("working");
|
82
|
+
// $(".hd-session-form input[type='submit']").removeProp("disabled")
|
83
|
+
},
|
84
|
+
statusCode: {
|
85
|
+
200: function (token) {
|
86
|
+
// The user id/password combination is valid and a token has been returned.
|
87
|
+
// We save the token to a hidden field so it wikll be submitted in the session form.
|
88
|
+
$(authorisationTokenHiddenField).val(token);
|
89
|
+
$(container).removeClass("unauthorised").addClass("authorised").removeClass("error");
|
90
|
+
// $(userSelect).prop("disabled", true);
|
91
|
+
var tokenCount = $(topContainer).find(".authorised").length;
|
92
|
+
$(topContainer).attr("data-token-count", tokenCount);
|
93
|
+
|
94
|
+
},
|
95
|
+
401: function (data) {
|
96
|
+
// The user id/password combination was not valid
|
97
|
+
console.log('401: Unauthenticated');
|
98
|
+
$(authorisationTokenHiddenField).prop("value", "");
|
99
|
+
$(container).removeClass("authorised").addClass("error");
|
100
|
+
|
101
|
+
var tokenCount = $(topContainer).find(".authorised").length;
|
102
|
+
$(topContainer).attr("data-token-count", tokenCount);
|
103
|
+
}
|
104
|
+
}
|
105
|
+
});
|
106
|
+
}
|
107
|
+
});
|
108
|
+
});
|
@@ -24,6 +24,15 @@ Renalware.Letters = (function() {
|
|
24
24
|
});
|
25
25
|
}
|
26
26
|
|
27
|
+
var bindOnLetterAboutToBatchPrint = function() {
|
28
|
+
$(document).on("click", ".print-batch-letter", function(e) {
|
29
|
+
var modal = $("#letter-print-modal");
|
30
|
+
url = $(this).data("modal-url");
|
31
|
+
modal.load(url).foundation('reveal', 'open');
|
32
|
+
true;
|
33
|
+
});
|
34
|
+
}
|
35
|
+
|
27
36
|
var bindOnSalutationChange = function() {
|
28
37
|
|
29
38
|
$("#letter-form").on("click", ".has_salutation", function(e) {
|
@@ -91,7 +100,41 @@ Renalware.Letters = (function() {
|
|
91
100
|
alert("There are no notes to insert");
|
92
101
|
}
|
93
102
|
});
|
94
|
-
}
|
103
|
+
};
|
104
|
+
|
105
|
+
var pollBatchStatus = function(url) {
|
106
|
+
var POLL_INTERVAL = 2000; // ms
|
107
|
+
var batch = {};
|
108
|
+
|
109
|
+
// Check the current status of the TaskStatus object.
|
110
|
+
var updateStatus = function() {
|
111
|
+
$.ajax({
|
112
|
+
method: 'GET',
|
113
|
+
url: url,
|
114
|
+
contentType: 'json'
|
115
|
+
}).fail(function(e, x, a) {
|
116
|
+
// Possible network glitch or perhaps a re-deploy causing the site to be down momentarily.
|
117
|
+
// Anyway, not enough for us to give up polling.
|
118
|
+
// TODO: examine the response code to see if we should in fact give up and show an
|
119
|
+
// appropriate message.
|
120
|
+
setTimeout(updateStatus, POLL_INTERVAL);
|
121
|
+
}).done(function(batch) {
|
122
|
+
// Done!
|
123
|
+
$(".modal .percent_complete").html(batch.percent_complete + "%");
|
124
|
+
if(batch.status == 'awaiting_printing') {
|
125
|
+
$(".batch_results_container .preparing").hide();
|
126
|
+
$(".batch_results_container .generated-batch-print-pdf-container").show();
|
127
|
+
}
|
128
|
+
// Not done!
|
129
|
+
else {
|
130
|
+
// Could update a progress/100% tracker here
|
131
|
+
// Ask again in POLL_INTERVAL ms.
|
132
|
+
setTimeout(updateStatus, POLL_INTERVAL);
|
133
|
+
}
|
134
|
+
});
|
135
|
+
};
|
136
|
+
setTimeout(updateStatus, POLL_INTERVAL);
|
137
|
+
};
|
95
138
|
|
96
139
|
return {
|
97
140
|
init: function () {
|
@@ -101,8 +144,10 @@ Renalware.Letters = (function() {
|
|
101
144
|
initNewContactAsMainRecipient();
|
102
145
|
initNewContactAsCC();
|
103
146
|
initInsertEventNotesIntoTextEditor();
|
147
|
+
bindOnLetterAboutToBatchPrint();
|
104
148
|
bindOnLetterAboutToPrint();
|
105
|
-
}
|
149
|
+
},
|
150
|
+
pollBatchStatus: pollBatchStatus
|
106
151
|
};
|
107
152
|
}());
|
108
153
|
|
@@ -0,0 +1,56 @@
|
|
1
|
+
%PDF-1.3
|
2
|
+
%����
|
3
|
+
1 0 obj
|
4
|
+
<< /Creator <feff0050007200610077006e>
|
5
|
+
/Producer <feff0050007200610077006e>
|
6
|
+
>>
|
7
|
+
endobj
|
8
|
+
2 0 obj
|
9
|
+
<< /Type /Catalog
|
10
|
+
/Pages 3 0 R
|
11
|
+
>>
|
12
|
+
endobj
|
13
|
+
3 0 obj
|
14
|
+
<< /Type /Pages
|
15
|
+
/Count 1
|
16
|
+
/Kids [5 0 R]
|
17
|
+
>>
|
18
|
+
endobj
|
19
|
+
4 0 obj
|
20
|
+
<< /Length 4
|
21
|
+
>>
|
22
|
+
stream
|
23
|
+
q
|
24
|
+
Q
|
25
|
+
|
26
|
+
endstream
|
27
|
+
endobj
|
28
|
+
5 0 obj
|
29
|
+
<< /Type /Page
|
30
|
+
/Parent 3 0 R
|
31
|
+
/MediaBox [0 0 595.28 841.89]
|
32
|
+
/CropBox [0 0 595.28 841.89]
|
33
|
+
/BleedBox [0 0 595.28 841.89]
|
34
|
+
/TrimBox [0 0 595.28 841.89]
|
35
|
+
/ArtBox [0 0 595.28 841.89]
|
36
|
+
/Contents 4 0 R
|
37
|
+
/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
|
38
|
+
>>
|
39
|
+
>>
|
40
|
+
endobj
|
41
|
+
xref
|
42
|
+
0 6
|
43
|
+
0000000000 65535 f
|
44
|
+
0000000015 00000 n
|
45
|
+
0000000109 00000 n
|
46
|
+
0000000158 00000 n
|
47
|
+
0000000215 00000 n
|
48
|
+
0000000268 00000 n
|
49
|
+
trailer
|
50
|
+
<< /Size 6
|
51
|
+
/Root 2 0 R
|
52
|
+
/Info 1 0 R
|
53
|
+
>>
|
54
|
+
startxref
|
55
|
+
540
|
56
|
+
%%EOF
|
@@ -375,3 +375,207 @@ table.hd-sessions {
|
|
375
375
|
margin-bottom: 0.2rem;
|
376
376
|
}
|
377
377
|
}
|
378
|
+
|
379
|
+
/*
|
380
|
+
For the prescription administration section in the HD Session form
|
381
|
+
use flexbox to layout items inside each prescription.
|
382
|
+
*/
|
383
|
+
.hd-drug-administration {
|
384
|
+
display: flex;
|
385
|
+
border: solid 1px $light-grey;
|
386
|
+
margin: .7rem 0;
|
387
|
+
padding: .3rem .6rem;
|
388
|
+
border-right-width: 15px;
|
389
|
+
flex-wrap: wrap;
|
390
|
+
|
391
|
+
.summary {
|
392
|
+
flex-basis: 100%;
|
393
|
+
display: flex; /* also a flex for items within it */
|
394
|
+
|
395
|
+
.hd-drug {
|
396
|
+
flex: 1;
|
397
|
+
padding-bottom: .5rem;
|
398
|
+
color: $mid-grey;
|
399
|
+
|
400
|
+
.hd-drug--name {
|
401
|
+
font-weight: bold;
|
402
|
+
}
|
403
|
+
.hd-drug--name,
|
404
|
+
.hd-drug--dose,
|
405
|
+
.hd-drug--route,
|
406
|
+
.hd-drug--prescribed-on,
|
407
|
+
.hd-drug--frequency {
|
408
|
+
display: inline-block;
|
409
|
+
padding-right: .5rem;
|
410
|
+
color: $dark-grey;
|
411
|
+
}
|
412
|
+
|
413
|
+
.hd-drug--prescriber-name {
|
414
|
+
display: inline-block;
|
415
|
+
color: $mid-grey;
|
416
|
+
}
|
417
|
+
|
418
|
+
.hd-drug--termination {
|
419
|
+
.hd-drug--termination-date {
|
420
|
+
color: $dark-grey;
|
421
|
+
display: inline-block;
|
422
|
+
color: $dark-grey;
|
423
|
+
padding: 0 .3rem;
|
424
|
+
}
|
425
|
+
}
|
426
|
+
}
|
427
|
+
|
428
|
+
/*
|
429
|
+
This is the checkox to indicate the drug was administered.
|
430
|
+
We fix its width as we never want it to shrink.
|
431
|
+
*/
|
432
|
+
.hd-drug-administered {
|
433
|
+
flex-basis: 220px;
|
434
|
+
text-align: right;
|
435
|
+
|
436
|
+
.radio {
|
437
|
+
display: inline-block !important;
|
438
|
+
}
|
439
|
+
}
|
440
|
+
}
|
441
|
+
|
442
|
+
.reason-why-not-administered {
|
443
|
+
display: none;
|
444
|
+
}
|
445
|
+
|
446
|
+
&.undecided {
|
447
|
+
.authentication {
|
448
|
+
display: block;
|
449
|
+
}
|
450
|
+
}
|
451
|
+
|
452
|
+
&.administered {
|
453
|
+
border-right-color: $nhs-red;
|
454
|
+
|
455
|
+
/* The 'status' values for the prescription-administration */
|
456
|
+
&[data-token-count='2'] {
|
457
|
+
border-right-color: $nhs-green;
|
458
|
+
}
|
459
|
+
}
|
460
|
+
|
461
|
+
&.not-administered {
|
462
|
+
.authentication {
|
463
|
+
display: none;
|
464
|
+
}
|
465
|
+
|
466
|
+
.reason-why-not-administered {
|
467
|
+
display: block;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
|
471
|
+
.small-input {
|
472
|
+
max-width: inherit !important;
|
473
|
+
}
|
474
|
+
|
475
|
+
.notes {
|
476
|
+
flex: 1;
|
477
|
+
margin-right: 1rem;
|
478
|
+
|
479
|
+
textarea {
|
480
|
+
height: 5.2rem;
|
481
|
+
}
|
482
|
+
|
483
|
+
@media screen and (max-width: 768px) {
|
484
|
+
// As the screen shrinks, put the user/password boxes under the notes
|
485
|
+
flex-basis: 100%;
|
486
|
+
}
|
487
|
+
}
|
488
|
+
|
489
|
+
/* this section contains select2 inputs and pwd fields for the 2 users */
|
490
|
+
.authentication {
|
491
|
+
flex-basis: 330px;
|
492
|
+
flex-grow: 0;
|
493
|
+
|
494
|
+
// Addinng the disabled-with-faded-overlay class to authentication adds a semi transparent overlay
|
495
|
+
// that indicates the section is no receiving input ie because the drug has been marked
|
496
|
+
// as not administered.
|
497
|
+
&.disabled-with-faded-overlay {
|
498
|
+
position: relative;
|
499
|
+
}
|
500
|
+
|
501
|
+
&.disabled-with-faded-overlay:after {
|
502
|
+
content: " ";
|
503
|
+
z-index: 10;
|
504
|
+
display: block;
|
505
|
+
position: absolute;
|
506
|
+
height: 100%;
|
507
|
+
top: 0;
|
508
|
+
left: 0;
|
509
|
+
right: 0;
|
510
|
+
background: rgba(255, 255, 255, 0.5);
|
511
|
+
}
|
512
|
+
|
513
|
+
.user-and-password {
|
514
|
+
display: inline-block;
|
515
|
+
width: 50%;
|
516
|
+
padding-right: 1rem;
|
517
|
+
vertical-align: top;
|
518
|
+
|
519
|
+
.select2-container--default.select2-container--disabled .select2-selection--single {
|
520
|
+
background-color: $white;
|
521
|
+
}
|
522
|
+
|
523
|
+
.spinner {
|
524
|
+
display: none;
|
525
|
+
}
|
526
|
+
|
527
|
+
&.working {
|
528
|
+
.spinner {
|
529
|
+
display: inline-block;
|
530
|
+
}
|
531
|
+
|
532
|
+
.user-password {
|
533
|
+
background: $mid-grey;
|
534
|
+
}
|
535
|
+
|
536
|
+
}
|
537
|
+
|
538
|
+
.error.invalid-password {
|
539
|
+
display: none;
|
540
|
+
}
|
541
|
+
|
542
|
+
&.error {
|
543
|
+
small.error {
|
544
|
+
display: block;
|
545
|
+
}
|
546
|
+
}
|
547
|
+
|
548
|
+
.select2 {
|
549
|
+
// margin-bottom: 0.75rem;
|
550
|
+
}
|
551
|
+
|
552
|
+
.user-password {
|
553
|
+
margin-bottom: 0;
|
554
|
+
}
|
555
|
+
|
556
|
+
.confirmed {
|
557
|
+
display: none;
|
558
|
+
text-align: center;
|
559
|
+
|
560
|
+
i {
|
561
|
+
font-size: 1.6rem;
|
562
|
+
color: $nhs-green;
|
563
|
+
}
|
564
|
+
|
565
|
+
a {
|
566
|
+
margin-left: .4rem;
|
567
|
+
}
|
568
|
+
}
|
569
|
+
|
570
|
+
&.authorised {
|
571
|
+
.user-password {
|
572
|
+
display: none
|
573
|
+
}
|
574
|
+
|
575
|
+
.confirmed {
|
576
|
+
display: block;
|
577
|
+
}
|
578
|
+
}
|
579
|
+
}
|
580
|
+
}
|
581
|
+
}
|