Developing the "OCL for OpenMRS" Application

Alright let me try implementing it.

Thanks @cintiadr for chiming in.

I support the approach of creating a file in a bash script as part of CMD. @judeatu, can you rework your solution and do that? It’s fairly simple.

You cannot use ‘src/config/index.js’, because the file is being bundled during a build. I’d put a js file with global JS variables in public and have it loaded with the script tag in index.html. Your js file in the docker image will be located at ‘/usr/share/nginx/html’. Use a bash script to overwrite that file and run ngnix. Execute the bash script instead of starting ngnix using CMD in Dockerfile.

1 Like

@raff, I have never implemented this is there any documentation I could look at for more knowledge on this. It would be of help.

In the mean time let me start working on it.

@judeatu try some of the DevOps guys at the office.

Hello @raff, I have managed to implement the first part above but am failing to implement the second part below

Please help me elaborate on that.

Thanks.

Hello @darius, Please explain this again.

Also, at the moment, I have noticed that when I create a Q-AND-A mapping and say I choose the source to be CIEL when I display these Q-AND-A mappings, the source will no longer be CIEL but the dictionary to which the concept I made the mapping to belongs. Is that ok?

cc: @dkayiwa @shine @samdiano @judeatu @brucemakallan @alexkayabula @tbirungi @florentina

Let me try to explain with an example. Actually I will describe two different user flows, both of which should have exactly identical results.

User Flow 1:

  1. Create a new dictionary
  2. Add Existing CIEL concept: CIEL 1694, (“Left against medical advice”) to the dictionary
  3. Create a new Q-and-A concept named “Outcome of hospitalization”
    • add “Left against medical advice” as an answer by selecting it from the dictionary

User Flow 2

  1. Create a new dictionary
  2. Create a new Q-and-A concept named “Outcome of hospitalization”
    • add CIEL1694 as an answer by selecting it from CIEL

In both cases, the result should be identical:

  • the dictionary contains two concepts:
    1. CIEL 1694
    2. a custom concept, that’s a q-and-a, with one answer
      • the q-and-a mapping should point to CIEL:1694

In flow #2 the user implicitly said they want to include CIEL 1694 in their dictionary, by adding it as an answer. So when you’re handling “save concept with answers” you need to ensure that all its answers are also included in the dictionary.

In flow #1 even though the UI flow was to select from their own dictionary, the concept they selected is not authored by the user, but fundamentally belongs to CIEL. So that’s how we should store the mapping reference.

Does this make sense?

(I believe that what you wrote about current behavior you’re seeing is wrong, but it would help to see a screnshot. The “source” in that table in the UI is not supposed to be mapping.source, but rather it should be mapping.target.source.)

@raff We would like to know if you have feedback concerning those issues we raised https://github.com/OpenConceptLab/ocl_issues/issues/92 https://github.com/OpenConceptLab/ocl_issues/issues/94 Thanks

Hello community

We will be having our 15th sprint demo call today 6:00 pm to 7:00 pm (EAT), I will be sharing the call link 10 minutes to the call time. kindly attend if possible.

cc: @Darius, @akanter, @dkayiwa, @shine, @Collinewait, @samdiano, @Tittoh, @sheriff, @abulojoshua1 @brucemakallan, @judeatu,

@shine did you read this? https://wiki.openmrs.org/display/RES/How+To+Do+A+Sprint+Demo%3A+The+A+-+Z+Guide

@darius let me post a video of how it’s currently working on here.

Hello @darius,

I have reproduced user flow 1 and I am going to show it in a couple of short videos here.

  1. I created a new dictionary called Naguru Hospital with a short code NA-HOS

  2. I added CIEL concept: CIEL 1694. See below;

  1. Add a question concept named Outcome of Hospitalization and add an answer, Left against medical advice by searching Naguru Hospital dictionary. See below;

As the last step to show that the answer was added, I navigate to Naguru Hospital concepts and click on Edit for Outcome of hospitalization question, the answer is shown to Left against medical advice

Please look through and provide feedback.

cc: @dkayiwa @shine @samdiano @judeatu @brucemakallan @alexkayabula @tbirungi @florentina

Hello @darius,

I’ve been updating the OCL documentation as @ball suggested. I created a Google Doc to highlight the changes I’ve made so far and also to allow for comments from other members. Please review the current draft here

Secondly, Ellen also advised that the document should be moved into the correct directory structure for the Wiki. Please help clarify where exactly it should be. Thank you.

cc: @dkayiwa, @akanter, @judeatu, @shine, @alexkayabula, @sheriff, @samdiano

I haven’t found the reason yet.

Hello @raff,

I managed to implement what you requested above in the following way, please let me know if it works as you wanted;

  • I created a bash script that creates an env-config.js file with key-value pairs of the environment variables thus the environment variables could be accessed anywhere in the app as window.env.env_variable also shown here.
  • Then loaded env-config.js with the script tag in index.html
  • I then updated the start script in package.json to run the bash script when running the app during development.
  • After I updated the Dockerfile to copy the .env file, the bash script and also run the bash script before the build(at runtime). Then remove env-config.js from the public folder if any and overrode it with the newly created one by the bash script.

Hence the environment variables are available before build time.

Please confirm if you’re ok with this new implementation.

Also, the env variables can now be passed as you had earlier requested; OCL_API_HOST=https://api.qa.openconceptlab.org/ TRADITIONAL_OCL_HOST=https://qa.openconceptlab.org

Hello community, Here is the link to join the Sprint 15 Demo Call (6pm - 7pm EAT)

https://hangouts.google.com/hangouts/_/ytl/5FECk5fZ9rFZ_XWzE-k9uXsQssM1XuHJw6gZYXPCkgc=?eid=107163098052414183455&hl=en_US

cc: @dkayiwa, @shine, @collinewait, @samdiano, @sheriff, @brucemakallan, @judeatu, @ayesh, @c.antwi, @darius, @akanter

Looks good Allan, but we need to reorder the create concept fields. When you create a Q&A concept, the Answers for the concept should be near the bottom not BEFORE the concept names. @darius, I think we have a mockup of this?

@shine I seem to have difficulties joining the demo call

@akanter

Thank you Andrew.

"Answers for the concept should be near the bottom not BEFORE the concept names"

Is that on the dictionary concepts page?

I am going to follow from the live events on you tube. Anyone with the link?