LHNCBC / formbuilder-lhcforms

Build LHC-Forms and FHIR Questionnaires
Other
28 stars 22 forks source link

suppression of unit in the UI impact on json not correct #69

Open Rosnyni opened 1 year ago

Rosnyni commented 1 year ago

filling the unit field of an integer item

image

leads to the following json :

{
  "item": [
    {
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
          "valueCoding": {
            "system": "http://unitsofmeasure.org",
            "code": "g/L",
            "display": "gram per liter"
          }
        }
      ],
      "linkId": "2603837273225",
      "text": "New item 1"
    }
  ],
  "resourceType": "Questionnaire",
  "title": "New Form",
  "status": "draft"
}

And it is good.

However, deleting the content of the units field :

image

leads to the following json :

{
  "item": [
    {
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit",
          "valueCoding": {
            "system": "http://unitsofmeasure.org",
            "code": "g/L",
            "display": "gram per liter"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit"
        }
      ],
      "linkId": "2603837273225",
      "text": "New item 1"
    }
  ],
  "resourceType": "Questionnaire",
  "title": "New Form",
  "status": "draft"
}

Which is not good I think.

plynchnlm commented 1 year ago

Confirmed. Thanks for this report.