Skip to main content

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 NameTypeDescription
Patient EventpatientTrack when any action is performed on the patient.
Encounter EventencounterTrack when any encounter/assessment is performed on the patient.
Appointment EventappointmentTrack when an action is performed on appointment.
Diagnosis EventdiagnosisTrack 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

ParamUsabilityFormatEnum ValuesDescription
patient_idREQUIREDSTRING---id of the patient
site_idREQUIREDSTRING---Site ID where action is happening
locationREQUIREDSTRING---Location where action is happening
actionREQUIREDSTRINGview, add, update, done, remove, otherAction that is happening
is_from_ghoREQUIREDBOOLEAN---Is the data fetched from a central repo - default is false.
categoryREQUIREDSTRINGfacility, community, patient_address, virtual, otherCategory for site where the action was performed
typeREQUIREDSTRINGtriage, outpatient, inpatient, pharmacy, door_to_door, camp, otherType of the category/patient.
sub_typeOPTIONALSTRING---SubType of the category/patient.
ageOPTIONALNUMBER---Age of the patient.
genderOPTIONALSTRING---Gender of the patient.
metaOPTIONALANY---Any additional value that is sent with the log.

Usage

     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"
)
)


Encounter Event

To log encounter action is performed on the patient such as adding a new encounter/assessment, updating or deleting as well.

Format

ParamUsabilityFormatEnum ValuesDescription
encounter_idREQUIREDSTRING---id of the encounter
patient_idREQUIREDSTRING---id of the patient, involved in the encounter
site_idREQUIREDSTRING---Site ID where action is happening
appointment_idOPTIONALSTRING---Id of the appointment associated with the encounter
locationREQUIREDSTRING---Location where action is happening
hcw_id_listREQUIREDARRAY (STRING)---Ids of HCWs involved in the encounter
actionREQUIREDSTRINGview, add, update, done, remove, otherAction that is happening
categoryREQUIREDSTRINGfacility, community, patient_address, virtual, otherCategory for site where the action was performed
typeREQUIREDSTRINGscreening, assessment, enrolment, medical_review, counseling, otherType of the encounter.
sub_typeREQUIREDSTRINGbio, 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, otherSubType of the encounter.
encounter_timeOPTIONALSTRING---Time of the encounter.
riskOPTIONALSTRING---Risk Status of the encounter.
metaOPTIONALANY---Any additional value that is sent with the log.

Usage

     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"
)
)


Appointment Event

To log appointment event is performed on the patient such as adding a new appointment, updating or deleting as well.

Format

ParamUsabilityFormatEnum ValuesDescription
appointment_idREQUIREDSTRING---id of the Appointment
patient_idREQUIREDSTRING---id of the patient
site_idREQUIREDSTRING---Site ID where action is happening
actionREQUIREDSTRINGview, add, update, done, remove, otherAction that is happening
locationREQUIREDSTRING---Location where the the appointment is happening
hcw_id_listOPTIONALARRAY (STRING)---Ids of the HCWs attending the appointment
is_time_sensitiveOPTIONALBOOLEAN---If the appointment is an urgent appointment
statusREQUIREDSTRING---Status of tje appointment, upcoming, missed, attended, etc.
categoryREQUIREDSTRING---Category of the appointment
typeREQUIREDSTRING---Type of the appointment
sub_typeREQUIREDSTRING---Sub Type of the appointment
timeREQUIREDSTRING---Time of the appointment
update_reasonOPTIONALSTRING---Reason for appointment update
followup_idOPTIONALSTRING---Id for appointment followup
followup_typeOPTIONALSTRING---Type for appointment followup
followup_responseOPTIONALSTRING---Response for appointment followup
metaOPTIONALANY---Any additional value that is sent with the log.

Usage

     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"
)
)


Diagnosis Event

To log diagnosis event is performed on the patient such as a part of encounter/assessment.

Format

ParamUsabilityFormatEnum ValuesDescription
nameREQUIREDSTRING---Name of the diagnosis event
encounter_idREQUIREDSTRING---Id of the encounter the diagnosis is associated with
patient_idREQUIREDSTRING---Id of the patient the diagnosis is associated with
site_idREQUIREDSTRING---Site ID where the diagnosis is happening
actionREQUIREDSTRINGview, add, update, done, remove, otherAction that is happening
locationREQUIREDSTRING---Location where the the diagnosis is happening
categoryREQUIREDSTRING---Category of the diagnosis
typeREQUIREDSTRING---Type of the diagnosis
sub_typeREQUIREDSTRING---Sub Type of the diagnosis
valueREQUIREDSTRING---Value of the diagnosis
resultOPTIONALSTRING---Result of the Diagnosis
metaOPTIONALANY---Any additional value that is sent with the log.

Usage

     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"
)
)