OpenConceptLab / ocl_issues

Issues for all OCL repos. NOTE: Install ZenHub Browser Extension and request access to the OCL Roadmap board to view all issues and to contribute
4 stars 2 forks source link

Concept tracing information - Modification indicators #1763

Open jamlung-ri opened 8 months ago

jamlung-ri commented 8 months ago

A user needs to be aware if the concept in a repo/collection that they are viewing is "original" (i.e. is the same as the source concept) or "modified" (i.e. its details, mappings, etc. differ from the source concept).

In TBv2, this only manifests when the mappings of a concept differ from its original source vs. what is being displayed on the concept from the context of a collection.

Complexities from this OCL Arch Call:

Original MSF Concept:

image.png

"Modified" MSF Concept:

image.png
jamlung-ri commented 8 months ago

Current behavior in TBv2:

  1. I select the concept from the collection, which has changed the mappings from the original source concept
  2. I click "Add to Collection"
  3. The "Add References to Collection" interface appears, but in the API Details section, the reference being added is to the original source concept, not the collection concept (which would use the reference /orgs/MSF-OCB/collections/Trauma/concepts/1290/). image
jamlung-ri commented 8 months ago

Current API behavior:

Using this API call:

PUT /users/jamlung/collections/omrs-squad3/references/
{
  "data": {
    "expressions": [
      "/orgs/MSF-OCB/collections/Trauma/concepts/1290/"
    ]
  },
  "cascade": {
    "method": "sourcemappings",
    "cascade_levels": "*",
    "map_types": "Q-AND-A,CONCEPT-SET",
    "return_map_types": "*"
  }
}

Yields these results:

{"resourceType":"Bundle","type":"searchset","meta":{"lastUpdated":"2024-02-06T12:59:50.023147Z"},"total":14,"entry":[{"checksums":null,"id":"1290","type":"Concept","url":"/orgs/MSF/sources/MSF/concepts/1290/3319661/","version_url":"/orgs/MSF/sources/MSF/concepts/1290/3319661/","retired":false},{"checksums":null,"id":"1383","type":"Concept","url":"/orgs/MSF/sources/MSF/concepts/1383/3319860/","version_url":"/orgs/MSF/sources/MSF/concepts/1383/3319860/","retired":false},{"checksums":null,"id":"1417","type":"Concept","url":"/orgs/MSF/sources/MSF/concepts/1417/3319934/","version_url":"/orgs/MSF/sources/MSF/concepts/1417/3319934/","retired":false},{"checksums":null,"id":"164407","type":"Concept","url":"/orgs/CIEL/sources/CIEL/concepts/164407/4379597/","version_url":"/orgs/CIEL/sources/CIEL/concepts/164407/4379597/","retired":false},{"checksums":null,"id":"10064","type":"Mapping","map_type":"Q-AND-A","url":"/orgs/MSF-OCB/sources/MSFOCB/mappings/10064/","version_url":"/orgs/MSF-OCB/sources/MSFOCB/mappings/10064/6494566/","to_concept_code":"164407","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/164407/","cascade_target_concept_code":"164407","cascade_target_concept_url":"/orgs/CIEL/sources/CIEL/concepts/164407/","cascade_target_source_owner":"MSF","cascade_target_source_name":"MSF","cascade_target_concept_name":"Other health facility","retired":false,"sort_weight":null,"from_concept_code":"1290"},{"checksums":null,"id":"3643","type":"Mapping","map_type":"Q-AND-A","url":"/orgs/MSF/sources/MSF/mappings/3643/5478613/","version_url":"/orgs/MSF/sources/MSF/mappings/3643/5478613/","to_concept_code":"1417","to_concept_url":"/orgs/MSF/sources/MSF/concepts/1417/","cascade_target_concept_code":"1417","cascade_target_concept_url":"/orgs/MSF/sources/MSF/concepts/1417/","cascade_target_source_owner":"MSF","cascade_target_source_name":"MSF","cascade_target_concept_name":"Self-referral","retired":false,"sort_weight":null,"from_concept_code":"1290"},{"checksums":null,"id":"6513","type":"Mapping","map_type":"Q-AND-A","url":"/orgs/MSF/sources/MSF/mappings/6513/","version_url":"/orgs/MSF/sources/MSF/mappings/6513/6494525/","to_concept_code":"1383","to_concept_url":"/orgs/MSF/sources/MSF/concepts/1383/","cascade_target_concept_code":"1383","cascade_target_concept_url":"/orgs/MSF/sources/MSF/concepts/1383/","cascade_target_source_owner":"MSF","cascade_target_source_name":"MSF","cascade_target_concept_name":"Emergency department","retired":false,"sort_weight":null,"from_concept_code":"1290"},{"checksums":null,"id":"1644","type":"Mapping","map_type":"SAME-AS","url":"/orgs/MSF/sources/MSF/mappings/1644/5193907/","version_url":"/orgs/MSF/sources/MSF/mappings/1644/5193907/","to_concept_code":"225728007","to_concept_url":null,"cascade_target_concept_code":"225728007","cascade_target_concept_url":null,"cascade_target_source_owner":"IHTSDO","cascade_target_source_name":"SNOMED-CT","cascade_target_concept_name":null,"retired":false,"sort_weight":null,"from_concept_code":"1383"},{"checksums":null,"id":"1821","type":"Mapping","map_type":"SAME-AS","url":"/orgs/MSF/sources/MSF/mappings/1821/5194066/","version_url":"/orgs/MSF/sources/MSF/mappings/1821/5194066/","to_concept_code":"160551","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/160551/","cascade_target_concept_code":"160551","cascade_target_concept_url":"/orgs/CIEL/sources/CIEL/concepts/160551/","cascade_target_source_owner":"CIEL","cascade_target_source_name":"CIEL","cascade_target_concept_name":"Self-referral","retired":false,"sort_weight":null,"from_concept_code":"1417"},{"checksums":null,"id":"1358","type":"Mapping","map_type":"SAME-AS","url":"/orgs/MSF/sources/MSF/mappings/1358/","version_url":"/orgs/MSF/sources/MSF/mappings/1358/5193647/","to_concept_code":"164408","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/164408/","cascade_target_concept_code":"164408","cascade_target_concept_url":"/orgs/CIEL/sources/CIEL/concepts/164408/","cascade_target_source_owner":"CIEL","cascade_target_source_name":"CIEL","cascade_target_concept_name":"Source of initial patient referral","retired":false,"sort_weight":null,"from_concept_code":"1290"},{"checksums":null,"id":"328178","type":"Mapping","map_type":"SAME-AS","url":"/orgs/CIEL/sources/CIEL/mappings/328178/6154368/","version_url":"/orgs/CIEL/sources/CIEL/mappings/328178/6154368/","to_concept_code":"4563007","to_concept_url":null,"cascade_target_concept_code":"4563007","cascade_target_concept_url":null,"cascade_target_source_owner":"IHTSDO","cascade_target_source_name":"SNOMED-CT","cascade_target_concept_name":null,"retired":false,"sort_weight":null,"from_concept_code":"164407"},{"checksums":null,"id":"1269612","type":"Mapping","map_type":"SAME-AS","url":"/orgs/CIEL/sources/CIEL/mappings/1269612/6453898/","version_url":"/orgs/CIEL/sources/CIEL/mappings/1269612/6453898/","to_concept_code":"164407","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/164407/","cascade_target_concept_code":"164407","cascade_target_concept_url":"/orgs/CIEL/sources/CIEL/concepts/164407/","cascade_target_source_owner":"CIEL","cascade_target_source_name":"CIEL","cascade_target_concept_name":"Other health facility","retired":false,"sort_weight":null,"from_concept_code":"164407"},{"checksums":null,"id":"1641","type":"Mapping","map_type":"SAME-AS","url":"/orgs/MSF/sources/MSF/mappings/1641/","version_url":"/orgs/MSF/sources/MSF/mappings/1641/5193905/","to_concept_code":"160473","to_concept_url":"/orgs/CIEL/sources/CIEL/concepts/160473/","cascade_target_concept_code":"160473","cascade_target_concept_url":"/orgs/CIEL/sources/CIEL/concepts/160473/","cascade_target_source_owner":"CIEL","cascade_target_source_name":"CIEL","cascade_target_concept_name":"Emergency department","retired":false,"sort_weight":null,"from_concept_code":"1383"},{"checksums":null,"id":"1823","type":"Mapping","map_type":"SAME-AS","url":"/orgs/MSF/sources/MSF/mappings/1823/","version_url":"/orgs/MSF/sources/MSF/mappings/1823/5194068/","to_concept_code":"306098008","to_concept_url":null,"cascade_target_concept_code":"306098008","cascade_target_concept_url":null,"cascade_target_source_owner":"IHTSDO","cascade_target_source_name":"SNOMED-CT","cascade_target_concept_name":null,"retired":false,"sort_weight":null,"from_concept_code":"1417"}],"requested_url":"/orgs/MSF-OCB/collections/Trauma/v2024-01-16/concepts/1290/$cascade/?method=sourcetoconcepts&mapTypes=&excludeMapTypes=&returnMapTypes=*&cascadeHierarchy=true&cascadeMappings=true&includeRetired=false&cascadeLevels=*&reverse=false&view=flat&omitIfExistsIn=&equivalencyMapType=&q=1290&isTable=true&isList=false&page=1","repo_version_url":"/orgs/MSF-OCB/collections/Trauma/v2024-01-16/"}

Screenshot in TB (which shows all 14 mappings, not just the 4 expected mappings): image