LibreHealth EHR: Porting to Laravel (8)

Hi everyone,

This thread is open to discuss the “potential move” of the current EHR codebase to Laravel.

This was initially brought up by @pri2si17 and probably I wasn’t around LH yet :slight_smile: who did tremendous work translating the EHR database so that it can be compatible to the Laravel standard. You can find this here -

Thanks @pri2si17 ,

Problem: While the current codebase “works”, it is however really complicated/tough to navigate around especially for a newbie. I perfectly understand that the code was written years ago, probably by the php gurus, yet things have evolved in the way we build modern apps.

I in particular have had several complaints from students (GCI and aspirant GSocers) that the codebase is actually tough to navigate, While this is somehow true, the codebase is really bulky and has a lot of duplicate stuffs here and there. An attempt for example toe refactor assets during GCI 2018 - Moved imgs in images folder to assets/images folder by jonathanzhang53 · Pull Request #1279 · LibreHealthIO/lh-ehr · GitHub which till date hasn’t been complete.

TL:DR The goal is to port the current codebase to Laravel . I took it up as a challenge to do the whole refactoring and porting to Laravel which I spoke to @r0bby about before going ahead. This has seen progress as I began by installing the basic requirements and gathing the work @pri2si17 did here though a little obsolete with the recent changes in Laravel, but with some modifications helped me get a working database seeded with data of my given size.

TECH STACK: Deciding the tech stack is not an easy choice but however I decided to go with what is comfortable to go with and also easy to learn by any newbie.

This will go a long way to address many things such as:

So far I have been working on this and it has known tremendous progress. Currently, I am done with the boilerplate all those stated up have been addressed and need little or no efforts to implement/stretch through out the codebase. Some basic screens I get are shown below

Your inputs and feedback are highly appreciated as this will go a long way to help achieve the desired results.

NOTE: This change was proposed by me and I am committed in seeing that it is realized. Obviously there is a lot to do, so I am calling on everyone interested in making this big change happen to please reach out so that we can have a roadmap and see how to get things done.

This thread will also serve as update on what is being done and what’s left to do.

BR, Mua

5 Likes

This is amazing work!

@lsc – you folks should definitely see this amazing work!

I agree with @r0bby … this is amazing @muarachmann maybe we can call for student volunteers too to assist … I know @pri2si17 has moved on to other things but I would like this change made

1 Like

Great job @muarachmann I am glad you are taking it this direction.

Thanks for the heads up.

Tony

Hello @muarachmann this is great work, I couldn’t find the Repo fo this, I would love to collaborate with you on this

1 Like

Hi, was wrapping up some stuffs, the repo is private, will make it public soon, was writing some detailed installation guides and other stuffs. @prondubuisi sure you are welcome to chime in when ever. Just give me time to publish this. I will let it known. Should be by Thursday or Friday

1 Like

That works @muarachmann, take all the time you need!

Hi @muarachmann this is a great work. Thanks for making it possible and extending my work (it was 2 years old, so I know you have to do a lot of work to get it working). Please let me know if any help is needed. The UI is amazing and now I get a feel that new contribution will attract EHR as it would be more accessible using APIs. Thanks again !! :slight_smile:

2 Likes

Hi everyone,

The codebase has been made public and can be found here - https://github.com/LibreHealthIO/lh-ehr-laravel @prondubuisi, @pri2si17 heads up

Again your feedback and contributions are highly awaited. Also rooms for improvements is allowed. However this is the boilerplate and subsequent code will be written thereoff. The use of Modules - e…g ReportGenerator I included will be used for more modularity and can be coded as entirely different modules or components for pull and plug or activated when needed.

Your contributions are highly awaited to make this a success. Also feel free to invite students around or any other person willing to dig this and release a stable version soon.

Thanks Mua

2 Likes

Thanks Chief. Checking it out!

Don’t forget to star it out :slight_smile:

1 Like

First thing I did. Will be discussing with some friends about the project later on!

Today, I began writing a custom installation script and consequently a middleware will be written for this which will run the commands during setup. like migrations and taking care of creating an admin perharps.

Server Requirements Step.

should there be any other steps needed here, feel free to ping and add

@muarachmann I was thinking what if we dockerize this whole project? It would be easy to setup then. Please let me know if you have other thoughts.

I’d actually like to help with that…unless you folks want to do it…in which case I will step out of the way

Sure it can always be included… maybe you might want to ping @r0bby for that, I am not a docker expert, just know the very basics and have setup a few use cases too but its cool. Aside that, I made the readme explicit and it should be easy to follow along as well.

1 Like

More updates on this

  • Calendar view revamped and almost done
  • Patient Details view
  • Facilities preview/details

Will be working this week on creating/adding users/facilities/patients to the system.

1 Like

@tony, @htuck, @aethelwulffe I am trying to understand the history_data table and schema… I noticed pipes | are being used to separate the property:value for example, I see this in risk factors vv|db|sc|fib|str|hep|gb|ast|ep|cl|coc which tells me what is active or needs to be check. How ever I see this also in exams brs:1:|cec:0:|ecg:0:iohsdoed/eprwe|gyn:0:|mam:2:asdasdasd/sadasd|phy:0:|pro:0:|rec:1:|sic:0:|ret:0:|flu:0:|pne:1:|ldl:0:|hem:1:|psa:0: which i do understand too.

My question arises from the other columns like dc_father, dc_mother which never gets filled or maybe in some other place which I haven’t yet figured out. Also I will like to understand the |currentcoffee|1970-01-01 in the Lifestyle tab and what it means. The codes that appears when you toggle the dropdown.

  • Also the patient histories create each a new entry, is this the expected behavior and where do I get to see all the history as I only get to see the recent (sorted by date limit 1)

PS: I am willing to use json columns for this to be more flexible and elegant.

$table->json('risk_factors')->nullable() values will then go as

[{vv: 0}, {db: 1}, {sc: 1}, {fib: 0}]

This permits me to loop through and know which is active or not. Looking forward to hearing from you.

Mua,

This is a very complex topic (as you may have noticed). It all has to do with the way date stamped (Immutable) medical activities are tracked for the purposes of Meaningful use quality reporting. Frankly speaking it’s all meaningless in LibreHealth EMR, it was designed for OpenEMR (by Brady) when we certified. Since LHEMR is not certified and will not likely ever be then it’s a table that is not used and a bunch of hooks that don’t really need to be there anymore.

The report that they drive have been replace by the Center for Medicare Services (USA) with different methods for doing that kind of thing anyway.

Hope that helps.

I am so glad your are still active and doing well.

—Tony

2 Likes