GSoC 2018-FHIR Swagger Codegen Integration and Strategic Improvements

Hello, I am Prabodh Kotasthane, 3rd year Engineering student interested in this project. After some study on FHIR, HAPI and Swagger and also on the OpenMRS FHIR module, i have came across some queries.

I have gone through the given links and wiki documentation regarding the FHIR module. I have now understood what is FHIR, what are resources, the RESTful style approach and now i have a basic understanding of this stuff. I now know how the modules are structured in OpenMRS and have once gone through the code of FHIR module also.

One query I have here is what basically are strategies? Are they to be taken literally, like are strategies actually the ways in which we handle the resources? If i am wrong then please guide me about this.

I also went through the past development activities of the FHIR module and read the threads related to have better understanding. :slight_smile:

Now coming to the project, listing the project objectives :

  • Upgrading HAPI FHIR Library to it’s updated version.

  • Upgrading DSTU2 resources to DSTU3.

  • Swagger document generation improvements after library upgrade.

  • Integrate the swagger codegen library which allow users to generate client with selected languages.

  • Research on new FHIR resources which can support for OpenMRS.

  • Improve the test coverage.

I am going to learn about HAPI in more detail soon and will learn about how to upgrade it.For upgrading to DSTU3, I think to know how to do this, i have to go through the code. Am i right?

I have read about swagger and swagger codegen and will now proceed to look forward to how to implement these objectives related to swagger. I just need to know how to proceed in this , I mean , if anyone can help me with some links(sort of), it would be a great help :slight_smile: .

I have a idea about what FHIR resources does OpenMRS presently supports and will surely look forward to research on what more can we have.

Finally, Yes, the test coverage is a thing which always can be improved by identifying more unit tests and writing them. :slight_smile:

Any sort of help and corrections will be of great help and will be appreciated.

Please have a look at this @harsha89. :slight_smile:

Thank you :slight_smile:

4 Likes

Great it would be best to tackle few issues as well.

1 Like

Sure @harsha89. I surely will solve some issues.

Feel free to answer my queries :slight_smile:

Regards, Prabodh

@harsha89 I would like to know more about Swagger Integration. Is it similar to generating a Swagger documentation for a REST API ?

@madushan Generating swagger document is already implemented in to the module. This talks about generating client side code. :slight_smile:

1 Like

@harsha89 Thank you very much for the clarification

Hi @harsha89

I’m Isuranga Perera an undergraduate student at University of Colombo School of Computing. I participated GSoC 2017 and worked on implementing WS-Trust specification for WSO2 Identity Server. In addition to that I have worked on few features and Issues of Identity Server including writing swagger definitions to generate a SCIM 2.0 client(Used for SCIM Outbound Provisioning Connector).

I would like to contribute this project at GSoC 2018. I went through FHIR module as well as core module. So basically we have upgrade hapi library to version 3.2 which is the latest version. If I’m not mistaken Some of the DSTU2 resources already have been upgraded to DSTU3.

Can you bit clarify extra credit requirement “Add security features to manage transactions”. What kind of features you suggest we add to manage transactions?

Appreciate any help.

This part should be removed. Don’t worry about it.

1 Like

Yes.

You can definitely google this and find out more information.

1 Like

sure @harsha89 i have started learning about this :slight_smile:

Regards,

Prabodh :slight_smile:

Hello @harsha89

I’m interested in this project. Can I use https://swagger.io/swagger-codegen/?

Yes you can use it.

@harsha89 I was able to find out modification that we need to do when we’re Upgrading from HAPI FHIR version 2.5 to version 3.2. I have few clarifications to be made before drafting the proposal

  1. What do you mean by “Swagger document generation improvements”? Are you referring to required modifications (to support upgraded version) or some other improvements like code optimizations.

  2. How the user is supposed to interact with the swagger client/server generator? (is it through the swagger-ui)?

  3. What is the current test coverage percentage?

In addition to above queries I have discovered some unnecessary code duplications that we can reduce. Can we include those changes to the scope as well. :slightly_smiling_face:

According to http://hl7-fhir.github.io/security.html , FHIR defines “provenance” and “audit event” resources suitable for tracking the origins, authorship, history, status and access of resources. These audit events can be then further processed by properly authorized application.

ATNA profile can be used to implement audit mechanism but I don’t know whether it is possible to implement it during the GSoC time period (Anyway can continue it after GSoC :grinning:).

In addition to above audit mechanism we can simply use interceptors to audit transactions. This will be a simple implementation that doesn’t require much effort yet former mechanism would be the best because it is used widely throughout health industry.

Appreciate any suggestions.

Best Regards

1 Like

When you upgrade the version there can be changes to resource definitions and etc. So you will need to modify the swagger resource generation.

You can have module UI to download it.

What is the current test coverage percentage?

We need to check it from the build it self.

1 Like

Thanks for the clarifications.

Hello,

I notice that we use FHIR Statement to generate the swagger representation. When I check swagger codegen, it needs to input a swagger to generate the client SDK. Can we intercept the swagger generation and reuse it for this purpose?

1 Like

We will need to move that logic to generic place and reuse.

1 Like

thank you.