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) and at least one sensor compartment (120), wherein the sensor compartment (120) comprises at least one detachable upper cap (164) and at least one detachable lower cap (166).