A micropackaged electronic device (100, 205, 410, 500, 855, 865) for use as an implantable medical device, said micropackaged device (100, 205, 410, 500, 855, 865) comprising: a device (110, 105, 112) to be packaged; a substrate for securing the device (110, 105, 112) to be packaged; an encapsulation material layer (125, 135, 221, 225, 435, 437, 517, 533) configured to create an enclosed housing; characterised by wherein said substrate is a thin-film substrate, which comprises a first thin-film layer, a metal adjacent to the first thin-film layer and a second thin-film layer adjacent to the metal to form a thin-film metal thin-film sandwich; at least one elongate hermetic feedthrough (133, 165) disposed in said thin-film substrate and disposed in apertures of said micropackaged device (100, 205, 410, 500, 855, 865) to come out of the encapsulation material layer (125, 135, 221, 225, 435, 437, 517, 533), to permit at least one input and/or at least one output line into said micropackaged device (100, 205, 410, 500, 855, 865) without degrading a hermeticity of the enclosed housing of said micropackaged device (100, 205, 410, 500, 855, 865); and a corrosion barrier (120, 211, 213, 422, 825) affixed to said thin-film substrate, wherein said corrosion barrier (120, 211, 213, 422, 825) is made from a low-permeation material, wherein said low-permeation material comprises at least one of glass, metal, ceramic, parylene, PET, and PVC, and said corrosion barrier (120, 211, 213, 422, 825) is affixed to said thin-film substrate with an adhesive, wherein the encapsulation material layer (125, 135, 221, 225, 435, 437, 517, 533) is configured to hermetically seal the device (110, 105, 112), the substrate and the corrosion barrier (120, 211, 213, 422, 825). a device (110, 105, 112) to be packaged; a substrate for securing the device (110, 105, 112) to be packaged; an encapsulation material layer (125, 135, 221, 225, 435, 437, 517, 533) configured to create an enclosed housing; characterised by wherein said substrate is a thin-film substrate, which comprises a first thin-film layer, a metal adjacent to the first thin-film layer and a second thin-film layer adjacent to the metal to form a thin-film metal thin-film sandwich; at least one elongate hermetic feedthrough (133, 165) disposed in said thin-film substrate and disposed in apertures of said micropackaged device (100, 205, 410, 500, 855, 865) to come out of the encapsulation material layer (125, 135, 221, 225, 435, 437, 517, 533), to permit at least one input and/or at least one output line into said micropackaged device (100, 205, 410, 500, 855, 865) without degrading a hermeticity of the enclosed housing of said micropackaged device (100, 205, 410, 500, 855, 865); and a corrosion barrier (120, 211, 213, 422, 825) affixed to said thin-film substrate, wherein said corrosion barrier (120, 211, 213, 422, 825) is made from a low-permeation material, wherein said low-permeation material comprises at least one of glass, metal, ceramic, parylene, PET, and PVC, and said corrosion barrier (120, 211, 213, 422, 825) is affixed to said thin-film substrate with an adhesive, wherein the encapsulation material layer (125, 135, 221, 225, 435, 437, 517, 533) is configured to hermetically seal the device (110, 105, 112), the substrate and the corrosion barrier (120, 211, 213, 422, 825).