Seeking guidance Regarding "Dynamic EHR"

Hello everyone, I’m currently exploring the Dynamic EHR GSoC project, mentored by @nethmi . Since the requirement document is quite limited Doc , I could really use some guidance

Goal : Show relevant UI elements on the O3 home page and other Pages based on User Location, currenting displayed Visit / Encounter etc.

  1. There is this Pr “ O3-4931: Add ability to evaluate expressions in extensions by CynthiaKamau · Pull Request #1422 · openmrs/openmrs-esm-core · GitHub “ raised by CynthiaKamau . i guess this pr implemented some features what the project asks for. For instance, It implements expression-based display conditions for extensions. In broader context the project is asking for implementing this feature to navigations , pages right ?

  2. in this particular pr is using Store-level evaluation, the question is whether i should follow this same pattern (centralized store-level evaluation) or need something different .

    or Hybrid approach :

    1. This means the filtering will become:
      1. Store level: privilege check, feature flags
      2. Component level: expression evaluation with full context → final filtering
   observation:
// This slot's expressions CAN access patientUuid 
<ExtensionSlot name="patient-chart-widgets" state={{ patientUuid, visit }} /> 

// This slot's expressions CANNOT — no state passed 
<ExtensionSlot name="homepage-widgets" />


So even though evaluation happens at the store level, the context data enters through the component level.
  1. could you please explain a bit more what “reduced set of JavaScript expressions“ mentioned in the doc ? Is there an existing spec.

refrences

  1. O3: Privileges Plan? - #4 by florianrappl
  2. Location Based Access Control - v0.1.0 Released

Would really appreciate any guidance here. Thanks a lot!

cc: @ibacher @dennis @veronica