Patient Management Ingest Events
The Patient Management content block support the events related Healthcare Workers day to day tasks. This goes on from them using of the app to screening, assessment, medical review and managing elements for the patients like test results, counseling and prescriptions.
List of Events
| Event Name | Type | Description |
|---|---|---|
| Patient Event | patient | Track when any action is performed on the patient. |
| Encounter Event | encounter | Track when any encounter/assessment is performed on the patient. |
| Appointment Event | appointment | Track when an action is performed on appointment. |
| Diagnosis Event | diagnosis | Track when an action is performed as a part of diagnosis. |
Patient Event
To log any action is performed on the patient such as adding a new patient, updating patient details, or deleting a patient.
Format
| Param | Usability | Format | Enum Values | Description |
|---|---|---|---|---|
| patient_id | REQUIRED | STRING | --- | id of the patient |
| site_id | REQUIRED | STRING | --- | Site ID where action is happening |
| location | REQUIRED | STRING | --- | Location where action is happening |
| action | REQUIRED | STRING | view, add, update, done, remove, other | Action that is happening |
| is_from_gho | REQUIRED | BOOLEAN | --- | Is the data fetched from a central repo - default is false. |
| category | REQUIRED | STRING | facility, community, patient_address, virtual, other | Category for site where the action was performed |
| type | REQUIRED | STRING | triage, outpatient, inpatient, pharmacy, door_to_door, camp, other | Type of the category/patient. |
| sub_type | OPTIONAL | STRING | --- | SubType of the category/patient. |
| age | OPTIONAL | NUMBER | --- | Age of the patient. |
| gender | OPTIONAL | STRING | --- | Gender of the patient. |
| meta | OPTIONAL | ANY | --- | Any additional value that is sent with the log. |
Usage
- Android (Java/Kotlin)
- iOS (Swift)
- React Native (JS/TS)
- Web Application (JS/TS)
- JSON
CFPatientMgmtEvent.logIngest(
eventType = PatientMgmtEventType.Patient,
logObject = PatientEventObject(
patientId = "patientID",
siteId = "SampleSiteId",
action = HcwItemAction.Add,
isFromGHO = false,
type = "outpatient",
subType = "some Value",
location = "community",
gender = "male"
)
)
CFPatientMgmtEvent.shared.logIngest(
eventType: PatientMgmtEventType.Patient,
logObject: PatientEventObject(
patientId: "patientID",
siteId: "SampleSiteId",
action: HcwItemAction.Add,
isFromGho: false, location: "Some Location",
type: PatientType.Outpatient,
subType: "some Value"
)
)
const patientEvent = {
patient_id: 'patientTEstId',
site_id: 'siteTestId',
location: 'testLocation',
action: HcwItemAction.View,
is_from_gho: false,
type: PatientType.DoorToDoor,
age: 11,
gender: 'male',
} as PatientProperties;
CFPatientMgmt.logIngestEvent(
PatientMgmtEventType.Patient,
patientEvent,
false,
);
const patientEvent = {
patient_id: 'patientTEstId',
site_id: 'siteTestId',
location: 'testLocation',
action: HcwItemAction.View,
is_from_gho: false,
type: PatientType.DoorToDoor,
age: 11,
gender: 'male',
};
PatientMgmt.logIngestEvent(
PatientMgmtEventType.Patient,
patientEvent,
false,
);
{
"name": "patient",
"property": "add",
"ctx": {
"__ol": true,
"action": "add",
"gender": "male",
"is_from_gho": "false",
"location": "community",
"patient_id": "patientID",
"site_id": "SampleSiteId",
"sub_type": "some Value",
"type": "outpatient"
},
}
Encounter Event
To log encounter action is performed on the patient such as adding a new encounter/assessment, updating or deleting as well.
Format
| Param | Usability | Format | Enum Values | Description |
|---|---|---|---|---|
| encounter_id | REQUIRED | STRING | --- | id of the encounter |
| patient_id | REQUIRED | STRING | --- | id of the patient, involved in the encounter |
| site_id | REQUIRED | STRING | --- | Site ID where action is happening |
| appointment_id | OPTIONAL | STRING | --- | Id of the appointment associated with the encounter |
| location | REQUIRED | STRING | --- | Location where action is happening |
| hcw_id_list | REQUIRED | ARRAY (STRING) | --- | Ids of HCWs involved in the encounter |
| action | REQUIRED | STRING | view, add, update, done, remove, other | Action that is happening |
| category | REQUIRED | STRING | facility, community, patient_address, virtual, other | Category for site where the action was performed |
| type | REQUIRED | STRING | screening, assessment, enrolment, medical_review, counseling, other | Type of the encounter. |
| sub_type | REQUIRED | STRING | bio, hiv, ncd, tb, ecd, diabetes, hypertension, pregnancy, mental_health, substance_use_disorder, adolescent_health, general_screening, antenatal, postnatal, cervical_cancer, lifestyle, psychological, gender_based_violence, sexual_behaviour, economic_strengthening, other | SubType of the encounter. |
| encounter_time | OPTIONAL | STRING | --- | Time of the encounter. |
| risk | OPTIONAL | STRING | --- | Risk Status of the encounter. |
| meta | OPTIONAL | ANY | --- | Any additional value that is sent with the log. |
Usage
- Android (Java/Kotlin)
- iOS (Swift)
- React Native (JS/TS)
- Web Application (JS/TS)
- JSON
CFPatientMgmtEvent.logIngest(
eventType = PatientMgmtEventType.Encounter,
logObject = EncounterEventObject(
patientId = "patientID",
siteId = "SampleSiteId",
action = HcwItemAction.Add,
encounterId = "SomeEncounterId222",
type = "assessment",
subType = "some Value",
category = "HIV",
location = "community",
hcwIdList = listOf("user1"),
appointmentId = "someAppointmentId",
encounterTime = "2025-07-17T15:26:02Z",
risk = "low"
)
)
CFPatientMgmtEvent.shared.logIngest(
eventType: PatientMgmtEventType.Encounter,
logObject: EncounterEventObject(
encounterId: "SomeEncounterId",
patientId: "patientID",
siteId: "SampleSiteId",
action: HcwItemAction.Add,
category: HcwSiteCategory.Community,
type: EncounterType.Assessment,
subType: DiagnosisType.HIV,
location: "Some Location"
)
)
const encounterProperties = {
encounter_id: 'testencounterID',
patient_id: 'testID',
site_id: 'testID',
action: HcwItemAction.Update,
category: HcwSiteCategory.Facility,
type: EncounterType.Counseling,
sub_type: DiagnosisType.Lifestyle,
location: 'testLocation',
appointment_id: 'testAppointment',
hcw_id_list: ['hcw_id_listItem', 'hcw_id_listItem2222'],
} as EncounterProperties;
CFPatientMgmt.logIngestEvent(
PatientMgmtEventType.Encounter,
encounterProperties,
false,
);
const encounterProperties = {
encounter_id: 'testencounterID',
patient_id: 'testID',
site_id: 'testID',
action: HcwItemAction.Update,
category: HcwSiteCategory.Facility,
type: EncounterType.Counseling,
sub_type: DiagnosisType.Lifestyle,
location: 'testLocation',
appointment_id: 'testAppointment',
hcw_id_list: ['hcw_id_listItem', 'hcw_id_listItem2222'],
};
PatientMgmt.logIngestEvent(
PatientMgmtEventType.Encounter,
encounterProperties,
false,
);
{
"name": "encounter",
"property": "add",
"ctx": {
"__ol": true,
"action": "add",
"category": "HIV",
"encounter_id": "SomeEncounterId222",
"hcw_id_list": "user1",
"location": "community",
"patient_id": "patientID",
"site_id": "SampleSiteId",
"sub_type": "some Value",
"type": "assessment"
},
}
Appointment Event
To log appointment event is performed on the patient such as adding a new appointment, updating or deleting as well.
Format
| Param | Usability | Format | Enum Values | Description |
|---|---|---|---|---|
| appointment_id | REQUIRED | STRING | --- | id of the Appointment |
| patient_id | REQUIRED | STRING | --- | id of the patient |
| site_id | REQUIRED | STRING | --- | Site ID where action is happening |
| action | REQUIRED | STRING | view, add, update, done, remove, other | Action that is happening |
| location | REQUIRED | STRING | --- | Location where the the appointment is happening |
| hcw_id_list | OPTIONAL | ARRAY (STRING) | --- | Ids of the HCWs attending the appointment |
| is_time_sensitive | OPTIONAL | BOOLEAN | --- | If the appointment is an urgent appointment |
| status | REQUIRED | STRING | --- | Status of tje appointment, upcoming, missed, attended, etc. |
| category | REQUIRED | STRING | --- | Category of the appointment |
| type | REQUIRED | STRING | --- | Type of the appointment |
| sub_type | REQUIRED | STRING | --- | Sub Type of the appointment |
| time | REQUIRED | STRING | --- | Time of the appointment |
| update_reason | OPTIONAL | STRING | --- | Reason for appointment update |
| followup_id | OPTIONAL | STRING | --- | Id for appointment followup |
| followup_type | OPTIONAL | STRING | --- | Type for appointment followup |
| followup_response | OPTIONAL | STRING | --- | Response for appointment followup |
| meta | OPTIONAL | ANY | --- | Any additional value that is sent with the log. |
Usage
- Android (Java/Kotlin)
- iOS (Swift)
- React Native (JS/TS)
- Web Application (JS/TS)
- JSON
CFPatientMgmtEvent.logIngest(
eventType = PatientMgmtEventType.Appointment,
logObject = AppointmentEventObject(
appointmentId = "RandomAppointmentId",
patientId = "randomPatientIDHERE",
siteId = "randomSiteId",
action = HcwItemAction.Add,
status = "missed",
appointmentDateTime = "2025-07-17T15:26:02Z",
category = "HIV",
type = "assessment",
location = "community"
)
)
CFPatientMgmtEvent.shared.logIngest(
eventType: PatientMgmtEventType.Appointment,
logObject: AppointmentEventObject(
appointmentId: "percipit",
patientId: "taciti",
siteId: "efficiantur",
action: HcwItemAction.Add, location: "some locarion",
status: AppointmentStatus.Missed, category: "some category",
appointmentDateTime: "2025-07-17T15:26:02Z",
type: "normal",
)
)
const appointmentProperties = {
patient_id: 'patient_id',
site_id: 'site_id',
action: HcwItemAction.Done,
appointment_id: 'testID',
location: 'testLocation',
category: HcwSiteCategory.Community,
hcw_id_list: ['hcwIdListItem', 'hcwIdListItem111'],
is_time_sensitive: false,
status: AppointmentStatus.Attended,
type: ScheduleItemType.Assessment,
sub_type: DiagnosisType.EconomicStrength,
time: '2006-01-02T15:04:05Z',
} as AppointmentProperties;
CFPatientMgmt.logIngestEvent(
PatientMgmtEventType.Appointment,
appointmentProperties,
false,
);
const appointmentProperties = {
patient_id: 'patient_id',
site_id: 'site_id',
action: HcwItemAction.Done,
appointment_id: 'testID',
location: 'testLocation',
category: HcwSiteCategory.Community,
hcw_id_list: ['hcwIdListItem', 'hcwIdListItem111'],
is_time_sensitive: false,
status: AppointmentStatus.Attended,
type: ScheduleItemType.Assessment,
sub_type: DiagnosisType.EconomicStrength,
time: '2006-01-02T15:04:05Z',
};
PatientMgmt.logIngestEvent(
PatientMgmtEventType.Appointment,
appointmentProperties,
false,
);
{
"name": "appointment",
"property": "add",
"ctx": {
"__ol": true,
"action": "add",
"appointment_id": "RandomAppointmentId",
"category": "HIV",
"location": "community",
"patient_id": "randomPatientIDHERE",
"site_id": "randomSiteId",
"status": "missed",
"time": "2025-07-17T15:26:02Z",
"type": "assessment"
},
}
Diagnosis Event
To log diagnosis event is performed on the patient such as a part of encounter/assessment.
Format
| Param | Usability | Format | Enum Values | Description |
|---|---|---|---|---|
| name | REQUIRED | STRING | --- | Name of the diagnosis event |
| encounter_id | REQUIRED | STRING | --- | Id of the encounter the diagnosis is associated with |
| patient_id | REQUIRED | STRING | --- | Id of the patient the diagnosis is associated with |
| site_id | REQUIRED | STRING | --- | Site ID where the diagnosis is happening |
| action | REQUIRED | STRING | view, add, update, done, remove, other | Action that is happening |
| location | REQUIRED | STRING | --- | Location where the the diagnosis is happening |
| category | REQUIRED | STRING | --- | Category of the diagnosis |
| type | REQUIRED | STRING | --- | Type of the diagnosis |
| sub_type | REQUIRED | STRING | --- | Sub Type of the diagnosis |
| value | REQUIRED | STRING | --- | Value of the diagnosis |
| result | OPTIONAL | STRING | --- | Result of the Diagnosis |
| meta | OPTIONAL | ANY | --- | Any additional value that is sent with the log. |
Usage
- Android (Java/Kotlin)
- iOS (Swift)
- React Native (JS/TS)
- Web Application (JS/TS)
- JSON
CFPatientMgmtEvent.logIngest(
eventType = PatientMgmtEventType.Diagnosis,
logObject = DiagnosisEventObject(
name = "some name",
encounterId = "encounterId",
patientId = "patient id",
type = "encouhnter type",
subtype = "encounter subtype",
siteId = "someSiteId",
category = "HIV",
value = "SomeValue",
action =HcwItemAction.Add,
location = "community"
)
)
CFPatientMgmtEvent.shared.logIngest(
eventType: PatientMgmtEventType.Diagnosis,
logObject: DiagnosisEventObject(
name: "DiagnosisNAMEMEEE",
encounterId: "SomeEncounterId",
patientId: "patientID",
siteId: "SampleSiteId",
action:HcwItemAction.Add,
location:"Some Location",
category: "HIV",
type: "normal",
)
)
const diagnosisProperties = {
name: 'testDiagnosisName',
encounter_id: 'testencounterID',
patient_id: 'testID',
site_id: 'testID',
action: HcwItemAction.Update,
category: HcwSiteCategory.Facility,
type: EncounterType.Counseling,
sub_type: DiagnosisType.Lifestyle,
location: 'testLocation',
result: 'someResult',
} as DiagnosisProperties;
CFPatientMgmt.logIngestEvent(
PatientMgmtEventType.Diagnosis,
diagnosisProperties,
false,
);
const diagnosisProperties = {
name: 'testDiagnosisName',
encounter_id: 'testencounterID',
patient_id: 'testID',
site_id: 'testID',
action: HcwItemAction.Update,
category: HcwSiteCategory.Facility,
type: EncounterType.Counseling,
sub_type: DiagnosisType.Lifestyle,
location: 'testLocation',
result: 'someResult',
};
CFPatientMgmt.logIngestEvent(
PatientMgmtEventType.Diagnosis,
diagnosisProperties,
false,
);
{
"name": "diagnosis",
"property": "some name",
"ctx": {
"__ol": true,
"action": "add",
"category": "HIV",
"encounter_id": "encounterId",
"location": "community",
"name": "some name",
"patient_id": "patient id",
"site_id": "someSiteId",
"sub_type": "encouhnter type",
"type": "encouhnter type",
"value": "SomeValue"
},
}