Physicochemical analysis and detection of exceptionally high diclofenac concentration in the pharmaceutical wastewaters collected from the production units of national industrial zone, Rawat, Pakistan

The annual growth rate of pharmaceutical industry in Pakistan is 10% and is continuously expanding to fulfill the increasing demand of the rapidly growing population. But inability of the pharmaceutical sector to comply with the environmental standards leads to the introduction of large quantities of various pollutants in the natural environment which presents serious ecological challenges. In this study, effluent wastewater samples from 14 manufacturing units of the pharmaceutical industries of the National Industrial Zone, Rawat, Pakistan, were collected and characterized for physicochemical parameters including color, odor, pH, electric conductivity, temperature, total dissolved solids, total suspended solids, salinity, dissolved oxygen (DO), chemical oxygen demand (COD), nitrates, sulfates and phosphates according to the standard methods. The detection and quantification of diclofenac (DCF)—one of the commonly prescribed drugs in Pakistan—were carried out in the pharmaceutical wastewater samples (PWWSs) using HPLC-PAD. Exceptionally high concentration of the diclofenac was detected in the industrial disposal of MB-12 (311,495 µg L−1). PWWSs were analyzed using chemometric techniques including principal factor analysis (PFA) and cluster analysis (CA). PFA explained almost 81.48% of the total variance by the newly extracted four components and complemented the strong Pearson’s correlation coefficient (r) of DCF concentrations to that of the levels of COD, r = 0.752, and DO, r =  − 0.609, in PWWSs. Six clusters were generated during similar wastewater characteristics-based CA dendrogram, in which reverse osmosis-treated PWWSs were observed to cluster with the untreated PWWSs, suggesting the need to adopt an advance and better wastewater treatment methods by the pharmaceutical industries.


Introduction
Water is an odorless, tasteless and colorless essential commodity which makes up more than 70% of our body and is primarily used for the cleaning and washing purposes in the household activities, for various manufacturing processes in industries and for irrigation in agriculture sector. Pollution of this invaluable resource is increased by ever-expanding innovations in the field of pharmaceutical industry due to high demand and intake of pharmaceuticals. The production and processing of pharmaceutical products until their cycle of consumption can cause water pollution (Seenivasagan and Kasimani 2022). About 478 national and multinational pharmaceutical manufacturing industries of varying capacity are operating in Pakistan (Khan et al. 2020). These companies are exporting different pharmaceutical compounds (PhCs) to more than 27 countries in the world (Ashfaq et al. 2017), but unfortunately local pharmaceutical production units do not comply with the National Environmental Quality Standards (NEQS) and dispose their effluents directly (without any pre-treatment) in the natural environment, i.e., into nearby sewers, creeks, streams and open sites, resulting in the increased contamination of surface and ground water resources (Ibrahim et al. 2021). The concern for the prevalence of pharmaceuticals in the environment has increased over the past few years (Riaz et al. 2018) due to their impacts on aquatic ecosystems . PhCs can enter the environment via various pathways including wastewater treatment plants (WWTPs) (Lopez-Herguedas et al. 2022), hospitals (Valdivia et al. 2023), manufacturing facilities, land runoff, agriculture, improper household use and disposal (Parra-Saldivar et al. 2021;Rodriguez-Mozaz et al. 2020). Although no Pak-NEQS exists for the pharmaceuticals, the threshold concentration of PhCs in wastewater is taken as 1 μg L −1 to that of the maximum allowable concentration of diclofenac (DCF), as per the documents of Evaluation of Quality Standards (EQS) and Food and Drug Administration (FDA) (Johnson et al. 2013).
Due to its excessive annual consumption of almost 940 tons all over the world, DCF has become a common and persistent water contaminant because of its high stability and hydrophobicity (Fellah et al. 2022). The highest (38%) consumed pharmaceutical groups in Pakistan is nonsteroidal anti-inflammatory drug (NSAID) (Nasir et al. 2012), and among the NSAID, DCF is the most popular pain killer due to its over-the-counter availability (Lonappan et al. 2016). Chemically, DCF is 2-(2',6'-dichloroanilino)-phenylacetic acid, primarily employed as sodium or potassium salt in pharmaceutical formulations. Being one of the most effective inhibitors of prostaglandin synthesis, DCF is used to reduce inflammation and to relieve pain in acute injuries and arthritis (Schjerning et al. 2020). DCF can be administered orally or applied to the skin (Leppert et al. 2018). Headache, renal and hepatic damage, skin rashes, gastrointestinal lesions, edema and dizziness are the reported side effects of DCF (Amanullah et al. 2022). Municipal waste, effluent discharge from hospitals, pharmaceutical units and wastewater treatment plants (WWTPs) are the most prominent sources of diclofenac in the aquatic environment (Alessandretti et al. 2021;Osorio et al. 2016). Considerably low removal percentage is observed in the conventional treatment processes due to the recalcitrant properties and possibility of conjugate formation of PhCs (Nguyen et al. 2021;Zhao et al. 2021). DCF when finds its way to drinking water via ground and surface water causes health hazards for humans (Sathishkumar et al. 2020;Shamsudin et al. 2022). Inappropriate veterinary use of diclofenac resulted in serious decline of wild population of vultures (Gyps sp.) (Camiña et al. 2014). The observed geno-cytotoxic environment relevant concentration of DCF in the Cyprinus carpio was found out to be 0.31 mg L −1 (Quiroga-Santos et al. 2021). Besides the reported adverse effects, limited studies are available for the detection of DCF, particularly in the industrial effluents of Pakistan. Lack of research studies motivated us to carry out the current research work on the detailed characterization of pharmaceutical wastewater along with the detection and quantification of model pollutant, i.e., diclofenac in the industrial effluents. The study provides the baseline data of the environmentally related concentration of the studied parameters, particularly diclofenac in the pharmaceutical wastewaters of Pakistan, thus emphasizing the need to adopt more efficient treatment strategies by the industries.
Pearson correlation was employed to analyze the relationships among the measured variables. Multivariate statistical tools known as chemometric techniques, including principal factor analysis (PFA) and hierarchical cluster analysis (HCA), were applied to reduce the whole datasets to a few significant factors (variables) which can explain most of the variance without losing significant information (Korichi et al. 2021;Mohammadi et al. 2022). The final objective for using chemometric techniques was to unveil the significant underlying 'latent' variables with an aim to identify the major pollution sources influencing the water quality (Tavakol et al. 2017), and thus enable industries to adopt the treatment strategies accordingly.

Chemicals and reagents
National Institutes of Health (NIH), Islamabad, Pakistan, supplied the reference standard of diclofenac. Figure S1 (a) and table S1 (Supplementary data) provide the structure and physiochemical properties of diclofenac. All the received chemicals were of analytical grade and were used without further purification.

Study area
The National Industrial Zone (NIZ) Rawat, Pakistan, was established in 1963. More than 200 industries are present in NIZ covering an area of over 625 acres on the border of twin cities, i.e., Islamabad (33.7294° N,73.0931° E) and Rawalpindi (33.5984° N,73.0441° E). The nine segments in the industrial area include re-rolling mills, steel melting furnaces, ghee and oil, marble polishing and cutting, soap, recycling of lead storage batteries, auto repair shops, flour mills and pharmaceuticals, etc. (Siddiqui et al. 2011). The map of the sampling sites was prepared using ArcGIS 9.3 ( Fig. 1).

Physicochemical analysis
The collected wastewater samples were transported to the laboratory and immediately measured for parameters like electrical conductivity (EC, µS cm −1 ), total dissolved solids (TDS), total suspended solids (TSS) and salinity using digital meter (HANNA instruments). Multimeter probe was regularly calibrated against pH and EC standard solutions of 4, 7 and 9; and 1413 µS cm −1 , 13 µS cm −1 and 84 µS cm −1 , respectively. DO meter was used to measure dissolved oxygen (DO) values. Temperature (temp, °C) was also examined. The chemical oxygen demand (COD) was examined using the standard procedure of Spectroquant COD kit with measuring range of 45-1500 mg L −1 . The parameter of color was measured through visual comparison method (Hussain et al. 2021). Standard method 2540D was used to evaluate TSS of the samples. The concentrations of nitrate (NO 3 − ), sulfate (SO 4 −2 ) and phosphate (PO 4 −3 ) were measured using standard methods via UV-visible spectrophotometry IDs as S1-S14. GIS coordinates of the two adjacent industrial sites, i.e., S13 and S14, appeared to superimpose and thus are shown as such in the provided figure  (APHA et al. 2017). Standard calibration curves for determination of nitrates, sulfates and phosphates are provided in Figs. S2, S3 and S4 (Supplementary data), respectively. The values of DO, TDS, salinity, TSS, COD, nitrates, phosphates and sulfates were measured in mg L −1 .

Chloroform extraction protocol
The samples meant for HPLC analysis were immediately transported to the laboratory, treated with 37.5 mg of disodium edetate (ethylenediaminetetraacetic acid disodium)-a chelating agent used to complex the metal ions in the wastewater samples-and stored in refrigerator (4 °C) to inhibit bacterial growth. The targeted analyte, i.e., diclofenac, was extracted from wastewater samples employing chloroform extraction (Ashfaq et al. 2017). Before chloroform extraction, all the PWWSs were filtered through 0.45-μm PTFE syringe filters to eliminate particulate matter. The filtered samples (25 mL) were then extracted thrice using 50 mL of chloroform during each extraction. The extracts were combined and evaporated. The residue was re-dissolved in 2 mL of methanol for HPLC analysis.
Chromatographic conditions LC-20A system (Shimadzu, Japan) equipped with PAD detector was used for the analysis of diclofenac in the extracted wastewater samples. All the solutions were refiltered through 0.22 μm PTFE (polytetrafluoroethylene) filter membrane before HPLC analysis. The stationary phase, i.e., C18 column (250 × 4.6 mm, 5 µm particle size), was maintained at room temperature, and the detector was adjusted at the optimum detection wavelength of 254 nm with a bandwidth of 4 nm. The mobile phase was composed of a mixture of acetonitrile and 0.1 M ammonium acetate (pH 5.0) in 50:50 v/v ratio for the chromatographic analysis at a flow rate of 1 mL min −1 in isocratic mode (Ashfaq et al. 2017). An aliquot of 20 μL of the extracted sample was automatically injected into the reverse-phase HPLC column and eluted for 10-20 min run time. Finally, the peak area was utilized as an instrumental response and the analysis was obtained under the chromatographic conditions. The prepared mobile phase was degassed using ultrasonication before use.

Method validation
The developed method was validated by performing parameters like linearity, precision, limits of detection (LOD) and limits of quantification (LOQ). Calibration curve ( Fig. S5) was prepared by preparing six standard solutions in concentration ranges from 40 to 0.05 µg mL −1 (40, 20, 8, 1.6, 0.26 and 0.05 µg mL −1 ). All the working The values above or below the NEQS permissible limits (PLs) are represented in the bold font Table 1 (continued) solutions were prepared in methanol. For precision, three solutions were analyzed during different time intervals within and between days, i.e., intra-and inter-day precision. LOD and LOQ were calculated using signal-to-noise ratio approach. The summary of validation parameters is provided in Table 2.

Statistical analysis of the pharmaceutical wastewater samples
Statistical analyses were performed using SPSS (IBM SPSS Statistics 20). The descriptive statistics were evaluated for all the physicochemical parameters of wastewater samples. Pearson correlation coefficients (r) of water quality parameters were evaluated to determine the correlations between the analyzed parameters and to that of DCF concentrations. Data are subjected to varimax rotation to perform principal factor analysis (PFA) on 12 variables. Principal component analysis (PCA) was used as the extraction method during PFA (Ogarekpe et al. 2023). The PCA assumes that the few components significantly influence (explain) the whole or the major source of variations in the dataset. Thus, the identification of the major factors helps to explain the maximum interactions and/or relationships between various parameters and samples involved in the analysis of environmental data (Platikanov et al. 2019). The similarity of samples within the same group tends to maximize, while the dissimilarity of different groups in the whole dataset tends to maximize in the cluster analysis (CA) (Han et al. 2020). In the present study, the most used hierarchical agglomerative cluster analysis was performed on z-score standardized data using Ward's method and the Euclidean distance as a measure of dissimilarity.

Physicochemical characterization of the wastewater samples of NIZ, Rawat
The understanding of wastewater characteristics plays a vital role for developing the wastewater treatment plant via determination of wastewater quality parameters (Nazif et al. 2023). The wastewater characteristics of the pharmaceutical manufacturing units vary greatly according to the raw materials consumed, equipment used and variations in the synthesis, compounding and formulation processes (Rana et al. 2017). The computed values for all the physicochemical parameters along with NEQS for the discharge of industrial effluents in Pakistan (Mahmood et al. 2019) are mentioned in Table 1.

Descriptive analysis
The infrastructure deficiencies and high cost are the contemporary hurdles in the evaluation of wastewater characteristics. Thus, the determination of appropriate wastewater treatment methods is important to design site-specific WWTPs keeping in view effluent load and nature (Hamid et al. 2020;Mannina et al. 2019). The distribution of physicochemical parameters and DCF concentration in the wastewater of NIZ, Rawat, was determined by the descriptive analysis. Table S2 (Supplementary information) summarizes the basic statistics of the physiochemical parameters of PWWSs. The calculated mean values of pH, EC, temperature and TDS along with their ± SD (standard deviation shown by error bars) are presented in Fig. 2. pH of the industrial effluents ranged from acidic to slightly alkaline, i.e., 5.38-7.73. Except for two samples, i.e., MB-17 and MB-13, pH values of all the wastewater samples were recorded within permissible limits (PLs). The pH of MB-16 was alkaline (7.73). MB-1 (7.36), MB-4 (7.17), MB-5 (7.24), MB-6 (7.04), MB-10 (7.16), MB-11 (7.24) and MB-12 (7.43) have almost neutral pH. Industrial effluents of MB-17 and MB-13 are most acidic, i.e., 5.38 and 5.74 (below PLs), followed by slightly acidic samples of MB-14, MB-2, MB-7, MB-3, MB-9, MB-15 and MB-8 with pH of 6.22, 6.49, 6.68, 6.7, 6.78, 6.81 and 6.88, respectively (Table 1). Metabolic activities of aquatic organisms are pH dependent (Benedetti et al. 2022;Leung et al. 2022). The optimal pH range of 6.5 to 8.5 is best suitable for metabolic activities of most aquatic organisms (US EPA 2022). So, the influx of the acidic industrial effluents highly affects the survival and abundance of aquatic organisms by destabilizing the fundamental properties like alkalinity, hardness and metal solubility of receiving water bodies (Ouyang et al. 2019;Zouch et al. 2018). The biological and chemical processes involved in the wastewater treatments are also pH dependent (Gome and Upadhyay 2022). Thus, pH of the industrial effluents needs to be controlled properly before their release in the environment.
Electrical conductivity (EC) is the measure of conduction of current in an aqueous solution. EC is the water quality parameter and is primarily dependent on the occurrence and total concentration of ions, their valence state, temperature and mobility (Khan et al. 2012). Huge variations were observed in the EC values with minimum value of 15.7 (MB-14) to maximum value of 1493.6 (MB-2). The EC values recorded for all the analyzed samples in the study were greater than the permissible limit (300 µS cm −1 ), except for the samples collected from the industrial site of S10, i.e., MB-13 and MB-14 (Table 1). These observations concluded that the soluble salts released from the pharmaceutical industries increase the ion concentration and thus the EC values of the receiving wastewater. The high ions containing wastewater when enters the freshwater ecosystem affects aquatic life and human health (Pratap et al. 2023). In addition, it is also an important parameter to determine the suitability of wastewater treatment method (Al Hadidi and Al Hadidi 2021). Data values with the large variations can be attributed to the high values for the standard deviation of TDS, EC, TSS, sulfates, salinity, nitrates, COD and DCF (Kurek et al. 2019).
Biochemical reactions of aquatic organisms are dependent on temperature (Alfonso et al. 2021). The chemical reactions in the water are enhanced, while the solubility of gases decreases as the temperature increases, which could adversely affect aquatic life (Kazmi et al. 2022). The values of temperature for all the wastewater samples analyzed in our study were found within the NEQS permissible limit of 40 °C.
TDS is the measure of total dissolved ions and is considered one of the main indicators for determining the quality of wastewater (Granata et al. 2017). The industrial effluents of the studied samples contained TDS in the range of 11.9-906.6 mg L −1 , as provided in Table S2 (Supplementary data). Although TDS values of almost all the samples from different industries were high, all samples met NEQS (3500 mg L −1 ) (Table 1). Lowest TDS value of 11.9 mg L −1 was shown by the sample MB-14. The highest TDS value of 906.6 mg L −1 was observed for the RO-treated wastewater sample of MB-5 (Table 1) which can be explained with the problems of brine disposal and filter fouling of RO membranes (Peng et al. 2020). High TDS value alters the water density, imparts bad odor, reduces water clarity, decreases oxygen concentration and thus affects the essential processes like photosynthesis of the aquatic organisms in the water bodies (Tomar 2018). Figure 3 depicts the TSS, salinity, DO and COD values in the sampling sites of NIZ, Rawat. TSS is an important parameter to determine and control the quality and efficiency of WWTPs . Maximum and minimum TSS levels of 176 and 14.6 mg L −1 were recorded for the effluent samples of MB-2 and MB-10, respectively (Table S2) Fig. 2 a pH, b EC, c temp and d TDS in the sampling sites of NIZ, Rawat is 150.3 which is just at the border line of the TSS permissible limit, i.e., 150 mg L −1 . The TSS value of 176 mg L −1 exceeded the admissible limit only in the sample MB-2. DO levels and light penetration into the water bodies can be reduced by high TSS values, resulting in harmful living environment for microorganisms (Abd Wahab et al. 2018;Ishii et al. 2020).
The release of saline wastewater containing high levels of various nutrients causes eutrophication of water bodies . Salinity and sulfates are directly related to each other at the significance level of 0.05 (r = 0.490). Strong positive correlation is depicted by both salinity and sulfates to that of the TDS values. Large variance of 38,635.88 (Supplementary Table S2) was observed in the salinity values ranging from 22 to 731 mg L −1 (Table 1) for the analyzed wastewater samples. The highest salinity value of 731 mg L −1 was observed for the industrial effluent of MB-2 (Table 1), which can be explained by comparatively higher TDS value of 405.3 mg L −1 (as the highly significant correlation exists between TDS and salinity, i.e., 0.828; p = 0.01) ( Table 3). High TDS values cause salinity problem in the effluents leading to increase in the cost of the wastewater treatment processes (Javier et al. 2020;Luján-Facundo et al. 2018).
Respiration of aquatic species is reflected by DO levels and can cause serious detrimental effects if DO levels drop below the limit of 4-5 mg L −1 (Ni et al. 2019). The mean values of DO (mg L −1 ) along with the SD (error bars) are presented in Fig. 3. MB-12 and MB-15 has the lowest and the highest DO values of 0.11 and 4.85, respectively (Table 1). DO levels of all the wastewater samples were below NEQS PLs (> 5 mg L −1 ), which can harm the existence of aquatic species due to the creation of dead zones arising from the hypoxia (low DO levels) in the receiving natural water bodies (Breitburg et al. 2018).
The degree of pollution caused by the industrial effluents is measured by COD. Large quantities of organic and inorganic compounds including microbes, organic matter and salts in the wastewater create increased COD Lowest COD value, i.e., 45 mg L −1 , was recorded for the RO-treated wastewater sample (MB-14) collected from the sampling site of S10 which may be attributed to the efficiency of RO treatment in the particular pharmaceutical industry (Liu et al. 2022). High COD value in the pharmaceutical wastewater is an indicator of high concentration of pharmaceuticals and personal care products (Patel et al. 2020), which is confirmed in the maximum wastewater samples analyzed with DCF concentration, including the upper outliers of MB-12 and MB-3. Strong positive correlation of COD with DCF also supported these findings, which has been discussed in detail in the correlation analyses. Moreover, the pollution charge caused by the COD value determines the cost of wastewater treatment contracted by the pollution causing industry (Wu et al. 2021). Thus, monitoring the COD values of industrial wastewater is important parameter to ensure the economical sustainability of the treatment facility.
The concentrations of nitrates, phosphates and sulfates in the PWWSs are depicted in Fig. 4. Wastewater samples from all the industrial sites have depicted nitrate levels within the PLs except MB-3 which showed exceptionally high nitrate concentration of 237.4 mg L −1 , exceeding the nitrate permissible limit of ≤ 50 mg L −1 . The recorded nitrate outlier can be due to the mixing of industrial effluent with the sewerage pipelines (Mukate et al. 2018). While all PWWSs met the sulfates permissible limit (600 mg L −1 ), the concentration of sulfates ranges from the lowest value, i.e., 0.6 mg L −1 (MB-6 and MB-14), to the highest values, i.e., 46.97 mg L −1 (MB-3), in the studied samples. Phosphate concentrations ranged from 0.9 mg L −1 (MB-6) to 20.74 mg L −1 (MB-17) in the wastewater samples with an average value of 8.58 (Table S2). The occurrence of high nitrate and phosphate concentrations can contribute to eutrophication by increasing the nutrient load of the receiving freshwater bodies (Wurtsbaugh et al. 2019). Thus, to maintain the levels of these inorganic anions by the industries is crucial, not only to prevent the aquatic life of the receiving environment from their negative impacts but also to adopt the proper wastewater treatment strategy as the presence of these ions affects the applicability of WWTPs (Liu et al. 2020;.

Occurrence of DCF in pharmaceutical wastewaters
External standard method was used to quantify diclofenac in the pharmaceutical effluents. The validation parameters carried out for the proposed diclofenac extraction method from the wastewater samples are summarized in Table 2. The experiments showed adequate linearity (close to 1) for all of the analyzed standards within the range (0.05-40 µg mL −1 ). Figure  Till date, the ever-highest reported concentration of DCF was 4900 ng L −1 in the surface water bodies (Scheurell et al. 2009) which was attributed to the absence of advance WWTPs in the country. However, in terms of highest pharmaceutical detection in PWWSs, the results can be compared with the research study of Larsson et al. (2007) where ever-highest concentration of ciprofloxacin was detected, i.e., up to 31,000 µg L −1 , in the effluents of a WWTP of Hyderabad, India. Ciprofloxacin concentration of 14,000 µg L −1 was reported by Fick et al. (2009) in the pharmaceutical effluents (Fick et al. 2009). The difference in detected concentrations might be due to the huge variations in total production, usage pattern (Khasawneh and Palaniandy 2021;Couto et al. 2019) and availability of almost no wastewater treatment facilities in Pakistan (Ashfaq et al. 2017).    Moreover, the detection frequency (DF), which was calculated by dividing the number of samples in which DCF was detected by the total number of samples (Ashfaq et al. 2017), was very high, i.e., 88%, and is indicating frequent occurrence of diclofenac in the PWWSs. Detection of DCF in the RO-treated wastewater samples suggested that RO is not sufficient to treat micropollutants like DCF due to their recalcitrant properties and conservative nature (Rodriguez-Narvaez et al. 2017;Rout et al. 2021). DCF concentrations were found below detection limit (BDL) in the industrial effluents of MB-2 and MB-9 which can be due to the extremely low concentration of DCF that it cannot be detected using HPLC analysis (Meng et al. 2021).

Correlations between different parameters
Pearson's correlation coefficient (r) values were used to determine the possible relationships between physicochemical parameters with DCF concentrations across all sites (n = 17), as presented in Table 3. pH is positively correlated with EC (r = 0.486; p = 0.05) and TDS (r = 0.623; p = 0.01), i.e., the increase or decrease in a pH value results in a corresponding increase or decrease in the values of EC or TDS. Although the correlation analyses help to explain the maximum trends in the analyzed samples, some exceptional deviations in the correlation(s) and trend(s) can be observed in the study (Table 1). For example, sample MB-2 has maximum EC, but it does not have the maximum TDS value or the minimum DO value. Both EC and TDS are  (Hilmi et al. 2021), and it can be explained with the Pearson correlation analysis (Table 3) that EC is highly correlated with TDS (r = 0.838; p = 0.01) and near-perfect correlation with salinity (r = 0.998; p = 0.01), while there are medium correlations with sulfates (p = 0.498). In case of the sample MB-2, Table 1 shows that although TDS value is relatively low, EC is strongly correlated with the salinity of the sample. The highest salinity value, i.e., 731 ± 6.08, was recorded for the wastewater sample of MB-2. Thus, the enhanced EC of the sample MB-2 might be preeminently due to the highest salinity value (Hamaidi-Chergui and Brahim Errahmani 2019), including TDS and sulfates. (Although values of both the parameters lied in the permissible limits, they can affect the overall wastewater chemistry.) It can also be inferred from the above discussion that natural environmental samples are complex, and thus, all the evaluated data cannot be explained by simple or defined correlations. Rather, the synergistic effect of multiple factors/parameters and interactions in the environmental matrix also needs to be studied to completely understand the acquired data and to design the appropriate wastewater treatment strategy accordingly (Rekhate and Srivastava 2020).
In our study, temperature is negatively but not significantly correlated with the analyzed parameters including TDS (r = − 0.196), salinity (r = − 0.047), DO (r = − 0.046), COD (r = − 0.025), nitrates (r = − 0.293) and sulfates (r = − 0.318) ( Table 3). Previous studies have reported the negative correlation of temperature with multiple parameters including DO and COD which may indirectly influence the DCF concentration in the PWWSs (Ferguson et al. 2013).
Various other physicochemical properties also influence the occurrence and removal of diclofenac (Alessandretti et al. 2021). As expected, pronounced association is observed between the pharmaceutical, i.e., DCF and DO, r = − 0.609 (strong negative correlation) (Ohoro et al. 2022), and COD, r = 0.752 (strong positive correlation) , in the wastewater samples. High DCF concentration significantly reduces the DO level which is confirmed by their recorded values for majority of the samples. While the DO levels of all the wastewater samples lied below the NEQS PLs in the analyzed wastewater samples, MB-12 containing the highest DCF concentration has the lowest DO level of 0.11 mg L −1 (Table 1). DO levels for the PWWSs of MB-2 and MB-9 in which DCF concentrations were below detectable limits can be explained by an indirect significant correlation of DO and COD (r = − 0.53; p = 0.01) ( Table 3). DO levels are not only influenced by the DCF concentrations but also highly dependent on COD values. Relatively higher COD values, i.e., 555.3 and 495.3 (mg L −1 ) in MB-9 and MB-2 (much greater than the COD admissible limit of 150 mg L −1 ), may cause lower DO levels of 3.13 and 3.56 (mg L −1 ) in the respective PWWSs. Oxygen concentrations of the receiving water bodies can be depleted by the high COD and pharmaceutical levels of the industrial effluents, thus creating unfavorable living conditions for aquatic organisms, and may pose severe impacts on human health (Manirakiza et al. 2022).
The direct relationship of COD levels to that of the increased DCF concentration (Table 3) presents a real challenge to the pharmaceutical industries during the treatment of industrial effluents. Highest COD values were observed for the PWWSs of MB-12 and MB-3 which contained the upper extreme and mild DCF outliers of 1407 and 1129 mg L −1 , respectively (Table 1), as shown in Supplementary Fig.  S1 b. High levels of both DCF and COD were observed in the maximum PWWSs excluding MB-2, MB-7, MB-9, MB-13 and MB-14 (Table 1). The deviations in these samples can be explained by the strong direct correlations between COD values to the levels of the nitrates (r = 0.581; p = 0.05) and sulfates (r = 0.607; p = 0.01) (Table 3) of the specific PWWSs (Qin et al. 2022). Sulfate concentrations are then highly correlated with the TDS (r = 0.674; p = 0.01) and COD (r = 0.607; p = 0.01) values, while they are mildly correlated with EC (r = 0.498; p = 0.05) and salinity (r = 0.49; p = 0.05). Therefore, high concentrations of DCF not only directly but also indirectly influence the overall wastewater quality via various parameters in the complex natural environmental samples like PWWSs. Principal factor analysis (PFA) PFA technique was employed to evaluate the parameters which are responsible for the major variations in the wastewater quality and identification of the potential pollution source (Duan et al. 2016;Zhang et al. 2022). The sampling adequacy was measured by Kaiser-Meyer-Olkin (KMO) test (0.43) to analyze the suitability of data for the factor analysis (Kaiser 1974). PFA summarized in Table 4 depicts that all the parameters satisfied cross-factor loading threshold of 0.4 (Bayo and López-Castellanos 2016) in varimax rotated matrix. The first four factors extracted from PFA, with eigenvalues greater than one can describe 81.48% of the total variance of the dataset. The reduction of dataset from 12 to 4 factors, i.e., first principal factor (PF1), second principal factor (PF2), third principal factor (PF3) and fourth principal factor (PF4), accounted for 38%, 18.5%, 16% and 8.9% of the total variance. PF1 may be considered as primary factor in determining the quality of the wastewater samples due to the positive loading of all the variables, and it is also characterized by the highest number of wastewater quality parameters including pH, TDS, sulfates, EC, salinity and COD with the factor loading values of 0.487, 0.959, 0.865, 0.96, 0.47 and 0.646, respectively. PF1 can explain the 38% of the variations in the dataset, which perfectly complements the Pearson's correlations analysis where sulfates, TDS, salinity, EC and COD are the most influential parameters in explaining the maximum significant correlations of the wastewater quality. Because of the importance and weight of PF1 as a dominant pattern in the dataset (Bayo and López-Castellanos 2016), it is very important to maintain the parameters of pH (values above PLs in 2 samples), EC (values above PLs in all samples), salinity, COD (values above PLs in 14 samples) and sulfates before the disposal of industrial effluents in the natural ecosystem.pH (0.418), DO (− 0.828), COD (0.646) along with the most pronounced factor loading of DCF, i.e., 0.89, constituted PF2 which also confirmed the correlation analysis between DCF concentration and the prominent differences in the physicochemical parameters of the pharmaceutical wastewater (Ferguson et al. 2013). The prominent loading of DCF in the PF2 highlighted the influential role of the occurrence of DCF in determining the quality of wastewater. These results also affirmed that the pharmaceutical manufactories are the major point sources for the release of DCF in the aquatic ecosystem (Sathishkumar et al. 2020) and thus should be properly monitored and treated as the prevalence of such higher pharmaceutical levels can cause serious ecological risk for aquatic life including algae, fish, etc. in the receiving freshwater bodies (Singh and Suthar 2021).
PF3 received significant loadings from three water quality variables: TSS (0.839), temp (0.766) and pH (− 0.499). pH (− 0.432), COD (0.478), nitrates (0.837) and phosphates (0.741) are demonstrated in PF4, indicating the major parameters influencing the wastewater quality and providing guiding factors (parameters) to design proper wastewater treatment plants. In addition, factor analysis can serve as a useful tool for the decision makers to examine the major parameters of the pharmaceutical industries and extent of pollution caused by them via practical pollution indicators (Tripathi and Singal 2019).
Moreover, it can be observed from the analysis that pH is the only significant loading on all the 4 principal factors, while COD is significant in the 3 principal factors (Table 4), indicating that the chemical synthesis and fermentation units in the pharmaceutical industries are the primary source of samples contamination as the raw material consumed during these processes causes prominent fluctuations in the values of various parameters including pH and COD w.r.t PLs in the pharmaceutical effluents (Rana et al. 2017). The positive factor loadings of pH in PF1 and PF2 tend to significantly impact the pharmaceutical wastewater quality, while negative factor loadings of pH in PF3 and PF4 tend to decrease the influence of pH in determining the wastewater quality w.r.t other parameters in the specific samples (Seo et al. 2019

Cluster analysis (CA)
During hierarchical cluster analysis (HCA), clusters were identified based on the similarities/dissimilarities in their wastewater characteristics using 12 variables, which were all proved to be significant in PFA. Based on the grouping, appropriate treatment strategy can be suggested to dispose the industrial wastewater samples clustered near or far away (Mena-Rivera et al. 2017). Visual examination of the CA rendered dendrogram (Fig. 6) revealed the formation of statistically six significant clusters at a linkage distance lower than 25 which all are related to each other, representing single water quality, i.e., pharmaceutical wastewater containing both treated and untreated samples. Six clusters including cluster 1 (MB-1, MB-16, and MB-10); cluster 2 (MB-6, MB-7 and MB-15); cluster 3 (MB-5, MB-8 and MB-11); cluster 4 (MB-4, MB-9 and MB-2); cluster 5 (MB-3) which is then joined by an individual sample MB-12; and cluster 6 (MB-13, MB-14 and MB-17) are formed based on the similar characteristic of the sampling sites. In a second step, using a criterion value of a rescaled distance between 5 and 10, two statistically significant clusters, i.e., cluster A1 and A2, were formed. Clusters 1 and 2 are grouped together in the same cluster (A1), while clusters 3 and 4 constitute cluster A2. Both A1 and A2 are grouped in the cluster B, which is then joined by cluster C containing wastewater samples of MB-3 and MB-12 (cluster 5). Clusters D (or cluster 6) combines with cluster C in the hierarchy.
All the samples in cluster 1 were industrial effluents. The samples in cluster 2, i.e., MB-6 (doubly treated with reverse osmosis and distillation processes), MB-7 and MB-15 (both samples were RO-treated), are all treated wastewater samples. Similarly, MB-8 and MB-11 are industrial effluents while MB-5 in cluster 3 is RO-treated wastewater sample. All samples contained in cluster 4 are untreated industrial effluents. An industrial effluent of MB-3 is then joined by untreated MB-12 sample which contains DCF outlier (exceptional DCF concentration). The grouping in cluster 6 again composed of untreated (MB-13 and MB-17) and RO-treated (MB-14) wastewater samples. Although CA was expected to generate separate clusters of untreated and treated wastewater samples, it can be clearly observed from the unexpected clustering composition that the untreated industrial wastewaters were grouped with the treated samples throughout the dendrogram.
Most of the PWWSs were grouped in the major cluster B, which was then linked with cluster C. The cluster C consisted of samples MB-3 and MB-12, both containing an exceptional extreme outlier of nitrates and DCF, respectively (Table 1). The clustering behavior of the wastewater samples, which is also supported by detection of DCF in the RO-treated PWWSs during HPLC analysis indicates that all these samples, either treated or untreated, have one or multiple physicochemical parameters higher/lower than the NEQS/WHO limits and thus need proper treatment prior to their discharge (Alessandretti et al. 2021). Cluster D is composed of three PWWSs, i.e., MB-13, MB-14 and MB-17, and is identified as relatively the lowest contaminated cluster as it is joined with the highest linkage distances of ~ 25 to cluster C. The observation suggested that although most of the parameters of the samples in Cluster D lied within the NEQS PLs, few wastewater parameters still need to be managed and controlled properly before their release in the environment. Contrary to the study by Bayo and López-Castellanos. (2016), CA results obtained in our study depicted that the clustering of treated wastewater samples with untreated industrial samples clearly suggests the need of advanced and efficient treatment process(es), as the existing treatment methods are inefficient to treat the pollution load, particularly micropollutants like DCF released in the industrial effluents (Valdivia et al. 2023).

Conclusions
The study provides the first estimation of diclofenac micropollutant in the wastewater samples collected from the National Industrial Zone (NIZ), Rawat, Pakistan, and their characterization via various physicochemical parameters. The deviations, i.e., higher or lower values, w.r.t their permissible limits of the wastewater quality parameters, particularly electric conductivity, chemical oxygen demand, dissolved oxygen and DCF concentration in the analyzed wastewater samples, indicate the noncompliance of Pakistan's pharmaceutical industry with local (where available) and international standards. The factor loadings extracted during principal factor analysis confirmed that all the physicochemical parameters analyzed in the study area are significant in determining the wastewater quality. Thus, their detailed analysis is a prime requisite before suggesting the precise and improved treatment of the industrial wastewaters. Clusters analysis complemented PFA, recommending adopting an improved treatment approach for the pharmaceutical wastewater samples before their release into the natural environment as the traditional treatment methods are inefficient to treat the refractory pollutants present in the industrial effluents. This study strongly suggests the need to adopt advance treatment mechanisms by the pharmaceutical industries to achieve environmental and economic feasibility and to meet stringent effluent standards before final disposal.

Recommendations
Following recommendations can be made based on the study conducted above: • Broadening the research studies for the occurrence (both detection and quantification) and monitoring of the pharmaceutical compounds in the natural environmental matrices, especially industrial effluents which can help to develop the baseline repository of their environment-related concentrations and related ecological footprint. • Development of the local permissible limits for the emerging contaminants including pharmaceuticals like diclofenac along with the proper mechanism of monitoring and implementation for specific industries. • Adoption of advance treatment processes by the industries, particularly pharmaceutical industries as traditional wastewater treatment methods, lacks the ability to remove micropollutants including diclofenac. • Furthermore, toxic effects of high DCF concentrations (as detected in the study) on aquatic life are yet to be explored and need detailed investigations.
Author contribution MB was involved in conceptualization, methodology, validation, data curation, formal analysis and writing-original draft write-up. JR took part in supervision, correspondence, validation, resources and writing-reviewing and editing. MM contributed to resources and HPLC analysis. AI participated in writing-reviewing and editing. MX were responsible for writing-reviewing and editing.
Funding The research was supported by Quaid-i-Azam University through Departmental Research Fund. This publication is a part of the first author's doctoral research.

Conflict of interest
On behalf of all the authors of this manuscript, the corresponding author declares to have no conflict of interests.
Ethical approval This article does not contain any studies with human participants performed by any of the authors.
Informed consent For this type of study, formal consent is not required.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.