инструменту uitableviewcell переход к другому инструменту uitableviewcell не работает - делегат ноль

ISSUE HAS BEEN FIXED. SEE POSTCustomCell label in ViewController not displaying data

У меня инструменту UITableViewCell с кнопки IBAction, который вызывает запрос к Firestore. После запуска запроса я хочу перейти к другому инструменту UITableViewCell и показать данные. Я не уверен, что я упускаю или делаю неправильно здесь. Пожалуйста помогите. Спасибо.

Cell Delegate
protocol MyCellDelegate {func sendDataFromCell(_ sender: Any)} 
PTLISTCELL
class PtlistCell: UITableViewCell {@IBOutlet private weak var ptnameLbl: UILabel!@IBOutlet private weak var assignedmdLbl: UILabel!@IBOutlet private weak var officemdLbl: UILabel!@IBOutlet private weak var roomnumberLbl: UILabel!@IBOutlet private weak var seenoseeLbl: UILabel!@IBOutlet private weak var assigneddateLbl: UILabel!@IBOutlet weak var ptdataBtn: UIButton!var ptdatainfoRef: CollectionReference!var query: Query!var patdata = [PTData]()var delegate: MyCellDelegate?override func awakeFromNib() {    super.awakeFromNib()    ptdatainfoRef = Firestore.firestore().collection(PTLIST_REF)}func configureCell(ptlist: PTList) {    ptnameLbl.text = ptlist.ptname    assignedmdLbl.text = ptlist.assignedmd    officemdLbl.text = ptlist.officemd    roomnumberLbl.text = ptlist.room    seenoseeLbl.text = ptlist.seenosee    assigneddateLbl.text = ptlist.assigneddate }@IBAction func ptdataTapped(_ sender: Any) {    let query = ptdatainfoRef.whereField("ptname", isEqualTo: (ptnameLbl.text!))        .whereField("assignedmd", isEqualTo: (assignedmdLbl.text!))        .whereField("officemd", isEqualTo: (officemdLbl.text!))        .whereField("room", isEqualTo: (roomnumberLbl.text!))        .whereField("seenosee", isEqualTo: (seenoseeLbl.text!))        .whereField("assigneddate", isEqualTo: (assigneddateLbl.text!))    query.getDocuments { (snapshot, error) in        if let err = error {            debugPrint("error getting data: \(err)")        } else {            guard let snap = snapshot else { return }            for document in snap.documents {                let data = document.data()                let ptname = data[PTNAME] as? String ?? ""                let dob = data[DOB] as? String ?? ""                let fin = data[FIN] as? String ?? ""                let officemd = data[OFFICEMD] as? String ?? ""                let assignedmd = data[ASSIGNEDMD] as? String ?? ""                let assigneddate = data[ASSIGNEDDATE] as? String ?? ""                let room = data[ROOM] as? String ?? ""                let diagnoses = data[DIAGNOSES] as? String ?? ""                let reasonforadmitorconsult = data[REASONFORADMITORCONSULT] as? String ?? ""                let goalofhospitalization = data[GOALOFHOSPITALIZATION] as? String ?? ""                let seenosee = data[SEENOSEE] as? String ?? ""                let notestocbo = data[NOTESTOCBO] as? String ?? ""                let comments = data[COMMENTS] as? String ?? ""                let hosp = data[HOSP] as? String ?? ""                let team = data[TEAM] as? String ?? ""                let newPtdata = PTData (ptname: ptname, dob: dob, fin: fin, officemd: officemd, assignedmd: assignedmd, assigneddate: assigneddate, room: room, diagnoses: diagnoses, reasonforadmitorconsult: reasonforadmitorconsult, goalofhospitalization: goalofhospitalization, seenosee: seenosee, notestocbo: notestocbo, comments: comments, hosp: hosp, team: team)                self.patdata.append(newPtdata)                print(document.data())            };print(self.delegate)            if(self.delegate != nil) {                self.delegate?.sendDataFromCell(sender)            }        }    } }}
ResultsdataVC
 class ResultsdataVC: UIViewController, UITableViewDataSource,  UITableViewDelegate { @IBOutlet weak var tableView: UITableView! var ptlist: PTList! var ptlists = [PTList]() var tableVc: PatdataVC! var ptdata: PTData! var patdata = [PTData]() override func viewDidLoad() {    super.viewDidLoad()    tableView.delegate = self    tableView.dataSource = self}func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {    return ptlists.count}func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {    if let cell = tableView.dequeueReusableCell(withIdentifier: "PtlistCell", for: indexPath) as? PtlistCell {        cell.configureCell(ptlist: ptlists[indexPath.row])        return cell    }    return UITableViewCell() }}extension ResultsdataVC: MyCellDelegate {func sendDataFromCell(_ sender: Any) {    self.performSegue(withIdentifier: "gotoptdata", sender: Any?.self)}override func prepare(for segue: UIStoryboardSegue, sender: Any?) {    if segue.identifier == "gotoptdata" {         let vc = segue.destination as! PatdataVC         vc.patdata = patdata    }}

}

patdataVC
class PatdataVC: UIViewController, UITableViewDelegate, UITableViewDataSource {var ptdata: PTData!var patdata = [PTData]()var tableViewCellDelegate: MyCellDelegate?@IBOutlet weak var tableView: UITableView!override func viewDidLoad() {    super.viewDidLoad()    tableView.delegate = self    tableView.dataSource = self}func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {    return patdata.count}func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {    if let cell = tableView.dequeueReusableCell(withIdentifier: "PtdataCell", for: indexPath) as? PtdataCell {        cell.configureCell(patdata: patdata[indexPath.row])            return cell }     return UITableViewCell()}}
PATDATACELL

patdataCell класс: инструменту UITableViewCell {

@IBOutlet weak var ptnameLbl: UILabel!@IBOutlet weak var dobLbl: UILabel!@IBOutlet weak var finLbl: UILabel!@IBOutlet weak var officemdLbl: UILabel!@IBOutlet weak var assignedmdLbl: UILabel!@IBOutlet weak var assigneddateLbl: UILabel!@IBOutlet weak var roomLbl: UILabel!@IBOutlet weak var diagnosesLbl: UILabel!@IBOutlet weak var reasonforadmitorconsultLbl: UILabel!@IBOutlet weak var seenoseeLbl: UILabel!@IBOutlet weak var goalofhospLbl: UILabel!@IBOutlet weak var notestocboLbl: UILabel!@IBOutlet weak var commentsLbl: UILabel!var ptdata: PTData!override func awakeFromNib() {    super.awakeFromNib()}func configureCell(ptdata: PTData) {    ptnameLbl.text = ptdata.ptname    dobLbl.text = ptdata.dob    finLbl.text = ptdata.fin    officemdLbl.text = ptdata.officemd    officemdLbl.text = ptdata.officemd    assignedmdLbl.text = ptdata.assignedmd    roomLbl.text = ptdata.room    diagnosesLbl.text = ptdata.diagnoses    reasonforadmitorconsultLbl.text = ptdata.reasonforadmitorconsult    seenoseeLbl.text = ptdata.seenosee    goalofhospLbl.text = ptdata.goalofhosp    notestocboLbl.text = ptdata.notestocbo    commentsLbl.text = ptdata.comments}}