sync-for-science / tracking

Issue tracking for S4S reference stack development
0 stars 0 forks source link

Test Suite: Conditions test fires a warning when codes are not SNOMED #101

Open daliboz opened 7 years ago

daliboz commented 7 years ago

The Test suite is firing warnings that not all conditions are coded to SNOMED. However, the argonaut recommendation/requirement to use that coding only applies to problems and health-concerns. Since the suite is not filtering by those types, it also may get other conditions. In the Cerner case (why I'm reporting this), it's because Diagnoses are returned in ICD*.

The suite should either apply this test/warning to only problems and health-concerns, or should limit the query by category. Note, the category parameter is considered optional to support by Argonaut: http://www.fhir.org/guides/argonaut/r2/StructureDefinition-argo-condition.html#search

daliboz commented 7 years ago

Example of diagnosis with ICD from tests:

{
    "fullUrl": "https://fhir-myrecord.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Condition/d36454559",
    "resource": {
      "resourceType": "Condition",
      "id": "d36454559",
      "meta": {
        "versionId": "36454559",
        "lastUpdated": "2017-02-16T20:57:18.000Z"
      },
      "text": {
        "status": "generated",
        "div": "\u003Cdiv\u003E\u003Cp\u003E\u003Cb\u003ECondition\u003C/b\u003E\u003C/p\u003E\u003Cp\u003E\u003Cb\u003EPatient\u003C/b\u003E: SMART, FRED RICK\u003C/p\u003E\u003Cp\u003E\u003Cb\u003EDiagnosis\u003C/b\u003E: Dysphagia, neurologic, Other somatoform disorders\u003C/p\u003E\u003Cp\u003E\u003Cb\u003EClinical Status\u003C/b\u003E: active\u003C/p\u003E\u003Cp\u003E\u003Cb\u003EVerification Status\u003C/b\u003E: Confirmed\u003C/p\u003E\u003Cp\u003E\u003Cb\u003EOnset\u003C/b\u003E: 2017-02-16\u003C/p\u003E\u003C/div\u003E"
      },
      "patient": {
        "reference": "Patient/4478007",
        "display": "SMART, FRED RICK"
      },
      "encounter": {
        "reference": "Encounter/4135906"
      },
      "asserter": {
        "reference": "Practitioner/4554007",
        "display": "JUX, PW"
      },
      "dateRecorded": "2017-02-16",
      "code": {
        "coding": [{
          "system": "http://hl7.org/fhir/sid/icd-10-cm",
          "code": "F45.8",
          "display": "Other somatoform disorders",
          "userSelected": false
        }],
        "text": "Dysphagia, neurologic"
      },
      "category": {
        "coding": [{
          "system": "http://hl7.org/fhir/condition-category",
          "code": "diagnosis",
          "display": "Diagnosis"
        }],
        "text": "Diagnosis"
      },
      "clinicalStatus": "active",
      "verificationStatus": "confirmed",
      "onsetDateTime": "2017-02-16"
    }