        $pasien = new Pasien($_POST['idPasien']);
        $units = new Unit(null, $_POST['unitsesudah']);
        $antrian = new Antrian(null, null, $_POST['jenis_kunjungan']);
        $id = $pasien->getPasien_id();
        $jenis_kunjungan = $antrian->getJenis_kunjungan();
        $unit = $units->getNama_unit();
        $status = "belum_dilayani";
        
        $query =
        "INSERT
        INTO antrian(pasien_id, jenis_kunjungan, unit_id_tujuan, status)
        VALUES ('$id', '$jenis_kunjungan', '$unit', '$status')
        ";
        $result = $this->conn->query($query);