Developing the "OCL for OpenMRS" Application


(Bruce Makaaru) #692

Just a reminder:

@raff Please remember to look into this after the move to the new server. Thanks.


(collins Ijeomah) #693

Hello community, Going through the features need for the MVP we have For the MVP

  1. Create a new Implementation Dictionary, belonging to an organization
  2. Add concepts from CIEL to an implementation dictionary
  3. Create custom concepts in an implementation dictionary
  4. Release a version of an implementation dictionary
  5. Subscribe to a released implementation dictionary from a fresh OpenMRS installation of Platform + Legacy UI

The features from Number one to Number four have been implemented by the team and we would like everyone to check it out and see if those features meet expectation. Currently, we are still having issues with the number five. One of the issues is the error message we get while trying to sync with OpenMRS installation which has been reported to @raff on issues. Another is the error page we get when you select browser with traditional OCL for a dictionary.

Apart from that are there other features that are required for the MVP to be completed that I didn’t mention. Your feedback is needed @dkayiwa @darius @c.antwi @akanter @ball


(JUDE INNOCENT ATUHAIRE) #694

@raff, Humble reminder, I have managed to rename BASE_URL to OCL_API_HOST and implemented it to be saved as environment variables using a .env file as shown in this PR but now the tests are failing because we need to pass the environment variable URLs as shown below to the Travis settings that I have no access to.

REACT_APP_OCL_API_HOST=https://api.qa.openconceptlab.org/

REACT_APP_TRADITIONAL_OCL=https://qa.openconceptlab.org

So my request is that the above environment variables are passed to the Travis environment variable settings.

Cc: @cintiadr


(Allan Guwatudde) #695

@shine I discovered it’s a false error and indeed you’re logged in. Just strip away /accounts/login/ and reload within the same window.


(Allan Guwatudde) #696

@judeatu , I thought @raff requested the url named OCL_API_HOST .


(JUDE INNOCENT ATUHAIRE) #697

Yes @sheriff when passing environment variable in react we start with REACT_APP_, React_environment_variables


(Allan Guwatudde) #698

@judeatu, thanks I didn’t actually know that. That means @raff also had to change the name of the variable?


(JUDE INNOCENT ATUHAIRE) #699

Yes @sheriff , he would have to prefix it with REACT_APP_ when using it. Because according to the docs the project can consume variables declared in the environment as if they were declared locally in our JS files as long as the environment variables start with REACT_APP_ .


(Allan Guwatudde) #700

Hello @darius and @akanter ,

In a bid to finally get the Q and A mappings working properly. We’re re-visiting the old implementation which looked like this;

This implementation was incorrect because the relationship for a Q and A mapping is described as Q-AND-A and not SAME-AS or NARROWER-THAN and therefore as we plan on first taking this implementation out before we implement it the right way.

Here’s how we plan to implement it and we would like to know if we’re going in the right direction. The screenshot below shows the current implementation of normal mappings. To the relationship dropdown we’re going to add Q-AND-A as an option or actually the only option when creating Q and A mapping. Would that be the right implementation?

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


(Andrew Kanter) #701

It would seem to be unnecessary to have the UI ask for a single selection. You know that it is Q-A so just store it and display it as the concept. It seems to me that answers should have to already be part of my dictionary to create this link. Either we only allow existing concepts within the dictionary be answers, or we allow any internal map to be an answer and those answers are moved into the user dictionary with the question at the time of save. @darius, do you agree?

Andy


(Darius Jazayeri) #702

I agree with Andy, and further, the user is not supposed to know that a Q-A or a Set membership is “really” a mapping in the OCL backend. They just think that a question concept can have answers, and a set concept can have members.

I would expect that Q/A and Set Member work like:

  1. there’s a table whose columns are Source, Concept, and action.
    • the rows of this table are not editable
    • the only action is Remove (i.e. removing it as a set member or as an answer)
  2. there’s an “Add Answer” or “Add Set Member” button (maybe the label on the button is just “Add” if the heading and table make things obvious from context
  3. “Add” lets you search for a concept, and it should prefer concepts already in your dictionary, followed by concepts from preferred dictionaries (like CIEL), and finally other concepts.
    • I think the ideal UI for this is a single search field which searches across all sources, and sorts results intelligently. This might be harder to implement though.
    • Another fine option is that you have:
      1. a dropdown to select a source or dictionary. The first (and default-selected) option is “this dictionary”, the next option is the preferred source (CIEL). After the MVP we should also include other sources/dictionaries, in alphabetical order, but skip this for now.
      2. a text field which searches within the dictionary or source that you selected.
      3. an Add button to actually add the selected concept to the table.
    • note that if you add a concept as an answer or set member, then we need to automatically also add it to our dictionary.
    • if I go with the default option of searching within “this dictionary” and I choose something, the actual answer/member reference that’s added is to that concept in a source. E.g. if I already have Hypertension from CIEL in my dictionary, and I choose it as an answer to the question, the mapping that’s created is to CIEL/Hypertension, not to MyDict/Hypertension. And the table will show source = CIEL.

Does this make sense?

Some parts of this are definitely not complete yet. For example the thing we’re just discussing about how Q-and-A should work. Can state which ones of 1-4 your team feels are complete (just awaiting UAT) versus which your team thinks still have work to do? (And also, what are the tickets for the ongoing work.)


(Bruce Makaaru) #703

Hello @darius, We have worked on the following:

  1. Create a new Implementation Dictionary, belonging to an organization :white_check_mark:
  2. Add concepts from CIEL to an implementation dictionary :white_check_mark:
  3. Create custom concepts in an implementation dictionary

Tasks remaining

  • Q/A Concepts
  • Set Member Concepts
  1. Release a version of an implementation dictionary

Tasks remaining

The released versions are still throwing errors in the traditional OCL


(Bruce Makaaru) #704
  1. Make search consistent across the entire application
  2. Implement reading an OCL backend URL from a system environment property called OCL_API_HOST
  3. Fix inaccurate total concept counts on some dictionary detail card page
  4. Fix pagination on Add CIEL concepts page when datatype/class filters are selected.
  5. Fix inability to create more than one Name or Description while Creating and Editing Concepts
  6. Use the traditional OCL url constant defined in HelperFunction.js to replace the traditional url scattered in the codebase.
  7. Fix the issue with the remove button on the dictionary concept page
  8. Improve current implementation of Q-AND-A mapping

The rest have been merged (are live).


(JUDE INNOCENT ATUHAIRE) #705

Hello Community,

@raff , requested that I pass API urls in environment variables which I managed to implement and raised a PR, but Travis CI failed because the variables where not passed to Travis CI settings. I reached out to help desk and they put the variables.

But still the issue persisted then I realised that on Travis CI when I push changes from a fork of the upstream repository the encrypted environment variables are disabled as shown below and in the Travis-docs. This leads to the tests failing because the environment variables are not available.

Screen Shot 2019-03-07 at 10.09.22.png

This is because pull requests sent from a fork of the upstream repository are not exposed to environment variables. The upstream repository’s maintainer would have no protection against this attack, as pull requests can be sent by anyone who forks the repository on GitHub.

So to solve the problem so since the tests do not hit the endpoints I had to pass them a mock URL that Travis can access from the code as shown here.

I request for assistance if anyone has faced this problem and also please advise on the solution above.

Cc: @helpdesk1


(JUDE INNOCENT ATUHAIRE) #706

Hello @darius,

We found an old ticket OCLOMRS-216 that was not done which was a sub-task to Make the app ui consistent. The ticket is meant to make dictionary overview concepts page pagination consistent with the rest of the app. Currently, the view dictionary concepts table pagination and add existing CIEL concepts table pagination are inconsistent as shown below.

View dictionary concepts table pagination

Add existing CIEL concepts table pagination

My question is that is this Ok or should I make them look the same?


(Bruce Makaaru) #707

Hello @darius, A couple of old tickets were brought to our attention by @dkayiwa and we would appreciate some clarification. Please have a look at these:

  1. Optimize the navbar for better app usability: Ticket URL
  2. Update OCL for OpenMRS wiki documentation: Ticket URL
  3. Use Navlink in place of Link on the Navbar: Ticket URL
  4. Add webpack.config file to the PlatformUI application: Ticket URL
  5. The login and signup page UI and functionality should be consistent: Ticket URL

Thank you.


(collins Ijeomah) #708

Hello, community

This is a reminder of the OCL-client team and POs weekly sync (Thursdays 6pm - 7pm EAT). I will share a link to the call 15minutes before the call. kindly attend if you can make it.

cc: @dkayiwa, @samdiano, @sheriff, @brucemakallan, @judeatu, @c.antwi, @akanter, @darius, @alexkayabula


(collins Ijeomah) #709

Here is the link to the call (Weekly sync) https://hangouts.google.com/hangouts/_/ytl/OrDihMs1_9eTn4M0EDxy12okCRX2rXLf9aa_xzn0kxY=?eid=107163098052414183455&hl=en_US .

cc: @darius, @akanter, @dkayiwa, @samdiano, @sheriff, @stonecoder, @brucemakallan, @judeatu


(collins Ijeomah) #710

Hello @darius @akanter This is to notify you that the call has started.


(Andrew Kanter) #711

Sorry, I had forgotten to update my calendar and these were still on Friday. I will move them to Thursday, but if folks are available for a re-do tomorrow (Friday) at the same time, I am available.

Andy