Dynamic Views & Forms

Concepts overview for R&D

configuration

  • view-model
  • layout

clinical

  • model
  • meta-data

Evn

lookups

i18n

user data

etc.

Save

Cancel

Model - Meta-Data

Model :

  • the clinical entities (e.g. patient, visit, order)
  • raw data
  • functionality (e.g. calcFullName(),  isOrderUrgent())
  • schema dependent by configuration

Meta-Data -

  • description of the structure of the Model
  • includes raw data and functionality
  • schema-dependent
  • auto-generated (TBD)

model - metadata

// model

{
    personKey: 1030210250.0,
    lastName: "Davidson",
    firstName: "David",
    get fullName() { return
        `${this.lastName}, ${this.firstName}`;
    },
    visit: [
        {
            visitKey: 2000009164.0,
            patientClass: "Emergency",
            orders: [
                {
                    orderKey: 1203000316539.0,
                    reasonForOrder: "test me"
                }
            ]
        }
    ]
}
// metadata

{
    personKey: { type: 'number', id: true },
    lastName: { type: 'text' },
    firstName: { type: 'text' },
    fullName: { type: 'text', calculated: true },
    visit: {
        type: 'group',
        multiple: true,
        fields: {
            visitKey: { type: 'number', id: true },
            patientClass: { type: 'text' },
            orders: {
                type: 'group',
                multiple: true,
                fields:  {
                    orderKey: { 
                        type: 'number',
                        id: true
                    },
                    reasonForOrder: { type: 'text' }
                }
            }
        }
    }
}

view-model

 

  • describes the form's functionality
  • binding (linking data and ui)
  • behavior (inter-fields relations, show hide, validations e.g.)
  • does not define view properties
// view-model

{
    lable: 'Patient Form',
    fields: {
        firstNameField: {
            lable: 'First Name',
            path: 'firstName'
        },
        lastNameField: {
            lable: 'Last Name',
            path: 'lastName'
        },
        fullNameField: {
            lable: 'Full Name',
            path: 'fullName'
        },
        orderKeyField: {
            lable: 'Order Key',
            path: 'visit.0.orders.0.orderKey'
        }
    }
}

modularity

 View Model is structured using:

  • model properties (e.g. firstName)
  • calculated properties (e.g. isOrderCritical())
  • Sub View Models
    • Pregnancy Details View Model
    • may be applied to their relevant input
  • Custom components
    • Pre-developed components to handle complex structures and behavior 

layout

A layout add visual description to the

view model:

  • Orientation: Vertical/Horizontal
  • Navigation: Tabs etc. 
  • Collapsible boxes
  • Pop Up (activated by buttons)
  • Styling properties such as colors
  • Has the same structure as the view model

 

 

 

  • in the future, multiple layouts may be available for a given view model
// layout

{
    align: Alignment.Tabs, 
    // optional- Alignment.Vertical,
    //           Alignment.Horizontal
    children: [
        {
            fieldName:
                'firstNameField'
        },
        {
            fieldName:
                'lastNameField'
        },
        {
            fieldName:
                'fullNameField'
        },
        {
            fieldName:
                'orderKeyField'
        }
    ]
}

Collapsible boxes

Popup

Tabs

Validations

  • field level
  • defined in the view model
  • visual indication bubble up to the relevant level
  • validation for example:
    • is number
    • required

Defaults

  • implemented using the view model and/or the model
  • require analysis for different scenarios (edit/new for the same field and possibly using the same form e.g.)

lookups

// model

{
    ...
    genderKey: 2.0,
    FKLookupRows: {
        genderKey: {
            genderKey: 2.0,
            description: "Male"
        }
    }
}
// metadata

{
    ...
    genderKey: {
        type: 'lookup',
        lookupName: 'GENDER',
        lookupKey: 'genderKey',
        lookupDescription: 'description'
    }
}
// view-model

{
    gender: {
        lable: 'Gender',
        path: 'genderKey'
    },
    ...
}

Result

// model

{
    personKey: 1030210250.0,
    lastName: "Davidson",
    firstName: "David",
    get fullName() { return ... },
    visit: [
        {
            visitKey: 2000009164.0,
            patientClass: "Emergency",
            orders: [
                {
                    orderKey: 1203000316539.0,
                    reasonForOrder: "test me"
                }
            ]
        }
    ]
}

(angular Control)

(angular Control)

(angular Control)

Copy of deck

By eladdo92

Copy of deck

  • 352