This Apache Camel application is a proof-of-concept (PoC) that fetches adverse events following immunization (AEFI) from DHIS2 and turns them into FHIR questionnaire responses before proceeding to push these questionnaire responses onto a FHIR server.
The PoC was developed in collaboration with the Pan American Health Organization (PAHO) to assess the technical feasibility of having the national surveillance systems report to a FHIR-based regional database with the end goal of strengthening pharmacovigilance following immunization. Visit the DHIS2 website to learn more about this initiative.
-
Open
fhir-esave-paho/src/main/resources/application.yml
and set:dhis2-to-fhir.dhis2.base-url
to the DHIS2 server's addressdhis2-to-fhir.dhis2.username
to the DHIS2 account usernamedhis2-to-fhir.dhis2.password
to the DHIS2 account passworddhis2-to-fhir.dhis2.org-unit-id
to the ID of the DHIS2 organisation unit to which the tracked entities belong todhis2-to-fhir.fhir.server-url
to the FHIR server's address
-
From your terminal, change the current directory to
fhir-esave-paho
and runmvn spring-boot:run
TrackedEntityToFhirQuestionnaireRoute
┌─────┐ ┌─────┐ ┌──────────┐ ┌───────────┐
│Camel│ │DHIS2│ │DataSonnet│ │FHIR server│
└──┬──┘ └──┬──┘ └────┬─────┘ └─────┬─────┘
│𝟏 /api/trackedEntityInstances.json?program=EZkN8vYZwjR&fields=*&ou=[orgUnitId] │ │ │
│──────────────────────────────────────────────────────────────────────────────>│ │ │
│ │ │ │
│ 𝟐 Tracked entities │ │ │
│<─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │ │
│ │ │ │
│ │ │ │
╔═══════╤════╪═══════════════════════════════════════════════════════════════════════════════╪══════════════════╪══════════════════════╪═══════════════╗
║ LOOP │ tracked entities │ │ │ ║
╟───────┘ │ │ │ │ ║
║ │ 𝟑 Transform tracked entity into FHIR questionnaire response │ │ │ ║
║ │─────────────────────────────────────────────────────────────────────────────────────────────────>│ │ ║
║ │ │ │ │ ║
║ │ 𝟒 │ │ │ ║
║ │<─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│ │ ║
║ │ │ │ │ ║
║ │ 𝟓 Create questionnaire response │ │ │ ║
║ │────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────>│ ║
║ │ │ │ │ ║
║ │ 𝟔 │ │ │ ║
║ │<─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ║
╚════════════╪═══════════════════════════════════════════════════════════════════════════════╪══════════════════╪══════════════════════╪═══════════════╝
┌──┴──┐ ┌──┴──┐ ┌────┴─────┐ ┌─────┴─────┐
│Camel│ │DHIS2│ │DataSonnet│ │FHIR server│
└─────┘ └─────┘ └──────────┘ └───────────┘
@startuml
title TrackedEntityToFhirQuestionnaireRoute
autonumber
Camel -> DHIS2 : /api/trackedEntityInstances.json?program=EZkN8vYZwjR&fields=*&ou=[orgUnitId]
Camel <-- DHIS2: Tracked entities
loop tracked entities
Camel -> DataSonnet: Transform tracked entity into FHIR questionnaire response
Camel <-- DataSonnet
Camel -> "FHIR server": Create questionnaire response
Camel <-- "FHIR server"
end
@enduml