Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new widget #149

Open
DaniArj1980 opened this issue May 21, 2024 · 3 comments
Open

A new widget #149

DaniArj1980 opened this issue May 21, 2024 · 3 comments

Comments

@DaniArj1980
Copy link

Good afternoon,

I don't know if you can help me, I have created a new widget as follows.

image

When making a selection, I would need something like this to be generated in the Questionnaire.

"code": [
{
"system": "EDO_SYSTEM",
"code": "EDO_CODE",
"display": "EDO"
},
{
"system": "BOTULISMO_SYSTEM",
"code": "BOTULISMO ",
"display": "BOTULISMO"
}
],

The code system, display fields are obtained from each dropdown.

If anyone could help me, thank you very much.

Best Wishes.

@plynchnlm
Copy link
Member

I think you mean that the codes would appear in the (FHIR) QuestionnaireResponse. The answer for each question would appear under its own "item" in the QuestionnaireRepsonse (item.answer.valueCoding), and not listed together in the same array as you are showing. Is that okay?

@DaniArj1980
Copy link
Author

DaniArj1980 commented May 23, 2024

No, my idea is that by adding the new widget.

image

The following appears when you select a drop-down menu when you select JSON preview.

image

The system, code and display had already been previously loaded in the information of the drop-down menu

@plynchnlm
Copy link
Member

I understand. So, in the short term you would need to modify the form builder to include your widget and set the codes on the Questionnaire it generates. Longer term, we have been thinking about adding a lookup feature to the system/code/display fields for item answerOption, and we could do the same for the Questionnaire code. That would not be quite the same thing, though, because you would just be picking one code, and it wouldn't be grouped by the type. Probably we could add support for hierarchical CodeSystems, so that if you defined type/subtype codes as a CodeSystem with hierarchy, we could display that hierarchy (at least for two levels) in single list, or perhaps with two list fields as you have in your picture. However, it seems like a special-case feature to include both the code and the sub-code in the Questionnaire, so you might be better off with your own customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants