The Programs module is used to monitor and keep track of patients who need to be treated for conditions that require periodic monitoring to ensure recovery. |
The Programs module can be used to:
|
The implementer can configure a separate app for "Programs" on the application dashboard. The "Programs" app is the same as the Clinical app with a separate configuration for patient queues.
The name of the extension config is picked up from app's url as follows: the first parameter after # in the app's url is the name of the extension config that needs to be picked up. For example, the app's url should look like https://<IP_or_domain_name>/bahmni/clinical/#/{{extension_name}}/patient/search
Edit the home/extension.json as shown below:
"programs": { "id": "bahmni.programs", "extensionPointId": "org.bahmni.home.dashboard", "type": "link", "label": "Programs", "url": "../clinical/#/programs/patient/search", "icon": "fa-tasks", "order": 2, "requiredPrivilege": "app:clinical" } |
The programs app has its own configuration at /var/www/bahmni_config/openmrs/apps/clinical/extension-programs.json . To configure specific search tabs and observation display controls put the related config in extension-programs.json.
{ "bahmniClinicalPatientsSearchActivePatientsForPrograms": { "id": "bahmni.clinical.patients.search.activePatients", "extensionPointId": "org.bahmni.patient.search", "type": "config", "extensionParams": { "searchHandler": "emrapi.sqlSearch.activePatients", "display": "Programs", "forwardUrl": "#/patient/{{patientUuid}}/consultationContext" }, "label": "Active", "order": 1, "requiredPrivilege": "app:clinical" } |
To configure the second tab to search amongst all enrolled patients:
{ "bahmniClinicalPatientsSearchAllPatients": { "id": "bahmni.clinical.patients.search.allPatients", "extensionPointId": "org.bahmni.patient.search", "type": "config", "extensionParams": { "display": "All", "forwardUrl": "#/patient/{{patientUuid}}/consultationContext" }, "label": "All", "order": 2, "requiredPrivilege": "app:clinical" } |
To make the "Programs" tab appear in the Clinical module, add the following configuration to /var/www/bahmni_config/openmrs/apps/clinical/extension.json file.
Modify the "extension.json" to contain the snippet present below:
"bahmniCLinicalPatientsSearchActicePatientsForPrograms" : { "id": "bahmni.clinical.patients.search.allPatients", "extensionPointId": "org.bahmni.patient.search", "type": "config", "extensionParams": { "searchHandler": "emrapi.sqlSearch.activePatientsByProvider", "display":"Programs", "forwardUrl" : "#/default/patient/{{patientUuid}}/consultationContext" }, "label": "Programs", "order": 1, "requiredPrivilege": "app:clinical" } |
When the json file is configured as mentioned above, a new tab "Programs" will be shown in the clinical patient search page.
Programs tab on the Patient Search Page
Please refer Configure Programs
To associate a program to an encounter type, Bahmni uses the generic entity mapping concept which can be configured as explained below.
a) In the entity_mapping_type table, add a record to define the mapping between program and encounter type:
insert into entity_mapping_type(name, uuid, entity1_type, entity2_type, date_created) values ('program_encountertype', uuid(), 'org.openmrs.Program', 'org.openmrs.EncounterType', now()); |
insert into entity_mapping(uuid, entity_mapping_type_id, entity1_uuid, entity2_uuid, date_created) values (uuid(), <id_of_the_record_created_in_step_4a>, <uuid_of_program>, <uuid_of_encounter_type>, now()); |
To associate an observation template (as a concept) to a program, Bahmni uses the same generic entity mapping as above. To do this, follow the below steps
a) In the entity_mapping_type table, add a record to define the mapping between program and concept
insert into entity_mapping_type(name, uuid, entity1_type, entity2_type, date_created) values ('program_obstemplate', uuid(), 'org.openmrs.Program', 'org.openmrs.Concept', now()); |
insert into entity_mapping(uuid, entity_mapping_type_id, entity1_uuid, entity2_uuid, date_created) values (uuid(), <id_of_the_record_created_in_step_5a>, <uuid_of_program>, <uuid_of_concept>, now()); |
For a patient is enrolled in a program, there can be some additional attribute types that are specific to the patient’s enrollment into the program. These attribute types are called Program Attributes but have various values based on the patient. Examples of Program Attribute types are Program Identifier, Date of Enrollment, Facility of Enrollment, etc.
Bahmni supports the ability to capture values for Program Attribute types. These attributes can be captured or edited during the start or course of the Program and are configurable based on usage needs.
To configure program attributes for the installation,use the SQL query below to add a program attribute. The datatype can be one of the following :
org.openmrs.customdatatype.datatype.FreeTextDatatype org.openmrs.customdatatype.datatype.BooleanDatatype org.openmrs.customdatatype.datatype.DateDatatype org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype |
|
insert into program_attribute_type(name, description, datatype, min_occurs, creator, date_created, uuid) values('Sample attribute1','This is a test attribute', 'org.openmrs.customdatatype.datatype.FreeTextDatatype', 0, 1, NOW(), UUID()); insert into program_attribute_type(name, description, datatype, datatype_config, min_occurs, creator, date_created, uuid) values('Sample attribute3','This is a NumericRegex attribute', 'org.openmrs.customdatatype.datatype.RegexValidatedTextDatatype', '[0-9]*', 0, 1, NOW(), UUID()); insert into program_attribute_type(name, description, datatype, datatype_config, min_occurs, creator, date_created, uuid) values('Sample attribute2','This is a CodedConcept attribute', 'org.bahmni.module.bahmnicore.customdatatype.datatype.CodedConceptDatatype', 123, 0, 1, NOW(), UUID()); ******* 123 is Concept Id |
In the app.json of the clinical module, add the following configuration:
"config" : { "program": { "programAttributeName" : { "required" : true } } } |
In the app.json of the clinical module, add the following configuration to hide specific Program Attributes based on Program selected. This feature is available from release-0.90.
"config" : { "program": { "programAttributeName" : { "excludeFrom" : ["ProgramName"] } } } |
In the app.json of the clincal module, add the following configuration. This shows the patient age only in years on program management page.
"config" : { "program": { "patientInformation": { "ageLimit":100 } } } |
In the app.json of the clinical module, add the following configuration:
"config" : { "programDisplayControl": { "showProgramStateInTimeline": true, "programAttributes": [ "Treatment_Date", "Doctor", "Id" ] } } |
|
Refer Retire Programs
We can add observations against a program. Whenever you end a program, that program will be listed under past programs. So if you go to patient dashboard through past programs and add some observations, they will be added against that program. In this way you can add observations against past programs.