Reliability Modelling of Dispensing Processes in Community Pharmacy

Studies of error rates in community pharmacies have reported error rates of between 0.014% and 3.3% per item dispensed. This suggests up to 36 million items per year may contain errors in England. In addition, literature shows that patient satisfaction with services is directly related to waiting times. There is a need for a method to model pharmacy efficiency balancing safety and waiting times, ensuring that the reliability of the dispensing process is not compromised. In this paper a Coloured Petri Net (CPN) approach is proposed for analysing reliability and efficiency of community pharmacy. A pharmacy team work to complete dispensing and non-dispensing tasks, where non-dispensing tasks require staff to be temporarily removed from the dispensing process. The proposed approach is useful to investigate what affects the error rates and long waiting times, and provides modelling-based evidence to decision makers, looking to optimise staffing levels and improve the reliability of dispensing.


Background
It has become increasingly apparent that healthcare systems are responsible for some level of iatrogenic harm to patients (Health Foundation, 2011), and community pharmacies represent no exception to this.So much so, that the World Health Organization (WHO) has identified them as a key area for safety improvements in primary care (WHO, 2012).For example, dispensing error rates of between 0.014% (Knudsen et al, 2007) and 3.3% (Franklin & O'Grady, 2007) have been reported in literature.In addition, patient satisfaction with their pharmacy service provision is influenced by waiting times (Afolabi & Erhun, 2003), and satisfied patients are more prone to return visits to specific providers.Given that pharmacies operate in a competitive market environment, there is a clear incentive to try and reduce their patient waiting times and to increase levels of patient satisfaction and patient retention.Doing this while also maintaining very high standards of safety presents a challenge for community pharmacy policy makers, and it is one that this paper addresses.

Reliability engineering
Risk assessment has become a common feature for industries which involve some level of risk in their operations (Andrews, 2009).Commonly seen examples of reliability engineering techniques are fault and event trees.Cohen et al. used both techniques to conduct an assessment of community pharmacy dispensing (Cohen et al, 2012).These models used Boolean logic to relate events in a way such that independent events can combine together to create system level failures.By assigning each event a probability of occurrence, a study of the fault tree structure can provide both qualitative and quantitative analyses of the undesirable outcome of the process.
Another technique commonly used for reliability engineering applications are Markov models (Boyd, 1998).These are used when systems exhibit dynamic behaviour, such as repairable components or inspection strategies.The models have the Markov property, meaning that the future behaviour of the system is independent of the past, and instead only dependent on the present.
Petri Nets are capable of modelling process which exhibit concurrency (Schneeweiss, 1999).This makes them a good candidate modelling tool for community pharmacies, which have a large number of components, as well as events, such as the final accuracy check, which are dependent on earlier stages of the dispensing process.Furthermore, colours can be introduced to Petri Net models, creating so called Coloured Petri Nets (Jensen, 1996).This type of Petri Nets enable information specific to individual tokens to be transmitted around the net, allowing the complex properties of prescriptions to be modelled at a higher resolution.
The primary healthcare sector has not been a conventional area for the application of reliability engineering techniques.Where work has been done, it has focused on the secondary healthcare settings.Petri Net modelling approaches have been proposed in a number of secondary healthcare settings, such as hospital departments, hospital information systems, and mental health providers (Dammasch & Horton, 2007).The novel element of this paper is the ability to investigate the effects of various prescription checking strategies and team makeup on the reliability and efficiency of the dispensing process using a single PN model.The process begins when a patient hands over a prescription, then the labels are printed and the required medicines are picked.Then an intermediate check is performed by the member of staff who has completed the previous stages.The labels are applied to medicine boxes, before the completed prescription is passed onto a pharmacist who completes clinical and final accuracy checks.After the final accuracy check, the prescription is handed back to the patient or stored in the pharmacy to be collected later.The final accuracy check is the final failsafe of the process, beyond which errors are unlikely to be identified.

Resources
Community pharmacy teams are made up of a group of qualified and semi-qualified personnel, including pharmacists, Accuracy Checking Technicians (ACTs), dispensers and counter assistants.Teams range in size, from a single pharmacist up to large teams of people.The only legal requirement in terms of staff is that there must be a responsible pharmacist present on site.Non-staff resources used in the pharmacy include prescription forms, medicines, labels, labelling stations and a private room for consultations.

Non-dispensing tasks
In addition to the dispensing requirements of a community pharmacy, many non-dispensing tasks must also be completed (Davies et al, 2014).These tasks temporarily take staff away from the dispensing process, slowing down the movement of prescriptions.The non-dispensing tasks modelled in this paper are: stock management, patient counselling and advanced pharmacy services.Lunch hours for dispensers have also been considered in the model.

Failure modes
Reliably providing customers with accurate prescriptions in the shortest time possible is the main goal of community pharmacies.Thus the process can be considered to be a failure if either the process takes a period of time such that the customer is unhappy with, or the prescription provided is inaccurate.
Prescription inaccuracies can come in many forms; the three main components of a prescription which may contain inaccuracies are: labels, contents and label application.An example of a labelling inaccuracy would be a label indicating to take a higher dose than the amount prescribed.Contents errors can be as basic as items being dispensed which are not on the prescription form, and label application errors involve labels being applied to the wrong medicine boxes.
If an erroneous prescription is given to a patient, this is recorded as a dispensing error.If instead an error is found in a prescription at the final accuracy check, this is recorded as a near miss (Chua et al, 2003).

Defining process reliability and efficiency
The dispensing process reliability, R, is defined in equation 1: where pcc is the number of completely correct prescriptions dispensed, and ptotal is the total prescriptions dispensed.
Efficiency is commonly calculated as a ratio between the required resources to maintain a process and the useful output produced.This paper focusses on a set of efficiency indicators related to how fast prescriptions are processed by the pharmacy and how many prescriptions are completed in a day.

Proposed CPN-based methodology
A Coloured Petri Net (CPN) was developed to model a manual, rather than automated, dispensing process.The full model of the process is shown in Figure 2. Prescriptions enter the pharmacy from the left (transitions 2 and 4), and as staff complete the stages of dispensing prescriptions are moved from left to right.and 2 show the descriptions of each place and transition in the CPN respectively.Each place is allocated a set of token types which are able to occupy it, where the token types used in this net are: e (basic), w (staff) or p (prescription).Transitions are given a distribution controlling their delay, and they are also denoted as processor transitions or not; note that processor transitions model stages which are dependent on the number of items in the prescription.Transition times are sampled from the distribution a number of times, equal to the number of items in the prescription being processed, taking the sum as a delay value for the transition.Exponential, uniform and normal distributions were used, some transitions had a deterministic delay.

Model assumptions
There are two main categories of task in the model -primary and secondary tasks.Primary tasks may be completed by any member of staff, and secondary tasks are strictly limited to pharmacists.Many assumptions about staff behaviour and pharmacy operation were made in the modelling process.The assumptions related to how staff behave are as follows:  Probability distributions for task timings and error probabilities do not depend on the level of staff. Dispensers are limited to primary tasks only; pharmacists can complete both types. Once the primary stages of dispensing are started, the same member of staff completes the remaining primary stages; stages 2, 3 and 4 in Figure 1. A customer arriving in the pharmacy is seen to as soon as a member of staff becomes available. Lunch hours are taken by dispensers (one at a time); pharmacists do not stop for lunch.
The remaining assumptions relate to the model:  Opening hours are between 9am -5 pm.
 Walk-in prescriptions are given priority over deliveries, and the number of items in prescriptions is sampled from a Geometric(0.35)distribution. Delivery prescriptions enter the pharmacy at 10am, as a group of 150 prescriptions. There are only 2 labelling stations used to generate labels. 15 minutes is the threshold beyond which a walk-in is considered to have been delayed.

Prescription modelling
Prescriptions are modelled using colours in the CPN model, where the colours represent prescription properties.The properties that alter token behaviour are: the type of prescription, the number of items, and the presence of errors.Other colours are used to keep track of how many times a prescription has been corrected during its dispensing journey, or how long it has taken to dispense.

Failures and checks
The occurrence of failures in the process is modelled by Bernoulli random variables.The following error occurrence probabilities have been taken from (Cohen et al., 2012) (labelling (0.06), filling (0.05), label application (0.03), final accuracy check (0.05)), or assumed (intermediate accuracy check (0.1)).
Both accuracy checks are dependent of the state of the prescription being checked.Correct prescriptions pass through checks unhindered, however, prescriptions containing errors are spotted and attempts are made to rectify them.Checks can fail to spot errors.Upon finding an error, there are a number of ways staff can deal with them.This paper investigates two intermediate check protocols.The first protocol (a), is that if an error is found, the prescription form is sent back to be dispensed again from the start.Using the second protocol (b), staff finding erroneous prescriptions attempt to rectify through repeating the related task.Staff "repair" each component of an erroneous prescription with the failure probabilities, described above.Note that the final accuracy check always uses protocol (a).It is assumed that intermediate checks do not increase the time taken to complete primary dispensing tasks since they are done simultaneously.

Scenario specification
Four checking strategies were used to demonstrate the ability to evaluate pharmacy performance using the CPN model and simulation results are shown in Table 3.The first four scenarios used the same staff set up of 1 pharmacist and 2 dispensers, and the set of non-dispensing requirements was the same.Scenario 1 had no accuracy checks, and scenario 2 used a final accuracy check.Scenarios 3 and 4 were extensions of scenario 2, i.e. scenarios 3 (a) and 4 (b) introduced intermediate checks using protocols (a) and (b) respectively.The last two scenarios considered 2 pharmacist and 2 dispensers.Each scenario was simulated 6000 times.

Results and analysis
The results indicate that the different checking strategies had variable effects on the dispensing process.Incorporating a final accuracy check (2) reduced the number of dispensing errors produced significantly although it slowed down the process in comparison with using no checks (1).The use of both intermediate checking protocols further reduced errors.Protocol (a) was better than (b) in terms of reliability.Protocol (a) also performed slightly better in terms of efficiency, as can be seen by comparing the number of deliveries completed, and the mean time taken to dispense walk-ins.Thus these results indicate that it may be beneficial for pharmacies wanting to incorporate an intermediate accuracy check into their processes, to use a check that sends erroneous prescriptions to be dispensed again.This is influenced, however, by assumptions about how such checks operate.It may be the case that when repeating a "faulty" prescription, repeated error probabilities are lower (due to increased concentration).
The last two scenarios (2+2) had an additional pharmacist on the team; as a result, more prescriptions were dispensed and the reliability was retained.
Table 3. Simulation results

Conclusion
It has been shown that the CPNs can be used to model the dispensing process in a community pharmacy, and the model can evaluate process efficiency and reliability.All main steps of dispensing are modelled, taking account of staff roles, task error probabilities and remedial actions.The model could be used to support decisions in better staffing levels and improved reliability of dispensing.Future work is focussing on in-field data collection in UK pharmacies and using the CPN model within an optimisation framework.

Figure 2 .
Figure 2. A CPN model for community pharmacy dispensing

Table 1 .
Model places