Uploaded image for project: 'OpenMRS Dictionary Manager'
  1. OpenMRS Dictionary Manager
  2. OCLOMRS-1067

OCL Module: Add support for importing mappings with sort_weight

    XMLWordPrintable

Details

    • Medium
    • OCL for OpenMRS November 2021

    Description

      OpenMRS uses a property called sort_weight to store a default order for both concept answers and concept sets. For instance, I may have a question labelled:

      "Does the patient smoke?"

      With answers like:

      • "Yes"
      • "No"
      • "Didn't Ask"
      • "Refused"

      In OpenMRS this would be represented as 5 concepts, one for "Does the patient smoke?" and one for each of the answers. The answers would then be linked to the question as answers via the concept_answer table. In this table, we have a sort_weight column that can be used to determine the order the answers should be displayed.

      Currently, in the dictionary manager, we capture the order of concept answers by writing to a sort_weight property in the extras field of the mapping (note that this property is entirely optional). Where this value is populated, the corresponding concept_answer in the OpenMRS data should have it's sort_weight set to that value.

      The above also applies to set members of concept sets, where the sort_weight is a property of the concept_set table that relates concepts that are the "head" of sets to concepts that make up that set.

      Acceptance criteria:

      1. When a mapping of type Q-AND-A is downloaded from OCL and the extras section contains a sort_weight, the resulting ConceptAnswer object should have this sort_weight value assigned to its sortWeight property.
      2. When a mapping of type CONCEPT-SET is downloaded from OCL and the extras section contains a sort_weight, the resulting ConceptSet object should have this sort_weight value assigned to its sortWeight property.

      This feature is requested by PIH

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                mseaton Mike Seaton
                ibacher Ian Bacher
                Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: