Tenth Week of GSoC @ OpenMRS

Time flew so fast as GSoC is coming to a end after two weeks. I have added my GSoC midterm presentation to youtube. If you interested please watch following video.

During this week I have made an improvement to FHIR module. Swagger definition of FHIR module doesn’t contain security definitions section. This is an issue when Swagger SDK generation. Because basic authentication scheme isn’t present, client can’t invoke with basic authentication headers. I have added the fix in https://github.com/openmrs/openmrs-module-fhir/pull/160.

Then I add demo client which uses generated Java SDK in https://github.com/eunice18/demo-sdk-client. Here is very small piece of code to get patient by id.

package org.openmrs.demo.client;

import io.swagger.client.ApiClient;
import io.swagger.client.ApiException;
import io.swagger.client.api.DefaultApi;
import io.swagger.client.model.Patient;

public class DemoClient {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String id = "892b89a2-6823-403b-899c-d7045c0d9b5e"; // String | The ID of the resource
try {
ApiClient apiClient = apiInstance.getApiClient();
apiClient.addDefaultHeader("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
apiClient.addDefaultHeader("Accept-Encoding", "*/*");
Patient result = apiInstance.patientIdGet(id);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#allergyIntoleranceGet");

I’m currently working on improvements to this feature.

Like what you read? Give Eunice Amoh a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.