## 5 Proposed Architecture  
The 2D-spectral/spatial DW-ZCC code for eight on-body sensors used for the implementation of the proposed setup is provided in Table 4; it uses the following four codes in the spectral domain: X1, X2, X3, and X4, and the following two codes in the spatial domain: Y1 and Y2. The block diagram of the proposed setup is shown in Figure 2. We consider that the sensors are attached to the bodies of patients and generate electrical data signals that are fed to the optical coordinator, which is used to perform the necessary encoding in the optical domain, as mentioned in Section 2. The optical coordinator is the main part of the architecture and is where all encoding related tasks take place using a combination of continuous wave (CW) lasers, power splitters, and couplers [2]. The optical coordinator houses 8 \(\times\) CW lasers and 8 \(\times\) power splitters. The CW lasers, each having 10 dBm power, are centered at \(\lambda_{1}=1552.5\) nm, \(\lambda_{2}=1551.7\) nm, \(\lambda_{3}=1550.9\) nm, \(\lambda_{4}=1550.1\) nm, \(\lambda_{5}=1549.3\) nm, \(\lambda_{6}=1548.5\) nm, \(\lambda_{7}=1547.7\) nm, and \(\lambda_{8}=1546.9\) nm. Each CW laser is first split into two parts using 50:50 power splitters, then two different parts are combined using optical couplers as per the spectral encoding scheme presented in Table 4. The electrical data generated from each on-body sensor are encoded using the non-return to zero On-Off keying (NRZ-OOK) format and modulate an optical carrier obtained by coupling two different optical signals as per spectral encoding scheme. For instance, parts of \(\lambda_{1}\) and \(\lambda_{2}\) are combined to translate the sensor's data into spectral representation with reference to code sequence of 11,000,000 as shown in Table 4. The data modulation process is shown in inset of Figure 3.  
After performing spectral encoding, the spectrally encoded signals at the outputs of the Mach-Zehnder modulators (MZMs) are split into two equal parts to implement the spatial encoding. This is achieved by coupling the parts of spectrally encoded optical signals at their respective star couplers as per the spatial encoding scheme presented in Table 4. For instance, the parts of the optical signals at the output of sensor U(1,1) are connected to their respective star couplers, i.e., C\({}_{1}\) and C\({}_{2}\), with reference to the code sequence of 1100, as shown in Table 4. Similarly, spatial encoding is performed for all sensors following the respective code sequence. A time delay is introduced in the spectral/spatial encoded optical signals at the output of the star couplers to eliminate multiple parallel FSO channels between the transmitter and medical center, as shown in Figure 2. The time delay is calculated for each spectral/spatial encoded signal using the following equation [47]:  
\[t_{D}=D\times\frac{t_{b}}{S} \tag{9}\]  
\begin{table}
\begin{tabular}{c c  
where \(D\) represents the chip placement in the coding design, \(t_{b}\) is the bit's time duration, and \(S\) expresses the number of time slots. The time-delayed spectral/spatial encoded optical signals are then combined and amplified to a suitable power level using an optical amplifier (OA), ensuring a sufficient power budget. The amplified signal is then transmitted from the optical coordinator to the medical center over a 1 km FSO channel using a transmitter telescope, as shown in Figure 2. The FSO channel used in this work is modeled using the log-normal distribution [46], and the details have been discussed in Section 4. The optical signal transmitted over the FSO channel is received using a receiver telescope. The received signal is split into four equal parts, and a time delay is introduced in each spectral/spatial encoded signal according to following equation [47]. \[t_{D}=(S-1-D)\times\frac{t_{b}}{S} \tag{10}\]  
To perform spatial decoding, each signal after the time delay is again split into four equal parts; the required decoding for U(1,1) is performed as per the respective code sequence.