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.
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:
The diagnosis sources that are used to query for diagnoses are determined by the EMR API from a global property.
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.
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.