英文:
Personalizing question text in a FHIR Questionnaire
问题
通常情况下,我期望 FHIR 问卷的问题文本是静态的(例如 PHQ-9 问卷)。然而,对于非标准化的表单,比如特定于一家诊所的问卷,可能存在需要根据用户体验个性化的问题。
一种情况是父母/监护人填写他们的儿童受抚养者的信息表。为了更贴近个人,问题文本可以是类似于“请告诉我们约翰的身高”的内容。
我能想到两种方法来实现这一点与 FHIR 问卷一起使用:
-
在问卷内部创建伪模板化业务逻辑。这将要求使用此资源的任何消费者理解模板化。例如:
- Questionnaire.item .text: "请告诉我们 {dependent_name} 的身高。"
- Questionnaire.item .extension[] -> 创建一个新的扩展,将模板变量 "dependent_name" 映射到一个枚举或标识符 "DEPENDENT_NAME"。消费者需要知道当他们看到这个时,去找出名称。
-
基于参考/静态问卷生成个性化的 FHIR 问卷。该问卷仍然会包含一些文本,指示需要替换的部分,但每个信息表将生成参考问卷的副本,根据需要填充文本,并将这份个性化副本提供给患者。
- Reference Questionnaire.item .text: "请告诉我们 {dependent_name} 的身高。"
- Personalized Questionnaire.item .text: "请告诉我们约翰的身高。"
- Personalized Questionnaire.derivedFrom: 参考参考问卷的规范。
还有其他适用于这些情况的选项吗?
英文:
Generally I would expect a FHIR Questionnaire's questions' text to be static (i.e. a PHQ-9 Questionnaire). However for non-standardized forms, such as an intake specific to one clinic, there could be questions where the text should be personalized for user experience.
A scenario would be a parent / guardian filling out an intake for their pediatric dependent. For a more personal touch, the question text could be something like "Please tell us John's height".
There's two approaches I can think of to make this work with FHIR Questionnaires:
-
Create pseudo-templating business logic within a Questionnaire. This would require any consumer of this resource though to understand the templating. For example:
- Questionnaire.item .text: "Please tell us {dependent_name}'s height."
- Questionnaire.item .extension[] -> A new extension mapping the template variable "dependent_name" to an enum or identifier "DEPENDENT_NAME". Consumers need to know when they see this, go figure out the name.
-
Generate personalized FHIR Questionnaires off of a reference / static Questionnaire. This Questionnaire would still include something in the text indicating it needs to be replaced, but each intake would generate a copy of that reference Questionnaire, populating the text as needed, and serving this personalized copy to the patient.
- Reference Questionnaire.item .text: "Please tell us {dependent_name}'s height."
- Personalized Questionnaire.item .text: "Please tell us John's height."
- Personalized Questionnaire.derivedFrom: canonical reference to the reference Questionnaire.
Are there any other options for these types of scenarios?
答案1
得分: 1
有一个标准扩展可以实现你想要的功能。如果你查看SDC高级渲染配置文件,你会看到item.text元素上有一个cqf-expression扩展。这允许你指定一个FHIRPath或CQL表达式,用于确定渲染文本的内容。(你也可以对高级行为配置文件上的其他元素执行类似的操作。)
另请查看SDC关于表达式的部分,它将提供如何使用诸如launch-context扩展设置某些变量的指导。
英文:
There's a standard extension for doing what you want to do. If you look at the SDC Advanced Rendering profile, you'll see there's a cqf-expression extension on the item.text element. That allows you to specify a FHIRPath or CQL expression that determines what the rendered text ought to be. (You can do the same thing for a bunch of other element on the Advanced Behavior profile.)
Also take a look at the SDC section on expressions which will give guidance on how to set some of those variables using things like the launch-context extension.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论