iOS Patient App, Master Node Code and Slave Nodes Code