Introduction

Over the past decades, drug research has made tremendous strides in ensuring a safe and healthy life. However, these pharmaceutical components have become a new environmental threat (Khan et al. 2021a, b, c; Polianciuc et al. 2020; Peña et al. (2021) mentioned that pharmaceutical discharges to the natural environment accumulate to damage aquatic ecosystems and cause public health problems.

In this context, our research aims to improve the biological treatment of wastewater produced by the pharmaceutical industry, so we propose this work as a literature review on recent work in this field to have a clear idea on our intervention.

Detailed studies by Archer et al. (2021) and Devault et al. (2021) have characterized compounds in the environment, such as pharmaceuticals, personal care products, endocrine disruptors, hormones, and antibiotics, to select an effective and efficient treatment process. Khan et al. (2021a, b, c) and Mukherjee et al. (2021) mentioned a need to monitor and evaluate the environmental risks caused by pharmaceuticals at wastewater treatment plants. This allows the development of treatment technologies to minimize negative environmental impacts (Simon et al. 2021). In addition, the industrial processes used for drug production condition the nature of liquid and solid discharges, which have non-negligible impacts on the environment, public health, and especially on the operation of wastewater treatment plants (Bilal et al. 2020; Wang et al. 2020a, b).

Antibiotics have a specific action with killing power on microorganisms at therapeutic doses (Kortright et al. 2019). Work that addresses antibiotic detection in the environment is growing (Ayankojo et al. 2020). The presence of antibiotics in the aquatic environment poses two problems: the potential toxicity of these compounds to aquatic organisms and humans via drinking water and the possibility of developing resistance in pathogenic bacteria (Kovalakova et al. 2020; Szymańska et al. 2019).

Traditionally, pharmaceutical wastewater treatment can be divided into primary, secondary, and tertiary. Primary treatment is chemical or physicochemical (Agrawal et al. 2020; Wang and Chen 2022), secondary treatment is mainly based on biological processes (Han et al. 2020; Zhu et al. 2021), and tertiary treatment is composed of advanced oxidation processes (Verma and Haritash 2020; Wang and Zhuan 2020).

Wastewater treatment shops (WWTPs) are frequently considered as one of the main pathways for the preface of PhACs into the Submarine terrain via treated water or into the terrestrial terrain by disposal of the sewage sludge/ biosolids in tips (Nguyen et al. 2021). Still, WWTPs also serve as a hedge to control the discharge of these PhACs into the terrain (Rueda-Márquez et al. 2020). There are multitudinous ways WWTPs can impact the metamorphosis and junk of these composites (Nguyen et al. 2021). Biological processes are generally the most usable approaches in WWTPs. They have been frequently reported to have an important impact on the junking of numerous PhACs in WWTPs, similar to conventional activated sludge treatment (CAS) (Kołecka et al. 2019); membrane bioreactors (MBRs) (Carolin et al. 2021), moving bed biofilm reactors (MBBRs) (Song et al. 2020), and constructed washes (Button et al. 2019).

Several ultramodern anaerobictechnologies have shown their capabilities in the effective treatment of medicinal, including anaerobic membrane bioreactor (AnMBR) (Huang et al. 2018), up-flow anaerobic sludge mask (UASB) (Mareai et al. 2020), anaerobic sequencing batch reactor (AnSBR) (Karanan et al. 2020), moving bed biofilm reactor (MBBR) (Ooi et al. 2018), and other mongrel technologies. In addition, the development of AnMBR provides a promising result because AnMBR is coupled together with the anaerobic process and the membrane filtration to produce a solid-free effluent by the complete retention of biomass (Shi et al. 2017). AnMBR also contributes to energy generation because it can produce methane from exercising a lot of organics in wastewaters. Likewise, footmark and space can be reduced while producing an effluent of largely bettered quality (Anjum et al. 2021).

Lu et al. (2020) and Pan et al. (2021) mentioned that biological remediation has an advantage over other chemical methods due to the by-products generated by physicochemical and advanced oxidation treatments that render water toxic. A bioremediation technology such as aerobic, anaerobic, or membrane bioreactor aims to treat antibiotics through microbial transformation, making the water less toxic and more stable than its original polluted state (Shah and Shah 2020).

Dutta and Bhattacharjee (2022) and Kumar et al. (2022) mentioned that biological and physicochemical treatment processes have advantages and disadvantages. Biological treatment does not effectively mineralize pharmaceutical compounds (Jamil et al. 2021). These can cause toxicity to the bacterial community of the biological process (Tiwari et al. 2020). In the case of advanced treatments, most processes are very energy-intensive and expensive (Taoufik et al. 2021). Tiwari et al. (2020) mentioned that the use of chemicals and high pH in the advanced oxidation process places an additional burden on the economics of the process.

Therefore, attempts by Çifçi and Meriç (2022) and Li et al. (2022) have been made to combine biological and physicochemical treatments to provide an efficient wastewater treatment system and improve the process economics. For example, hybrid treatment processes, including anaerobic and aerobic treatment, have been developed by Tiwari et al. (2020), and membrane bioreactors combined with advanced oxidation process (AOP) and reverse osmosis are used due to their ease of use and superior performance (Priyanka et al. 2021). It is, of course, recognized that the scientific research must entrust the choice of the appropriate technique that effectively meets the requirements of the regulatory standards.

This study aims to present the current status of biological treatment processes for pharmaceutical wastewater and their effectiveness for the degradation and removal of various pharmaceuticals. We first present the sources of pharmaceutical products that generate emerging micropollutants. We analyze their effect on wastewater treatment plants and receiving environments. We present a review of the various research works on current treatments to eliminate toxic products, and finally, we end with synthesis and a conclusion.

The origins of pharmaceuticals in wastewater

Pharmaceuticals and personal care products pose potential risks to human health rather than to the environment (Chami et al. 2021; Trouillard et al. 2021). Martínez et al. (2021) and Tiwari et al. (2020) noted that these pollutants are ubiquitous in the environment from different sources.

Drug residues have been observed in all aspects of life (Guo et al. 2021). Their existence and fate are generally dependent on the source, route of entry, and environmental matrix (Khan et al. 2020a, b; Rasheed et al. 2020).

At the inlet of wastewater treatment plants, Kar et al. (2020) and Rasheed et al. (2020) detected several environmental pollutants, including anti-inflammatory drugs, analgesics, plasticizers, preservatives, anti-epileptics, hormones, solar stimulants, and heavy metals on a global-scale Pain medications and bactericides are primarily found in aquatic organisms due to their widespread consumption (Gernigon et al. 2020; Villemin et al. 2021). Sulfonamides and tetracyclines are commonly used antibiotics that are highly stable and permeable in the environment (Landecker 2021; Nys and Vété 2021). Similarly, Bilal et al. (2020) and Zainab et al. (2020) mentioned that ibuprofen is one of the most used drugs, and it is considered among the toxic pollutants in the ecosystem. Furthermore, Palma et al. (2020) and Vass et al. (2020) reported that pharmaceuticals are classified into seven distinct groups based on their applications, such as X-ray contrast agents, analgesics, antibiotics, cytostatics, anticonvulsants, β-blockers, and lipid regulators (Santos et al. 2020), in addition steroids, synthetic hormones, fragrances, lipid regulators, analgesics, shampoos, and cosmetics (Chaturvedi et al. 2021; Van et al. 2021).

Hospitals and pharmaceutical plants are the main sources of pharmaceutical products in the environment, especially during the COVID-19 pandemic (Khan et al. 2021a, b, c). Other secondary sources also exist, such as discarded medicines and mismanagement of pharmaceuticals (Bu et al. 2020; Kar et al. 2020). Indeed, thousands of pharmaceuticals are traceable in the environment, so various parameters such as consumption pattern, ecotoxicity, risk, biodegradation, and processing difficulty are prioritized (Kairigo et al. 2020; Khan et al. 2020a, b; Kroon et al. 2020). Once they leave the manufacturing center and reach the retail market, the environmental exposure pathways become too fragmented to track and analyze. Dey et al. (2019) found that humans use various consumer products, including pharmaceuticals, so everyone is an active contributor. Products such as detergents, household cleaners, disinfectants, fungicides, and cosmetics are all active sources of pharmaceuticals and can enter the aquatic system directly (Guo et al. 2021; Lindberg et al. 2021).

The processing of pharmaceuticals does not allow the reduction of emerging compounds (Bilal et al. 2020; Pereira et al. 2020). Indeed, the drug is released into the environment as a parent compound, metabolite, and conversion product, causing contamination of the surface, marine, and groundwater (Santos et al. 2020). This causes resistance in several pathogenic bacterial strains (He et al. 2021). Overexposure to antibiotics can alter microbial diversity and harm the upper food chain (Dey et al. 2019).

Table 1 illustrates the consumption in the UK of the top 20 drugs used for different diseases with their PEC and PNEC ratios. PEC represents the concentration of the substance in the environment, and PNEC represents the predicted no-effect concentration.

Table 1 Presentation of the top 20 most consumed pharmaceutical compounds in the UK with their PEC and PNEC ratios from Webb (2001)

Impacts of pharmaceuticals

Pharmaceutical and personal care products PPCP are used worldwide (Niemi et al. 2020; Galani et al. 2021). They are released into the ecosystem in various ways, causing potential threats to different parts of the environment (García-Fernández et al. 2021; Schwartz et al. 2021). In particular, active pharmaceutical PhAC compounds can affect aquatic organisms, even when they occur at low concentrations (Nguyen et al. 2021). In addition, new regulations aimed at preserving water quality have increased the need to monitor and reduce certain PhACs at wastewater treatment plants (Liang et al. 2021; Usman et al. 2020,).

Active pharmaceutical compounds have been used to address many diseases, including life-threatening diseases such as a concert, diabetes, influenza, COVID-19, and goiters (Chaubey et al. 2021; Varnai et al. 2021). Porika et al. (2021) and Reichert et al. (2020) reported that many micropollutants had been found in terrestrial and aquatic environments over the past 20 years. These micropollutants can lead to multi-drug resistance in bacteria which is harmful to human health. Thus, Chaturvedi et al. (2021) and Varnai et al. (2021) have indicated that sustained release of antibiotics in aquatic ecosystems and soils is among the major priorities.

Humans are most likely to be exposed to pharmaceutical residues and personal care in their daily lives through contaminated air, water, or soil (Ferreira et al. 2020; Keerthanan et al. 2021). Human contact with pharmaceutical waste causes human health damage such as allergies, diseases, and tumors (Dehkordi et al. 2021; Oliveira et al. 2020). In a survey conducted in Australia by Kroon et al. (2020), many antibiotics, such as tetracycline, erythromycin, and sulfonamides, were found in wastewater. Ricky and Shanthakumar (2022) and Wang et al. (2021a, b, c) mentioned that one of the reasons for this exposure is their bioaccumulation and entry into the food chain via sewage plants and agriculture.

Most ecotoxicological studies of PPCPs exposure to non-target organisms are from acute toxicity data (Ghahari et al. 2021; Liang et al. 2021). Among the negative impacts of pharmaceuticals on aquatic communities, Bio and Nunes (2020) and Khalil et al. (2020) cited the failure of natural reproduction and the extinction of some living things. Fish are very sensitive to pollution because they are linked to the environment, where these pollutants are most mobile (Beiras 2021). For example, diclofenac and gemfibrozil are expected to have a direct negative effect on fish organs. On the other hand, algae are phototrophic organisms that regulate the cycle of energy and nutrients in the water. Therefore, their activities are important for the survival of the entire ecosystem (Hussain et al. 2021; Piwowar and Harasym 2020). According to Harshkova et al. (2021) and Majewska et al. (2021) in the presence of carbamazepine and diclofenac, algae’s chloroplasts are severely damaged. Long-term exposure to sulfamethoxazole can cause chronic algal toxicity and interfere with photosynthesis (Mojiri et al. 2022). In addition, hormones tend to unbalance the endocrine system in aqueous environments, thereby disrupting the homeostasis of non-target organisms (Sicard et al. 2020). Some will inhibit the activity of natural hormones, while others will cause physiological changes and even induction of female characteristics in male fish (Dey et al. 2019; Tiwari et al. 2020).

Antibiotics cause multigenerational transformations in the entire biological community (Juma et al. 2020; Liu et al. 2020a, b). Kovalakova et al. (2020) and Ricky et Shanthakumar (2022) have shown that biocides are considered harmful emerging pollutants. It lasts longer in the environment. Antibiotics are often detected at low concentrations in seawater, groundwater, surface water, and even drinking water (Chaturvedi et al. 2021; Sahani et al. 2022). Parent antibiotic molecules or their metabolites are released into the aquatic environment, resulting in virtual or long-lasting ecological effects and contamination and the emergence of antibiotic resistance (Harrower et al. 2021; Rico et al. 2021).

Liu et al. (2020a, b) and Shahriar et al. (2021) observed that irrigation with wastewater could lead to a greater accumulation of PPCPs in the soil than in groundwater. PPCPs, such as estrone, naproxen, triclosan, ibuprofen, and clofibric acid, can contaminate groundwater due to their high leaching properties (Liu et al. 2020a, b; Tosun et al. 2020).

Impacts of pharmaceuticals on wastewater treatment plants

Removal of pharmaceutical pollutants is limited due to their high biological toxicity (Vargas-Berrones et al. 2020; Vasilachi et al. 2021). They even promote ARG antibiotic-resistant bacteria and genes (Fu et al.2020; Salazar et al. 2020). The presence of antibiotics and other drugs in the environment has become a growing public concern that requires reliable management of treatment of these pollutants, as reported by (Jose et al. 2020; Zhang et al. 2022).

Indeed, Yadav et al. (2020) and Zhou et al. (2021) have shown that incomplete degradation of antibiotics would lead to residual compounds in wastewater treatment plants which strongly influence the performance of treatment plants. The latter hinders the depollution processes because of the phosphorus compounds that have a considerable impact on the functioning of the treatment plants (Chen et al. 2020). The need then became urgent to purify wastewater containing antibiotics effectively. To this end, denitrification has been widely used to treat wastewater from pharmaceutical discharges with high nitrate (Robson et al. 2020; Guan et al. 2022). This process is considered sensitive to various environmental factors, such as carbon sources, heavy metals, and antibiotics. Various antibiotics can have a significant effect on denitrifying microorganisms and denitrification rates, such as sulfamethoxazole and tetracycline (Osińska et al. 2020; Wang et al. 2020a, b), including microbial community performance, diversity and dynamics, and dominant bacteria (Fan et al. 2020; Zhang et al. 2022). Shu and Liang (2022) and Wang et al. (2020a, b) found that the high concentration of tetracycline affects its community structure and abundance and can inhibit bacterial growth and reproduction of bacterial ribosomal units.

Gurmessa et al. (2020) and Xiao et al. (2021) mentioned that the efficiency of anaerobic digestion could be reduced by the presence of antibiotics and their residues, which can inhibit the microbial community and activity. The abundance of ARG-carrying bacteria increased with the addition of antibiotics. This limits the overall system efficiency improvement and leads to the spread of GRAs (Cheng et al. 2021).

The production of biomethane from macromolecular organic carbon involves processing a variety of microorganisms, primarily fermenting bacteria and methanogenic archaea (Nozhevnikova et al. 2020; Tao et al. 2020). Microorganisms convert complex organic matter into methane through anaerobic digestion, which is the primary means of mineralization of organic matter (Xie et al. 2020; Azizan et al. 2021). Some antibiotics that affect anaerobic fermentation, such as macrolides and tetracyclines, are protein synthesis inhibitors in bacteria and inhibit bacterial growth (Kong and Yang 2021). For this reason, antibiotics have inhibitory effects on bacteria with hydrolytic and acidifying functions (Liu et al. 2021; Xiao et al. 2021). Finally, Cheng et al. (2021) and Zarei-Baygi et al. (2020) mentioned that sulfonamide (SM) antibiotic increases membrane fouling in the anaerobic membrane bioreactor process.

Moroccan regulations on pharmaceutical waste

Morocco has implemented a series of major institutional and economic reforms to stabilize the country’s policy and help it withstand the effects of climate change (Pouya et al. 2021; Karim et al. 2021). Indeed, Morocco is now committed to sustainable development and considers it the main development option at the national level (Barakat et al. 2020) and the continuous improvement of citizens to acquire a better quality of life (Khetrapal and Bhatia 2020). Furthermore, Jain et al. (2022) and Johansen et al. (2022) mentioned that sustainable development has recently gained much interest and priority in protecting and maintaining natural balances disturbed by a wide range of human activities.

Morocco is particularly sensitive and aware of the depletion of its natural resources due to human factors. Therefore, it has begun to address this through various sectors, including those known to directly impact the environment and health (Niemi et al. 2020; Ghahari et al. 2021). To achieve sustainable development, it is necessary to protect natural resources and make rational use of them. In addition, natural resources must be used rationally and recycled to the maximum (Dahchour et al. 2021; Makan et al. 2021). For example, the former water law commits all cities to collect and treat wastewater (El Hmaidi et al. 2021; Oualkacha et al. 2022). In particular, it is necessary to formulate strict urban wastewater treatment standards following the receiving environment and discharge standards. In addition, measures are needed to prevent pollution of surface and groundwater (Touzani et al. 2020; Ouakkas et al. 2022). The new law enacted in 2016 provided for the reuse of wastewater and sewage sludge and stipulated that treated wastewater must meet quality standards (Mansir et al. 2021; Belazreg et al. 2021).

In Morocco, the standard for irrigation water is determined by the Directorate of Equipment and the Directorate of Land Use, Urban Planning, Habitat, and Environment to establish quality standards for irrigation water (Oertlé et al. 2020).

Hdidou et al. (2022) and Slamini et al. (2022) indicated that Morocco faces a growing water scarcity challenge. Abou-tammame et al. (2022) discussed the reuse of treated wastewater as an important opportunity to close the gap between water demand and need in Morocco. If properly disposed of and recycled, it can cover more than 13% of total water consumption. In the circular economy paradigm, the reuse of treated wastewater in agriculture can solve water shortages and pollution problems (Gulzar et al. 2022). Wastewater is now considered a cheap, renewable, non-conventional resource rather than pollution (Abdouni et al. 2021). Therefore, these resources can supplement or replace freshwater in areas that do not require quality water for agricultural irrigation (Gulzar et al. 2022).

Morocco has made significant progress in municipal wastewater treatment under the National Sanitation Plan (Hdidou et al. 2022). However, rural health facilities have experienced serious delays. The 2006 National Health Plan aims to reduce the overall treatment rate from 8 to 60% by 2020. The national plan also calls for the number of wastewater treatment plants to increase to 330 by 2030, of which 145 were commissioned in 2015. This opens up new opportunities for water reuse (Ait-Mouheb et al. 2020; Oertlé et al. 2020). The National Water Plan (PNE) published in 2009 predicted that the total amount of reusable wastewater in 2030 will vary around 935 mm3 for a reuse rate of 31% of the same year 2030.

Morocco’s approach is based on existing legislation, guided by different environmental legal texts, and supported by different national plans related to different sectors. This opens the way for the private sector to contribute to public–private projects to achieve investment and efficiency goals (Dahchour et al. 2021).

Biological treatment techniques for pharmaceutical waste

For each treatment step, wastewater can be treated in different unitary processes. The unit operations that can be used at different processing levels are shown in Fig. 1.

Fig. 1
figure 1

Unit operations and unit processes involved in primary, secondary, and tertiary wastewater treatment according to Ullah et al. (2020)

Figure 1 shows the different treatment techniques for pharmaceutical waste, namely primary treatment which includes flotation system, primary sedimentation tank, neutralization tank, equalization tank, in addition, secondary treatment which consists of biological and physicochemical treatment, finally tertiary treatment such as adsorption, membrane filtration, membrane distillation, distillation, advanced oxidation processes, solvent extraction, and disinfection.

Anaerobic treatment of pharmaceutical wastewater

In most conventional wastewater treatment plants, the biological part plays a major role in the degradation of pharmaceutical compounds (Pugazhendi et al. 2022). Given the high organic content of these wastewaters, anaerobic methods have been proposed as sustainable, low-cost, low-nutrient, low-surface areas, and effective methods for drug degradation (Khadir et al. 2020). Anaerobic digesters (Rorke et al. 2022), membrane bioreactors (Chen et al. 2020), up-flow anaerobic sludge beds (Kong and Shi 2022), and anaerobic sequencing batch reactors are the main technologies for anaerobic treatment plants (Chaturvedi et al. 2022).

Huang et al. (2018) and Pugazhendi et al. (2022) mentioned that anaerobic treatment is an environmentally friendly treatment method that can generate renewable energy in methane. In contrast, some antibiotics can severely inhibit the stability of microorganisms and the performance of anaerobic processes (Aziz et al. 2022; Wang et al. 2022). In addition, few studies have investigated the anaerobic biodegradation properties of wastewaters containing complex organic compounds, including sulfamethoxazole pharmaceutical wastewaters, and little is known about the feasibility of using anaerobic digestion to treat these types of wastewaters (Chen et al. 2018; Zahedi et al. 2022).

Anaerobic digestion is becoming increasingly important because of its economical and efficient way of recovering carbon in renewable biogas (Xu et al. 2021; Samoraj et al. 2022). Harb et al. (2019) showed that anaerobic systems could promote the degradation of typical persistent compounds such as sulfamethoxazole, trimethoprim, clozapine, triclocarban, and amitriptyline, with a removal rate of greater than 80%. On the other hand, the low mineralization efficiency, low degradation efficiency, and poor stability of resistant organic wastes limit the application of anaerobic technology in antibiotics (Kong et al. 2019). Ailijiang et al. (2021) and Dai et al. (2022) reported that the application of electricity, stimulation of anaerobic systems, can improve the mineralization of recalcitrant nitrates and chlorine-substituted pollutants and can also improve the energy recovery. Guo et al. (2019) mentioned that the removal efficiency of antibiotics such as chloramphenicol increases from 53.3 to 89.7%, by increasing the voltage, while methane production more than tripled. Hu et al. (2020) and Jiang et al. (2021a, b) showed that electrical stimulation selects dominant functional bacteria and increases antibiotic resistance, improving antibiotic degradation and methane production by further affecting system performance.

Despite advanced scientific research, researchers have not been able to determine whether up-flow anaerobic sludge treatment systems for pharmaceutical wastewater are cost-effective in the long term (Chen et al. 2018; Collivignarelli et al. 2021). The Upflow Anaerobic Sludge Blanket (UASB) reactor has proven to be a competitive low-cost system for the direct treatment of municipal wastewater and some toxic compounds (Daud et al. 2018; Kong et Shi 2022). However, antibiotics such as carbamazepine CBZ have proven highly resistant to anaerobic treatment. In this sense, Moya-Llamas et al. (2021) reported its recalcitrant behavior by achieving low CBZ removal (< 15%) by anaerobic wastewater treatment. Also, other authors, such as Huang et al. (2018), found a COD removal of 45% under anaerobic conditions. Vassalle et al. (2020) found a lack of pollution elimination in the UASB reactor. However, some major problems such as long start-up periods, slow growth, anaerobic microorganism rates, and poor biomass retention limit the anaerobic process for pharmaceutical wastewater treatment (Huang et al. 2018).

To improve biological removal, Oliveira et al. (2020) and Sakurai et al. (2021) investigated the treatment (UASB) combined with constructed wetlands to treat discharged pharmaceutical wastewater. The system achieved an average of 95% pollutant removal, demonstrating the stability and potential of the UASB and the integration of constructed wetlands with pharmaceutical wastewater treatment (Vistanty and Crisnaningtyas 2021). In addition, dos Santos et al. (2021) and Sevda et al. (2020) developed a novel up-flow anaerobic sludge blanket with a bioelectrocatalysis system (UASB-BEC) to improve the treatment of wastewater containing acetopyrimidine. The results show that a higher applied current has a positive effect on acetopyrimidine (AP) degradation with high AP and total organic carbon (TOC) removal rates (96.3 ± 2.6% and 92.9 ± 3.2%), respectively (Wang et al. 2019). In parallel, Xu et al. (2021) and Sun et al. (2021) proposed the addition of zero-valent iron (ZVI) and granular activated carbon (GAC) to improve the anaerobic digestion of pharmaceutical wastewater. The results confirmed the synergistic effects of ZVI + GAC for COD removal (increased by 13.4%) and methane production (increased by 11.0%) (Dai et al. 2022). Moreover, microbial community analysis revealed that ZVI + GAC decrease species evenness and richness in bacteria and improve the removal of pharmaceutical intermediates (Wang et al. 2021a, b, c; Dai et al. 2022). Vassalle et al. (2020) proposed anaerobic wastewater pretreatment using microbial fuel cells (MFC) followed by aerobic treatment with microalgae. The combined process showed potential reductions in heavy metal concentrations and COD, TOC, nitrate, and phosphate observed in raw wastewater, 90.29, 97.05, 81.60, and 94.87%, respectively (Amit et al. 2020).

However, combined anaerobic wastewater treatment processes improve environmental sustainability and offer a more environmentally friendly biofuel production pathway (Choi et al. 2022; Song et al. 2022).

Pharmaceutical wastewater treatment by activated sludge

The activated sludge process is a traditional biological method commonly used to treat wastewater from the pharmaceutical industry (Quintelas et al. 2020; Nguyen et al. 2021). The pollutants are converted to gases and digested sludge, which can be safely released into the environment (Mareai et al. 2020; Hu et al. 2020). It has a lower capital cost and limited operating requirements than more advanced processing methods. In contrast, operational problems such as high energy consumption, production of large amounts of sludge and color, foaming, and swelling of the secondary clarifier are associated with activated sludge plants (Pilli et al. 2020; Barati et al. 2022).

Factors that affect the efficiency of a pharmaceutical activated sludge treatment plant include hydraulic retention time (Katam et al. 2021), temperature (Ogwueleka and Samson 2020), pH, dissolved oxygen, organic load, microbial communities, presence of toxic or recalcitrant substances (Yang et al. 2020; Hajji et al. 2021). These variables must be modified to account for wastewater treatment in the pharmaceutical industry (Mareai et al. 2020). For example, Sun et al. (2020a, b) mentioned that inoculum plays an important role in establishing bacterial communities in bioprocess reactors. And in addition, Jaén-Gil et al. 2021 have shown that diet composition affects the microbial composition and activity of activated sludge, thus its ability to biotransform drugs.

Zhao et al. (2020) discussed the difficulty of completely removing antibiotics by conventional biological methods and the spread during such treatment. Cheng et al. (2020) and Fan et al. (2022) mentioned that biodegradable feeds facilitate the simultaneous removal of antibiotics and ARMs in activated sludge processes. Zhang et al. (2020a, b) and Sun et al. (2020a, b) studied the degradation of amoxicillin in a sequencing bioreactor using sodium acetate as a cosubstrate. According to Zhang et al. (2021), this process removed nearly 100% of the amoxicillin and stabilized the chemical oxygen demand in the effluent. In addition, the total abundance of ARGs decreased by about 30%, and the proportion of bacteria resistant to major antibiotics decreased by about 9%. The overall abundance of ARG-encoding plasmids was reduced by about 30%, implying that the risk of ARG transmission was reduced again (Zhang et al. 2021). Kanafin et al. (2021a, b, c) and Rios-Miguel et al. (2021) mentioned that the sequential feed-activated sludge process could not effectively remove the target drugs. Based on using a sequential batch reactor in an aeration chamber in Swarzewo, Kołecka et al. (2020) conducted a pharmaceutical wastewater treatment study with a calculated removal rate for conventional pollutants of 94.4–99.5%. The risk quotients (RQs) calculated for the drugs analyzed indicated a low environmental risk for the selected species. On the other hand, a negative effect on biota due to the prolonged presence of diclofenac cannot be excluded still, according to (Kołecka et al. 2020).

Hui et al. (2021) and Stévenne et al. (2021) considered different strategies for the biological treatment of the antibiotic metronidazole: bioaugmentation, bioacclimation, and biostimulation. Aboudalle et al. (2021) mentioned that conventional biological treatment with activated sludge resulted in 58.1% mineralization, while metronidazole by-product mineralization was higher than in the combination of biomagnification and biostimulation. Thus, the mineralization rate was 96.1%, again, according to (Aboudalle et al. 2021).

Paśmionka et al. (2021) and Wang et al. (2021a, b, c) set on the power of the activated sludge process for the removal of fecal coliform bacteria and Escherichia coli resistance to antibiotics in treated wastewater. Notwithstanding a 99% reduction of the pollution in the biologically treated wastewater, 89% of the E. coli in the isolates were resistant to the antibiotics tested. In comparison, 100% of the isolates were susceptible to metronidazole (Hawrylik and Butarewicz 2021).

Complete degradation of caffeine and ibuprofen and partial degradation of metronidazole between 12 and 27% were found by Kanafin et al. (2021a, b, c) after adopting the activated sludge process.

The removal of acetaminophen (ACT), one of the most widely used pharmaceutical compounds, and chemical oxygen demand (COD) was studied by Park and Oh (2020) and Rios-Miguel et al. (2021) using a fully environmentally friendly biological method, the bioreactor cycle (BRC). The removal efficiencies of ACT and COD are 98% and 95%, respectively, under the 18-h cycle and concentrations of 500 mg/L ACT and 7600 mg/L COD (Khoshvaght et al. 2021).

Kanafin et al. (2021a, b, c) mentioned that most antibiotics, such as metronidazole, affected nitrification’s kinetics and metabolic behavior and activated sludge’s heterotrophic activities in batch culture. According to Velasco-Garduño et al. (2021), increasing the initial concentration of metronidazole decreases COD and ammonium removal efficiencies, nitrate production efficiencies, and specific substrate consumption rates. Metronidazole has a greater effect on heterotrophic activity than on nitrification activity. In addition, its inhibitory effect on nitrite oxidation is greater than that of ammonium oxidation (Kanafin et al. 2021a, b, c).

To increase the removal of pharmaceuticals, Huidobro-López et al. (2022) conducted a comparison study between the use of a screw filter (VF) pilot and the actual removal rate obtained by the activated sludge (AS) treatment system for antibiotic treatment. The results suggest that the auger filter can be considered a promising alternative to traditional processes (Aemig et al. 2020). In addition, based on the calculated RQ, the AS system indicated that the wastewater had a high risk of algae. In general, the VF system reduced the ecotoxicity of antibiotics (Shokoohi et al. 2020). On the other hand, Alfonso-Muniozguren et al. (2021) and Joannis-Cassan et al. (2021) proposed a benchtop reactor that was inoculated with activated sludge and fed with a synthetic medium for the treatment of pharmaceuticals such as ibuprofen (IBU) and paracetamol (PARA). According to Alfonso-Muniozguren et al. (2021), removal efficiency reached 99.1 and 99.5% values independent of the initial IBU concentration. For PARA, the removal percentage ranged from 93.3 to 98.8, decreasing with increasing initial concentration again (Quintelas et al. 2020).

Pharmaceutical wastewater treatment by membrane bioreactor

The MBR membrane bioreactor combines a membrane module and a bioreactor, which has been widely used as an advanced method for treating pharmaceutical wastewater (Hosseinpour et al. 2021; Liu et al. 2022). This type of bioreactor has several operational advantages: low sludge production, good effluent quality, better organic matter removal, longer sludge residence time maintenance, and better resistance to toxic substances (Guo et al. 2020a, b; Al-Asheh et al. 2021).

Despite the significant advantages of MBR, Campo et al. (2021) and Sengar and Vijayanandan (2022) mentioned that membrane fouling remains a major problem in reducing membrane permeability. This significantly affects the performance and longevity of the membrane and increases the operating cost of the MBR (Cheng et al. 2021). However, Al-Asheh et al. (2021) and Fakhri et al. (2021a, b) proposed an aerobic hollow fiber membrane bioreactor to treat pharmaceutical wastewater containing antibiotics. The endophyte Penicillium has been used as a natural fire extinguisher to control biofouling problems and improve antibiotic removal efficiency. According to Fakhri et al. (2021a, b), the bioincrease in Penicillium endophyte resulted in changes in antibiotic removal efficiency and significantly reduced transmembrane pressure, thereby reducing membrane fouling. In addition, Fakhri et al. (2021a, b) used the saprophytic fungus Trichocladium canadense as a bioaugmenter in an anaerobic membrane bioreactor (AnMBR) for the removal of antibiotics such as erythromycin (ERY), sulfamethoxazole (SMX) and tetracycline (TET) from wastewater. The results indicated that the biological fouling of the membrane was slowed by 25%, with the removal of chemical oxygen demand increased by 16% and more efficient removal of ERY and SMX. In parallel, proposed a cocktail of bacteriophages (Pyophage) in an anaerobic membrane bioreactor for wastewater treatment containing a high concentration of erythromycin, tetracycline, and sulfamethoxazole. According to Aydin and Can (2020), the results indicate that the Pyophage cocktail significantly contributes to the decrease (45%) in transmembrane pressure while also suppressing biofilm-producing bacteria.

In the same context, Hosseinpour et al. (2021) prepared a polypropylene (PP) membrane by incorporating carboxylated functionalized nanodiamonds (-COOH) and also polyethylene glycol (-PEG) to reduce membrane fouling in pharmaceutical wastewater treatment. The results indicated that the COD removal was more than 91%, and incorporating nanodiamond in PP membrane can reduce membrane fouling in MBR again, according to Hosseinpour et al. (2021). In addition, Aydin et al. (2022) proposed a bioaugmenter MBR with Haematococcus microalgae for the treatment of antibiotics such as sulfamethoxazole (SMX), tetracycline (TET), and erythromycin (ERY). In the biological reactor, the membrane fouling was decreased by 33%, and chemical oxygen demand removal grew by 6% (Aydin et al. 2022). Also, Zhang et al. (2020a, b) conducted a comparative study of three anoxic/aerobic membrane bioreactors (AO-MBRs), including MBR moving bed biofilm (MBRa), MBR fixed biofilm (MBRb), and AO-MBR (MBRc) for the treatment of wastewater containing antibiotics such as tetracycline (TC) and norfloxacin (NOR). The results showed that MBRb impacted antibiotic removal and membrane fouling mitigation compared to two bioreactors. The removal rate of TC in MBRb reached 65% and 46% for NOR (Zhang et al. 2020a, b).

Anaerobic membrane bioreactors (AnMBRs) can treat complex waste streams, recover energy, and produce nutrient-rich wastewater for irrigation (Lou et al. 2020). Based on (Guo et al. 2020a, b) analyses, the results showed that the removal efficiency of antibiotics and ARMs in the AnMBR system ranged from 34.6 to 100%. According to Wang et al. (2020a, b), the results showed that approximately 61.8% to 77.5% of the antibiotics were degraded, and the MBR sludge adsorbed an average of 22.5% to 38.2% of the antibiotics. Zarei-Baygi et al. (2020) proposed AnMBR to treat domestic wastewater containing antibiotics (sulfamethoxazole, ampicillin, and erythromycin). Overall, these results provide useful information on the association of ARMs with microbial community dynamics in AnMBR, which is necessary to develop operational and design strategies to reduce the spread of antibiotic resistance in the environment. On the other hand, Xu et al. (2019a, b) investigated antibiotic removal by a sequencing membrane bioreactor (SMBR) for commonly used veterinary antibiotics, namely sulfonamides, tetracyclines, and fluoroquinolones. The results show that SMBR can effectively remove sulfonamides and tetracyclines (> 90%), while the removal rate of fluoroquinolones is lower (< 70%). In addition, Arcanjo et al. (2021) evaluated the performance of a hybrid anaerobic permeation membrane bioreactor coupled with a membrane distillation system (AnOMBR-MD) to remove PhAC from wastewater. Dissolved organic carbon and P-PO 4 3-removal rates reached 97.2% and 98.0%, respectively. N-NH4 + accumulates in the bioreactor because it cannot be removed by anaerobic treatment. However, the overall removal rate of PhACs by the AnOMBR-MD system was greater than 96.4%.

Notably, antibiotics inhibit the sludge growth of the biological process (Wang et al. 2020a, b). To this end, Xu et al. (2019a, b) investigated the removal pathways of sulfadiazine (SDZ) and tetracycline (TC) and their roles in microbial community formation. The results showed that the MBR system removed more than 90% of the TC in the diet, while the removal rate of SDZ decreased from 100 to 40% with increasing SDZ concentration.

Hybrid treatment of pharmaceutical wastewater

Various other methods of treating pharmaceutical wastewater, including chemical, physical, and biological procedures, have been developed by researchers such as Angeles et al. (2020) and Taoufik et al. (2021). Indeed biological wastewater treatment is an environmentally friendly method that forms less sludge and is relatively inexpensive (Changotra et al. 2019; Khan et al. 2021a, b, c). But the process is less effective in removing drug residues and requires a lot of maintenance (Nagda et al. 2021). In contrast, physicochemical methods represent promising treatment methods for pharmaceutical wastewater (Zamri et al. 2021; Nidheesh et al. 2021). But they suffer from significant drawbacks such as economic inefficiency production of toxic by-products, higher investment, membrane fouling accumulation in the filtration, high energy demand, and decreased sludge absorption capacity (Khan et al. 2021a, b, c; Nagda et al. 2021; Zamri et al. 2021). To overcome the limitations of individual methods, researchers have turned to hybrid processes (Saidulu et al. 2021; Mojiri et al. 2020), in which all physical, chemical, and biological treatment methods are integrated to facilitate the effective removal of various emerging contaminants (Gonzalez-Tineo et al. 2020; Top et al. 2020). Hybrid systems can generate bioenergy, which helps reduce the system’s operating costs (Forruque et al. 2021; Jaén-Gil et al. 2021).

Different treatment methods can be used to remove emerging pollutants quickly and eco-efficiently (Almaguer et al. 2021; García et al. 2021). Pirsaheb et al. (2020) explored tests of several hybrid systems by first applying a biological treatment, followed by physical or chemical treatment. Among these tests, Dhangar and Kumar 2020 mentioned that membrane bioreactor technology followed by membrane filtration is one of the most effective treatments for removing emerging pharmaceutical contaminants. Similarly, hybrid systems using biosorption and biological treatment have shown promising potential for drug disposal (Mojiri et al. 2020; Rathi and Kumar 2021). In particular, Hu et al. (2021a, b) and Qiu et al. (2021) mentioned that hybrid systems combine activated sludge processes with physical processes such as ultrafiltration, reverse osmosis, and gamma radiation, the most cost-effective technology, and provide better removal of trace organic pollutants. In parallel, hybrid systems membrane bioreactors combined with UV oxidation activated carbon and ultrasound after ozonation have completely degraded many drugs (Monteoliva-García et al. 2020; Rostam and Taghizadeh 2020).

Recently, the POA advanced oxidation process has received attention as an effective method for the complete mineralization of pharmaceuticals (Guo et al. 2020a, b; Giannakis et al. 2021). The acute operating costs of the mismanagement of energy and chemicals are the main disadvantage of these processes compared to the high energy and chemical consumption (Forruque et al. 2021; Nidheesh et al. 2021). Therefore, POA is often used with other treatments (Saidulu et al. 2021). Chemical, biological hybrid treatment can effectively treat pharmaceutical wastewater degradation (Changotra et al. 2019; Angeles et al. 2020). The combination of PDOs and biological procedures within this framework can help reduce contaminant concentrations to desired levels, thereby ensuring better water quality (Mukimin et al. 2020; Olvera-Vargas et al. 2021). Arellano et al. (2020) and Khan et al. (2021a, b, c) recommended the Fenton process as an appropriate choice for pretreatment technology before biological treatment. Taoufik et al. (2021) also stated that the advantages of this hybrid technology are low energy costs, efficient degradation process, and production of non-toxic by-products. On the other hand, Almaguer et al. (2021) and Li et al. (2022) mentioned that the combined treatment of AOP and microalgae is a very environmentally friendly technology, as it can provide microalgae biomass as feedstock for biofuel production in addition to wastewater treatment (Samal et al. 2022).

Conventional activated sludge treatments do not always provide satisfactory results for the removal of pharmaceuticals, but they remain the most commonly used methods globally (Kamali et al. 2022; Elshikh et al. 2022). However, the incomplete removal of biodegradable pollutants and biorecycling intermediates produced in wastewater treatment plants is a major problem (Leiviskä and Risteelä 2022). To remediation poorly biodegradable effluents, Ortiz-Marin et al. (2020) and Pandis et al. (2022) proposed UV/H2O2 PDO as a pretreatment step for biological treatment. In particular, according to Jaén-Gil et al. (2021), the removal of metoprolol and metoprolol acid from hospital wastewater using UV/H2O2 before and after conventional activated sludge was ranked as the most efficient combination with the highest removal (86% and 100%). On the other hand, a hybrid system of biological treatment by activated sludge and adsorption on activated carbon has been suggested by Viegas et al. (2020) and García et al. (2021) to remove three drugs such as acetaminophen, caffeine, and ibuprofen. According to Ferrer-Polonio et al. (2020), results show that the effluent produced by this system is of better quality than that obtained from conventional individual treatment in terms of COD concentration, turbidity, and soluble microbial products. In the same context, Çifçi and Meriç (2022) and Cadamuro et al. (2022) studied a combined treatment system using activated sludge and biofilter with slag as filtering materials for the removal of ceftriaxone (CEF) and amoxicillin (AMX). The results showed that the hybrid system was able to effectively remove about 87.53% (for AMX) and 93.17% (for CEF), according to Pirsaheb et al. (2020)

The hybrid membrane process is a powerful solution for removing emerging contaminants from wastewater (Khan and Boddu 2021; Qiu et al. 2021). Using these processes, water quality can be achieved for sustainable reuse in the hydrological cycle while minimizing environmental and economic impacts (Molinari et al. 2020; Schwaller et al. 2021). In particular, biological treatment by an ultrafiltration membrane bioreactor (UF-MBR) after adsorption on granular activated carbon, ozonation, and UV/H2O2 has been tested by Mousel et al. (2021). The results are generally interested in combining UF-MBR biological treatment with GAC adsorption, ozonation, or AOP to remove drug residues (Töre et al. 2021). Each combination of UF-MBR with one of the three additional treatments achieved removal efficiencies greater than 80% for most species studied again, according to Mousel et al. (2021).

Researchers have developed other hybrid treatment systems to study the impact of combined treatment on wastewater detoxification, including coagulation, biological treatment, and beta process (Ahmad Sadaf et al. 2022; Kim et al. 2022). According to Changotra et al. (2020), this process resulted in efficient degradation and detoxification with 94% and 89%, respectively, high drug removal rates. In addition, ozone (O3), activated carbon (AC), and biological treatment have been studied by Jhunjhunwala et al. (2021) and Choi et al. (2022) for the degradation of levosulpiride. Using the minimum dose of activated carbon, ozone, and run time, the percentage removal of levosulpiride obtained was about 76% and 61% for degradation and detoxification, respectively, again according to (Jhunjhunwala et al. 2021).

Wastewater treatment options

Industrialization plays an important role in economic growth and development (Ali et al. 2020; Usman and Balsalobre-Lorente 2022). However, the number of industries has also led to a rapid increase in pollution due to poor industrial wastewater management (Yenkie 2019; Ali et al. 2020). Technological solutions for wastewater treatment range from traditional methods to advanced technologies (Saghafi et al. 2019; Salamirad et al. 2021). However, choosing the best wastewater treatment technology can be a complex task. Several alternatives are available, and multiple technical, economic, social, regulatory, governmental, and environmental criteria are involved in the selection process (Kamali et al. 2019a, b; Boer et al. 2022).

To address this problem, various multi-criteria decision support methods have been used to integrate multiple environmental application criteria (Delanka-Pedige et al. 2022). Ullah et al. (2020) developed a comprehensive review of the latest technologies in wastewater treatment implementer dusting Microsoft Visual Studio 2010. This system is divided into four levels of treatment depending on the complexity of the wastewater and the level of treatment required to have the primary, secondary, tertiary, and hybrid treatments. In addition, Mannina et al. (2019) and Hammond et al. (2021) mentioned that the decision support system enables customization of treatment groups at the planning stage at minimal cost, eliminates errors in the planning and design stages, facilitates decision-making by refining alternative solutions based on user needs and current conditions, incorporates customer needs, and promotes developmental sustainability.

Meanwhile, Mahajan et al. (2022) and Gupta and Kumar (2022) evaluated five wastewater treatment technologies used in Pakistan against ten criteria using the fuzzy multi-criteria decision-making method VIKOR. Among the selected criteria, land requirements, energy consumption, and excessive sludge production had the most pronounced effect on decision-making (Saghafi et al. 2019). The study results showed activated sludge was the most suitable technology for industrial wastewater treatment in Pakistan (Ali et al. 2020).

The treatment method’s efficiency and sustainability are the most important criteria for selecting sustainable wastewater treatment methods (Koohathongsumrit and Meethom 2022). Kamali et al. (2019a, b) investigated a Fuzzy-Delphi approach to evaluate 17 parameters incorporating technical, economic, environmental, and social criteria to classify nine treatment technologies into two categories (physical–chemical and biological processes. The results show that membrane technology and sludge blanket technology are the most promising methods to treat highly polluting emerging industrial pollutants still, according to Kamali et al. (2019a, b).

And in addition, Kamali et al. (2019a, b) and Parhizgarsharif et al. (2019) proposed a new hybrid methodology based on the best–worst method (BWM) and the behavioral technique of preference ordering by similarity to the ideal solution (BTOPSIS). BWM incorporates consistency checks, while BTOPSIS can model the decision-makers risk-taking behavior (Liu et al. 2019). Based on different levels of decision-makers loss-aversion, results indicate that energy consumption and a fixed-film integrated activated-sludge reactor are the most efficient criterion and the most effective technology (Salamirad et al. 2021).

For example, Cunha et al. (2021) have carried out tests based on a multi-criteria decision-making method (MCDM) to evaluate the cheapest UVC/H2O2 process with the lowest associated environmental impacts coupled with the highest degradation rate. The results showed that E7 experiment ([H2O2] 0 = 43.5 mg L−1; E UVC = 15.0 W m−2; k IMD = 0.236 s−1) was considered to fulfill the three criteria in a balanced way again according to (Cunha et al. 2021).

According to several authors, the advantages and limitations of wastewater treatment processes have been summarized in Table 2

Table 2 Strengths and limitations of wastewater treatment operations and processes

Table 2 represents a comparison of the different liquid waste treatment techniques produced by the pharmaceutical industry in terms of advantages and disadvantages in terms of degradation efficiency, investment and operating cost and performance.

Conclusion

It can be concluded that industrial discharges of pharmaceutical products considerably impact the environment, the ecosystem, and health. The pollution generated by these discharges is becoming more and more worrying. It also causes severe damage to the proper functioning of wastewater treatment plants because antibiotics have a considerable impact on these plants. These discharges must be treated to eliminate the contaminants. Therefore, the treatment of pollutants is necessary to represent a gain for a better quality of life for citizens, an improvement of the health system, and positive socioeconomic benefits. In addition, there are many techniques of biological treatment, among others.

This study, via a review of the literature on treating liquid waste from the pharmaceutical industry, aims to highlight the negative impacts of these discharges on the environment, human health, and treatment plants. In addition, the study helped illustrate the possible techniques to eliminate pollution from pharmaceutical discharges to minimize the impacts effectively.

This literature review does not provide a single viable treatment technique in terms of efficiency, cost, and performance. Therefore, we propose a combination of treatments toward an optimal technique called hybrid. It should be noted that the advantages of this technique involve low energy cost, efficient degradation process, and generation of non-toxic by-products.

Water in the pharmaceutical industry must be controlled both upstream and downstream of the plant:

  • Upstream, water must be saved by rationalizing and recycling treated water.

  • Downstream, all types of pollution must be treated before discharge into the environment, with recycling of treated water.

For downstream actions, among the biological treatments recommended for pharmaceutical waters, we can mention.

  • Membrane processes

  • Biological treatment by activated sludge

  • Techniques using rotating disks as biomass support

  • Membrane bioreactors with high antibiotic reduction efficiency

  • Anaerobic treatment techniques alone or combined with aerobic treatment

It is understood that the appropriate treatment choice must be entrusted to the technique that effectively meets the requirements of the regulatory standards.