Thursday, 8 December 2011

A simple, yet powerful design model to manage records

(Published in 2011)


A user interface to create, read, update or delete records (CRUD) is an essential component of any computer system. The existing user interfaces and activities in record management can be further optimized. Some existing CRUD interfaces involve migrating to a few different pages with a different set of controls and different functionalities. This proposed model is developed to achieve all the functions related to record management on the same page with the same set of controls. This model can achieve all the CRUD functionality in a single page with the same set of controls using minimal interactions. This model ensures a higher level of user-friendliness with more efficient resource management. The proposed model can be extended easily to accommodate specific requirements in different situations.


Several entities need to have CRUD functionality even in a simple software solution. The users may view records through the user interface. They may update the viewed record or delete that. The users also need to create new records. This functionality is currently achieved by different systems using a combination of pages. Each page involved has different components with different actions on each page. These systems could have been improved to achieve the same functionality in a simpler and more user-friendly manner. This article discusses a simple, yet powerful model to manage records which have a more user-friendly UI and lesser interactions to achieve the same CRUD operations. This proposed model can achieve all CRUD functions in a single page with the same set of control with minimal interactions.

Existing Modals for Record Management

When users manage records, they have to perform actions like adding a new record, viewing an existing record, altering and updating a selected record or deleting one. In order to achieve that functionality, some systems needed to navigate to a few different pages with a different set of controls on each page.

Some systems provide links like Add New, Search, Edit, Previous and Next, to achieve CRUD functionality. The users have to navigate to different page views at different stages of activities of CRUD functions. The controls appear on one page may be different from another; hence the users have to adapt to different situations depending on the action he is undertaking. Even very popular applications have suboptimal CRUD interfaces. The first examples given here is CRUD functionality is OpenMRS, which is a popular Open Source Electronic Medical Record System. The other example is automatically generated JSF page Cby NetBeans for CRUD operations for Entity Classes.

Open MRS has one page to view a Record, Figure 1. It has several links like "Previous", "Edit",  "Next", "New" and "Search". The page to Edit a Record, Figure 2, is different from the page to view a Record. It has links like "Save" and "Delete" at the bottom of the page. There is another page to create a Record, Figure 3, which is different from previous pages. It has a link "Save", but some links in other pages like "Search" are missing. This example is clear evidence that there are several different pages involved in CRUD operations. Each different page has a different combination of controls. The placement of controls also differs among the pages.

Figure 1: Open MRS interface for viewing a record

Figure 2: OpenMRS interface for Updating a Record

Figure 3: OpenMRS interface for Creating a Record

Figure 4: View during creating a new item

Figure 5: Soon after saving the newly created item

Figure 6: Listing all Items

Figure 7: View after Preparing to Edit a record

Figure 8: View soon after saving changes to an existing record

The modal I developed have following characters.

• Same User Interface for all record management functions.

• Ability to directly navigate to all possible sequence of actions that involves record management.

• Minimizing accidental mismanagement of records

• Simple, user friendly arrangement of the user interface

• Ability to extend the functionality depending on specific requirements.

I have attached two demonstrations of the modal, one using Visual Basic 6, which I used for 8 years now and the other using Java Server Faces, which I finished few days back.
There is a list of the records on the left side of the page. On top of that list, there is a text box to search the records. Immediately below the list, there are three buttons, named here as Add, Edit and Delete. On the right side of the page, the details of the selected record are displayed. Immediately below the details, there are two buttons, namely Save and Cancel. In windows MDI forms, I include a Close button on the right lower most corner as well.
There is two states in my modal, select mode and modify mode. During the select mode the search text box, list box and buttons on the left side are active. The details and buttons on the right are visible, but not active in this select mode. In the modify mode, the details and buttons on the right are active while the others are inactive.

When the window opened or web page requested, the select mode is active. In this state, a text can be entered in the search text box. The list can be clicked and immediately the details of the selected record will be displayed on the right side. If Add button is clicked, all the details are cleared on the right side and page is shifted to modify mode. In this modify mode, no search text can be entered to search box and the list is inactive. After adding the details for a new record, the user has two choices, either to Save the changes or to discard them clicking Save button or the Cancel button respectively. This will bring back the Select mode. In select mode, after selecting a record, Edit button can be clicked and the controls already displaying the details of the record will become editable. After making changes, Save button or Cancel button can be selected as needed.

The Delete button is active only during the Select mode. After selecting the record, which will also display the details of the record immediately, user can click the Delete button to delete it.

Every functionality involved in record management can be achieved in the very same window or the page. The buttons in all situations remain the same place, and the user is not needed to adjust to different views of different states.

This basic functionality can be adjusted to meet different requirements without major modifications. The search box here searches one field of the records, and several search boxes in a tabbed pane can be added to search multiple fields. The list box may contain only one field, like for example, name of grocery items, but can use a table with the name and the price, instead of a list box. At the onset, the listbox can be populated with all the items or it can be populated depending on the search text. If all the items are listed, as the user continue to enter letters to the search box, the most suitable selection can bring to the top of the list or can just remove all the non matching ones from the list. As the search text is expanded, the best possible list may be selected from the list below and its details are displayed on the right side. When that is not suitable in some situations, the selection of a record in the list can be delayed until the exact match is achieved, so the details are not displayed until then. The user can stop entering the remaining search text and directly click on the list below to select and display the record.

The Add, Edit and Delete buttons can be remained active throughout the select mode or it they can be selectively make active or inactive depending on the requirement. Add button can be made inactive if a record is already selected in the list. Edit and Delete buttons can be inactive till an exact selection is made in the list.

If there is need to Edit multiple records simultaneously, select many type of a list box can be used. When multiple selections are made, only the common values of all the selected records will be displayed. Depending on the requirements, the values of all the records can be updated with a single click on Save button.

If users request even lesser clicking of buttons, Edit buttons, Save button and Cancel button can be omitted. In that case, when ever selection is made, the controls displayed on the right will be editable and whatever the changes made will be save when selecting another one or closing the page or the window.

Figure 9: VB6 Demo - Select Mode, before selecting any item

Figure 10: VB6 Demo - Select Mode, after selecting item

Figure 11: VB6 Demo - Modify mode, after selecting one and clicking Edit Button

Figure 12: VB6 Demo - Modify mode, after clicking Add Button

Figure 13: JSF Demo - Select mode, before entering any search text

Figure 14: JSF Demo - Select mode, after entering some search text

Figure 15: JSF Demo - Modify mode after clicking on Edit button

Figure 16: JSF Demo - Modify mode after clicking Add button

First demo, which was developed using VB6, can be downloaded from the link as an installation shield setup in a zip folder. The JSF demo, is available in my local computer with a 512mbits/sec ADSL connection with a dynamic IP, is configured to be accessed through dynamic to static IP site, In that demo, I have used Ajax and whole process is asynchronous.
I did not intend to take any copyrights or patenting and I will be grateful to you if you can give me a feedback.

Implementation of the modal is very simple, and if anyone is interested, I can help or give the source code for the demos.

Latest Updated Article

Blog Article

Contact Details

Name: Dr M. H. B. Ariyaratne, MBBS (Sri Lanka), Postgraduate Trainee for MSc (Biomedical Informatics)

Email :,

Phone : (+94) 71 58 12399, (+94) 91 22 41603

Skype : buddhika.ari

Thursday, 20 October 2011

Overview of The Human Genetics Unit (HGU)

(Published in 2011)

The Human Genetics Unit (HGU) of the Faculty of Medicine, University of Colombo is the only centre in Sri Lanka dedicated to providing clinical genetic services including genetic testing and genetic counselling. At the moment, the record-keeping in the HGU is done manually through a paper-based system.

This system is introduced to keep all the records electronically so that the entering, retrieving and analyzing the data will be optimized with the use of Information Technology. At the moment, this is under evaluation and yet to be tested prior to the acceptance as the functioning system.

OpenMRS is used as the platform which has been extensively customized to achieve the functionality. Modules have been developed and added to the OpenMRS where customization alone is not sufficient to meet the specific requirements.

The system is a client and server-based system. There is a central application server and a data server. The clients can access the system through internet browsers through intranet or internet.
The system is developed initially by Dr M. H. B. Ariyaratne as the project for the MSc(Biomedical Informatics). Administrators can be added as needed as authorized by the Head of the HGU, and they will have to capacity to improve the system further. The source codes for the modules added are also available in the application server at the HGU.

The ownership and the authority completely lie with the Head of the HGU. The administers when appointed by the HGU, can manage the other users and the system. The other users are given the privileges to access the system in the way that they are allowed to use the system to achieve their specific tasks while preventing the access of unwanted features.

Sunday, 21 August 2011

Why OpenMRS?

(Published in 2011)

I have made up my mind to adapt an opensource software as my final MSc project. Then the question was what is the best open-source software that I can use to achieve the goals of my project. I have gone through several available options and finally, I decided to go for OpenMRS. The strategic and personal reasons that made me come to the conclusion are listed below.

OpenMRS is based on Java Enterprise Edition. I have been studying and practising JEE in the recent past and I have very good faith in its capabilities. Java Persistence API is a very useful technology and it is used in openMRS to connect to the database. MySQL, which is commonly used as the database is also very familiar to me.

Modular Based
Grater Popularity
Good Community Support
Robust data Model
Comply with health standards

Adapting Open Source Vs Build From Scratch

(Published in 2011)

At the onset, I was planning to develop an Electronic Health Record System from scratch. I have been developing medical software for six years and there is one electronic health record system developed by myself that is practised by five general practitioners in Sri Lanka. I have been improving the system design depending on the feedback and I had only to develop cording in Java. When I presented my project proposal in front of my supervisor, they thought that is a project for the lifetime and advised me to customize or develop a module for OpenMRS instead of developing one by myself. I am comparing the methodology of adopting open-source software and developing one from scratch.


The chances that I can build the relevant solution without many compromises is more when I develop it. If I adopt another system, there may be some essential features that is missing and difficult to add on in the already available system whereas there may be several features that need not be there according to system analysis.

For example, when adding details of an encounter, the observations needed to be categorized to categories and subcategories. That feature was missing on OpenMRS. OpenMRS had a feature like Regimens, which was not a system requirement.

Architectural Choices

The choice of selecting what are the technologies I use can be decided by myself when I want to develop the software myself, whereas we have to adhere to the choices of someone else when we adopt open-source software.

OpenMRS uses Hibernate as the JPA implementation library and I prefer to use Eclipse Link which is more efficient. (1,2) Instead of JSP and Spring Framework which are used in OpenMRS and I would love to use JSF, the new front-end framework(3,4) from ORACLE itself.

Smaller Footprint

What the programmer need to code to develop custom made software are limited and hence the resources. The codebase used in already available software generally have more code and hence use more resources.

Learning Curve

The custom made software is developed in familiar technologies and well-practised methodologies. When adopting another one's code, there are new things to learn and will take some additional time to master the coding. In fact, many developers hate to go through someone else's code. When an error is found, debugging is difficult as the code is someone else creation, which is not familiar to the one who is adapting.

Online Support

When a custom made software is developed, the issues arise that need support is related to technologies like Java and MySQL. They have a wider audience and the support available online is huge. There are thousands of sites which host forums to address the issues related to Java. In contrast, the issues arise are more or less related to the software alone. There is mostly one site which allows forums and mailing lists and the support community is very limited.

Why rebuild?

These days it is not that uncommon to find a ready-made software that meets most, if not all, the requirements of the system. In such a situation, it is a fair question to ask why does someone else has to redo the same again. They have addressed the issues like security and no need to waste human resources on building the same over and over again. If the available solution is an open-source, that will also allow adaptation of the system to match to very fine customization needed by the system requirements. If adaptation is done systematically after a good background analysis about all the possible solutions, there can be saving of a significant amount of money and time.

Still Custom

Already available open-source ready-made software can also be considered still as custom made. In fact, someone can make it a custom software.


Community effort of several volunteers with expertise in different fields like Java or MySQL. The quality of software developed by many can not even be compared with a custom made product by one or a few developers with a limited number of fields.

Budding concepts

The person who is developing a new software may be having some concept that has the potential to modify the future of the industry. Such new concepts are not always applicable when adapting another product. If everyone get used to adapt something already exists, there will be slower development of the industry.

After considering the benefits and risks of each method, finally I decided to select adopting an open-source EHR rather than developing one of my own in developing a system as my MSc project. Up to now I have no regrets.

What problems are addressed in my MSc project?

(Published in 2011)

The data collected from patients, although classified as genealogical, demographic, phenotypic or sequential, are actually components of what we can extract from the same living being. (9) The necessity to have them all in a single platform is still to be addressed. (10) There is a huge list of genealogical websites that collect and display the family history details, but almost all lack the ability to add clinical or laboratory details. There are some good web services, mainly EHR systems and LIS, which handles clinical and laboratory details, but hard to find one that incorporates genealogical details and sequential data. (11)

The sites that cater to the general public, mainly genealogical sites, usually do not facilitate clinicians or scientists to add details. (12)The sites, those can be categorized as EHR and LIS, do not allow the participation of the patients as users. (13) (14) The sites that maintain clinical databases may not always provide highly useful data for researches due to confidentiality issues. A significant proportion of the general public may be willing to reveal their data anonymously to researchers, but they don’t get a chance to take control of the destiny of data originated from them.

Deliverables of my MSc project

(Published in 2011)

  • Project Proposal
  • Project Management Plan
  • Project Schedule
  • Software Requirements Specification
  • Software Design Description
  • Implementation Model: Code and System
  • Module to be incorporated for the OpenMRS
  • Software Quality Assurance Plan
  • User Manual

My MSc Project

(Published in 2011)

I am Dr M H B Ariyaratne. I am a trainee for MSc (Biomedical Informatics) at Postgraduate Institute of Medicine, University of Colombo, Sri Lanka. This blog was mainly developed as a self-assessment tool for me on the progress of my project. This will help my supervisors and examiners to have an evaluation of my work. This blog will also help the internet users to get some details related to health informatics, bioinformatics, software development and general facts on medicine and IT.


Development and Implementation of a module for OpenMRS to address the unmet needs of the Geneticists.


Prof. Vajira D. W. Dissanayake
Dr. (Mrs.) Nilakshi Samaranayake


The general objective of my project is to introduce the concept of a platform where there is interactive participation and collaboration of general public, genealogists, geneticists, clinicians and researchers to store, retrieve and analyze personal, demographic, genealogical, clinical, laboratory and sequential data.
My specific objective is to develop a module for OpenMRS, which will add the above capabilities to the existing open-source platform.


I will create an OpenMRS ID and sign up for the developer and implementer mailing lists. I will also start using the OpenMRS Community RSS Feed.
Then I will configure the Eclipse environment which will be used as the IDE. Then I will start creating my first OpenMRS module. I can click “Request Code Review” and a core developer will get me some feedback.
The development of the project is planned to follow the Spiral modal of software design. At the onset system requirements are defined in as much detail as possible after interviewing geneticists, clinicians, genealogists and the general public. A preliminary design is created initially which is a scale-down system which represents an approximation of the characteristics of the final product. The first prototype will be evaluated to identify the strengths, weaknesses and risks, where the feedback will be used to build the next prototype. The same process will be repeated as necessary until a thoroughly evaluated and tested final system is developed. Afterwords routine maintenance is carried out on a continuing basis to prevent large-scale failures and to minimize downtime.
The final product will be a module that can be included in the OpenMRS core modules. Client tire and application tire will be mainly developed using Java Enterprise Edition. JavaScript, CSS, and Ajax will also be utilized in developing client tire architecture. The data tire is built on my-SQL which will be connected to application tire through Hibernation technology all of which are the standards for OpenMRS.


  • Project Proposal
  • Project Management Plan
  • Project Schedule
  • Software Requirements Specification
  • Software Design Description
  • Implementation Model: Code and System
  • Module to be incorporated for the OpenMRS
  • Software Quality Assurance Plan
  • User Manual

What is the Role of Genetics in Clinical Medicine?

(Published in 2011)
Genetic maker tests for individuals are currently available at affordable prices. With the rapid decline in sequencing cost, an exponential increase in the availability of complete personal genomes is expected in the near future. As modern clinicians are becoming more interested in the genetic contribution of disorders of their concern, the availability of genetic data on the desktop will be very informative. (8)

What is genealogy?

(Published in 2011)
Usage of family trees has been there for centuries, mainly for the purpose of tracing the ancestry. Family trees, fortified with the clinical details are commonly used to represent or recognize repetitive patterns of behaviour of phenotypes that punctuate relationships are commonly described as pedigrees or genogram. When the information technology was applied to almost every field imaginable, several software and websites were developed to cater for these genealogical requirements.

What is an open source or a free Electronic Health Record System?

(Published in 2011)

Open-source software are those available in source code form, often developed in a public and collaborative manner. In contrast, closed source software developers pose restrictions to access the original source code.

There is a long list of proprietary Electronic Health Record Systems available for commercial use with advanced features and good customer support. As there is a shift of the whole IT industry towards open source software, few useful open source projects to develop Electronic Health Record Systems are initiated in the last decade.

Table 1: List of Open Source Medical Software

Hospital OS
Open Dental
OSCAR McMaster

There are advantages and disadvantages for each open source Electronic Health Record System.

OpenMRS is one of the leading open-source electronic health record systems which outperform most of its competitors from several aspects.

What are the benefits of Electronic Health Record Systems?

(Published in 2011)

In the Fifth Century B. C., Hippocrates wanted to have two main goals for medical records. It should accurately reflect the course of the disease and indicate the probable cause of the disease. These goals are still valid to today, either with the paper-based or electronic health records. Although paper-based clinical records address the basic goals, electronic health records systems can also provide additional functionality which cannot be achieved by existing paper-based systems. (3)

Advantages (4)

Improve the quality of care
Reduction in medical errors
Promote evidence-based medicine
Record keeping and mobility
Interactive alerts
Better financial and operational outcomes


Startup costs
Implementation Costs
Training Costs
Software Maintenance Costs
Privacy Issues
Legal Issues
Technical Issues

What is an Electronic Health Record System?

(Published in 2011)

Health is one of the major fundamental requirements of mankind. Every religion has emphasized the importance of the health to the human being and accordingly the value given to the healer’s role is enormous in every culture.

A health care provider, an individual or an institution, that provides preventive, curative, promotional or rehabilitative health care services in a systematic way to individuals, families or communities, is an essential element of every community.

Paper-based records have been in existence for centuries helping the healers to heal the ill more efficiently. Even Hippocrates had used medical records in the fifth century B. C. As the information technology is invading every possible field that exists today, the paper-based medical records are slowly but steadily been replaced by computer-based records. Although computerised information systems have not achieved the same degree of penetration in healthcare as that seen in other sectors such as finance, manufacturing and transport industries, it is only a matter of time to see physicians count on electronic health records systems instead of straggling to get details of their patients searching bundles of paper-based clinical notes.

While there are many accepted definitions of Electronic Health Record Systems, most agree to the definition by the Health Information management Systems Society’s (HIMSS) stated below. (1)

“The Electronic Health Record (EHR) is a longitudinal electronic record of patient health information generated by one or more encounters in any care delivery setting. Included in this information are patient demographics, progress notes, problems, medications, vital signs, past medical history, immunizations, laboratory data and radiology reports. The EHR automates and streamlines the clinician’s workflow. The EHR has the ability to generate a complete record of a clinical patient encounter – as well as supporting other care-related activities directly or indirectly via interface – including evidence-based decision support, quality management, and outcomes reporting.” (2)

Why I selected Bioinformatics as the elective for MSc in Biomedical Informatics?

(Published in 2011)

After two semesters of MSc (Biomedical Informatics), the trainees were requested to select one of the four electives as the elective.

The available choices were

  • Public Health Informatics
  • Health Policy Group
  • IT for medical informatics
  • Bioinformatics.

It was difficult to select one, at least between public health informatics and bioinformatics.

I have no intention of taking IT for Medical Education as that was not of my choice. I have no good liaison or communication skills to join the policy group. Hence, the choices were limited to Public Health Informatics and Bioinformatics. As I had designed several medical software, I thought Public Health Informatics will be easy for me. I was also interested in genetics. It was one of the rapidly developing fields in science, where miracles are expected in a not so distant future.

Most of the Bioinformaticians are from the field of mathematics, IT or statistics background. It will be difficult to compete with them in case of developing new tools or algorithms for bioinformatics, yet I like challenges.

Finally, I thought there is a place for me I Bioinformatics and Bioinformatics has a place for me. So I am doing bioinformatics as my elective.

Who am I

Published in 2011
Updated: February 2020
(Photo in 2012)

I am Dr. M. H. B. Ariyaratne.

I am a medical doctor who is currently working on health informatics.

I have developed open-source health applications that is used by hundreds of users round the clock automating mission-critical health care delivery workflows in more than 40 healthcare institutions of Sri Lanka.

I was born on the 14th September 1975 in Galle, Sri Lanka. I completed my education up to the G. C. E. (O/L) at Mahinda College, Galle, Sri Lanka. I attended to Royal College, Colombo 7, Sri Lanka for my G. C. E. (A/L). I was selected to the Faculty of Medicine, University of Ruhuna, Karapitiya from my first attempt from the advance level examination in 1994.

I was from the 18th batch of the Faculty of Medicine. I completed my 2nd MBBS in 1998 with a 2nd Lower Class. I completed my 3rd MBBS in 2000 with a 1st class with distinctions in Microbiology, Community Medicine and Pathology. I completed my Final MBBS in 2002 with a 2nd lower class. I was ranked the 10th from the all island list initially and later ranked the 12th after inclusion of graduates from the Jaffna faculty.

When I was a schoolboy at Royal College, we had two periods of Computer Studies for a week. I started my programming carrier with gw-BASIC in 1993.

In 1994, soon after my A/L Exam, my father bought me a 386 desktop computer from Tec Sri Lanka. There was no hard disk. The RAM was 1MB. I started my programming with gwBASIC, dBase, PASCAL and then Q-BASIC.

My medical faculty life started in later 1996. During the faculty life, my father bought me the second computer, a Pentium III 650MHx machine. I achieved some milestones as I did a nice presentation driven colours night in 2000 at the faculty. The multimedia presentations with graphics and animations were relatively rare at that time and everyone was very impressed. I was invited to make a similar multimedia presentation for the Colours Night of Richmond College, Galle in 2001. I did several works for the faculty using MS-Office, Photoshop and Illustrator. Everyone in the medical faculty recognized me a computer guy. Even the head of IT of the faculty intermittently sought my help in technical matters which he could not manage himself.

I was working as a Demonstrator at the Department of Surgery, Faculty of Medicine in 2002/2003. I helped the Head of Surgery to conduct few research activities by creating and testing data entry forms, making MS-Access database and data analysis using EpiInfo.

I married Niluka Gunasekara in 2002. At my wedding, I projected presentations with songs and visuals. Live proceedings of the wedding also projected in between. The family and friends have not witnessed a similar multimedia experience at that time. I still enjoy those memories.

I did my internship at Teaching Hospital Karapitiya. I did medicine with Dr. Wasantha Kodikaraarachchi from 2nd March 2002 for 6 months. The next six months, I was doing my internship as a Surgical HO in the Professorial Surgical Unit. My consultants were Dr. M M A J Kumara and Dr. J P M Kumarasinghe. During my internship, I hardly could touch the computer due to a very busy schedule.

After completing my internship, I worked as an RHO (Surgery). I was transferred to Base Hospital, Kamburupitiya for my first post-intern appointment alone with my wife. We were first on call Obstetrics & Gynaecology Medical Officers for 5 years there. During that time I started my part-time private practice as a general practitioner. I had time and money to spend on IT during my stay at Kamburupitiya. I started developing medical software. My first software was an Electronic Medical Record system for myself. Some friends of mine, like Dr Jagath Samarasekara, was interested and started to use it. Several other friends of mine, namely Dr Veditha Banduwardhana, Dr Gayaman Dissanayake and Dr Chrishantha Widisinghe helped me to add new features to the EMR system. Later I started developing other medical software like laboratory management system, medical channeling management system, pharmacy management system and inpatient management system.

I had several requests to develop non medical software as well. As there was a great demand for the software, I employed five employees, who are very talented in their fields. Mr. Sudesh Pathirana was the chief programmer. Mr. Thilina was handling the marketing. Mr. Janaka Sampath and Chamath Prasanna were the hardware guys. Mr. Rangana was handling the accounting and also helped the development with his accounting knowledge. Miss. Nalika Sewwandhi was the receptionist and did the data entry and program testing.

By 2010, my software was running in more than 20  healthcare institutions in the Southern Province of Sri Lanka. I was losing lot of money from software business because of the company overhead expenses. Most of the money I spend from my private practice had to be spent to cover up the expenses of the software projects.

From the annual transfer list of 2009, I was transferred back to the Teaching Hospital, Galle. I was working as a Medical Officer in Radiology.

I was selected to follow an MSc (Biomedical Informatics) programme conducted by the Postgraduate Institute of Medicine, University of Colombo, Sri Lanka. In 2012, I completed the MSc and started working as a Medical Officer(Health Information) at the Department of Health Services, Southern Province, Sri Lanka from 2012 to 2015. During that time, my contribution to achieve national productivity awards, national quality awards and ISO 9001:2008 were appreciated by the Provincial Director and the rest of the staff of the Provincial Department. I also developed several systems that are still been used in Medical Administration Workflows.

In 2012, I converted my Hospital Information Management System to an Open Source System with an MIT license. It was hosted in Github. Several young boys who passed out from the ATI(Labuduwa) and College of Technology contributed to the Open Source Project. By 2019, it was running in more than 40 healthcare institutions.

In 2015, I was appointed as the DMO (or officially Medical Officer in Charge) of the Divisional Hospital, Unawatuna. Under my leadership, I could achieve the runner's up for the Best Divisional Hospital in Southern Province in a competition called "Dakshina Suwa Viruwo 2016". It accesses the service care delivery in addition to quality, productivity and patient safety.

I was then selected to MD(Health Informatics) in 2019. I completed MD in 2019. I was attached to the Management, Development and Planning Unit of the Ministry of Health as a Senior Registrar in Health Informatics. Until then I was not given any role in the government sector to develop software despite several requests. Luckily, Dr Anil Samaranayaka, the Director of Health Information, identified my capabilities. Despite some severe resistances, he convinced the Ministry to allow me to design a system for Healthy Lifestyle Clinics of Sri Lanka. With the help of several of my colleagues, I was able to develop a system that is now been used in several HLC clinics in Sri Lanka. I am currently working on improving the software so that Dr Anil Samaranayaka will not have to regrate his decision to support me when so many were against that idea.

Currently, I am attached to the University of Southampton as a Commonwealth Digital Health Fellow.