GSoC 2017 - FHIR Module Enhancements

Hello Everyone,

I found this project interesting. I did two bug fixes in FHIR module. I got basic idea how the module is arranged. I would like to work on this project idea.

I went through the FHIR standard and find in very interesting. I went through the project page and there is a objective to upgrade FHIR resources to use DSTU3. Document in here says it’s not finalized it. Do we need to update it?

I checked the swagger generated from the FHIR module. Then check the swagger code generator of the swagger in here. We can do the code generation using swagger code generator. Will that be good?

One objective to add new resources and methods. How can I find them?

Thanks, Kwateng

@kwateng Thanks for your interest on this project. [quote=“kwateng, post:1, topic:10613”] I found this project interesting. I did two bug fixes in FHIR module. I got basic idea how the module is arranged. I would like to work on this project idea. [/quote]

This is a good start. But keep doing contributions.

This will something we need to research further and discuss. If DSTU3 comes out soon we should do it.[quote=“kwateng, post:1, topic:10613”] I checked the swagger generated from the FHIR module. Then check the swagger code generator of the swagger in here. We can do the code generation using swagger code generator. Will that be good? [/quote] Swagger codegen is a good option but it’s better to research more on existing tools and evaluate further.[quote=“kwateng, post:1, topic:10613”] One objective to add new resources and methods. How can I find them? [/quote]

If you go through the available resources in OpenMRS and available resources in FHIR standard you should be able to find out.

1 Like
1 Like

Thank you very much @harsha89 and @pascal. Will go through the suggestions and resources.

Thank you all for resources. I checked the HAPI library, they released new version. I’m checking the latest features available in the release. @harsha89 I have questions.

Do we need to support both DSTU2 and DSTU3?
For the new resources, should I check DSTU2 or DSTU3?

I couldn’t find better codegen than swagger codegen. Anyone knows better codegen let me know.

Thanks, Kwateng

Then we can update FHIR module to the latest version.

I need to look whether we want to support both DSTU2 and DSTU3. Since module is not used in production, we can directly support DSTU3 and remove DSTU2. Please read whether it’s required support both the versions.

Since the newest version is DSTU3, I would recommend you to go through it.

Thanks, Harsha

1 Like

Thank you very much. It helped me in creating the proposal.

Hi Everyone,

This is to give you an update on the current work.

Today I had a call with my mentor @harsha89. I have analyzed all the resources of newest FHIR release. I attached document with my evaluation. I found Medication and MedicationRequest as resources we can add to the FHIR module.

I upgrade the HAPI FHIR version and create a pull request https://github.com/openmrs/openmrs-module-fhir/pull/131

All resource analysis can be found in below PDF. FHIRSTU3Resources.pdf (144.0 KB)

If you find any resource which we can support instead of Medication. Let me know.

Thank you!

FHIR has released 2.5 version on June 8. Let’s upgrade the module to use that version as well. As we discussed on the call before we implement new resources, we will need to migrate to STU3 version. Some resources are changed. I went through your PDF, it contains all the STU3 resources. Thanks for evaluating each of FHIR resource.

@burke @surangak @dkayiwa please go through the PDF and let us know if we can support more resources. @kwateng did some research on each of FHIR resource to identify a matching OpenMRS resource. Medication related resources are identified as resources which we can support from available resource. When I went through [1] and [2] threads, it seems openmrs core support. Drug and DrugOrder while rest are in pharmacy module such as Administration and Dispense. In this case we will need to depend on pharmacy module to get those resources into FHIR module If we going to implement them.

[1] Drug Order Model [2] Drug dispense and administration in OrderEntryUi

Thanks, Harsha

Hi Everyone,

This is to give a status update on current status. I have migrated the module to HAPI FHIR 2.5 version. This migration is very drastic migration that uses the STU3 version of FHIR specification. As per my mentor @harsha89, I have tested many resources due to underline core changes. I fixed minor issues and now it works fine. I couldn’t test the diagnostic report resource. @harsha89 if you have any resource to test it, let me know.

If anyone using the module, you can test it out and report any issues. My next move is to implement the medication request resource. As per discussion with @harsha89, we will not implement the SDK generation for FHIR during this time frame.

Thank you!

Thanks for your contribution so far @kwateng. Let’s complete the medication request as soon as possible as we only have 3-4 weeks left. We need to further stabilize the module due to the major update. Also, documentation needs to be updated.

@kwateng as we discussed please add a detailed note here on MedicationRequest implementation and complete the documentation by this weekend.

Hi Everyone,

Under my mentor guidance, implemented MedicationRequest GET and POST. I got challenges to map DrugOrder to MedicationRequest. DrugOrder of OpenMRS not allow updating DrugOrder. Because of it PUT not supported.

Documentation added in https://wiki.openmrs.org/display/projects/MedicationRequest+Resource

Medication request specification https://www.hl7.org/fhir/medicationrequest.html

Challenges and Concerns

  • Medication request timing can’t match with DrugOrder

“timing”: { “repeat”: { “boundsPeriod”: { “start”: “2015-01-15”, “end”: “2015-01-20” }, “frequency”: 1, “period”: 6, “periodMax”: 12, “periodUnit”: “h” } }

  • Medication request fields status, intent, maxDosePerAdministration and validityPeriod can’t map

  • sample medication request is below

{ “resourceType”: “MedicationRequest”, “id”: “56b9196c-bcac-4c2f-b3a2–123464a96439”, “status”: “stopped”, “intent”: “order”, “priority”: “routine”, “medicationCodeableConcept”: { “id”: “865fceb1-ad0c-4102-aead-26ca25c77b09”, “coding”: [ { “system”: “http://openmrs.org”, “code": “cedf8fc4–6fc9–11e7–9b2b-c4d98716fd91”, “display”: “Cetirizine” } ] }, “subject”: { “id”: “cf14c415–6fc9–11e7–9b2b-c4d98716fd91”, “reference”: “Patient/cf14c415–6fc9–11e7–9b2b-c4d98716fd91”, “display”: “John Patient(Identifier:100)” }, “context”: { “id”: “3fcd2047–2aca-404f-ab9d-0d009265d4dd”, “reference”: “Encounter/3fcd2047–2aca-404f-ab9d-0d009265d4dd” }, “authoredOn”: “2008–10–19T09:24:10+05:30”, “requester”: { “agent”: { “id”: “b3d97e25–274e-4ed6-b1aa-18848505c33e”, “reference”: “Practitioner/b3d97e25–274e-4ed6-b1aa-18848505c33e”, “display”: “Super User(Identifier:Test)” } }, “recorder”: { “id”: “b3d97e25–274e-4ed6-b1aa-18848505c33e”, “reference”: “Practitioner/b3d97e25–274e-4ed6-b1aa-18848505c33e”, “display”: “Horatio L Hornblower(Identifier:Test)” }, “dosageInstruction”: [ { “sequence”: 1, “timing”: { “code”: { “coding”: [ { “system”: “http://openmrs.org”, “code”: “ae984cea-24cb-4e1e-abdd-fd19c9802704”, “display”: “1/day x 7 days/week” } ], “text”: “1/day x 7 days/week” } }, “route”: { “id”: “cee0f244–6fc9–11e7–9b2b-c4d98716fd91”, “coding”: [ { “system”: “http://openmrs.org”, “code”: “cee0f244–6fc9–11e7–9b2b-c4d98716fd91", “display”: “UNKNOWN” } ], “text”: “UNKNOWN” }, “doseQuantity”: { “value”: 3.0, “unit”: “mg” } } ], “dispenseRequest”: { “quantity”: { “value”: 1.0, “unit”: “tab (s)” } } }

Thank you

Hi All,

Mappings from OpenMRS drug order to medication request looks fine. I checked the existing samples. it seems that the timing term of medication request is related to DrugOrder OrderFrequency term. It has a concept which describes how often drug should take. But I don’t think we can break it to the format of the medication request timing format. So specifying it as above should fine.

@kwateng thanks for the reply and the documentation. Please work on the final demo.

Thanks, Harsha