                     
                     if model.currentStatus.lowercased() == "new" {
                         arr.insert(model, at: 0)
+                        tempModel = model
                         inProgressIndex += 1
                         completeIndex += 1
                     } else if model.currentStatus.lowercased() == "in progress" {

            if self.tableview != nil {
                var inProgressIndex = 0
                var completeIndex = 0
                
                let dic = snapshot.value as? NSDictionary
                var arr = [AppointmentModel]()

                }

                DispatchQueue.main.async {
                    if self.listBlock != nil {
                        if tempModel != nil {
                            self.listBlock!(tempModel as AnyObject)
                        } else {
                            self.listBlock!(AppointmentModel() as AnyObject)
                        }
