LHNCBC / formbuilder-lhcforms

Build LHC-Forms and FHIR Questionnaires
Other
26 stars 21 forks source link

help for finding valueSet.url #80

Open Rosnyni opened 5 months ago

Rosnyni commented 5 months ago

As formBuilder user, not necessarily familiar with ValueSet en CodeSystem management, the current field answer value set requires me to find the url on my own, which is not very user friendly.

We are thinking of adding some feature on the formbuilder to help Questionnaire conceptors to fill this field.

We have currently 3 ideas in mind.

Autocomplete for Answer value set field

This option consists only in providing an autocomplete feature in this field based on the ValueSets available in the FHIR serveur defined in the preferredTerminologyServer extension.

The autocomplete can be based on the url only, or on other attributes of the questionnaire (name, title, id... like for the units field with UCUM).

ValueSet search engine

It consists in :

ValueSet (and CodeSystem) management tool (light)

It consists in having a new interface that allows ValueSet edition "for dummies". We do not have a clear idea on how to manage this, because we don't want the user to face the complexity of valueSet composition from codesystem.

One option would be to associate resources (valueSet, codeSystem and questionnaire) based on their useContext. The FormBuilder would only allow, for a questionnaire with useContext A :

The user interface would mask most of the complexity to the user by only asking for a title, a list of terms, and maybe a description and a status. The tool would automatically create the codeSystem The tool would automatically add any term filled by the user as a concept (flat list)

However it is clearly not an option that allow the creation of well managed terminological resources...

Are you interested in working on such development? (We will do but having more brain on this topic could lead to better feature and less maintenance).

Sincerely

plynchnlm commented 5 months ago

We're discussing this internally, but thanks for the suggestions. My current thought is that the second option (a dialog like the import of Questionnaires from a FHIR server) is probably the best option because it lets you select parameters.

Also, someone requested the ability to create "contained" ValueSets. Doing that would look more like your third option.

I had not really considered "useContext" before. Are those important to you?

Rosnyni commented 5 months ago

I have seen some comment about the use of contained resources on the chat fhir. I did not think a lot about it, maybe because a significant portion of our terminological resources are shared between multiple Questionnaires and we have no particular issue managing valueSet independantly.

But maybe I am missing something.

Use Context sounds like a good candidate in the perspective to ease filtering and searching of our resources. As we will have to manage a lot of questionnaire, it is probably something we will work on event if we don't use it for some terminology feature in the formbuilder.

plynchnlm commented 5 months ago

We think that that feature that would be immediately useful would be the dialog for searching for ValueSets. If you would like to implement that we would welcome a PR; otherwise we will add it to our list. For building and editing ValueSets, David Hay created a tool (currently broken) at http://clinfhir.com/valuesetCreator.html. I checked with him and he is interested in fixing it, particularly if there would be some real users. Of course, it is hard to assess whether it would meet your needs given that it is broken, but does the idea of using a tool external to the NLM Form Builder for managing ValueSet creating and editing sound okay?

Rosnyni commented 5 months ago

For the dialog for searching for ValueSets, I have to check internally, I'll have a better view on what we can do in ten days.

For building and editing ValueSets, as you say, it is hard to assess :-). In fact we have two needs:

  1. having something simple enough for people that are not familiar with FHIR to use in the formbuilder
  2. having a richier tool, probably external to the formbuilder, for users more familiar with FHIR and terminological resources.

So, it sounds ok, thanks !

Rosnyni commented 4 months ago

A brief update on this topic:

We have worked on this topic and we drafted a simple valueSet searching interface that popup for the "answer value set" field :

image

image

The text search rely on a simple _content:contains searchparameter : e.g. _content:contains=maternit. I think we will change this...

The two booleans rely on the usecontext attribute.

  1. The valueSets and quesitonnaires of interest in our usecase have one useContext
    • the code is fixed
    • the value can be area specific (e.g. maternité), or "transversal"
  2. The first boolean filter the search by context-type-value=transversal
  3. The second boolean filter the search by context-type-value=<current questionnaire useContext.value>

We thought to add the possibility to allows search in the current questionnaire contained resources, but it appears that the formbuilder truncates contained resources.

plynchnlm commented 4 months ago

It looks nice, though we would have to give some thought about what to do, in the general case, for checkboxes like those.

I am not aware of the formbuilder truncating contained resources. Can you give an example?

Rosnyni commented 4 months ago

I have uploaded a simple questionnaire with a simple contained resource in my server (on your the contained section is truncated):

{
    "resourceType": "Bundle",
    "type": "transaction",
    "entry": [
        {
            "resource": {
                "resourceType": "Questionnaire",
                "contained": [
                    {
                        "resourceType": "Practitioner",
                        "id": "p1",
                        "name": [
                            {
                                "family": "Person",
                                "given": [
                                    "Patricia"
                                ]
                            }
                        ]
                    }
                ],
                "id": "container-example-2-quest",
                "url": "https://aphp.fr/ig/fhir/eds/Questionnaire/container-example-2-quest",
                "name": "ContainerQuestExampleDeux",
                "title": "container-example-2-quest",
                "status": "draft",
                "date": "2023-11-01T12:11:21.000Z",
                "item": [
                    {
                        "linkId": "F_MATER_001661",
                        "text": "Grossesse suivie au diagnostic prénatal",
                        "type": "boolean"
                    }
                ]
            },
            "request": {
                "method": "PUT",
                "url": "Questionnaire/container-example-2-quest"
            }
        }
    ]
}

And when I load it with the formbuilder, the contained section does not appear in the json preview :

After some test, it works if the questionnaire import is performed from the item interface, not if it is done from the questionnaire interface or the connection interface :-/

plynchnlm commented 4 months ago

That was definitely not intended. I was not able to get to work from any of the three places you mentioned, but then I was uploading from a file. Maybe it only works if you upload from a FHIR server? Anyway, I have added an internal tracker item for this.

akanduru commented 1 month ago

The bug about missing contained field is fixed in form builder version 9.6.3.