Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Reproducible poster using knitr to knit R code into a LaTeX beamer poster. It produces a A0 size poster describing work we've done to improve analgesia for patients with hip fracture. It won't compile straight from these files: you will need to add some data and download the NHS logo, accepting the terms and conditions. The template uses NHS col…
\usepackage[orientation=portrait,size=a0, scale=1.5]{beamerposter}
% This is based on the template at
%%%%%%%%%%%%%%%%%%%%% Edit this section with your info %%%%%%%%%%%%%%%%%%%%%%%
\title{\huge Fascia Iliaca Block}
\author[]{Duncan McPherson, Daniel Waddington}
\institute{University Hospital Southampton NHS Foundation Trust}
\titlegraphic{./figure/NHS-rev} %this is the path to your logo
% You can download the official NHS logos from
% after accepting the terms and conditions
<<mainSettings, echo=FALSE, include=FALSE>>=
opts_chunk$set(echo=FALSE, comment=NA, message=FALSE, results='asis', cache=TRUE, fig.height=5)
<<setupData, include=FALSE>>=
fibs <- read.csv("path/to/FasciaIliacaBlocks.csv")
# The actual data has patient identifiers in it, so you can't have it.
# You could easily make some fake data to test though
fibs$dob<- strptime(fibs$Date.Of.Birth, "%d/%m/%Y")
fibs$arrival<- strptime(fibs$Arrival.Date, "%d/%m/%Y %H:%M")
fibs$out.dept<- strptime(fibs$Left.Dept.Date, "%d/%m/%Y %H:%M")
fibs$block.time<- strptime(fibs$Block.Time, "%d/%m/%Y %H:%M")
fibs$age<- with(fibs, as.period(as.interval(dob, arrival), unit="years"))
fibs$<- with(fibs, as.period(as.interval(arrival, block.time), unit="hours"))
fibs$d.arrival<- round_date(fibs$arrival, "day")
fibs$w.arrival <- round_date(fibs$arrival, "week")
fibs$block.done<- ifelse(fibs$Block.Location %in% c("ED", "ward"), 1, 0)
d.fibs<- with(fibs, qcc.groups(block.done, as.character(d.arrival)))
names<- rownames(d.fibs)
d.fibs<- data.frame(d.fibs)
d.fibs$Date<- names
d.fibs$sizes<- rowSums(![,c(1:5)]))
d.fibs$blocks<- rowSums(d.fibs[,1:5], na.rm=TRUE)
w.fibs <- with(fibs, qcc.groups(block.done, as.character(w.arrival)))
names<- rownames(w.fibs)
w.fibs<- data.frame(w.fibs)
w.fibs$Week<- names
w.fibs$sizes<- rowSums(![,c(1:15)]))
w.fibs$blocks<- rowSums(w.fibs[,1:15], na.rm=TRUE)
qfibs<- fibs[fibs$Block.Location %in% c("ED", "ward"),] <- data.frame(seq(min(fibs$d.arrival), max(fibs$d.arrival), by="day"))
names([1] <- "Date"$Date <- as.character($Date) <- merge(, d.fibs, by="Date", all.x=TRUE)[c("Date", "sizes", "blocks")][] <- 0$Date <- as.Date($Date)
by.week <- data.frame(seq(min(fibs$w.arrival), max(fibs$w.arrival), by="week"))
names(by.week)[1] <- "Week"
by.week$Week <- as.character(by.week$Week, "%Y-%m-%d")
by.week <- merge(by.week, w.fibs, by="Week", all.x=TRUE)[c("Week", "sizes", "blocks")]
by.week[] <- 0
by.week$Week <- as.Date(by.week$Week)
by.week$Proportion <- with(by.week, blocks/sizes)
% ---------------------------------------------------------%
% Set up a column
\begin{minipage}[T]{.95\textwidth} % tweaks the width, makes a new \textwidth
\parbox[t][\columnheight]{\textwidth}{ % must be some better way to set the the height, width and textwidth simultaneously
% Since all columns are the same length, it is all nice and tidy. You have to get the height empirically
% ---------------------------------------------------------%
% fill each column with content
Fascia iliaca block was first described in 1989 as an alternatvie to 3-in-1 block in children~\citep{dalens1989}.
Fascia iliaca block is more effective than 3-in-1 block at producing lateral femoral cutaneous nerve block~\citep{capdevila1998}.
Fascia iliaca block provides good analgesia for fractures of the hip, and improves sitting ability~\citep{candal-couto2005}.
Ultrasound guidance may deepen the block of the obturator nerve compared to a landmark technique, but both techniques are equally effective for other aspects of the overall block~\citep{dolan2008}.
We decided for these reasons that all patients admitted to our hospital with fractured neck of femur should be offered a fascia iliaca block as soon as possible after admission in addition to standard analgesia.
An on-demand bleep service was staffed during office hours by a qualified anaesthetist able to undertake the injection.
This anaesthetist would also actively seek out pre-operative patients to offer and undertake the block.
The technique chosen was an ultrasound guided injection of 30ml of 0.25\% Bupivacaine into the fascia iliaca compartment.
We collect continuous data on fascia iliaca block for every patient admitted with fractured neck of femur since April 2013 when the service started.
Data presented here are for the first period upto the end of July 2013.
The average number of admissions per day is \Sexpr{mean($sizes)}.
The pattern of admissions fits well with a simple Poisson process of the same mean.
There are admissions throughout all 24 hours of the day, with a peak in the late afternoon and lull in the early morning.
<<admissionsDist, fig.cap="Number of days on which any given number of admissions for fractured hip occurred. Overlaid is the Poisson curve with the same mean as the mean number of admissions per day.">>=
pois.est <- data.frame(cbind(0:6, dpois(0:6, mean($sizes))*length($sizes))) <- ggplot(, aes(sizes)) + geom_bar(binwidth=1, fill="#006b54") + xlab("Number of admissions per day") + ylab("Number of days") + geom_path(data=pois.est, aes(X1, X2), colour="#e28c05") + scale_x_continuous(breaks=seq(0,6,1))
<<adHour, fig.cap="Admissions in each hour of the day.">>=
ggplot(fibs, aes(hour(arrival))) + geom_bar(binwidth=1, fill="#006b54") + xlab("Hour of arrival") + ylab("Number of patients") + scale_x_continuous(breaks=seq(0,24,3))
\begin{block}{Run chart of admissions and blocks}
<<dailyAdmissions, fig.cap="Admissions occurring during each day (green) and fascia iliaca injections done each day (orange).">>=
bar <- ggplot(, aes(Date)) + ylab("Number of patients")
bar <- bar + geom_bar(aes(y=sizes), stat="identity", fill="#006b54")
bar <- bar + geom_bar(aes(y=blocks), stat="identity", fill="#e28c05")
bar <- bar + scale_x_date(breaks = "month", labels=date_format("%b %y"))
bar <- bar + theme(axis.text.x=element_text(angle=90), axis.title.x=element_blank())
<<weekly, fig.cap="Proportion of patients admitted during each week that received a block.">>=
ggplot(aes(Week, Proportion), data=by.week) + geom_bar(stat="identity", fill="#006b54")
% ---------------------------------------------------------%
% end the column
% ---------------------------------------------------------%
% Set up a column
\begin{minipage}[T]{.95\textwidth} % tweaks the width, makes a new \textwidth
\parbox[t][\columnheight]{\textwidth}{ % must be some better way to set the the height, width and textwidth simultaneously
% Since all columns are the same length, it is all nice and tidy. You have to get the height empirically
% ---------------------------------------------------------%
% fill each column with content
\begin{block}{Geographic location of block}
About four fifths of blocks were done on the ward.
<<blockLoc, fig.cap="Location where blocks were done.">>=
ggplot(qfibs, aes(Block.Location)) + geom_bar(fill="#006b54") + ylab("Number of blocks") + theme(axis.title.x=element_blank())
\begin{block}{Time to block}
<<timeToBlock, fig.cap="Time to acheive block for the patients who had a block in each location.">>=
boxplot<- ggplot(qfibs, aes(Block.Location, as.duration( +geom_boxplot(colour="#006b54", fill="#5bbf21") +theme(axis.title.x=element_blank()) +ylab("Interval from admission to block (hours)")
About four fifths of blocks were done on the ward, rather than in ED, and the time from admission to acheiving block is significantly longer if it is done on the ward.
The first several weeks yielded no or very few blocks, but by the end of the study period 20-25\% of patients received a block.
An office hours only service provided by an anaesthetist has improved the provision of fascia iliaca blocks from zero to 25\% of patients within four months.
This is better than the service that was provided previously, but needs further improvement.
The main challenges to be addressed are that the service needs to be utilised more quickly when a patient is admitted, and that it needs to be available 24 hours per day for this to happen.
We have started training ED doctors and nurses to undertake this procedure, and will re-audit early next year.
This poster is open source: fork my gist at \texttt{}}
% ---------------------------------------------------------%
% end the column
% this style was created by Duncan McPherson, based on the I6pd2 theme
% by Thomas Deselaers an Philippe Dreuw
%%%%%%%%%%% Define Colours %%%%%%%%%%%%%%%%%%%
% These are official NHS colours.
% Get more information and the other colours at:
% NHS yellow
\definecolor{nhsyellow}{cmyk}{0, 0, 1, 0} % #f7e214
% NHS blue
\definecolor{nhsblue}{cmyk}{1, 0.43, 0, 0}
\definecolor{nhsdarkblue}{cmyk}{1, 0.69, 0, 0.115}
\definecolor{nhslightblue}{cmyk}{1, 0.085, 0, 0.06}
% NHS green
\definecolor{darkgreen}{cmyk}{1, 0, 0.69, 0.43} % #006b54
\definecolor{lightgreen}{cmyk}{0.65, 0, 1, 0} % #5bbf21
% NHS orange
\definecolor{orange}{cmyk}{0, 0.47, 1, 0} % #e28c05
%%%%%%%%%%%% Put colours to use %%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{footline}{fg=white, bg=nhsblue}
\setbeamercolor{separation line}{bg=nhsyellow}
\setbeamercolor*{normal text}{fg=white, bg=nhsdarkblue}
\setbeamercolor*{block body}{bg=nhslightblue!20,fg=black}
\setbeamercolor*{block title}{fg=white,bg=nhsblue}
\setbeamerfont{block title}{size=\large,series=\bf}
%%%%%%%%%%%%%%%% Set up structures in the template %%%%%%%%%%%%%%%
\setbeamertemplate{itemize items}[triangle]
\beamertemplatenavigationsymbolsempty % no navigation on a poster
\setbeamertemplate{block begin}{
\begin{beamercolorbox}[ht=3.5ex,dp=0.5ex,center,leftskip=-1em,colsep*=.75ex]{block title}%
\usebeamerfont*{block title}%
{\phantom{Gg}\insertblocktitle}% phantom because of baseline problem
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
\setbeamertemplate{block end}{
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
\begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot}
\textcolor{nhslightblue!20}{\footnotesize Created with \LaTeX~\texttt{beamerposter}}
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot}
% adapt height of imtemize rectangles
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{itemize item}{\raisebox{0.12ex}{$\blacktriangleright$}\hskip0.1em}
\setbeamertemplate{itemize subitem}{\raisebox{0.12ex}{$\triangleright$}\hskip0.1em}
% or define your own template using \defbeamertemplate{itemize item}, see beameruserguide.pdf
% equal font sizes for all levels
\setbeamerfont{itemize/enumerate body}{size=\normalsize}
\setbeamerfont{itemize/enumerate subbody}{size=\normalsize}
\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize}
abstract = {Adequate pre-operative analgesia for elderly patients with femoral neck fractures is difficult to assess and is often an overseen aspect of their care. We aimed to assess the efficacy of fascia iliaca blocks inserted via plexus blockade catheters in the pre-operative period. Our simple technique allowed the block to be administered safely without the need for a nerve stimulator. We assessed the effectiveness of the block with a novel objective sitting score and by assessing the degree of passive hip flexion that could be achieved comfortably. Visual analogue scores were also used. We studied 30 consecutive patients, regardless of their mental state. One hour following the block, there was a significant improvement in the sitting scores as well as the passive hip flexion (mean increase 44 degrees ). Visual analogue scores also score improved significantly from 7.2 to 4.6 (S.D. 2.4) in the 18 patients without cognitive impairment. We conclude that fascia iliaca blocks can provide significant benefit in the pre-operative period and allow patients to sit up more comfortably while they await surgery.},
author = {Candal-Couto, J J and McVie, J L and Haslam, N and Innes, a R and Rushmer, J},
doi = {10.1016/j.injury.2004.10.015},
file = {:Users/duncan/Documents/references mendeley/2005/Candal-Couto et al. - Pre-operative analgesia for patients with femoral neck fractures using a modified fascia iliaca block technique.pdf:pdf},
issn = {0020-1383},
journal = {Injury},
keywords = {Aged,Analgesia,Analgesia: methods,Cognition Disorders,Cognition Disorders: complications,Cognition Disorders: physiopathology,Female,Femoral Neck Fractures,Femoral Neck Fractures: complications,Femoral Neck Fractures: physiopathology,Femoral Neck Fractures: surgery,Hip Joint,Hip Joint: physiopathology,Humans,Male,Movement,Movement: physiology,Nerve Block,Nerve Block: methods,Pain Measurement,Preoperative Care,Preoperative Care: methods,Statistics, Nonparametric,Treatment Outcome},
month = apr,
number = {4},
pages = {505--10},
pmid = {15755432},
title = {{Pre-operative analgesia for patients with femoral neck fractures using a modified fascia iliaca block technique.}},
url = {},
volume = {36},
year = {2005}
abstract = {The 3-in-1 (Group 1) and fascia iliaca compartment (Group 2) blocks, two single-injection, anterior approach procedures used to simultaneously block the femoral, obturator, and lateral femoral cutaneous (LFC) nerves, were compared in 100 adults after lower limb surgery. Pain control, sensory and motor blockades, and radiographically visualized spread of local anesthetic solution were studied prospectively. Both approaches provided efficient pain control using 30 mL of 2\% lidocaine with 1:200,000 epinephrine and 0.5\% bupivacaine and 5 mL of contrast media (iopamidol). Complete lumbar plexus blockade was achieved in 18 (38\%) Group 1 and 17 (34\%) Group 2 patients (n = 50 patients per group). Sensory block of the femoral, obturator, genitofemoral, and LFC nerves was obtained in 90\% and 88\%, 52\% and 38\%, 38\% and 34\%, and 62\% and 90\% of the patients in Groups 1 and 2, respectively (P < 0.05). Sensory LFC blockade was obtained more rapidly for the patients in Group 2 (P < 0.05). Concurrent internal and external spread of the local anesthetic solution under the fascia iliaca and between the iliacus and psoas muscles was noted in 62 of the 92 block procedures analyzed radiographically. Isolated external spreads under the fascia iliaca and over the iliacus muscle were noted in 10\% and 36\% of the patients in Groups 1 and 2, respectively (P < 0.05). The local anesthetic solution reached the lumbar plexus in only five radiographs. We conclude that the fascia iliaca compartment block is more effective than the 3-in-1 block in producing simultaneous blockade of the LFC and femoral nerves in adults. After both procedures, blockade was obtained primarily by the spread of local anesthetic under the fascia iliaca and only rarely by contact with the lumbar plexus. Implications: In adults, the two anterior approaches, 3-in-1 and fascia iliaca compartment blocks, provide effective postoperative analgesia. The fascia iliaca compartment technique provides faster and more consistent simultaneous blockade of the lateral femoral cutaneous and femoral nerves. Sensory block is caused by the spread of local anesthetic solution under the fascia iliaca and only rarely to the lumbar plexus.},
author = {Capdevila, X and Biboulet, P and Bouregba, M and Barthelet, Y and Rubenovitch, J and D'Athis, F},
file = {:Users/duncan/Documents/references mendeley/1998/Capdevila et al. - Comparison of the three-in-one and fascia iliaca compartment blocks in adults clinical and radiographic analysis.pdf:pdf},
issn = {0003-2999},
journal = {Anesthesia and analgesia},
keywords = {Adult,Anesthetics, Local,Anesthetics, Local: pharmacokinetics,Fascia,Female,Humans,Male,Nerve Block,Pain, Postoperative,Pain, Postoperative: therapy,Pelvis,Pelvis: radiography,Prospective Studies},
month = may,
number = {5},
pages = {1039--44},
pmid = {9585293},
title = {{Comparison of the three-in-one and fascia iliaca compartment blocks in adults: clinical and radiographic analysis.}},
url = {},
volume = {86},
year = {1998}
author = {Dolan, J and Williams, a and Murney, E and Smith, M and Kenny, G},
doi = {10.1016/j.rapm.2008.03.008},
file = {:Users/duncan/Documents/references mendeley/2008/Dolan et al. - Ultrasound Guided Fascia Iliaca Block A Comparison With the Loss of Resistance Technique.pdf:pdf},
issn = {10987339},
journal = {Regional Anesthesia and Pain Medicine},
keywords = {1 one ap-,algesia after hip and,fascia iliaca compartment block,he lumbar plexus block,knee surgery,loss of resistance,provides excellent an-,ultrasound guidance},
month = nov,
number = {6},
pages = {526--531},
title = {{Ultrasound Guided Fascia Iliaca Block: A Comparison With the Loss of Resistance Technique}},
url = {},
volume = {33},
year = {2008}
abstract = {A new single injection procedure, the fascia iliaca compartment block, is described for blocking the femoral, lateral cutaneous, and obturator nerves. The technique consists of injecting a local anesthetic immediately behind the fascia iliaca at the union of the lateral with the two medial thirds of the inguinal ligament, and forcing it upward by finger compression. This block was prospectively evaluated in 60 pediatric patients aged 0.7 to 17 years undergoing surgery of the lower limb, and then compared with a similar group of 60 children given a 3-in-1 block. Adequate analgesia was only obtained in 20\% of the patients given 3-in-1 blocks (group 1), whereas the fascia iliaca compartment block proved to be easy, free of complications, and effective in more than 90\% of patients (group 2). Such a high failure rate in group 1 was not due to misplacement of the needle since a femoral nerve block developed in all patients. Therefore it is unlikely that the local anesthetic can spread rostrally towards the lumbar plexus then return peripherally along the issuing nerves, and this was, indeed, not confirmed by radiological findings. In the authors' opinion, a multieffective block can only develop when the local anesthetic is introduced behind the fascia iliaca, which circumscribes a potential space where the femoral, lateral cutaneous, and obturator nerves run for a considerable part of their course. This report shows that deliberately injecting this space almost always results in an easy and effective block of these three nerves. The fascia iliaca compartment block can be recommended for use in children.},
author = {Dalens, B and Vanneuville, G and Tanguy, A},
file = {:Users/duncan/Documents/references mendeley/1989/Dalens, Vanneuville, Tanguy - Comparison of the fascia iliaca compartment block with the 3-in-1 block in children.pdf:pdf},
institution = {Department of Anesthesiology, H\^{o}tel-Dieu Hospital, Clermont-Ferrand, France.},
journal = {Anesthesia \& Analgesia},
keywords = {adolescent,anesthesia,child,female,femoral nerve,groin,humans,infant,leg,leg innervation,leg surgery,local,local methods,male,preschool,prospective studies},
number = {6},
pages = {705--713},
pmid = {2589650},
title = {{Comparison of the fascia iliaca compartment block with the 3-in-1 block in children.}},
url = {},
volume = {69},
year = {1989}

This comment has been minimized.

Copy link

@kaos42 kaos42 commented Jul 30, 2014

Please try to upload a demo data. I have had difficulty in debugging my "fake" data, which wont work with the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment