A medical device (110) for detecting at least one analyte in a body fluid, a method for assembling the medical device (110) and a method of using the medical device (110) are disclosed. The medical device (110) comprises:• at least one analyte sensor (122) having an insertable portion (134) adapted for at least partially being inserted into a body tissue (200) of a user,• at least one insertion cannula (144), wherein the analyte sensor at least partially is placed inside the insertion cannula (144);• at least one electronics unit (118), wherein the analyte sensor (122) is operably connected to the electronics unit (118);• at least one housing (114), wherein the housing (114) comprises at least one electronics compartment (116) configured to at least partially receive the electronics unit (118) and at least one sensor compartment (120) configured to at least partially receive the analyte sensor (122), wherein the sensor compartment (120) forms a sealed compartment (162) receiving at least the insertable portion (134) of the analyte sensor (122), wherein the sealed compartment (162) comprises at least one detachable upper cap (164) and at least one detachable lower cap (166), wherein the detachable lower cap (166) is configured for detachment before insertion, thereby opening the insertable portion (162) for insertion, wherein the insertion cannula (144) is attached to the detachable upper cap (164), wherein the detachable upper cap (164) is configured for detachment after insertion, thereby removing the insertion cannula (144), wherein the electronics compartment (116) at least partially surrounds the sensor compartment (120).