<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ayeshmantha Perera on Medium]]></title>
        <description><![CDATA[Stories by Ayeshmantha Perera on Medium]]></description>
        <link>https://medium.com/@ayeshmanthaperera?source=rss-b96e226c05e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vqSpO1XLHyyZyMW-wAdA_g.png</url>
            <title>Stories by Ayeshmantha Perera on Medium</title>
            <link>https://medium.com/@ayeshmanthaperera?source=rss-b96e226c05e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 01 Jun 2026 10:13:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayeshmanthaperera/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[OpenMRS-FHIR Analytics Batch Streaming Mode in Google Cloud Platform]]></title>
            <link>https://ayeshmanthaperera.medium.com/openmrs-fhir-analytics-batch-streaming-mode-in-google-cloud-platform-2f0455de2f5f?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f0455de2f5f</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[fhir]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Thu, 17 Dec 2020 16:43:45 GMT</pubDate>
            <atom:updated>2020-12-17T17:02:21.062Z</atom:updated>
            <content:encoded><![CDATA[<h3>OpenMRS-FHIR Analytics Batch Streaming Mode</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*mQ24Ury2nWpLNa4Y-hQSmg.png" /></figure><p>OpenMRS team is currently working with the Google Cloud Platform team on an Analytical platform that provides a set of tools for transforming OpenMRS data into FHIR based data warehouse.</p><p>The platform supports both Streaming and Batch mode, focusing more on the Batch (Bulk Upload) in this blog post. Batch mode reads the whole OpenMRS MYSQL database, transforms it into FHIR resources, and uploads it to the Google Cloud Platform&#39;s target data warehouse.</p><p>Setting up the platform for Batch mode.</p><p>Currently, the repository for the FHIR analytics platform is in Google Cloud Platform Github itself. You can find it <a href="https://github.com/GoogleCloudPlatform/openmrs-fhir-analytics">here</a>.</p><p>Prerequisites</p><p>You can find the required docker-compose files to set up the required environment in the repository itself.</p><p><strong>Setting up OpenMRS with dummy data.</strong></p><p>You can find the compose file <a href="https://github.com/GoogleCloudPlatform/openmrs-fhir-analytics/blob/master/openmrs-compose.yaml">here</a>. This compose file includes MySQL 5.7 distribution, and you can see a dump attached as a volume to the entry point, which will spin up the database with dummy data.</p><p>You can also see a MySQL.cnf file attached as a volume, which will enable the Binlog in MySQL. This is required when you are trying out streaming Binlog mode with Debezium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*69AxoSaSZOdWYRBhVJbFNg.png" /></figure><p><strong>Setting up the sink FHIR store.</strong></p><p>With the current state, you can point the platform to either an FHIR store in Google Cloud Platform or to point to the local FHIR store you set up for testing purposes.</p><p>I will be focusing on setting up locally since an obvious guide on setting up the FHIR store in Google Cloud Platform is available <a href="https://github.com/GoogleCloudPlatform/openmrs-fhir-analytics#create-the-sink-fhir-store-and-bigquery-dataset">here</a>.</p><p>To set up for local usage again, we have provided a docker-compose file <a href="https://github.com/GoogleCloudPlatform/openmrs-fhir-analytics/blob/master/sink-compose.yml">here</a>.</p><p><strong>Add FHIR2 module to OpenMRS.</strong></p><p><a href="https://github.com/openmrs/openmrs-module-fhir2">FHIR2</a> module is a reimplementation of the FHIR module in OpenMRS using FHIR R4.</p><p>Different modes in the Analytics Platform get used of the FHIR2 module in different ways. Anyhow, in the end, all these modes will be publishing the data to an FHIR store. This highlights the main usage of the FHIR2 module to the Analytics platform.</p><p>Although Streaming AtomdFeed mode uses the <a href="https://github.com/openmrs/openmrs-module-atomfeed">Atom Feed module</a> of OpenMRS to capture different types of OpenMRS resources, it uses the FHIR2 module to get the FHIR object of the relevant OpenMRS resource.</p><p>In Batch mode, we are directly using the FHIR2 module of OpenMRS to fetch the resources defined as search list parameters by the end-user.</p><p>You need to download the latest released version and install the module through the admin page in OpenMRS (or copy that file to the modules directory of your OpenMRS installation).</p><p>Suppose you made it to this point 🤞🏾🤞🏾. Now it’s time to look into the Batch Mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*zmlpybZHUfwIXbD1DaSfKg.jpeg" /></figure><p><strong>More about Batch Mode.</strong></p><p>As of now, the core technology behind the Batch mode is Apache Beam. And based on your requirement, we have defined a few run times for you to execute the Beam ETL Pipeline.</p><ol><li><strong>Direct Runner</strong></li></ol><p>The Direct Runner executes pipelines on your machine and is designed to validate that pipelines adhere to the Apache Beam model as closely as possible. Instead of focusing on efficient pipeline execution, the Direct Runner performs additional checks to ensure that users do not rely on semantics that is not guaranteed by the model. Some of these checks include:</p><ul><li>enforcing immutability of elements</li><li>enforcing encodability of elements</li><li>elements are processed in an arbitrary order at all points</li><li>serialization of user functions (DoFn, CombineFn, etc.)</li></ul><p>Using the Direct Runner for testing and development helps ensure that pipelines are robust across different Beam runners. Besides, debugging failed runs can be a non-trivial task when a pipeline executes on a remote cluster. Instead, it is often faster and simpler to perform local unit testing on your pipeline code. Unit testing your pipeline locally also allows you to use your preferred local debugging tools.</p><p>2.<strong> Data Flow Runner</strong></p><p>The Google Cloud Dataflow Runner uses the <a href="https://cloud.google.com/dataflow/service/dataflow-service-desc">Cloud Dataflow managed service</a>. When you run your pipeline with the Cloud Dataflow service, the runner uploads your executable code and dependencies to a Google Cloud Storage bucket and creates a Cloud Dataflow job, which executes your pipeline on managed resources in Google Cloud Platform.</p><p>The Cloud Dataflow Runner and service are suitable for large scale, continuous jobs and provide:</p><ul><li>a fully managed service</li><li><a href="https://cloud.google.com/dataflow/service/dataflow-service-desc#autoscaling">autoscaling</a> of the number of workers throughout the lifetime of the job</li><li><a href="https://cloud.google.com/blog/big-data/2016/05/no-shard-left-behind-dynamic-work-rebalancing-in-google-cloud-dataflow">dynamic work rebalancing</a></li></ul><p>3.<strong> Spark Runner</strong></p><p>The Apache Spark Runner can be used to execute Beam pipelines using <a href="https://spark.apache.org/">Apache Spark</a>. The Spark Runner can execute Spark pipelines just like a native Spark application; deploying a self-contained application for local mode, running on Spark’s Standalone RM, or using YARN or Mesos.</p><p>The Spark Runner executes Beam pipelines on top of Apache Spark, providing:</p><ul><li>Batch and streaming (and combined) pipelines.</li><li>The same fault-tolerance <a href="https://spark.apache.org/docs/latest/streaming-programming-guide.html#fault-tolerance-semantics">guarantees</a> as provided by RDDs and DStreams.</li><li>The same <a href="https://spark.apache.org/docs/latest/security.html">security</a> features Spark provides.</li><li>Built-in metrics reporting using Spark’s metrics system, which reports Beam Aggregators as well.</li><li>Native support for Beam side-inputs via spark’s Broadcast variables.</li></ul><p>These are defined as separate maven profiles, and you can specify which profiles to run by their id. In this blog, I am focusing more on the direct runner defined in the default profile.</p><p>Currently, the batch mode will dump the output to Paraquest files as well as it will publish data to the FHIR store as well.</p><p><strong>ETL Process</strong></p><p>We are currently using Avro, a binary data structure that stands in the middle as a pass-through format. The resources queried from the OpenMRS FHIR2 module will be in JSON format, which harder to convert in the PARQUET format. But Avro files can be easily converted into PARQUET format.</p><p>The ETL process directly queries FHIR2 resource (JSON) from the OpenMRS FHIR2 module and then converted into Avro data objects using <strong>Bunsen</strong> library, a handy library that helps end-users to load, transform and analyze FHIR data with Apache Spark. We are using the FHIR resource schemas provided by Bunsen to convert openMRS FHIR resources into Avro files.</p><p>These Avro files will be converted into Parquet files using the Beam pipeline in the Batch mode of the Analytics Platform. Later on, we can spin up the FHIR data warehouse using the PARQUET files generated from the ETL Pipeline.</p><p>This is all about what we offer as a Platform for now in the Batch Mode. We will be working on adding more features in the upcoming months. Keep in touch for more updates. Cheers 🤞🏾🤞🏾🤞🏾</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f0455de2f5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020@OpenMRS]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-2020-openmrs-1290c0d8a8ff?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1290c0d8a8ff</guid>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sat, 29 Aug 2020 12:13:00 GMT</pubDate>
            <atom:updated>2020-08-29T12:23:37.473Z</atom:updated>
            <content:encoded><![CDATA[<p>Got selected to participate in GSoC back and with the same community OpenMRS. It’s a great community with a lot of new work going on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*_2NDJphUg3Ly59gv.png" /></figure><p><strong>About the project</strong></p><p><strong>Primary Mentor: Ian Bachler.</strong></p><p><strong>Mentors: Jude Niroshan.</strong></p><p><strong>Student: Ayeshmantha Perera.</strong></p><p><strong>Project Link:</strong></p><p><a href="https://summerofcode.withgoogle.com/projects/#6540918858973184">https://summerofcode.withgoogle.com/projects/#6540918858973184</a>.</p><p>The main idea of the project is to develop a framework that can capture System metrics as well as data metrics in a real-time way with the ability to expose to monitoring tools such as Graphite, Grapahana, Prometheus.</p><p>Currently, the workflow is to get the use of the ActiveMQ based event module which captures Hibernate interceptor based events. (Which fires after completion of transactions) and to feed them into a flat table that records details about the event time type OpenMRS class as well as the resource link to access from the OpenMRS Rest API. This will be the API workflow up to saving these records in a table. So from the client-side, we will be exposing these metrics through Dropwizard which is a great powerful toolkit of ways to measure the behavior of critical components in the production environment. The best thing is we can expose the JMX metric registry with Dropwizard with the built-in reporters. So there is a servelet in Dropwizard which was extended with HTTP servlet which we can use to expose the metrics with an endpoint.</p><h3>Main Influence for the Project</h3><p>What is OpenMRS &amp; Where is it?</p><p>OpenMRS is a software platform and a reference application that enables the design of a customized medical records system with no programming knowledge (although medical and systems analysis knowledge is required). It is a common platform upon which medical informatics efforts in developing countries can be built. The system is based on a conceptual database structure that is not dependent on the actual types of medical information required to be collected or on particular data collection forms and so can be customized for different uses.</p><p>OpenMRS is now in use around the world (see the <a href="https://atlas.openmrs.org/">OpenMRS Atlas</a>), including South Africa, Kenya, Rwanda, Lesotho, Zimbabwe, Mozambique, Uganda, Tanzania, Haiti, India, China, United States, Pakistan, the Philippines, and many other places. This work is supported in part by many organizations including international and government aid groups, NGO’s, as well as for-profit and nonprofit corporations.</p><h3>Main Objective.</h3><p>Create a framework that can capture system and server metrics for OpenMRS.</p><h3>Goals</h3><ul><li>Create a New module with database configurations:- Completed.</li><li>Ability to subscribe to the ActiveMQ service bus to listen to the Hibernate events of selected resources.:- Completed.</li><li>Persist events in a flat structured table in the OpenMRS db :- Completed.</li><li>Extend DropWizard JMX instrumental library to expose System metrics requested.:- Completed.</li><li>Expose DropWizard Server metrics:- Completed.</li><li>Expose Ping Endpoint provided by DropWizard:- Completed.</li><li>Add sample UI to showcase system and server metrics:- Completed</li><li>Add the DAO level and Service level Unit tests for the project. :- Completed</li><li>Add a 3rd party plugin flow for monitoring tools like Graphite and Prometheus:- Completed</li><li>Easy to extend the module for resources required.</li><li>Easy to handle date ranges for the application:- Completed.</li></ul><h3>Project Repository</h3><p><a href="https://github.com/openmrs/openmrs-module-metrics">openmrs/openmrs-module-metrics</a></p><h3>Contributions</h3><ul><li><a href="https://github.com/openmrs/openmrs-module-event/pull/8">EVNT-40: Speed up registering multiple actions for a single class by Akayeshmantha · Pull Request #8 · openmrs/openmrs-module-event</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/commit/c0234a3094b4b8783ce60027ffab085161dd3051">Add DB and Service · openmrs/openmrs-module-metrics@c0234a3</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/commit/b917afc76dacff31b0328f5cf3cb669bb6ab691d">Quick fixes · openmrs/openmrs-module-metrics@b917afc</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/3">Add basic class configs utils and exception classes. by Akayeshmantha · Pull Request #3 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/4">Add monitoring classes from config file. by Akayeshmantha · Pull Request #4 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/5">DB changes and Queries for the scope of the project. by Akayeshmantha · Pull Request #5 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/6">Add serverlet controller to expose metrics. by Akayeshmantha · Pull Request #6 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/7">Enable / disable Prometheus reporter based on global property by Akayeshmantha · Pull Request #7 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/8">METRICS-1: Add util method to build event object by Akayeshmantha · Pull Request #8 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/9">METRICS-2: Add default openmrs columns by Akayeshmantha · Pull Request #9 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/10">METRICS-3: Adding beans without autowiring by Akayeshmantha · Pull Request #10 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/11">METRICS-4: Moving from hbm mapping to annotations. by Akayeshmantha · Pull Request #11 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/15">METRICS-6: Add method to retrieve events based on UUID by Akayeshmantha · Pull Request #15 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/14">METRICS-5: DAO now uses correct table by Akayeshmantha · Pull Request #14 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/commit/af7e820626ed14b6b06595ab107d572ce3932d0a">METRIC-7 : Switch From LocalDateTime to Date. (#16) · openmrs/openmrs-module-metrics@af7e820</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/17">METRIC-8: Capturing Event Attributes by Akayeshmantha · Pull Request #17 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/18">METRIC-9: Add JMX report builder by Akayeshmantha · Pull Request #18 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/23">METRICS-15 :- Add Sample UI to show case Server Metrics. by Akayeshmantha · Pull Request #23 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/22">METRICS-14 :- Add Sample UI to show case System Metrics. by Akayeshmantha · Pull Request #22 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/20">METRIC-10: Add the system metric registration build flow. by Akayeshmantha · Pull Request #20 · openmrs/openmrs-module-metrics</a></li></ul><h3>Talk Thread links</h3><p><a href="https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106">Gsoc 2020: Expose System Metrics For Monitoring.</a></p><h3>Blog Posts</h3><ol><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-2020-openmrs-d328fa022f6b">Initial Blog</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-1st-week-f8d227f4ffd7?source=your_stories_page---------------------------">Week 1</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-2nd-week-48ae8ae5c49d?source=your_stories_page---------------------------">Week 2</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-3rd-week-b3d4e76cb2ba?source=your_stories_page---------------------------">Week 3</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-4th-week-3b5c5a047cd4?source=your_stories_page---------------------------">Week 4</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-5thweek-93974dfd3af7?source=your_stories_page---------------------------">Week 5</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-6thweek-2ac7090a8f32?source=your_stories_page---------------------------">Week 6</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-7thweek-e45314a3c920?source=your_stories_page---------------------------">Week 7</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-8thweek-fc2ea5ba37c5?source=your_stories_page---------------------------">Week 8</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-9thweek-2763d9dbca82?source=your_stories_page---------------------------">Week 9</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-10thweek-c03b53c33916?source=your_stories_page---------------------------">Week 10</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-11thweek-5faade8fd98b?source=your_stories_page---------------------------">Week 11</a></li><li><a href="https://medium.com/@ayeshmanthaperera/gsoc-openmrs-12thweek-4498ce098ad5?source=your_stories_page---------------------------">Week 12</a></li></ol><h3>Future Works</h3><p>Extend the flow and the flat table structure to expose more information on resources.</p><h3>Final Presentation</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9tljr7OgRG8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9tljr7OgRG8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9tljr7OgRG8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a435000ddd1a0be741a07344b2d26ca2/href">https://medium.com/media/a435000ddd1a0be741a07344b2d26ca2/href</a></iframe><h3>Thoughts on GSoC</h3><p>GSoC is one of the main programmes in the world which encourage and helps people to engage in opensource development. The experience it brings to developers is very valuable for there future work.</p><p>As I always mention openMRS is one of the best opensource communities in the world. My mentors were always helpful for me when proceeding on the project. And they motivated me to work towards the end of the project after going through the work I do.</p><p>Finally I would like to thank openMRS community who gave me this opportunity to work with the community and also to Google for organizing such an awesome opensource event for the students.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1290c0d8a8ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 12thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-12thweek-4498ce098ad5?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4498ce098ad5</guid>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sun, 23 Aug 2020 21:53:52 GMT</pubDate>
            <atom:updated>2020-08-23T21:53:52.100Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*29vSs_-ou5hi9GOt.png" /></figure><p>It’s the final week of the coding phase.Nothing much to add in the mean time working on below areas before the final evaluation starts.</p><ol><li>Adding a small UI to showcase system and server metrics.</li><li>Working on the final presentation.</li></ol><ul><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/23/files">METRICS-15 :- Add Sample UI to show case Server Metrics. by Akayeshmantha · Pull Request #23 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/22">METRICS-14 :- Add Sample UI to show case System Metrics. by Akayeshmantha · Pull Request #22 · openmrs/openmrs-module-metrics</a></li></ul><p>That’s it for the week will be publishing another blog in this week with all work done and what’s next on the project.Till then cheers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4498ce098ad5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 11thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-11thweek-5faade8fd98b?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5faade8fd98b</guid>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sun, 16 Aug 2020 22:51:26 GMT</pubDate>
            <atom:updated>2020-08-16T22:51:26.154Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*blyorssLxEk0Zr9A.png" /></figure><p>It’s been 11 weeks now since the start of the coding period now.Code related work for the project has been done.It’s a great pleasure to see the community interests towards the project.The community is awesome as always they are very helpful for each other members.</p><p>After going through the second phase of GSoC my main goal is to finalizing the work on the project.</p><p><strong>What is OpenMRS &amp; Where is it?</strong></p><p>OpenMRS is a software platform and a reference application that enables the design of a customized medical records system with no programming knowledge (although medical and systems analysis knowledge is required). It is a common platform upon which medical informatics efforts in developing countries can be built. The system is based on a conceptual database structure which is not dependent on the actual types of medical information required to be collected or on particular data collection forms and so can be customized for different uses.</p><p>OpenMRS is now in use around the world (see the <a href="https://atlas.openmrs.org/">OpenMRS Atlas</a>), including South Africa, Kenya, Rwanda, Lesotho, Zimbabwe, Mozambique, Uganda, Tanzania, Haiti, India, China, United States, Pakistan, the Philippines, and many other places. This work is supported in part by many organizations including international and government aid groups, NGO’s, as well as for-profit and nonprofit corporations.</p><p>As mentioned above openMRS is very popular among the African countries.And it’s a very well known fact that mobile devices are very popular among these countries.Without having mobile responsive UI it’s very hard for users who are using mobile devices to use the application.This is the main influence for the project to be take part on the GSoC’20.</p><p>I worked on finalizing the below or and getting it merged. last week.</p><p><a href="https://github.com/openmrs/openmrs-module-metrics/pull/20">METRIC-10: Add the system metric registration build flow. by Akayeshmantha · Pull Request #20 · openmrs/openmrs-module-metrics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5faade8fd98b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 10thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-10thweek-c03b53c33916?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c03b53c33916</guid>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Mon, 10 Aug 2020 08:33:25 GMT</pubDate>
            <atom:updated>2020-08-10T08:33:25.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*hdl8xt-ekp23c7Ct.png" /></figure><p>It’s been 10 weeks now since the start of the coding period now. Most of the code related work for the project has been done. There are some bugs to be fixed before moving forward. It’s a great pleasure to see the community&#39;s interests in the project. The community is awesome as always they are very helpful for each other members.</p><p>After going through the second phase of GSoC my main goal is to do the documentation for the project. Up to now have not started working on the documentation since am finalizing the code yet.</p><p>Below is a summary of the work I worked in the past week.</p><p>Exposing system metrics through a servlet</p><p>Exposing server metrics through a servlet</p><p>Working on time range based filtering</p><p>Worked on dao and service layer unit tests.</p><p>Created the below PR which was not merged yet.</p><p><a href="https://github.com/openmrs/openmrs-module-metrics/pull/20/files">METRIC-10 : Add the system metric registration build flow. by Akayeshmantha · Pull Request #20 · openmrs/openmrs-module-metrics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c03b53c33916" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 9thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-9thweek-2763d9dbca82?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2763d9dbca82</guid>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[openmrs]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sun, 02 Aug 2020 17:30:19 GMT</pubDate>
            <atom:updated>2020-08-02T17:30:19.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*RrkYAg5eG2EFg1QL.png" /></figure><p>It’s a great pleasure for me to get through the second phase of the project and passing the 2nd milestone. Most of the work related to the project is almost done. In the last week, I worked on tickets related to the module and got them merged. I finally got the chance to expose the metrics through a servlet that extends the default jmxservlet class of <strong>dropwizards.</strong></p><p>Normally it is easy to expose the servlet with <strong>dropwizard</strong> with their default servlet class it has everything inbuilt. We need to configure a listener that listens to the module startup to register a default metric registry on the application context. But in openmrs we don’t support listeners on servlet context. But we support filters so came up with a class that implements the filter interface. and on the init phase we inject the registry instance which is required by the jmxservlet class.</p><pre>public class MetricsInitializationFilter implements Filter {<br>	@Override<br>	public void init(FilterConfig filterConfig) {<br>		final ServletContext context = filterConfig.getServletContext();<br>        context.setAttribute(METRICS_REGISTRY, getMetricRegistry());<br>        context.setAttribute(METRIC_FILTER, getMetricFilter());<br>        if (getDurationUnit() != null) {<br>            context.setInitParameter(MetricsServlet.DURATION_UNIT, getDurationUnit().toString());<br>        }<br>        if (getRateUnit() != null) {<br>            context.setInitParameter(MetricsServlet.RATE_UNIT, getRateUnit().toString());<br>        }<br>        if (getAllowedOrigin() != null) {<br>            context.setInitParameter(MetricsServlet.ALLOWED_ORIGIN, getAllowedOrigin());<br>        }<br>        if (getJsonpCallbackParameter() != null) {<br>            context.setAttribute(CALLBACK_PARAM, getJsonpCallbackParameter());<br>        }<br>	}	<br> @Override<br> public void doFilter(ServletRequest req, ServletResponse res,     FilterChain chain) throws IOException, ServletException {<br>     chain.doFilter(req, res);<br> }<br>}</pre><p>But it was not a success path it was not injecting the registry instance during the server startup.</p><p>Then we went on to the doFilter phase of the Filter and tried to inject the registry object in that method.</p><pre>public class MetricsInitializationFilter implements Filter {	@Override<br>	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {<br>		final ServletContext context = req.getServletContext();<br>		if (context.getAttribute(METRICS_REGISTRY) == null) {<br>        	context.setAttribute(METRICS_REGISTRY, getMetricRegistry());<br>        }        if (context.getAttribute(METRIC_FILTER) == null) {<br>        	context.setAttribute(METRIC_FILTER, getMetricFilter());<br>        }		chain.doFilter(req, res);<br>	}<br>}</pre><p>Sadly it went on the down path as well. Then thought about injecting the registry in the init method of the servlet. It was not the solution as well.</p><p>Finally, I thought to replicate the jmxservlet in a way that we can inject the metric registry with a custom servlet class so it worked. It was the long story short. Yet I didn’t push the changes.</p><p>Also, I was been able to merge below PR’s last week</p><ul><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/16">METRIC-7 : Switch From LocalDateTime to Date. by Akayeshmantha · Pull Request #16 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/15">METRICS-6: Add method to retrieve events based on UUID by Akayeshmantha · Pull Request #15 · openmrs/openmrs-module-metrics</a></li></ul><p><a href="https://github.com/openmrs/openmrs-module-metrics/pull/14">https://github.com/openmrs/openmrs-module-metrics/pull/1</a>4</p><p>That’s all this week.</p><p>Cheers and hoping to work more in the next few weeks thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2763d9dbca82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 8thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-8thweek-fc2ea5ba37c5?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc2ea5ba37c5</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[openmrs]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sun, 26 Jul 2020 22:15:39 GMT</pubDate>
            <atom:updated>2020-07-26T22:15:39.461Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*BrJnxeFRYk4VdDPt.png" /></figure><p>The global OpenMRS community works together to build the world’s leading open-source enterprise electronic medical record system platform.</p><p>During the 8 weeks of the coding period, I got the opportunity to involve with the community on working toward the main goal to improve health care delivery in resource-constrained environments by coordinating a global community that creates a robust, scalable, user-driven, open-source medical record system platform.</p><p>As usually had the sprint call with my mentors last week and defined the work to be done during the week.</p><p>For the metrics module, we thought of creating a Jira board and maintain project-related tasks there. Below is the task board for the project.</p><p><a href="https://issues.openmrs.org/projects/METRICS/issues/?filter=allopenissues">OpenMRS Issues</a></p><p>So during last week worked on below tickets</p><ul><li><a href="https://issues.openmrs.org/browse/METRICS-4">Move from hbm mapping to spring annotations.</a></li><li><a href="https://issues.openmrs.org/browse/METRICS-3">Remove spring annotations.</a></li><li><a href="https://issues.openmrs.org/browse/METRICS-2">Add default liquibase openmrs coloumns.</a></li><li><a href="https://issues.openmrs.org/browse/METRICS-1">Add util method to build event object.</a></li></ul><p>Below are the PR’s which closed the issues.</p><ul><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/11">METRICS-4: Moving from hbm mapping to annotations. by Akayeshmantha · Pull Request #11 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/10">METRICS-3: Adding beans without autowiring by Akayeshmantha · Pull Request #10 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/9">METRICS-2: Add default openmrs columns by Akayeshmantha · Pull Request #9 · openmrs/openmrs-module-metrics</a></li><li><a href="https://github.com/openmrs/openmrs-module-metrics/pull/8">METRICS-1: Add util method to build event object by Akayeshmantha · Pull Request #8 · openmrs/openmrs-module-metrics</a></li></ul><p>Next week I will be working on finalizing the DefaultMetricServlet which is working as the API endpoint for the custom metric we exposes from the module.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc2ea5ba37c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 7thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-7thweek-e45314a3c920?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e45314a3c920</guid>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sun, 19 Jul 2020 19:58:58 GMT</pubDate>
            <atom:updated>2020-07-19T19:58:58.648Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*DZOVKsgI0Qhao1O6.png" /></figure><p>The global OpenMRS community works together to build the world’s leading open-source enterprise electronic medical record system platform.</p><p>During the 7 weeks of the coding period, I got the opportunity to involve with the community on working toward the main goal to improve health care delivery in resource-constrained environments by coordinating a global community that creates a robust, scalable, user-driven, open-source medical record system platform.</p><p>As usually had the sprint call with my mentors last week and defined the work to be done during the week.</p><p>This week mainly worked on the efficiency of the app and resolving small issues on the activator. Since we are subscribing to all events of the required resource types. We found there is an issue in the Events module. For all the events defined it’s scanning and filtering from a for each loop which has around 5000 records which slows down the process of subscribing to a topic.</p><p>To overcome came up with a solution to filter once and keep track of the classes and subclasses related for other action types.It’s already implemented and waiting to get merged in the events module.</p><p><a href="https://github.com/openmrs/openmrs-module-event/pull/8">EVNT-40: Speed up registering multiple actions for a single class by Akayeshmantha · Pull Request #8 · openmrs/openmrs-module-event</a></p><p>Next week I will be working more towards the omod layer of the app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e45314a3c920" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 6thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-6thweek-2ac7090a8f32?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ac7090a8f32</guid>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[openmrs]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Sun, 12 Jul 2020 12:19:58 GMT</pubDate>
            <atom:updated>2020-07-12T12:19:58.861Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*3wDY8Km2r1I-W5GE.png" /></figure><p>It’s been 6 weeks since the start of the GSoC coding period. After fixing the issue on the activator have some issues related to beans in Spring. Currently fixed it and now the modules API is working fine with the expected workflow.</p><p>I would like to thank @dkaiwa who helped out on fixing the issue last week.</p><p>Currently, the module is capable of capturing events fired by events module and building the related resources object and saving in the database for further reference. Also, it has the capability to filter out objects from the events module as well. We followed the same way that attomfeed module follows on filtering the resource objects which are required.</p><p>Also, I got some time to work with an on fhir module and worked a little bit on it to get the flow of how it works so it will help on writing unit tests for the metrics module. Sent few PR’s which are listed below to fhir2 module.</p><ul><li><a href="https://github.com/openmrs/openmrs-module-fhir2/pull/203">FM2-139: Add initial changes for the related person search. by Akayeshmantha · Pull Request #203 · openmrs/openmrs-module-fhir2</a></li><li><a href="https://github.com/openmrs/openmrs-module-fhir2/pull/211">FM2-214: Add delete operation for diagnostic report resource. by Akayeshmantha · Pull Request #211 · openmrs/openmrs-module-fhir2</a></li><li><a href="https://github.com/openmrs/openmrs-module-fhir2/pull/235">FM2-248:-Update MedicationFhirResource Provider delete method. by Akayeshmantha · Pull Request #235 · openmrs/openmrs-module-fhir2</a></li><li><a href="https://github.com/openmrs/openmrs-module-fhir2/pull/243">FM2-215: Add create, update, and delete methods for Encounter. by Akayeshmantha · Pull Request #243 · openmrs/openmrs-module-fhir2</a></li><li><a href="https://github.com/openmrs/openmrs-module-fhir2/pull/246">FM2-216 :- Add create, update, and delete methods for List. by Akayeshmantha · Pull Request #246 · openmrs/openmrs-module-fhir2</a></li><li><a href="https://github.com/openmrs/openmrs-module-fhir2/pull/212">FM2-212 : Extend allergyIntoleranceResource to support update delete. by Akayeshmantha · Pull Request #212 · openmrs/openmrs-module-fhir2</a></li></ul><p>Looking forward to finalizing the client-side of the metrics module within the upcoming weeks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ac7090a8f32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC@OpenMRS 5thWeek]]></title>
            <link>https://ayeshmanthaperera.medium.com/gsoc-openmrs-5thweek-93974dfd3af7?source=rss-b96e226c05e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/93974dfd3af7</guid>
            <category><![CDATA[openmrs]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <dc:creator><![CDATA[Ayeshmantha Perera]]></dc:creator>
            <pubDate>Mon, 06 Jul 2020 08:20:33 GMT</pubDate>
            <atom:updated>2020-07-06T08:20:33.061Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*Y5ObcehZdja30Z__.png" /></figure><p>It’s the successful 5th week in the GSoC 20. Faced the 1st evaluation by google and successfully went through it on yesterday.And now it’s time to get going with the 2nd phase of the project.</p><p>Last week worked on exposing the data metrics that we agreed upon for the project.</p><p>1 Expose encounters grouped by type</p><p>2 No of newly registered patients.</p><p>Also worked on the basic JMX workflow.</p><p>Separated out JMX report builder and it’s the workflow to separate classes. As well as introduced the service layer which is exposing them metrics to the mood layer as well. Finally got merged the PR by Ian.</p><p><a href="https://github.com/openmrs/openmrs-module-metrics/pull/5">DB changes and Queries for the scope of the project. by Akayeshmantha · Pull Request #5 · openmrs/openmrs-module-metrics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93974dfd3af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>