Added the support for the Item Control grid extension.#117
Added the support for the Item Control grid extension.#117nikhil-ht-el wants to merge 10 commits intoLHNCBC:masterfrom
Conversation
package.json
Outdated
| "typescript": "~4.8.4", | ||
| "webpack-cli": "^4.10.0" | ||
| "webpack-cli": "^4.10.0", | ||
| "lodash": "^4.17.21" |
There was a problem hiding this comment.
We don't want to add another 70KB unless it's absolutely necessary. forEach and includes could be done without lodash.
src/app/app.module.ts
Outdated
| import { LhcButtonPopoverComponent } from './lhc-button-popover/lhc-button-popover.component'; | ||
| import { LhcItemAttachmentComponent } from './lhc-item-attachment/lhc-item-attachment.component'; | ||
| import { LhcItemMessagesComponent } from './lhc-item-messages/lhc-item-messages.component'; | ||
| import { LhcItemGirdComponent } from './lhc-item-gird/lhc-item-gird.component'; |
There was a problem hiding this comment.
Please rename it to lhc-group-grid as it is similar to lhc-group-matrix.
| @@ -0,0 +1,51 @@ | |||
| <div *ngIf="item" class="lhc-layout-grid lf-table-item {{lhcDataService.getSiblingStatus(item)}}"> | |||
| <div class="lf-form-grid-table-title" *ngIf="!formLevel"> | |||
There was a problem hiding this comment.
The CSS class names starting with 'lf-' are legacy names used in the previous versions of lforms, and will be cleaned up eventually. Please use 'lhc-' when adding new CSS class names.
| <table class="lf-form-grid-table lf-form-table"> | ||
| <colgroup> | ||
| <col class="lf-question"> | ||
| <col *ngFor="let answer of item.items[0].answers"> |
There was a problem hiding this comment.
The number of columns should be from item.items, right? The "other-answer" is not needed. Your implementation looks similar to the "matrix" ("table in fhir itemControl). If that's what you need, "matrix" has been implemented in lforms.
There was discussion on chat.fhir.org (https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/Grid.20Question) that the items under each group are not necessary same. The grid could be sparse.
|
Please add a small test Questionnaire and some tests. (But first see Ye's comment about about whether "grid" is what you need or not. Grid columns should not be from item answer lists. See https://build.fhir.org/valueset-questionnaire-item-control.html .) |
Added the support for the Item Control grid extension.