Stack Sequential Algorithm to Analyse Adverse Medication Reaction

Amiya Kumar Tripathy, Nilakshi Joshi, Aslesha More, Divyadev Pillai, Amruni Waingankar

Abstract- An adverse medication reaction (ADR) is 'a response to a drugs which is noxious and unintended, and which occurs at dosages normally used in human beings'. Over the last decades it's been approximated that such unfavorable medication reactions (ADRs) will be the 4th to 6th greatest cause for mortality in various countries. They cause the fatality of several thousands of patients each year, and many more have problems with ADRs. The ratio of medical center admissions scheduled to adverse medicine reactions in a few countries is approximately or more than 10%. Furthermore suitable services to take care of ADRs impose a high financial burden on health care because of the hospital good care of patients with drug related problems. Some countries spend up to 15-20% of their hospital budget working with drug issues. The existing scenario is manual, costly, not easily portable and the conclusions aren't reported to the in charge authorities in timely manner.

To overcome these imperfections of the existing system, we propose a automatic ADR detecting system.

This is an interactive system system for detecting ADR from the specified combo of drugs. If ADR is discovered, the system will suggest some appropriate mixture of drugs that will solve the specific purpose. The diagnosis part of ADR is performed by using algorithms like Chi-Square, PRR (Proportionality Effect Ratio), Combinational. (Which already are implemented). The answer part i. e, suggesting appropriate drug combo is executed by Sequential decoding algorithms and the stack sequential algorithm.

Keywords-Adverse Drug Response, Adverse Drug Event, Bayesian Confidence Propagation Neural Network, Information Aspect, Frequent Structure, Online Analytical Processing Database, OPERATING-SYSTEM, Random Access Memory space, Medicines and Medical pro ducts Regulatory Agency, World Health Organization.


An adverse drug reaction (ADR) is an injury caused by taking medication. [1] ADRs may occur due to a single dose or permanent administration of any drug or result from the combo of two or more drugs, as this previous expression may also imply that the effects can be beneficial. "ADE can be mainly from medication problems.

A serious negative event is any event that:

  • Is fatal
  • Is life-threatening
  • Is forever/significantly disabling
  • Requires or longterm hospitalization
  • Causes beginning defects
  • Requires intervention to prevent long term impairment or damage


Study of design elements include exploration of relevant multiple results (utilization and/or safeness), sample size calculations, cohort accrual steps, and the timing and approach to data collection. The custom questionnaires can include those related risks possibly possible and diagnosed, also absent information in RMPs or can be designed to treat specific regulatory issues. Solo data get or multiple data take phases allow abstraction of scientific information from medical chart review by prescribers accountable for treatment initiation in most important care, over a period frame relevant to study needs analysis programs can be designed to address novel analytical issues and also convey thoughtful, appropriate, and extensive analysis of the data. Study information have been well prepared with scientific rigor to provide short or comprehensive demonstration of results relevant to the product's security and efficiency [4].

Before a drugs is granted a permit it must go through the strict testing and routine checks to ensure that it is acceptably safe and effective. All the medicines which work, can cause negative medication reactions which on the whole term we say a side-effect, which can range between a very trivial occurrence to being very serious. For any medicine to be authorized & qualified, the great things about the drugs must gratify all the possible conditions of the treatments causing undesireable effects in patients. Many a times, it is not easy to recognize if the medial side effect is because of a treatments, or another thing. Even if it is merely a suspicion a medicine or mixture of medications has caused a side-effect, the patients or doctors are asked to send the correct records of the symptoms and drugs approved, to FDA.

Reports received on suspected aspect effects are examined, with the information like professional medical trial data, medical literature or data from international medications regulators, for discovering previously unidentified safe practices issues or area effects[5].

In reports, a confidence interval (CI) is a populace parameter estimation and this implies the reliability of estimate. It is computed from the observations, in rule differs from test to test. The frequently observed interval contains the parameter and depends upon the assurance level or confidence coefficient. Confidence intervals contains a range of worth (period) that become best estimates of the unidentified population parameter. However, in infrequent cases, none of these ideals may cover the worthiness of the parameter. The amount of self-confidence of the confidence interval would signify the likelihood that the self-confidence range captures this true inhabitants parameter given a syndication of samples.

The confidence interval provides the parameter beliefs that, when examined, shouldn't be declined with the same sample. Greater degrees of variance yield larger confidence intervals, and therefore less precise estimates of the parameter. Self confidence intervals of difference variables not comprising 0 imply that there is a statistically factor between your populations.


The database comprises of a blend of drugs-symptoms and the negative medicine reactions associated with them specifically. The databases is a heterogeneous aggregation of the demographic, mix, medicine, symptoms and reactions of ADRs. It recently contains Information related to the drug description and capabilities of the individual as well. After evaluating the patient info that involves the symptoms and the medications the physician has prescribed compared to that patient the working system would provide a safe case to the end user.

These circumstances are regular and can be further utilized by the Doctor/Pharmacist to suggest the combinations. These safe conditions would be back ahead for the doctor about his prescription to that particular patient. These are tested instances and determine the validity of this doctor's prescription. The probability of occurrence of ADR and its own detection for a fresh patient is our definitive goal. The input after being evaluated derives a result of an ADR case. The incident of ADR means that the physician has to adjust his combination of Drugs consequently and convert an ADR case to a safe circumstance. This should bring about the doctor making changes that end up being safe to the individual according to our system. The type given by the physician discovering an ADR circumstance is then matched up with the databases in the available system. The Repository already comprises of ADR cases discovered, so whenever a current patient whose symptoms and the recommended medicine by the doctor matches it causes a ADR diagnosis.

Figure 1: System Architecture

The doctor gives input to the system including the patients symptoms and the drugs prescribed by the physician to that current patient. These information are the important factors for the recognition of the ADR through the system.


Figure 2: System flow

The System circulation requires extracting the Database which include the ADR situations and the safe cases. These cases are stored in the databases and comprises of the drug-symptom mixture. When a Doctor provides source to the system with the Symptoms and drugs, the machine evaluates the validity using the PRR algorithm and a value which is then matched up with the existing details in the data source of ADRs. In occurrences of safe circumstance the doctor proceeds with his combo of medicines approved, but in the event of an ADR that is happened the doctor realizes a medical neglect could occur. To prevent such an occurrence he modifies his drug combination for the basic safety of the patient.


For making experimental setup we have developed the structured databases in XAMPP with MySQL and we've made front end in HTML for performing various concerns. The databases which we are employing is the official data source released by food and Medication Administration (FDA)[2]. The database is updated after each three months. Data source consist complete information about Demographic data of patients, medicine, indications, reactions, therapy ETC. data of 5000 patients was regarded as test situations.

The databases which we've contains pursuing:

  1. Drug information;
  2. Reaction information;
  3. Patient outcome information;
  4. Information on the foundation;

Figure 3: databases Screenshot

This desk shown below gives complete information about the test cases of adverse medication reaction received in various years. The test situations are reported by various nursing homes, doctors, pharmacist, specialized medical researches, and medication manufacturers. This stand shows the number of accounts received by Food and Medication Association and got into into FDA Negative Event Reporting System by kind of report because the year 2003 until the end of the next one fourth of 2012.

Table 1: repository statistics

Table 1 provides information about the data that exists in the data source[2]. Every year shows lots of new conditions that were documented with the united states FDA. Expedited Cases involve those that were reported as soon as it was found. Direct Cases require those that were reported by individuals/ indie doctors. Non-expedited cases are those conditions that have been reported much after occurrence. The amount of cases which were received by All of us FDA were much higher than the ones that were moved into. Details regarding listed cases can be acquired before second 1 / 4 of the entire year 2012 only.


  1. Proportionality Reporting Proportion (PRR)

The PRR algorithm is a statistical method which is used to detect ADRs in Digital health details and databases. The working of this algorithm depends on the fact that when an ADR (related to a specific event) is determined for a therapeutic product (say medicinal product P), this adverse event is relatively reported more often in association with the product P than with another products in the repository. This gradual increase in the reporting of incidents for the medicinal product P in account is mirrored in the table below predicated on the total number of cases stored in the database.

Event (R)

All Other Events







All other









Table 2: Contingency matrix for PRR

In the table described the elements calculated are the specific available situations in the available databases. Therefore confirmed individual circumstance may donate to only an individual cell of the desk, where the circumstances make reference to the multiple products or the adverse occurrences[7]

PRR= A/(A+B)


The general criteria to perform the PRR are the following:

  1. Value A is the amount of conditions with the faulty medicinal product P including an adverse event R.
  2. Value B is the number of circumstances related to the faulty medicinal product P, concerning any other negative occurrences but R.
  3. Value C is the amount of cases including event R in relation to any other medicinal products but P.
  4. Value D is the amount of cases involving other adverse situations but R and any therapeutic products but P

The system performs the computations of the PRR on all the case counts instead of the ADRs to be chosen to keep the individuality between your variables used to analyze PRR so that the difference of the PRR will not be underestimated.

The computation of the PRR is done as follows:

  1. For evaluating given circumstances of nausea involving therapeutic product 'allopurinol l' = 15% (e. g. 15 reviews of diarrhea among a total of 100 reports

reported with medicinal product 'allopurino l'). For

evaluating a given number of information of nausea with other therapeutic products in a data source = 5%. Thus, the Proportionality Reporting Ratio is add up to 3.

  1. The chi-square (П‡2) statistics

The Chi-square is a statistic, which is usually found in dis proportionality analyses. The Chi-square can be used as a substitute measure of connection between the medicinal product P and the unfavorable event R based on the following calculation:[8]

X2= (AD-BC)2(A+B+C+D)/[(A+B)(C+D)(A+C)(B+D)]

When the PRR is shown with the X2 statistic :

  • The PRR ‰Ґ 2
  • The X2 ‰Ґ 4
  • The range of indivisual cases higher or add up to 3.
  1. Stack Sequential

We present the drug combo search engine optimization algorithms and show how they relate to the algorithms found in sequential decoding. Totally factorial datasets, where every possible medicine combination is analyzed, expand exponentially with the number of drugs (n). See Wording S1 for the relevant formula and an example dataset. In computational conditions we say that the difficulty is O(an). The O-notation implies the order of development of an algorithm basic procedure matter as a function of the input size. An exponential expansion is not functional for large n, therefore our aim is to find algorithms with much better efficiency, for example with a linear dependency on n, expressed as O(n).

The issue of finding the maximum estimation of the encoded

sequence is described as a walk by way of a tree. To appreciate the analogy with the search for the optimal medicine mixture, the tree shown in Body 4 can be weighed against the trees found in one of the initial descriptions of the stack sequential algorithm [14]. An alternative solution version of the tree, the ''trellis'' depiction shown in Physique 5, removes nodes representing redundant drug-dose combos.

The stack is a sorted list of all examined combos (best on


Notations :





S1 - the procedure initially is made up of only the list of

the measurements in the absence of any medicine (the main of

the tree of Figure 4).

Figure. 4 Tree representation of the data

S2 - The parsing begins from the most notable of the sorted list. Following the search completes it moves one level up in the braches of body 4. Combinations already used are dismissed for future extensions.

S3 - Once the combination extends to its maximum size, the parsing ends. This is similar to achieving the top of

the tree of Physique 4.

Since we consider the best combination, instead of

best avenue, we do not erase any mixture from the prepared list. When we find a combo recently been used, we move to the next blend in the sorted list. We do not incorporate different dosages of the same medication with one another, to limit the size of the search, but this is not an essential feature as shown in Shape 2, .

The algorithm is useful in searching mixtures where the result is not simply additive, because it overcomes non-linearities by backtracking to nodes in the tree.

Figure. 5 Trellis-like representation displaying combination of the data.

S1 Examine all drugs based on strength, dosages and list.

S2 The very best drug combo is kept from the processed list.

S3 Select the best single medicine and call it Cbest.

S4 Take the Combination of Cbest with all the drugs, increasing the medicine size by 1, gauge the biological ratings, and store the list of drugs of this size. At this step the algorithm moves one level up-wards in the tree of Physique 4.

S5 In the event the new combinations results better than

Cbest, this combo is utilized as the new Cbest and go back to earlier step.

If no new mixture scores much better than Cbest, backtrack to another best combination in the last size, symbol it as Cbest and return to the prior step.

S6 Backtrack value should be limited to a particular value.

S7 Do it again S4 to S6 till we find that the utmost size for the combinations is reached.


In this technique, by using PRR in colaboration with Chi-Square, an attempt has been made to help and assist the doctors/pharmacists to perform safe drug evaluation. An experimental analysis using test situations and combinations from a doctor was performed and the results obtained were very encouraging. The machine proposes a distinctive method for correcting the prescribed blend of drugs in case of an ADR event occurrence using Stack Sequential. The possibility of huge Patient Record data available allows for extracting the results open to the machine. The approach found in this paper can be to provide an impetus and improve existing systems offering detect Adverse Medication Reactions.

In the field of Pharmaceutical and medical diagnosis, there's always the scope for uncertainty. This system has been built to give a naЇve and safe knowledge of the drug combinations on the knowledge of doctors only, so there will always be a opportunity for ambiguous or uncertain diagnosis. The developed system does not provide a 100% exact results as not even the doctors can lay claim to do so; however, its email address details are promising. It can be used as a tool to check the doctors' knowledge and may assist them to attain a summary.

The system will give the physician an upper side to decide whether to make use of the results assessed from the algorithm and stop an ADR. Employing this system, many essential results can be obtained, thus reducing the effects of incorrect prescriptions to some extent. While using support of varied medicinal and pharmaceutical experts and private hospitals, higher probability of getting the positive results right can be acquired.

With an intensive data source of medical documents to mine from, this may be useful to build helpful medical assistance software that can be of great use to all or any doctors and pharmacists using this technique. The machine will also help the medical fraternity in the foreseeable future by aiding them in providing safer medical assistance to the patients and doctors.


[1] Search Algorithms as a Platform for the Optimization of Drug Combinations Diego Calzolari1. , Stefania Bruschi1. , Laurence Coquin1, Jennifer Schofield1, Jacob D. Feala2, John C. Reed1, Andrew D. McCulloch2, Giovanni Paternostro1, 2* 1 Burnham Institute for Medical Research, La Jolla, California, United states, 2 Section of Bioengineering, University of California NORTH PARK, La Jolla, California, United states.

[2] Safeness of Medicines A guide to discovering and reporting adverse medicine reactions.

[3] Statistical options for knowledge finding in adverse medicine reaction monitoring G. Niklas Noren.

[4] Adverse medicine reactions: definitions, medical diagnosis, and management I Ralph Edwards, Jeffrey K Aronson


[6] An Information Technology Architecture for Medication Effectiveness Reporting and Post-Marketing Security -Surendra Sarnikar, Amar Gupta, Ray Woosley(2006).

[7] A multi-agent intelligent system for detecting unknown adverse medicine reactions through communication and cooperation -Ayman Mohammad Mansour Wayne Point out University(2012)

[8] ADRTrace: Detecting Expected and Unexpected Adverse Drug Reactions from User Reviews on Social Multimedia Sites Andrew Yates, Nazli Goharian

[9] Detect undesirable medicine reactions for the drug Pravastatin. Yihui Liul 'Institute of Intelligent Information Processing, ' Shandong Polytechnic School, China(2012)

Also We Can Offer!

Other services that we offer

If you don’t see the necessary subject, paper type, or topic in our list of available services and examples, don’t worry! We have a number of other academic disciplines to suit the needs of anyone who visits this website looking for help.

How to ...

We made your life easier with putting together a big number of articles and guidelines on how to plan and write different types of assignments (Essay, Research Paper, Dissertation etc)