A medical system, comprising a medical device and a control apparatus for providing control data in the medical system, the medical device functionally connectable to the control apparatus for receiving context dependent device control data from the control apparatus, the control apparatus comprising - a portable device ; the medical system being characterized by - an arrangement comprising a plurality of active context data carriers (1.1, ..., 1.n), comprising a first context data carrier placed in a first location of a use environment of the portable device , wherein the plurality of active context data carriers (1.1, ..., 1.n) cover a local area thereby providing a local location reference system; and - a data handling system provided in the portable device , comprising a data input interface , and a device controller functionally connected to the data input interface ; wherein the data handling system is configured to - determine a presence of the portable device within the local reference system by determining that the portable device is in vicinity of one or more active context data carriers (1.1, ..., 1.n); - receive, through the data input interface , first local context data from the first context data carrier, the first local context data being indicative of at least one of location, patient identity, patient activity, and time, wherein the first local context data is received by - receiving, by a receiver of the portable device , the first local context data transmitted by a transmitter of the active context data carrier; - generate, in response to receiving the first local context data, context dependent device control data by the device controller , comprising processing of the first local context data and generating the first context dependent device control data in dependence on electronic context information derived from the processing of the first local context data; and - output, through a data output interface of the portable device , output data indicative of the first context dependent device control data. - a portable device ; the medical system being characterized by - an arrangement comprising a plurality of active context data carriers (1.1, ..., 1.n), comprising a first context data carrier placed in a first location of a use environment of the portable device , wherein the plurality of active context data carriers (1.1, ..., 1.n) cover a local area thereby providing a local location reference system; and - a data handling system provided in the portable device , comprising a data input interface , and a device controller functionally connected to the data input interface ; - determine a presence of the portable device within the local reference system by determining that the portable device is in vicinity of one or more active context data carriers (1.1, ..., 1.n); - receive, through the data input interface , first local context data from the first context data carrier, the first local context data being indicative of at least one of location, patient identity, patient activity, and time, wherein the first local context data is received by - receiving, by a receiver of the portable device , the first local context data transmitted by a transmitter of the active context data carrier; - receiving, by a receiver of the portable device , the first local context data transmitted by a transmitter of the active context data carrier; - generate, in response to receiving the first local context data, context dependent device control data by the device controller , comprising processing of the first local context data and generating the first context dependent device control data in dependence on electronic context information derived from the processing of the first local context data; and - output, through a data output interface of the portable device , output data indicative of the first context dependent device control data. <EOS>