dot-base / icd-10-api

Rest API to search the 10th revision of the International Statistical Classification of Diseases Database.
GNU General Public License v3.0
18 stars 4 forks source link

API returns Coding Extension without url #24

Closed rti closed 3 years ago

rti commented 3 years ago

🔥 Bug Description

Results contain an extension with no url set. This is not a valid FHIR resource as extension urls are mandatory.

http://127.0.0.1:3000/api/icd10?search=akute%20sinusitis%20maxi

[
  {
    "item": {
      "code": "J01.0",
      "display": "Akute Sinusitis maxillaris",
      "definition": "Akute Sinusitis maxillaris",
      "property": [
        {
          "code": "kind",
          "valueCode": "category"
        },
        {
          "code": "parent",
          "valueCode": "J01"
        },
        {
          "code": "inclusion",
          "valueString": "Akute Kieferhöhlenentzündung"
        }
      ],
      "extension": [
        {
          "id": "displayCopy",
          "valueString": "AkuteSinusitismaxillaris"
        }
      ],
      "modifierExtension": [
        {
          "id": "InclusionCopy",
          "valueString": "AkuteKieferhöhlenentzündung"
        }
      ]
    },
    "refIndex": 4302,
    "matches": [
      {
        "indices": [
          [
            14,
            17
          ],
          [
            5,
            13
          ],
          [
            0,
            4
          ]
        ],
        "value": "AkuteSinusitismaxillaris",
        "key": "extension.valueString",
        "refIndex": 0
      }
    ],
    "score": 0.12589254117941673
  }
]

Possible solution