Skip to content

TBv3 OCL extras JSON pretty display - Improve advanced extras description attributes schema and display #2402

@filiperochalopes

Description

@filiperochalopes

Follow up from #2365

User story

As a user, I want advanced description attributes to be stored and displayed in a clear schema so related description parts can be linked (via external_id) and later reassembled for OpenMRS, without confusing JSON rendering in the OCL concept panel and still be beautifully displayed.

Use case

CIEL - Create multiple “advanced” description parts that must be connected and later reassembled into a single OpenMRS description using patterns like “DEF: REF:”.

Requirements

  • Use a common linking element across advanced description parts: external_id.
  • Support OpenMRS conversion:
    • When a source is converted for OpenMRS, advanced description parts can be reassembled into a single description.
  • Avoid locale conflicts:
    • Advanced descriptions in different locales must use distinct records and must not conflict in extras.
  • Extras constraints and display:
    • Extras should contain only key-value pairs.
    • Display extras elegantly in the OCL concept detail panel (not raw JSON) even with multiple fields, suggestion:
{
    "label": "It would replace the key on the panel",
    "display": "It would replace the value on the parsed view on panel",
    "related_description_external_id": "in this case the related external id of the description would be placed here",
    "other": "such as description, value, metadata, ..."
}
  • Consider enabling OCL to support alternate extras parsing/display methods in the concept panel (e.g., label/display fields and related_description_external_id for linking).

Acceptance criteria

  • Given advanced description parts that share an external_id relationship, the data model can represent the linkage without extras conflicts across locales.
  • Given the concept detail panel, advanced attributes are displayed in a readable, structured way (not raw JSON).
  • Given OpenMRS conversion, advanced description parts can be reassembled into a single description using the stored linkage.

Metadata

Metadata

Labels

discussion-neededFlagged for discussion on OCL Community call

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions