Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!

Ticketing System

This device could be used for any reservations and appointments like hospitals. A patient can choose a doctor whom he/she wants to visit.

58
Ticketing System

Things used in this project

Story

Read more

Schematics

photo_2018-02-09_02-54-41_AqHHfS6Okm.jpg

Code

Untitled file

Python
This part of the code for robot telegram and the graphic part Our project has been,That list of doctors for us,and by choosing the doctor you want the message goes to the selected physician telegram.
from Tkinter import * 
from telegram.ext import Updater, CommandHandler
import telepot
import logging
class App: 
 def __init__(self, master): 
  frame = Frame(master) 
  frame.pack() 
  self.button1 = Button(frame, text="ear , dr.noori", fg="red", command= handle) 
  self.button1.pack() 
  self.button2 = Button(frame, text="heart , dr.amiri", fg="red", command= handle)
  self.button2.pack()
  self.button3 = Button(frame, text="stomach , dr.sarmad", fg="red", command= handle)
  self.button3.pack()
  self.button4 = Button(frame, text="bon , dr.ghasemi", fg="red", command= handle)
  self.button4.pack()
  self.button5 = Button(frame, text="feeding , dr.kermani", fg="red", command= handle)
  self.button5.pack()
  self.button6 = Button(frame, text="ouit", fg="yellow", command=quit)
  self.button6.pack()
def handle(msg):
 chat_id= bot.get_updates()[-1].message.chat_id
 bot.sendMessage(chat_id=chat_id ,text = "visit ok" )
bot= telepot.Bot('538208477:AAHwgVnGZqYzgf_WmUaK-YAE5ukdnNZAIes')
bot.massege_loop(handle)   
root = Tk() 
app = App(root) 
root.mainloop()

Untitled file

Python
This code is for reading from is rfid.We have two files,a file is a list of doctors and another file related to the patient list.
That's by flicking the rfid card id card matches the patient's id An id is detected.
That if the ids match
It works like an electronic insurance booklet.
import Rpi.GPIO as GPIO
import signal
import MFRC522





 
CardIds=[]
continue_reading = True
def end_read (signal , frame):
    global continue_reading
    print "ctrl + c captured , ending read."
    continue_reading = False
    GPIO.cleanup()
while continue_reading:
 file=open('/home/pi/Desktop/data.txt','r+') 
 for line in file:
  String=line
  CardIds.append(String[:-1])
while 1:
 ReadID=ser.read(12).decode('utf-8)
 for x in range(0,NumberOfCardIds): 
      if ReadID==CardIds[x]:
			 print "ID DETECTED"
                
              
    file.close()
    break
ser.close()

Credits

kimiya shirmohammadi
1 project • 3 followers
Contact
shahla
1 project • 2 followers
Contact
nasrin
1 project • 2 followers
Contact
Ehsan Aerabi
18 projects • 60 followers
Researcher on IoT and Embedded Systems
Contact
Erfan Saghabashi
2 projects • 22 followers
Contact

Comments

Please log in or sign up to comment.