Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Setting up a new report for DHIS2

...

  1. Generate and save the templates:- From datasense homepage navigate to Templates tab. Search for the DHIS dataset for which you want to setup the report. This will generate 3 templates.
    • Query Template Suggestion:- This is a json file template for list of queries with a name for each cell for that DHIS dataset. The template will have dummy queries which need to be replaced by actual queries. This should be stored as a json file in "/opt/datasense/lib/dhis_config/aqs_query" folder.

    • Post Template Suggestion:- This is a freemarker file template which will be parsed to get the JSON payload. For each cell in DHIS the value will be put from query-results in above template. This should be stored as a freemarker template file in "/opt/datasense/lib/dhis_config/templates" folder.

    • Config Template Suggestion:- This is a JSON file template which stores the path for above two templates and list of all query-names need to be executed. This should be stored as a json file "/opt/datasense/lib/dhis_config/aqs_config" folder. In this file, you need to replace "[path_to_config]" with "/opt/datasense/lib/dhis_config". It will have names for query file and template files, you will have to change them to above two file names respectively.

  2. Map HRM facility to DHIS Organisation:-Datasense works with HRM facilities and stores data against them. DHIS has a concept of Organisations and it accepts reports against them. In datasensefirst you have to map the HRM facility to a DHIS Organisation. From data-sense homepage navigate to Manage Facilities tab. Here all the facilities will be listed whose data is stored in datasense. Click on the action button for the facility you want to map. It will lead to the search box for DHIS Organisations where you can search and map it to the facility.

  3. Map datasense report to DHIS Dataset:- You need to map a datasense-report to DHIS dataset to tell the system the report content goes to which dataset. To do this from datasense homepage navigate to Manage Reports tab. All the reports which are put as a part of step 1 will be listed there. You need to click on the action button for the report you want to map. This will lead to a search box for DHIS datasets. You can search and map the dataset.

...

Expand
titleDatasense schema description needed for DHIS2 reports queries


Info

Below are the table-names and relevant columns which will be needed for DHIS2 reporting.

  1. patient:- This tables stores all the information about patients personal data.
    1. patient_hid => HealthId of the patient.
    2. dob => needed when we have to write queries for specific age groups.
    3. gender
    4. present_location_id => present address of patient stored in form of catchment codes. This column can be used when we have to write queries area wise.

  2. encounter:- This table stores information related to encounters.
    1. encounter_id
    2. encounter_datetime => stores the date when this encounter was recorded in CHW-Device/Hospitals.
    3. visit_type.
    4. encounter_type
    5. patient_hid
    6. facility_id => stores the HRM code for the hospital/community-clinic where the encounter happened.

  3. procedures:- This tables stores all the procedures performed in hospitals. While writing queries for procedure we should prefer to use reference-term-code(codings from ICD-10, LOINC etc) if defined for that procedure's concept otherwise concept_uuid for that procedure.
    1. procedure_id
    2. patient_hid
    3. encounter_id
    4. start_date
    5. end_date
    6. procedure_uuid => uuid of TR procedure concept. In the query we need to compare it with the uuid of the procedure concept from TR.
    7. procedure_code => reference-term-code for the procedure concept defined in TR.
    8. diagnosis_uuid => If there was a diagnosis as a part of procedure this will be populated. This also is the concept_uuid of the diagnosis in TR.
    9. diagnosis_code => reference-term-code for the diagnosis concept defined in TR.

  4. diagnosis:- This tables stores all the diagnoses information. While writing queries for diagnosis we should prefer to use reference-term-code(codings from ICD-10, LOINC etc) if defined for that diagnosis's concept otherwise concept_uuid for that diagnosis.
    1. diagnosis_id
    2. patient_hid
    3. encounter_id
    4. diagnosis_datetime
    5. diagnosis_code => reference-term-code for the diagnosis concept defined in TR.
    6. diagnosis_concept_id => uuid of TR diagnosis concept. In the query we need to compare it with the uuid of the diagnosis concept from TR.

  5. immunization:- This table stores all the immunization done. While writing queries for immunization we need to compare drug_id column with uuid of the same drug in TR.
    1. immunziation_id
    2. patient_hid
    3. encounter_id
    4. drug_id => uuid of the TR drug which was given as immunization.
    5. datetime

  6. prescribed_drug:- This table stores all the prescribed drugs.
    1. prescribed_drug_id
    2. patient_hid
    3. encounter_id
    4. prescription_datetime
    5. drug_code => uuid of the TR drug which was given as prescription.
    6. non_coded_name => The name of the drug if it is not from TR. It is not advised to create local drugs and report on them because of consistency issues.

  7. diagnostic_order:- All sort of orderables (Lab order, Radiology Order etc) are stored in this table. While writing queries for diagnostic-orders we should prefer to use reference-term-code(codings from ICD-10, LOINC etc) if defined for that diagnostic-order's concept otherwise concept_uuid for that diagnostic order.
    1. order_id
    2. patient_hid
    3. encounter_id
    4. order_datetime
    5. order_category => Type of order (Lab order, Radiology Order etc)
    6. code => reference-term-code for the order concept defined in TR.
    7. order_concept => uuid of TR order concept. In the query we need to compare it with the uuid of the order concept from TR.

  8. diagnostic_report:- This table stores the results of the orders.
    1. report_id
    2. patient_hid
    3. encounter_id
    4. order_id => ID of the order for which this report is
    5. report_datetime

  9. observation:- This table stores the generic observation which doesn't come any of the above category. Diagnostic Reports will also have results in form of observations.
    1. observation_id
    2. patient_hid
    3. encounter_id
    4. code => reference-term-code for the observation concept defined in TR.
    5. concept_id => uuid of TR observation concept. In the query we need to compare it with the uuid of the observation concept from TR.
    6. parent_id => for a nested observation, all the child observation will have id of their parent observation.
    7. value => value of this observation.
    8. report_id => populated if obs is part of a diagnostic_report.

...

 Once a report is setup in datasense, it can be scheduled for post to DHIS one time or periodically. From datasense homepage navigate to Mangae Reports tab. The reports which are mapped to DHIS datasets will have a calender icon. Click on the icon and this will lead to schedule reports page. On this page, it will show all the facilities with a checkbox that have data in datasense and this report is applicable for them. Check all the facilities for which the data should be posted. 

The report can be scheduled in two different ways

...


...

Refer here to configure and schedule a report