@Cuistot7 This is fairly straight forward and if you not a coder then it is doable with widgets which the best way for upgrading. Get the ICE tools for your version and search on EpicCare for cookbook.
Here is a thread with similar code that should also work for what you are needing, but again widgets would be the best route.