From 25977c834e8f6fc05cf77ef90adbef03b29217df Mon Sep 17 00:00:00 2001 From: Donald Kibet Date: Wed, 4 Oct 2023 15:59:11 +0300 Subject: [PATCH] (feat) Update diagnosis to support `rank` and `certainty` (#78) --- .../form-factory/question.factory.ts | 2 + .../form-renderer.component.html | 32 +++- .../value-adapters/diagnosis-helper.ts | 27 ++++ .../value-adapters/diagnosis.adapter.ts | 140 +++++++++++++++--- .../value-adapters/encounter.adapter.ts | 1 - src/app/adult-1.6.json | 75 ++++++++++ 6 files changed, 256 insertions(+), 21 deletions(-) create mode 100644 projects/ngx-formentry/src/form-entry/value-adapters/diagnosis-helper.ts diff --git a/projects/ngx-formentry/src/form-entry/form-factory/question.factory.ts b/projects/ngx-formentry/src/form-entry/form-factory/question.factory.ts index 8f71decb..56650313 100644 --- a/projects/ngx-formentry/src/form-entry/form-factory/question.factory.ts +++ b/projects/ngx-formentry/src/form-entry/form-factory/question.factory.ts @@ -808,6 +808,8 @@ export class QuestionFactory { } switch (renderType) { + case 'diagnosis': + return this.toDiagnosisQuestion(schema); case 'select': return this.toSelectQuestion(schema); case 'single-select': diff --git a/projects/ngx-formentry/src/form-entry/form-renderer/form-renderer.component.html b/projects/ngx-formentry/src/form-entry/form-renderer/form-renderer.component.html index a39693b2..4dafc20b 100644 --- a/projects/ngx-formentry/src/form-entry/form-renderer/form-renderer.component.html +++ b/projects/ngx-formentry/src/form-entry/form-renderer/form-renderer.component.html @@ -310,7 +310,7 @@
/>
+
+
+ + +
+
+
+