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

conditionnal display not well managed #143

Open
Rosnyni opened this issue Feb 6, 2024 · 4 comments
Open

conditionnal display not well managed #143

Rosnyni opened this issue Feb 6, 2024 · 4 comments

Comments

@Rosnyni
Copy link

Rosnyni commented Feb 6, 2024

I just uploaded a Questionnaire on https://lforms-fhir.nlm.nih.gov/baseR4 titled "form illustrating issue in conditional display resolution" to illustrate the bug I met.

Theoretically, the form act as follow :

  • if 'aucun antécédent' is true, the 3 other field are disabled
  • if one of the 3 other field is true, the 'aucun antécédent' field is disabled.

When loading the form in your preview tool, it does not act well if the 'aucun antécédent' field is true :

image

Using the csiro renderer (here), it works well.

When deleting the conditional displays on the 'aucun antécedent' field, it works :

image

I found this open issue, that look a little bit like this one, but I don't understand it very well.

@plynchnlm
Copy link
Member

We are looking into this. LHC-Forms throws an exception when trying to update the display status (maybe going into a loop because the items refer to each other via the enableWhen-- but that is just a guess).

@plynchnlm
Copy link
Member

plynchnlm commented Feb 6, 2024

Since our FHIR server resets itself, I am pasting the Questionnaire referenced above here so we doing lose this test case:

{
  "resourceType": "Questionnaire",
  "id": "[5770853](https://lforms-smart-fhir.nlm.nih.gov/v/r4/fhir/Questionnaire/5770853)",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2024-02-06T10:00:41.000-05:00",
    "source": "#6P24rcs39k6A1KvN",
    "tag": [
      {
        "code": "lformsVersion: 29.0.0"
      }
    ]
  },
  "url": "https://aphp.fr/ig/fhir/sdc/Questionnaire/test_conditionnal_loop",
  "title": "form illustrating issue in conditional display resolution",
  "status": "draft",
  "item": [
    {
      "linkId": "2968534520641",
      "text": "Traumatisme ou blessure ligamentaire",
      "type": "boolean",
      "enableWhen": [
        {
          "question": "3109258400896",
          "operator": "!=",
          "answerBoolean": true
        }
      ],
      "enableBehavior": "all",
      "repeats": false,
      "initial": [
        {
          "valueBoolean": false
        }
      ]
    },
    {
      "linkId": "366620113335",
      "text": "Troubles congénitaux ou développementaux",
      "type": "boolean",
      "enableWhen": [
        {
          "question": "3109258400896",
          "operator": "!=",
          "answerBoolean": true
        }
      ],
      "enableBehavior": "all",
      "repeats": false,
      "initial": [
        {
          "valueBoolean": false
        }
      ]
    },
    {
      "linkId": "5052291573689",
      "text": "Autres troubles articulaires",
      "type": "boolean",
      "enableWhen": [
        {
          "question": "3109258400896",
          "operator": "!=",
          "answerBoolean": true
        }
      ],
      "enableBehavior": "all",
      "repeats": false,
      "initial": [
        {
          "valueBoolean": false
        }
      ]
    },
    {
      "linkId": "3109258400896",
      "text": "Aucun antécédent",
      "type": "boolean",
      "enableWhen": [
        {
          "question": "2968534520641",
          "operator": "!=",
          "answerBoolean": true
        },
        {
          "question": "366620113335",
          "operator": "!=",
          "answerBoolean": true
        },
        {
          "question": "5052291573689",
          "operator": "!=",
          "answerBoolean": true
        }
      ],
      "enableBehavior": "all",
      "repeats": false,
      "initial": [
        {
          "valueBoolean": false
        }
      ]
    }
  ]
}```

@lhcye
Copy link
Contributor

lhcye commented Feb 8, 2024

It is a bug and it is fixed in version 35.0.1. Please give it a try. Thanks for the reporting it to us.

@plynchnlm
Copy link
Member

I think we'll need to update the version of lforms used by the NLM Form Builder for you to see the fix.

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

3 participants