Three years ago, one of the project leads started the project to migrate the smarty calendar to twig. I have taken up this quest and pushed the rock forward to move the needle. If you would like to join me on this quest to make a major change in OpenEMR. Fork this repo
Make a branch and we can make this change reality. Current status is that the majority of the calendar has been migrated. There are a lot of nuances that need to be migrated.
Right now, we are working on the week view. We finally got the IN/OUT function migrated over. We can use a few more hands and testers because I am sure there will be things I have not thought about.
If you have any question, post them here and I will get to them as soon as I can. Otherwise, fork the repo and start work on the month view. Please let me know ahead of time what you will be working on so that we don’t have 5 people fixing or building the same thing. I would like to have this finished and ready for the lead engineers to bring this into the next version of the program. We can really use some JavaScript developers and UI people on board this project.
Side note: the repo started out as a place where I need to build a facility view. I thought it would be good addition to the calendar because of some difficulties in see all the providers scheduled in a particular facility. I have put that on the side burner for now unless one of you reading this would like to pick up the ball and run with it.
@moussa thanks for the suggestion. The firs thing on Jules site is this
“small feature requests”
What we are doing with the calendar is not a small feature request. I do use Claude to assist with the migration. And it still gets things wrong. But hey, that is life. Best!
Yes, I saw that. When I asked Jules to migrate the Smarty calendar to Twig, it did generate a plan to me. Unfortunately, I’m not a developer and I’m unsure what to expect, though I thought it was worth a shot anticipating adjustments might be needed.
Replace Smarty variables with Twig variables passed from the controller.
Use Twig loops (for), conditionals (if), and includes (include) as needed.
Crucially, apply appropriate escaping (e.g., |escape, |escape('html_attr')) to all dynamic data to prevent XSS, as autoescaping is off.
Utilize existing Twig extensions for translations (e.g., |xlt), date formatting (|shortDate, |oeFormatDateTime), and URL/asset generation if available, or construct them using globals.