The Lunacy Act of 1845 was passed through Parliament simultaneously with the 1845 County Asylums Act. The two acts were dependent on each other.
The Lunacy Act established the Lunacy Commission and the County Asylums Act set forth most of the provisions as to what was to be monitored within the asylums and helped establish the public network of the county asylums.
Like the Lunacy Act, there had been several drafts of this act passed before 1845 and several afterward as well. The most notable of these were the 1808, and the 1853 County Asylum Acts. The Lunacy Act itself was amended several times after its conception. There was a new version written in both 1846 and 1847. Both of these versions were actually repealed by the County Asylums Act 1853.
The importance of these two acts together is that they consolidated Lunacy Law in England. However, no legislation has ever combined the entirety of Lunacy Law. Both of these acts were the basis for Lunacy Law in England until 1890 when both of them were repealed by the Lunacy Act of 1890.