Scottish scientists have developed a low-cost, flexible device that can help prevent blood clots for patients after an operation.