An indoor, real-time location system (RTLS) can benefit both hospitals and patients by improving clinical efficiency through data-driven optimization of procedures. Bluetooth-based RTLS systems are cost-effective but lack accuracy and robustness because Bluetooth signal strength is subject to fluctuation. We developed a machine learning-based solution using a Long Short-Term Memory (LSTM) network followed by a Multilayer Perceptron classifier and a posterior constraint algorithm to improve RTLS performance. Training and validation datasets showed that most machine learning models perform well in classifying individual location zones, although LSTM was most reliable. However, when faced with data indicating cross-zone trajectories, all models showed erratic zone switching. Thus, we implemented a history-based posterior constraint algorithm to reduce the variability in exchange for a slight decrease in responsiveness. This network increases robustness at the expense of latency. When latency is less of a concern, we computed the latency-corrected accuracy which is 100% for our testing data, significantly improved from LSTM without constraint which is 96.2%. The balance between robustness and responsiveness can be considered and adjusted on a case-by-case basis, according to the specific needs of downstream clinical applications. This system was deployed and validated in an academic medical center. Industry best practices enabled system scaling without substantial compromises to performance or cost.In EROC at UTSW, we deployed a fleet of 142 Raspberry Pis to host the Bluetooth sensors. Raspberry Pis are small, robust, low-cost ($35), and simple-to-install computers that run a Linux distribution. They are powered and connected by four 24V routing switches using power-over-Ethernet with a voltage transformer for each Pi. Thus, they require no additional 110V electric outlets, which eliminates a common safety concern for hospitals. Additionally, because we use a wired connection to communicate with the Raspberry Pis, data transmission is more reliable than with Wi-Fi, and there is no increased burden for the Wi-Fi that might affect patient and staff internet usage. The Raspberry Pis are installed in the ceiling, invisible from the ground, so they do not affect the building's appearance.Many RTLS implementations use fixed parts in the infrastructure, such as Wi-Fi routers, as transmitters and moving parts, such as smart phones, as receivers. While this scheme is convenient for brief applications, it is limited when it comes to mass deployment. For example, the battery life of the moving parts is extremely low (e.g., 1-2 days for smart phones) because of an excessive workload that includes continuous BLE signal scanning and communication with clouds, which makes tracking equipment infeasible. Moreover, smart phones or tags with communication functions are usually more expensive than simple active BLE beacons, and their communication with clouds is not as robust or efficient as wired devices. Thus, considering battery life...