synthetichealth/module-builder

Deleting observations on a DiagnosticReport just puts a null value in the observation array

eedrummer opened this issue · 0 comments

Steps to reproduce:

  1. Create a new module
  2. Create a new DiagnosticReport state
  3. Add two observations
  4. Remove the first observation
  5. Look at the GMF JSON

You will see the following for the observations property on the DiagnosticReport state:

"observations": [
        null,
        {
          "category": "laboratory",
          "unit": "",
          "codes": [
            {
              "system": "LOINC",
              "code": "1234",
              "display": "LOINC Code"
            }
          ],
          "exact": {
            "quantity": 1
          }
        }
      ]

The null in the array should not be there. It should just be an array with a single value.