It’s the fourth week, and we’re nearly done with the first round of developments. My main objective for the first round was migrating the Operation Theater module to the latest platform, and I’ve completed about 80% of it. There’s just one more thing to finish – to get the scheduler working.
The OT module uses a tool named Optaplanner for scheduling theater activities. It’s an open source constraint satisfaction solver written in Java. We can model the theater planning activity as a constraint satisfaction problem (CSP) and use Optaplanner to get a somewhat optimal solution in a given amount of time. As you might know, CSPs are considered to be either NP-complete or harder.
Let’s start with a few definitions before we get to the nitty-gritty.
Continue reading “GSoC 2017 – Week 4”
This week I was mostly working in checking the functionality of the system, looking at UI elements, following method calls related to surgery CRUD operations etc.
I found a few cases where a surgery validation failed when trying to enter a emergency procedure. The problem was that the surgery associated with the emergency procedure was not properly initialized, which caused it to fail validation. A few breakpoints with IntelliJ IDEA helped to solve that. Special thanks to Gayan Weerakutti for helping me to setup debugging.
Then there were some UI elements that didn’t appear properly. Checked through files and came across a set of JSON files that were apparently used for configuring the UI, but I couldn’t understand exactly how they interacted with the other files. They aren’t imported anywhere. I’m guessing the OpenMRS classloader is specially configured to look at the path they exist and read them if they’re there.
I’ll update this post with more info in a bit.
I’m gonna keep this one short, at least for now. You know the reason.
Last week, we decided to replace the Joda Time library with java.time and ThreeTen-Extra library. And that’s exactly what I did this week.
There were 3 steps to what I did.
- Identifying the replacement classes.
- Understanding the class structure to start the migration from the base classes.
- Figuring out the best match for a given instance of replacement.
It might not look like much, but there was quite a bit of work once I got into it. I had already started off the replacement without much thought in the previous week. But as I later realized, it’s better to first look exactly where and how the base classes are used later.
Continue reading “GSoC 2017 – Week 2”
It’s been one hell of a first week.
First, exams got postponed a week because Sri Lanka was hit with the heaviest floods since 2003. The lower part of the country was basically washed off into the sea. Our thoughts and prayers are with those affected. Exams getting postponed meant I need to cover as much work as I can in this week.
Second, a weird error kept coming up out of nowhere. Some errors, you just gotta erase from your code.
Errors, Errors Everywhere
You know the best part of Java Exceptions? It’s how specific they are. You know the worst part? It’s how specific they are.
Continue reading “GSoC 2017 – Week 1”
This is the official blog for my Google Summer of Code 2017 project. I am going to be working for OpenMRS, an open source project that supports healthcare delivery around the world. It feels great to have been awarded this opportunity, thank you @Team OpenMRS! 😁
My project is to work on the Operation theater module, which has been made as part of GSoC 2014. It’s used to schedule surgeries and other operation theater activities in multiple theaters. The module was written for an older OpenMRS version, so my first task is to migrate it to the latest platform.
Continue reading “GSoC 2017 – Operation Theater Module Workflow Enhancements”
So this started as an assignment but turned out to be quite fun by the end of it. We were asked to make a biometric identification system with Java using any biometric identifier. There was one restriction – no libraries were allowed. Out went OpenCV and pretty much anything that could be made to work reliably within the time-frame of a week.
My first thought was to make a voice identifier – a system in which the distinct features of someone’s voice would be saved in order to identify them uniquely. But that turned out to be far more time-consuming than I thought and involved libraries which I could not adopt. There wasn’t much time to write them myself. So after 3 days of struggling, I switched to keystroke dynamics.
What’s keystroke dynamics? It’s the official term for the unique way you type on a keyboard. Turns out that each of us use a keyboard differently – with more than just a change in overall speed. We spend different amounts of time pressing each key and moving onto another, have our own favourites among the Shift keys and show unique patterns while moving from one key to another. And these little things add up to a relatively strong set of features that can uniquely identify someone.
Continue reading “Biometric Identification with Keystroke Dynamics Using Java”
When Achala asked me to help him out with an electronics class for kids, I didn’t know what I was signing up for. It was in June 2016 – I was free procrastinating uni work, and this seemed like a good distraction. I mean, it was kids. Plus electronics. Kids are fun(!). How hard could it get?
But no, oh no. Joining Igniter Space (formerly KidsIgnite) changed quite a few of things in my life, including some life goals. I’ve seen most, if not all, kinds of kids from angels to brats. I’ve had the chance to teach basic calculus & programming, and clean up snot. I’ve cuddled the cutest of kids, and had my hair pulled off with a plier.
Okay, a little background first for the less fortunate of you who haven’t heard about Igniter Space. Essentially, it’s a makerspace – a place where people gather and work on computing or other technological projects. From the outside, you’re forgiven for mistaking it for an electronics class.
Continue reading “KidsIgnite – How I became the father of 20”
At the time of writing this article, Materialize CSS framework’s Autocomplete widget didn’t work properly with AJAX calls. So I gave it a go myself.
Ideally, the autocomplete widget should have the following features.
- AJAX calls must be made only after a certain minimum number of characters are entered.
- Requests must not be sent until the user stops typing into the box. This means setting a reasonable timeout to check end of typing.
- If a request is already on its way when the user enters more characters, the existing request must be cancelled before sending a new one.
- Clicking a result or outside the results list must close the list.
- Certain keys should not trigger AJAX calls.
- The results must be scrollable with arrow keys and selectable with Enter.
The code looks something like this. A few important things are explained below it.
Continue reading “Materialize CSS Autocomplete with AJAX”