Concepts overview for R&D
configuration
clinical
Evn
lookups
i18n
user data
etc.
Save
Cancel
Model :
Meta-Data -
// 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
{
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'
}
}
}The layout adds visual description to the
view model:
// layout
{
align: Alignment.Tabs,
// optional- Alignment.Vertical,
// Alignment.Horizontal
children: [
{
fieldName:
'firstNameField'
},
{
fieldName:
'lastNameField'
},
{
fieldName:
'fullNameField'
},
{
fieldName:
'orderKeyField'
}
]
}Collapsible boxes
// view-model
{
lastNameField: {
lable: 'Last name',
path: 'lastName',
validations: {
required: true
},
validationsErrorMessage:
"Last name is required"
},
...
}// 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'
},
...
}
View Model is structured using:
{
"label": "My Form",
"fields": {
"group_1": {
"label": "Pregnancy",
"fields": {
"field_1": {
"label": "Breast feeding",
"path": "visit.0.orders.0.cbIsBreastfeeding"
},
"field_2": {
"label": "Pregnancy",
"path": "visit.0.orders.0.cbOPregnant"
}
}
},
"group_2": {
"label": "Clinical Indications",
"fields": {
"field_1": {
"label": "Diabetic",
"path": "visit.0.orders.0.siteProtCOClinicalInd.0.cbIsSpoDiabetic"
},
"field_2": {
"label": "Asthmatic",
"path": "visit.0.orders.0.siteProtCOClinicalInd.0.cbIsSpoAsthmatic"
}
}
}
}
}server side
// id: 235
{
"label": "My Form",
"fields": {
"group_1": {
"storedFormId": 422
},
"group_2": {
"storedFormId": 423
}
}
}// id: 422
{
"label": "Pregnancy",
"fields": {
"field_1": {
"label": "Breast feeding",
"path": "visit.0.orders.0.cbIsBreastfeeding"
},
"field_2": {
"label": "Pregnancy",
"path": "visit.0.orders.0.cbOPregnant"
}
}
}// id: 423
{
"label": "Clinical Indications",
"fields": {
"field_1": {
"label": "Diabetic",
"path": "visit.0.orders.0.siteProt..."
},
"field_2": {
"label": "Asthmatic",
"path": "visit.0.orders.0.siteProt..."
}
}
}| form | sub-form |
|---|---|
| 235 | 422 |
| 235 | 423 |
when the client asks for form #235, the server will return the form + all of its descendants sub-forms
| form | form version | sub-form | sub-form version |
|---|---|---|---|
| 235 | 1 | 422 | 1 |
| 235 | 1 | 423 | latest |
client side
{
"label": "My Form",
"fields": {
"group_1": {
"label": "Pregnancy",
"fields": {
"field_1": {
"label": "Breast feeding",
"path": "visit.0.orders.0.cbIsBreastfeeding"
},
"field_2": {
"label": "Pregnancy",
"path": "visit.0.orders.0.cbOPregnant"
}
}
},
"group_2": {
"label": "Clinical Indications",
"fields": {
"field_1": {
"label": "Diabetic",
"path": "visit.0.orders.0.siteProtCOClinicalInd.0.cbIsSpoDiabetic"
},
"field_2": {
"label": "Asthmatic",
"path": "visit.0.orders.0.siteProtCOClinicalInd.0.cbIsSpoAsthmatic"
}
}
}
}
}ViewModelAnalyzer - input
{
"label": "My Form",
"fields": {
"group_1": {
"path": "visit.0.orders.0",
"label": "Pregnancy",
"fields": {
"field_1": {
"label": "Breast feeding",
"path": "cbIsBreastfeeding"
},
"field_2": {
"label": "Pregnancy",
"path": "cbOPregnant"
}
}
},
"group_2": {
"path": "visit.0.orders.0.siteProtCOClinicalInd.0",
"label": "Clinical Indications",
"fields": {
"field_1": {
"label": "Diabetic",
"path": "cbIsSpoDiabetic"
},
"field_2": {
"label": "Asthmatic",
"path": "cbIsSpoAsthmatic"
}
}
}
}
}ViewModelAnalyzer - result
Redux inspired data flow
TBD