Forum Discussion

pcho's avatar
pcho
Data Storage
03-11-2024

First occurrence of a field

Hello. I work with healthcare dashboards. For the data elements that have one-to-many relationships, is there a script for a widget, so that the table within the widget only selects the first field of that data element?

For example, there's a data element called "secondary provider impression" that can have "cardiac arrest", "chest pain", or "cough", etc. But I only want the table/dashboard to show the first value that is not null.

Thank you!

4 Replies

Replies have been turned off for this discussion
    • pcho's avatar
      pcho
      Data Storage

      Unfortunately as database users, we don't have access to Data Models or modifying SQL. We can only edit scripts for each widget or overall dashboard.

      • DRay's avatar
        DRay
        Admin

        I'll see what I can find out, but if this is something that will need to be used frequently, especially across multiple Widgets or Dashboards, it would be better to have it on the Data level. Keeping track of and updating individual Widget and Dashboard scripts is not going to scale well. 🙂