Developing the "OCL for OpenMRS" Application

Thanks @paulk, will look forward to your reply.

One more query i had is the traditional OCL does not support the export of all the classes and the data types, does the new OCL support them?

Hello again @mohitd,

OCL has not yet been fully integrated into OpenMRS which is why you are getting the specified bugs. We should be integrating OCL with OpenMRS within the next few weeks

Hello @dkayiwa is it possible to shed more light on this?

Hello community,

I’ve got a query in regards to the ‘create another kind of concept’. I’d like to understand why the classes of concepts which are already accounted for with other options on the menu, e.g questions, sets, drugs, procedures, etc are still included as possible options when creating another kind of concept. The only rationale I can currently think up for this is we might have situation where say, a question has a set in addition to its answers. Is this a likely scenario?

@darius @akanter

Hi @Mohit-

Not sure if this meets your needs, but you may download an export of the full list of classes and datatypes in traditional OCL interface using these links:

Jon

I have a slight preference to use Hangouts, but I can do zoom if we need to switch for @akanter.

This thread is fine for reporting feedback, though it’s high-traffic and it gets in the weeds of dev process. You can also use this thread, which is lower-traffic, and specifically about feedback: OCL for OpenMRS User Feedback discussion

@mohitd can you give examples of some of the classes and datatypes that you’re not seeing? E.g. Bahmni adds some classes that aren’t generally used in other OpenMRS installations. Are you looking for those, or something else?

(The “OCL for OpenMRS” application uses the same underlying OCL model, so if we’re going to have a discussion around specific classes we might start a new thread with @paynejd.)

@karuhanga, the example that you thought of is spot-on, and there some others.

If someone is creating a dictionary from scratch, we hope they’ll follow the modern conventions. But sometimes they don’t, either by choice, or because they have older concepts, or there’s some use case we haven’t thought of. And we don’t want to prevent that.

Examples:

  • A concept was created as Q-and-A, but then someone wants to use it with a new UI widget that expects it to be a set => user decides to duplicate all the answers as set members
  • Today we prefer for a diagnosis to have datatype=N/A, i.e. it’s not a question, just an answer. But before many implementations created diagnoses with datatype=boolean, and captured malaria=yes or malaria=no. Going forward we don’t prefer this, but it exists in many dictionaries (including CIEL).

Hi @darius @paynejd,

To clarify the export gives me all the concepts belonging to all classes and datatypes but when i try to import them in OpenMRS is when they fail. We have observed that concepts having any “Class” apart from “drug” fail to import in OpenMRS and also concepts with “datatype” other than “N/A” and “Coded” also fail during import

@darius Thanks for this clarification. As a follow up, does this mean that a user can, for example, while editing a Q-A concept after having created it, choose to add sets later, for example? If the answer to this is yes, then it seems to me that the layout for editing all the different classes of concepts will literally be the same.

Hello guys. yes I’m. for me zoom is a better option.

@Andela do we have a meeting today at 3pm UTC? Has this been included in the calendar? Please confirm

Hey @c.antwi Yes we do, it will be on the calendar shortly

cc: @danuluma @dkayiwa @madraja18 @darius @alexkayabula @cintiadr @raff @karuhanga @c.antwi

@darius As shown in the post below, there are a few members of the community suggesting a zoom meeting, I will have both links ready in case we opt for a zoom meeting

@madraja18 It could be tricky setting up a zoom meeting for this current sync on such short notice as a majority are expecting a google hangouts link but we shall explore this in greater detail during the meeting assuming I do not get an okay for zoom by then.

Do we have a link for today?

We shall be using the link below for the usual sync.

Hangouts: https://hangouts.google.com/hangouts/_/vo63j5vnmjd7rj6xj52mprighqe

If we do confirm a switch to zoom, I have prepared an optional link

Zoom: https://andela.zoom.us/j/557853106

cc @akanter @darius @dkayiwa @c.antwi @karuhanga @danuluma @alexkayabula @madraja18 @cintiadr

Hello Community, these are the notes and link demo call held today.

Call Link: Here

MVP

  1. Fix incorrect source returned when previewing concepts
  2. Fix the way state is persisted in the application. Persisting state is causing multiple bugs
  3. Users should be able to view all concepts in a dictionary inclusive of CIEL concepts

MVP +

  1. Concepts should be created with sequential IDs not uuids
  2. On create set concept page, the class should be blank by default

Other Notes

  1. Share the error traceback from trying to implement the OCL Subscription with Daniel
  2. Moving forward, we shall be using zoom for the meetings.

cc: @akanter @darius @alexkayabula @dkayiwa @danuluma @karuhanga @c.antwi

Hello Community

As per the recently concluded call, please see below a copy of the OCL Subscription traceback error

ERROR - ImportTask$1.run(77) |2019-04-24 19:05:02,973| Failed to import concept org.openmrs.module.openconceptlab.client.OclConcept@2c016d29[externalId=<null>]
org.openmrs.module.openconceptlab.importer.ImportException: Cannot create concept https://api.demo.openconceptlab.org/users/admin/sources/Run/concepts/b12fd941-fd51-431e-aad7-28a5a4059cdd/5cc087feb8059c0056629b67/
	at org.openmrs.module.openconceptlab.importer.Saver.saveConcept(Saver.java:105)
	at org.openmrs.module.openconceptlab.importer.ImportTask$1.run(ImportTask.java:73)
	at org.openmrs.api.context.Daemon$5.run(Daemon.java:286)
Caused by: java.lang.NullPointerException
INFO - LoggingAdvice.invoke(115) |2019-04-24 19:05:02,975| In method ImportService.saveItems. Arguments: Iterable=[org.openmrs.module.openconceptlab.Item@5f353ce5[itemId=<null>,uuid=<null>]], 
INFO - LoggingAdvice.invoke(155) |2019-04-24 19:05:02,979| Exiting method saveItems

cc: @c.antwi @dkayiwa

Can you share the full log via pastebin.com? If you are using the standalone version, it is in the tomcat logs folder in a file with today’s date.

I think there were errors specifically associated with the class filters (that might be MVP 2). Not sure what MVP 3 means. I think the critical bug was then when I add a concept to my collection which is a SET or QUESTION, all the dependent concepts need to be added to the collection as well.

1 Like

For future reference, since the demo server is reset every day, the concept it failed on is:

{
   "type":"Concept",
   "uuid":"5cc087feb8059c0056629b67",
   "id":"b12fd941-fd51-431e-aad7-28a5a4059cdd",
   "external_id":null,
   "concept_class":"drug",
   "datatype":"None",
   "display_name":"Run",
   "display_locale":"en",
   "names":[
      {
         "uuid":"8cb2f7ea619a4afd94f61fea8e2549ce",
         "external_id":null,
         "name":"Run",
         "locale":"en",
         "locale_preferred":true,
         "name_type":"Fully Specified",
         "type":"ConceptName"
      }
   ],
   "descriptions":[
      {
         "uuid":"707504238c5040e5bc3e2e80d5aa3e3a",
         "external_id":null,
         "description":"Run",
         "locale":"en",
         "locale_preferred":false,
         "description_type":null,
         "type":"ConceptDescription"
      }
   ],
   "retired":false,
   "source":"Run",
   "source_url":"/users/admin/sources/Run/",
   "owner":"admin",
   "owner_type":"User",
   "owner_url":"/users/admin/",
   "version":"5cc087feb8059c0056629b67",
   "created_on":"2019-04-24T11:59:58.499",
   "updated_on":"2019-04-24T11:59:58.541",
   "version_created_on":"2019-04-24T11:59:58.499",
   "version_created_by":"admin",
   "extras":null,
   "mappings":null,
   "is_latest_version":true,
   "locale":null,
   "version_url":"/users/admin/sources/Run/concepts/b12fd941-fd51-431e-aad7-28a5a4059cdd/5cc087feb8059c0056629b67/",
   "url":"/users/admin/sources/Run/concepts/b12fd941-fd51-431e-aad7-28a5a4059cdd/"
}

PS- @dkayiwa I suspect what they shared plus this json is enough to debug and we don’t need the full log, but of course they should share it anyway.

Hello @dkayiwa

Here is the Pastebin link