Sunday, June 2, 2024

Week One: Kicking Off the GSoC Project with OpenCR | GSoC'24

 


Embarking on my Google Summer of Code (GSoC) journey, I've laid the groundwork for a project aimed at integrating OpenELIS with a FHIR-based Open Client Registry. Here's a recap of the first week and the initial steps I've taken.

Setting Up the Trello Board

To ensure organized progress tracking and issue management throughout this project, I created a Trello board. This board will serve as a hub for all tasks, issues, and milestones, facilitating efficient workflow and collaboration. You can follow along with the board here.

Transforming Match Results into FHIR Bundle Objects

The primary task I tackled this week involved transforming match results returned by Open Client Registry (OpenCR) into a FHIR Bundle object. This task is crucial as it sets the foundation for seamless data exchange and interoperability between OpenELIS and the client registry.

Pull Request Overview

I made significant progress by submitting a pull request, which is currently under review. This PR encapsulates the initial implementation of the transformation process.

Technical Approach

To achieve this transformation, I followed a structured approach involving two main functions: getPatientById and transformToFhirObject. 

The getPatientById function is responsible for fetching patient data from the FHIR server based on an array of match results. Here’s a detailed breakdown of how it works:  For each match result, the function creates a promise to fetch the corresponding patient data using the fhirWrapper.getResource method.  If the patient data contains any links, the function adjusts the URLs to ensure they conform to the required format. It appends a `search` object to the patient data, which includes the match-grade and score.The function resolves the promise with the patient data or rejects it if an error occurs during fetching.

The transformToFhirObject function handles the creation of a FHIR Bundle object by combining the fetched patient data.It first calls `getPatientById` for both "auto" and "potential" match results, fetching patient data with appropriate scores and match grades.  The fetched patient data is then combined into a single array.  A FHIR Bundle object is constructed with the combined entries, setting the `resourceType` to "Bundle", generating a unique ID, setting metadata with the current timestamp, specifying the bundle type as "searchset", and setting the total number of entries. The function logs the results and returns the combined FHIR Bundle.

Moving Forward

With the first week successfully behind me, I am eagerly looking forward to the upcoming challenges and learning opportunities. The next steps will involve refining the current implementation based on review feedback, addressing any issues that arise, and diving deeper into the integration process.

Stay tuned for more updates as I continue this exciting journey of integrating OpenELIS with a FHIR-based Open Client Registry.

No comments:

Post a Comment