scss:
html {
overflow: hidden;
font-family: Helvetica, Arial;
}
.addressee {
width: 50%;
float: left;
}
.letter {
margin: auto;
width: 960px;
p, ul, ol, dl, li, h3 {
font-size: 1em;
}
p {
padding: 0;
line-height: 1.2em;
}
}
@media print {
.letter {
margin: 0 20px;
padding: 0;
font-size: 0.8em;
width: auto;
}
}
.header {
.unit-info p {
margin-top: 0;
text-transform: uppercase;
}
.description-block {
margin: 20px 0 30px 0;
.description {
font-weight: bold;
}
}
.unit-block {
width: 50%;
float: right;
text-align: right;
.trust-name p {
font-size: 1.2em;
vertical-align: bottom;
margin: 0;
}
.trust-caption p {
font-size: 0.8em;
margin-top: 5px;
}
.nhs-logo {
height: 33px;
padding: 0;
margin: 0 0 0 10px;
display: inline-block;
vertical-align: bottom;
}
.site-info-html p {
font-size: 0.7em;
}
}
.private {
text-transform: uppercase;
margin-bottom: 20px;
}
.address {
margin: 20px 0 20px 0;
}
}
.body {
clear: both;
padding-top: 10px;
.salutation {
margin: 30px 0;
}
.patient-status {
font-weight: bold;
text-decoration: underline;
margin: 10px 0;
}
.list {
margin-bottom: 5px;
h3 {
font-size: 0.9em;
font-weight: bold;
margin-bottom: 0;
margin-top: 0;
}
ul {
padding-left: 20px;
margin-top: 7px;
margin-bottom: 7px;
}
ol {
list-style-type: lower-latin;
font-size: 0.9em;
margin-bottom: 0;
margin-left: 0;
padding-left: 30px;
}
li {
line-height: 1.2em;
font-size: 0.9rem;
}
span, p {
font-size: 0.9rem;
}
}
.problems {
width: 50%;
float: left;
}
.allergies {
margin-bottom: 1rem;
h3 {
padding-right: 1rem;
}
h3, p {
display: inline;
}
ul {
list-style-type: none;
margin: 0.5rem 0 0;
padding: 0;
display: inline;
li {
display: inline;
margin-right: 1rem;
&::before {
content: "\2022";
padding-right: 0.2rem;
}
}
}
}
.prescriptions {
width: 50%;
float: right;
.prescription {
font-weight: normal;
&.recently_changed {
font-weight: bold;
}
}
}
.observations {
clear: both;
}
.investigations {
clear: both;
}
ul.inline {
display: block;
padding: 0;
margin: 0;
li {
display: inline;
padding-right: 15px;
}
}
.message {
margin-top: 30px;
p {
margin-bottom: 15px;
}
}
.electronic-signature {
margin-bottom: 40px;
}
.author-signature {
.author-name {
font-weight: bold;
}
margin-bottom: 20px;
}
}
.footer {
.ccs {
.electronic {
list-style-type: none;
list-style-position: outside;
margin: 0;
padding: 0;
}
h3 {
font-size: 1em;
margin-bottom: 20px;
}
}
}
div.alwaysbreak { page-break-before: always; }
div.nobreak:before { clear:both; }
div.nobreak { page-break-inside: avoid; }
.letter
.header
.addressee
.unit-info
p= letter.letterhead.unit_info
.description-block
p
= l letter.issued_on
br
span.description= letter.description
br
= letter.event_description
.private
p Private and confidential
.address
p= letter.main_recipient.to_html
.unit-block
.trust-name
p
=raw letter.letterhead.trust_name
/span.nhs-logo= inline_image_tag("renalware/NHS-Black.jpg", size: "82x33")
.trust-caption
p= letter.letterhead.trust_caption
.site-info-html
=raw letter.letterhead.site_info
.body
.salutation
p= letter.salutation
.patient-status
p= render "patient_summary", patient: letter.patient
= render letter.parts, patient: letter.patient
.message
= letter.body&.html_safe
.signature.nobreak
.electronic-signature
p= letter.signature
.author-signature
p
span.author-name= letter.author.signature
br
= letter.author.professional_position
.footer
.ccs
h3 cc:
ul.electronic
- letter.electronic_cc_recipients.each do |user|
li= user.professional_signature
.private
p Private and confidential
- letter.cc_recipients.each do |cc|
.address.nobreak
p= cc.to_html