Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-1610

<encounterDiagnoses*></encounterDiagnoses> to specify a 'diagnosisConceptSources' attribute

    XMLWordPrintable

    Details

    • Complexity:
      M

      Description

      1. Background

      The diagnoses pool that is known and used by the Ref App (and in particular by EMR API) is controlled by two GPs: EmrApiConstants.GP_DIAGNOSIS_SET_OF_SETS and EmrApiConstants.EMR_CONCEPT_SOURCES_FOR_DIAGNOSIS_SEARCH.

      The use of HFE tags <encounterDiagnoses/> and <encounterDiagnosesByObs/> assumes the user wants to choose diagnoses defined by the concept source specified by the above mentioned GP. This may include diagnoses from unwanted sources for the HFE usage.

      2. Description

      The <encounterDiagnoses*/> tags should allow to override the diagnosis sources such that diagnoses relevant to the form are fetched for usage.

      The tags should provide a way to specify the diagnosis sources names in the form of a comma separated list if more than one source, something along the line below is ok:

      <encounterDiagnoses diagnosisSourceNames="ICPC,CIEL"/>
      
      3. Dev Notes

      The diagnosis sources that are used to query for diagnoses are determined by the EMR API from a global property.

      4. Proposed Solution

      Create a new attribute diagnosisConceptSources for the EncounterDiagnosesElement and EncounterDiagnosesByObsElement that will be passed into the encounterDiagnoses.gsp through its config and attached to the <input id="diagnosis-search"...../> element. This would then look like.

      <input id="diagnosis-search" ........ diagnosisConceptSources="${config.diagnosisConceptSources}"/>
      

      Our JavaScript routines in scripts/diagnoses/diagnoses-angular.js will pick up the value of this input attribute (attr.diagnosisconceptsources) and use it when fetching diagnoses during the XHR/fetch.

      For backwards compatibility, if the diagnosisConceptSources attribute doesn't exist or is empty then the diagnosis concept sources defined by the global property  EmrApiConstants.EMR_CONCEPT_SOURCES_FOR_DIAGNOSIS_SEARCH will be used.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ruhanga Nathan Ruhanga
              Reporter:
              ruhanga Nathan Ruhanga
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: