Searching diagnosis concepts through EMRAPI results error if a particular concept source is not setup.

This is probably related to EA-131 ticket. My broad level questions are

  1. Is the “EmrConceptSearchController” only serves to search “Diagnosis Concepts”? This line of code seems to find concept sources that are specific to diagnosis concept.

  2. Should the concept search be limited to a single concept source? If it is so we decided, then fine. still the “concept source” is hard coded to “ICD-10-WHO” here. Why so? I would assume that the name of the source is defined through some global property. I can consider “ICD-10-WHO” to be the default, but why not giving a way to override the default ? Btw, ICD 11 has been in the draft for sometime.

  1. Even if all the above are somewhat acceptable, the call will break at this line, if the “concept sources” are not found!
  • currently throws a Null pointer exception if a system does not define “ICD-10-WHO” concept source.
  • either send an empty list from “emrApiProperties.getConceptSourcesForDiagnosisSearch()”
  • or modify EmrConceptSearchController .createListResponse() to handle appropriately for empty/null sources.

@darius, @shruthipitta, @dkayiwa

Your point 2 should be addressed through the following ticket:

EA-130 - Concept sources for diagnosis search to be configurable via GP or Metadata Mapping

I created a ticket for point 3 also:

EA-136 - EmrConceptSearchController should not throw an error if concept sources are not configured as expected

1 Like

i would actually think since getConceptSourcesForDiagnosisSearch returns a list of concept sources, it makes sense for the GP to expect a list of source for such as; “ICD-10-WHO, ICD 11

There’s another issue with the code, as evident from this line.

It only searches concepts defined in locale English! At the minimum, it should search for concepts defined in the system default locale. (it is mandatory to do so).

I have signed up for EA-130, I will do the above as part of the PR

1 Like