The Health Officer is hereby authorized and directed to make inspections to determine the condition of dwellings, dwelling units, rooming units and premises located within the Borough of Somerville in order that he may perform his duty of safeguarding the health and safety of the occupants of dwellings and of the general public. For the purpose of making such inspections the Health Officer is hereby authorized to enter, examine and survey at all reasonable times all dwellings, dwelling units, rooming units and premises. The owner or occupant of every dwelling, dwelling unit and rooming unit, or the person in charge thereof, shall give the Health Officer free access to such dwelling, dwelling unit or rooming unit and its premises at all reasonable times for the purpose of such inspection, examination and survey, except that the owner, occupant or person in charge thereof shall have the right to refuse such entry for a period not to exceed twenty-four (24) hours. Every occupant of a dwelling or dwelling unit shall give the owner thereof or his agent or employee access to any part of such dwelling or dwelling unit and its premises at all reasonable times for the purpose of making such repairs or alterations as are necessary to effect compliance with the provisions of this chapter or with any lawful rule or regulation adopted or any lawful order issued pursuant to the provisions of this chapter.