Skip to content

Commit

Permalink
Merge branch 'master' into Bahmni-IPD-master
Browse files Browse the repository at this point in the history
  • Loading branch information
kavitha-sundararajan committed Sep 16, 2024
2 parents d6090b3 + 9ed317c commit 04c6c5c
Show file tree
Hide file tree
Showing 15 changed files with 170 additions and 21 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ openmrs-distro-bahmni
`./mvnw clean deploy` command to create artifacts.

This command will attempt to upload & publish artifacts to https://bahmnirepo.thoughtworks.com (maven repository). You will need authorization to upload (your public key needs to be on the server).

This distribution also includes [FHIR CDSS module](https://github.com/Bahmni/openmrs-module-cdss) and [FHIR Terminology Service Module](https://github.com/Bahmni/openmrs-module-snomed) along with other modules bundled with standard Bahmni.
More details can be found [here](https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3132686337/SNOMED+FHIR+Terminology+Server+Integration+with+Bahmni)
31 changes: 17 additions & 14 deletions distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>bahmni</artifactId>
<groupId>org.openmrs.distro</groupId>
<version>0.94-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -83,6 +83,11 @@
<artifactId>bahmnicore-omod</artifactId>
<version>${bahmniCoreVersion}</version>
</dependency>
<dependency>
<groupId>org.bahmni.module</groupId>
<artifactId>bahmni-ipd-omod</artifactId>
<version>${bahmniIpdVersion}</version>
</dependency>
<dependency>
<groupId>org.bahmni.module</groupId>
<artifactId>openelis-atomfeed-client-omod</artifactId>
Expand Down Expand Up @@ -166,6 +171,13 @@
<artifactId>calculation-omod</artifactId>
<version>${calculationVersion}</version>
</dependency>

<dependency>
<groupId>org.bahmni.module</groupId>
<artifactId>medication-administration-omod</artifactId>
<version>${medicationAdministrationVersion}</version>
</dependency>

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>metadatamapping-omod</artifactId>
Expand All @@ -184,6 +196,7 @@
<artifactId>owa-omod</artifactId>
<version>${owaVersion}</version>
</dependency>

<dependency>
<groupId>org.openmrs</groupId>
<artifactId>event-omod</artifactId>
Expand Down Expand Up @@ -302,27 +315,17 @@
<artifactId>openconceptlab-omod</artifactId>
<version>${openConceptLabVersion}</version>
</dependency>

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>initializer-omod</artifactId>
<version>${initializerModuleVersion}</version>
</dependency>

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>reportingcompatibility-omod</artifactId>
<version>${reportingcompatibilityVersion}</version>
</dependency>

<dependency>
<groupId>org.bahmni.module</groupId>
<artifactId>medication-administration-omod</artifactId>
<version>${medicationAdministrationVersion}</version>
</dependency>

<dependency>
<groupId>org.bahmni.module</groupId>
<artifactId>bahmni-ipd-omod</artifactId>
<version>${bahmniIpdVersion}</version>
<version>${reportingCompatibilityVersion}</version>
</dependency>
<!-- end -->
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions openmrs-module-bahmni.configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>bahmni</artifactId>
<groupId>org.openmrs.distro</groupId>
<version>0.94-SNAPSHOT</version>
<version>1.1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -16,7 +16,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<openMRSVersion>2.5.10</openMRSVersion>
<openMRSVersion>2.5.12</openMRSVersion>
<MODULE_ID>${project.parent.artifactId}</MODULE_ID>
<MODULE_NAME>${project.parent.name}</MODULE_NAME>
<MODULE_VERSION>${project.parent.version}</MODULE_VERSION>
Expand Down
2 changes: 1 addition & 1 deletion package/.appversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.1.1
Empty file modified package/docker/openmrs/bahmni_startup.sh
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

14 changes: 14 additions & 0 deletions package/docker/openmrs/update_elis_host_port.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set +e

run_sql() {
mysql -N -s --host="${OMRS_DB_HOSTNAME}" --user="${OMRS_DB_USERNAME}" --password="${OMRS_DB_PASSWORD}" "${OMRS_DB_NAME}" -e "$1"
}

if [ $(run_sql "select count(*) from information_schema.tables where table_schema='${OMRS_DB_NAME}' and table_name='markers';") -gt 0 ]
then
echo "Updating OpenELIS Host Port in markers and failed_events table"
run_sql "update markers set feed_uri_for_last_read_entry = concat('http://${OPENELIS_HOST}:${OPENELIS_PORT}/openelis/ws/feed/patient',substring(feed_uri_for_last_read_entry, (LENGTH(feed_uri_for_last_read_entry) - LOCATE('/', REVERSE(feed_uri_for_last_read_entry)))+1) ) where feed_uri like '%openelis/ws/feed/patient/recent';"
run_sql "update markers set feed_uri = 'http://${OPENELIS_HOST}:${OPENELIS_PORT}/openelis/ws/feed/patient/recent' where feed_uri like '%openelis/ws/feed/patient/recent';"
run_sql "update failed_events set feed_uri = 'http://${OPENELIS_HOST}:${OPENELIS_PORT}/openelis/ws/feed/patient/recent' where feed_uri like '%openelis/ws/feed/patient/recent';"
fi
2 changes: 2 additions & 0 deletions package/helm/openmrs/templates/configMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ data:
MAIL_SMTP_PORT: "{{ .Values.config.MAIL_SMTP_PORT }}"
MAIL_SMTP_HOST: "{{ .Values.config.MAIL_SMTP_HOST }}"
OMRS_DOCKER_ENV: "{{ .Values.config.OMRS_DOCKER_ENV }}"
TZ: "{{ .Values.global.TZ }}"
OMRS_C3P0_MAX_SIZE: "{{ .Values.config.OMRS_C3P0_MAX_SIZE }}"
5 changes: 5 additions & 0 deletions package/helm/openmrs/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ spec:
name: bahmni-config
- mountPath: /home/bahmni/uploaded_results
name: bahmni-uploaded-results
- mountPath: /home/bahmni/uploaded-files
name: bahmni-uploaded-files
restartPolicy: Always
volumes:
# - name: openmrs-data
Expand All @@ -101,3 +103,6 @@ spec:
- name: bahmni-uploaded-results
persistentVolumeClaim:
claimName: bahmni-uploaded-results-pvc
- name: bahmni-uploaded-files
persistentVolumeClaim:
claimName: bahmni-uploaded-files-pvc
10 changes: 7 additions & 3 deletions package/helm/openmrs/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
Expand All @@ -18,12 +18,16 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions package/helm/openmrs/templates/volumes/bahmni-uploaded-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: {{ .Chart.Name }}
environment: {{ .Values.metadata.labels.environment }}
name: bahmni-uploaded-files-pvc
spec:
storageClassName: {{ .Values.global.storageClass }}
accessModes:
- ReadWriteMany
resources:
requests:
storage: {{ .Values.volumes.uploadedFiles.capacity }}
4 changes: 4 additions & 0 deletions package/helm/openmrs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ global:
nodeSelector: {}
affinity: {}
tolerations: {}
TZ: "UTC"

metadata:
labels:
Expand Down Expand Up @@ -42,6 +43,7 @@ config:
MAIL_SMTP_PORT: ""
MAIL_SMTP_HOST: ""
OMRS_DOCKER_ENV: 'false'
OMRS_C3P0_MAX_SIZE: 50

secrets:
OMRS_DB_HOSTNAME: ""
Expand Down Expand Up @@ -74,6 +76,8 @@ volumes:
capacity: "1Gi"
uploadedResults:
capacity: "2Gi"
uploadedFiles:
capacity: "2Gi"
nodeSelector: {}
affinity: {}
tolerations: {}
8 changes: 8 additions & 0 deletions package/resources/add_hibernate_properties.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

sed '/module.allow_web_admin/a\
c3p0.max_size=${OMRS_C3P0_MAX_SIZE}' ./startup-init.sh > ./startup-init-temp.sh

rm ./startup-init.sh
mv ./startup-init-temp.sh ./startup-init.sh
91 changes: 91 additions & 0 deletions package/resources/fhir-export-anonymise-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"resources": {
"patient": [
{
"fieldName": "id",
"method": "correlate"
},
{
"fieldName": "identifier",
"method": "redact"
},
{
"fieldName": "address",
"method": "redact"
},
{
"fieldName": "name",
"method": "redact"
},
{
"fieldName": "telecom",
"method": "redact"
},
{
"fieldName": "birthDate",
"method": "firstOfMonth"
},
{
"fieldName": "deceasedDateTime",
"method": "firstOfMonth"
}
],
"condition": [
{
"fieldName": "subject",
"method": "correlate"
},
{
"fieldName": "encounter",
"method": "redact"
},
{
"fieldName": "recorder",
"method": "redact"
},
{
"fieldName": "recordedDate",
"method": "redact"
}
],
"medicationRequest": [
{
"fieldName": "subject",
"method": "correlate"
},
{
"fieldName": "priority",
"method": "redact"
},
{
"fieldName": "authoredOn",
"method": "redact"
},
{
"fieldName": "requester",
"method": "redact"
},
{
"fieldName": "dosageInstruction",
"method": "redact"
},
{
"fieldName": "encounter",
"method": "redact"
}
],
"serviceRequest": [
{
"fieldName": "subject",
"method": "correlate"
},
{
"fieldName": "encounter",
"method": "redact"
}
]
},
"parameters": {
"oneWayHashSalt": "Bahmni123"
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.openmrs.distro</groupId>
<artifactId>bahmni</artifactId>
<version>0.94-SNAPSHOT</version>
<version>1.1.1</version>
<modules>
<module>openmrs-module-bahmni.configuration</module>
<module>distro</module>
Expand Down

0 comments on commit 04c6c5c

Please sign in to comment.