Patients

Configuration

incrementalUpdateConfig is applicable ( Refer https://msfprojects.atlassian.net/wiki/spaces/BAH/pages/329679036/Incremental+Update )
ColumnsToIgnore apply for this module ( Refer https://msfprojects.atlassian.net/wiki/spaces/BAH/pages/329875787/Appendix )
{ "name": "Patients", "type": "patients", "chunkSizeToRead": "500" }

Existing OpenMRS tables

patient patient_program patient_state person person_name patient_identifier users program program_workflow_state concept_view

Flattened Mart Tables

patient_state_default patient_allergy_status_default patient_identifier

Incremental Config:

Please check this section on how to enable/disable incremental config for specific mart tables.

a)  patient_state_default - This table gives details about patient state transitions in a program.

Openmrs tables used: patient, patient_program, program, patient_state, program_workflow_state, concept_view

Column Name

Description

patient_state_id

Unique column id from patient_state table from openmrs

patient_program_id

Unique id generated in DB when a patient is enrolled to a program

patient_id

Patient id from openmrs DB

program_id

Program ID from the program table

program_name

Name of the program to which the patient is enrolled

state

Program state id

state_name

Name of the program state

start_date

Start date of the patient state

end_date

End date of the patient state

creator_id

Id of the creator who started the patient sate

creator_name

Name of the creator who started the patient state

date_created

Date on the which the patient moved to this state

date_changed

Date on which any changes to the state was made

changed_by_id

Id of the user who made changes

changed_by_name

Name of the user who made changes

b) patient_allergy_status_default - This table displays allergy status information of each patient, present in the person table

Openmrs tables used: patient

Mart Table :- patient_allergy_status

Column Name

Description

patient_id

Patient id from openmrs DB

allergy_status

Allergy status of the patient, if the value is not provided the “Unknown” will be displayed by default.

c) patient_identifier - This is an EAV table. Columns are the pivoted values in identifier_type_table.

Openmrs tables used: patient, person, patient_identifier

Mart Table :- patient_identifier

Column Name

Description

person_attribute_type_id

Id of person attribute type

name

Name of the person attribute

description

Description of the person attribute

 


Mart Views

a)    patient_details_view :

This view provides those patient details which help in identifying a patient in terms of Nationality, camp, and special needs like caretaker requirements, legal guardian, etc and attributes pertaining to those needs

Mart tables used: person_details, person_attributes

b)    patient_information_view:

This view provides all the patient attributes, barring the PII, as captured in the Registration module.

Mart tables used : patient_identifier, person_details, person_attributes, person_address

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)