Skip to content

Instantly share code, notes, and snippets.

View jeanpaul-mupagasi's full-sized avatar
🇷🇼
You don't have to be great to get started, you have to get started to be great.

Mupagasi Jean-Paul jeanpaul-mupagasi

🇷🇼
You don't have to be great to get started, you have to get started to be great.
View GitHub Profile
@jeanpaul-mupagasi
jeanpaul-mupagasi / gist:14c5add5eaa8b2332f4289c52796f4e2
Created November 21, 2023 08:42 — forked from rcanepa/gist:535163dc249539912c25
Activate pg_stat_statements on PostgreSQL
1) Edit file postgresql.conf and add the next 3 lines (any where):
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.max = 10000
pg_stat_statements.track = all
2) Restart PostgreSQL
3) Execute the next command on psql, pgAdmin or similar:
TURN OFF:
update ir_mail_server set active = 'f';
update fetchmail_server set active = 'f';
update ir_cron set active = 'f' where function = 'schedule_backup';
TURN ON:
update ir_mail_server set active = 't';
update fetchmail_server set active = 't';
update ir_cron set active = 't' where function = 'schedule_backup';
public void run(BahmniEncounterTransaction bahmniEncounterTransaction) {
calculateAndAdd(bahmniEncounterTransaction);
calculateDiffSurgTimeInAndOut(bahmniEncounterTransaction);
}
static def calculateDiffSurgTimeInAndOut(BahmniEncounterTransaction bahmniEncounterTransaction){
Collection<BahmniObservation> observations = bahmniEncounterTransaction.getObservations()
BahmniObservation surgicalTimeDataObservation = find("OR Section", observations, null);
BahmniObservation surgicalTimeInObservation = find("Surgical Time In",surgicalTimeDataObservation ? [surgicalTimeDataObservation] : [], null);
@jeanpaul-mupagasi
jeanpaul-mupagasi / dashboard.json
Created July 23, 2018 12:40
Surgical time data section added
{
"general":{
"translationKey":"DASHBOARD_TAB_GENERAL_KEY",
"displayByDefault":true,
"maxRecentlyViewedPatients":10,
"sections":{
"patientInformation":{
"translationKey":"DASHBOARD_TITLE_PATIENT_INFORMATION_KEY",
"type":"patientInformation",
"displayOrder":0,
@jeanpaul-mupagasi
jeanpaul-mupagasi / formCondition.js
Created July 18, 2018 08:09
This file is used to configure Bahmni forms hide/show and enable/disable features
Bahmni.ConceptSet.FormConditions.rules = {
'Diastolic Data' : function (formName, formFieldValues) {
var systolic = formFieldValues['Systolic'];
var diastolic = formFieldValues['Diastolic'];
if (systolic || diastolic) {
return {
enable: ["Posture"]
}
} else {
return {