A system for electronic patient care, the system comprising: a network; a facility gateway comprising a device gateway and a clinical server and configured to provide a publish-subscribe service for an application; a device gateway configured for execution by the facility gateway, the device gateway is configured to communicate via the network by providing a web service; a medical device in operative communication with the network, wherein the medical device is configured to communicate with the device gateway using the web service; and a publish-subscribe engine configured to provide the publish-subscribe service for communication between a plurality of applications including the device gateway, the plurality of applications being executed within the facility gateway, wherein only the medical device initiates communications with the device gateway using a web method of the web service, wherein the medical device initiates communications with the device gateway using the web service in accordance with a predetermined periodicity to request a response payload, wherein in response to the medical device initiated communication, the device gateway formats the response payload comprising an availability of a software update, an availability of a queryable datatype and a plurality of current request statuses, wherein each current request status indicates a request for the medical device to transmit a log to the device gateway, wherein the device gateway communicates the response payload to the medical device in response to the medical device initiated communication, wherein the medical device transmits the log requested in the plurality of current request statuses to the device gateway, wherein the device gateway is configured to register a topic using the publish-subscribe service, wherein the topic is an infusion event topic and the device gateway reformats a medical device event received via the web service into an infusion event receivable by a subscriber to the topic via the publish-subscribe engine, and wherein the clinical server is configured to start an auto-programming workflow, the auto-programming workflow comprising: identifying the medical device as corresponding to a target patient; sending a command message to the medical device to load a prescription; the medical device acknowledging receipt of the prescription and displaying a notification; the medical device confirming that a medication matches the prescription; and the medical device sending a message to the clinical server via the device gateway. a network; a facility gateway comprising a device gateway and a clinical server and configured to provide a publish-subscribe service for an application; a device gateway configured for execution by the facility gateway, the device gateway is configured to communicate via the network by providing a web service; a medical device in operative communication with the network, wherein the medical device is configured to communicate with the device gateway using the web service; and a publish-subscribe engine configured to provide the publish-subscribe service for communication between a plurality of applications including the device gateway, the plurality of applications being executed within the facility gateway, wherein only the medical device initiates communications with the device gateway using a web method of the web service, wherein the medical device initiates communications with the device gateway using the web service in accordance with a predetermined periodicity to request a response payload, wherein in response to the medical device initiated communication, the device gateway formats the response payload comprising an availability of a software update, an availability of a queryable datatype and a plurality of current request statuses, wherein each current request status indicates a request for the medical device to transmit a log to the device gateway, wherein the device gateway communicates the response payload to the medical device in response to the medical device initiated communication, wherein the medical device transmits the log requested in the plurality of current request statuses to the device gateway, wherein the device gateway is configured to register a topic using the publish-subscribe service, wherein the topic is an infusion event topic and the device gateway reformats a medical device event received via the web service into an infusion event receivable by a subscriber to the topic via the publish-subscribe engine, and wherein the clinical server is configured to start an auto-programming workflow, the auto-programming workflow comprising: identifying the medical device as corresponding to a target patient; sending a command message to the medical device to load a prescription; the medical device acknowledging receipt of the prescription and displaying a notification; the medical device confirming that a medication matches the prescription; and the medical device sending a message to the clinical server via the device gateway. identifying the medical device as corresponding to a target patient; sending a command message to the medical device to load a prescription; the medical device acknowledging receipt of the prescription and displaying a notification; the medical device confirming that a medication matches the prescription; and the medical device sending a message to the clinical server via the device gateway.