The variable @type can no longer be used to declare whether the current ...

...active measure tab is 'logic' or 'patient_results' due to the change in commit 5cda431488c2b9fb65cac04e1ce1519131d06c9e. This renames the variable to @view_type so there is no longer a conflict.