I've always used two variable current hp and max hp being that at the time max hp can be used to be changed if let say an upgrade call for extended life such as 50 more to max hp to total 150 and had it done by if current hp is greater then max hp then set value of current hp to max hp.
This way you can modify the max hp if you are doing a level up or building better ship etc.
You can always used the current hp as a hp display alone but the max hp would be the barrier from going over.