Encounter Diagnosis in React Form Engine

Hi,

I want to start work on adding the diagnosis feature to the RFE, i wanted to get some feedback on the proposed approach and if it will handle all use cases. I have added some pointers on how it works on HFE and RFE to provide context.

Encounter Diagnosis in HFE :

This Wiki link documents encounter diagnosis in the HFE.

HFE can record multiple diagnoses marking them as presumed/confirmed and/or primary/secondary. Either of or tag can be used at-most once in an HTML form.

Example tag:

<encounterDiagnoses 
   required="true"
   selectedDiagnosesTarget="#encounter-diagnoses-target"
   preferredCodingSource="ICD-10-WHO"
   diagnosisConceptSources="ICD-10-WHO"
/>

Encounter Diagnosis in AFE :

There exists a diagnosis question type to capture encounter diagnosis. Sample schema to add an encounter diagnosis :

{
    "label": "Test Diagnosis",
    "id": "DiagNosIS",
    "type": "diagnosis",
    "questionOptions": {
        "rendering": "repeating",
        "dataSource": "diagnoses",
        "rank": 1
    }
}

This data is saved as an Encounterdiagnosis in the ${restBaseUrl}/patientdiagnoses endpoint where the certainty value is always ‘CONFIRMED’

Code can be accessed here

Encounter Diagnosis in RFE :

There exists a problem rendering type which returns a data source from concepts. This was initially used to handle diagnosis that were captured as obs in a form. A problem datasource can accept parameters in the class to specify the diagnosis concept class used to filter concepts.

Current Schema to handle diagnosis as obs :

{
    "type": "obs",
    "label": "Problem/Diagnosis:",
    "id": "problemDiagnosis",
    "required": "true",
    "questionOptions": {
        "rendering": "problem",
        "datasource": {
        "name": "problem_datasource",
        "config": "8d4918b0-c2cc-11de-8d13-0010c6dffd0f"
    },
    "concept": "0eaa21e0-5f69-41a9-9dea-942796590bbb"
    }
}

There is need to be able to :

  • Capture details like rank, presumed/confirmed diagnosis and/or primary/secondary diagnosis in RFE. What is the use case for rank in the question ? @aojwang
  • Handle AFE and RFE parity
  • Add ability to view, edit and post data to ${restBaseUrl}/patientdiagnoses after an encounter is submitted to store encounter diagnosis, the payload needs an encounter uuid (add diagnosis handler probably)
  • Is there need to add preferredCodingSource which is in HFE or can that be handled by concept mappings @PIH

New Proposed Schema for Encounter Diagnosis :

{
    "type": "diagnosis",
    "label": "Problem/Diagnosis:",
    "id": "problemDiagnosis",
    "required": "true",
    "questionOptions": {
        "rendering": "problem",
        "datasource": {
        "name": "problem_datasource",
        "config": {
            "isPrimary": "true",
            "rank": 1
        }
    },
    "concept": "0eaa21e0-5f69-41a9-9dea-942796590bbb"
    }

@slubwama @ibacher @OHRI

3 Likes

Is it possible to keep the concept as simple as it is in HFE. where we do not have to define the ranking and isPrimary at form the development level? I also think there is a need to build a custom render type for diagnosis given that its behavior is different from the default single-field render.

{
    "label": "Test Diagnosis",
    "id": "DiagNosIS",
    "type": "diagnosis",
    "questionOptions": {
        "rendering": "diagnosis",
        "answerSource": "diagnoses",
    }
}

This example above would be a good start. Not exactly accurate but we can have a better conversation about it.

3 Likes

Thanks @slubwama .We will use the same schema as the angular form engine. The rank is the only way to distinguish a primary diagnosis from a secondary diagnosis so its important to have it in the schema