CIP4001 view.jsp refactoring (JavaScript) and providing reportDataAvailable flag via each patient detail