beda-software / fhir-emr

EMR based on FHIR
MIT License
70 stars 28 forks source link

Patient dashboard #230

Closed ir4y closed 1 month ago

ir4y commented 7 months ago

The patient dashboard layout should be dynamically configurable. Instead of a hardcoded set of widgets, a dashboard should load layout configuration from the react context.

During the app initialization, we provide a layout configuration. it should define: the default layout, the default layout for a specific user role, and the layout for the practitioner role. The patient dashboard load layout is based on the current user and shows it.

dashboard layout configuration is a list of the following elements:

{
query: {
    resourceType: "Observation",
    search: { #Arguments for getFHIRResources function
        code: 'http://loinc.org|2160-0',
        _sort: ['-date']}
},
widget: CreatinineDashoboard, // React component for the dashboard widget 
layout: {
    position: 'top', // bottom, left, right
    order: 1} 
},