Skip to content

Commit

Permalink
Merge pull request #21 from Bahmni/BAH-3453
Browse files Browse the repository at this point in the history
BAH-3453|Deepthi m/Keerthana Y |Added init script for snomed standard with snowstrom lite and updated Readme.
  • Loading branch information
Gurpreet authored Jan 24, 2024
2 parents 676a280 + 6c4739e commit 34aef8e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ To use Snowstorm Lite server along with SNOMED CLINIC or STANDARD, please follow
1. Go to snomed-clinic-with-snowstorm-lite or snomed-standard-with-snowstorm-lite subfolder. For example: `cd snomed-standard-with-snowstorm-lite`.
2. Update _SNOWSTORM_RF2_FILE_PATH_ with RF2 file path from SNOMED and _admin.password_ in the .env file.
3. Replace `<UPDATE_PASSWORD_HERE>` with the same _admin.password_ in the load-data.sh file.
4. Please update the global properties in openmrs following the below Wiki page:
https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3183345706/Bahmni-SNOMED+Integration+Local+Deployment+Guide

### Known Issues with SNOMED CLINIC
1. For any concept supporting multiple languages, the form builder report displays all the languages against
Expand Down
16 changes: 16 additions & 0 deletions snomed-standard-with-snowstorm-lite/init_pacs_dbs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -e

create_user_and_database() {
export PG_PASSWORD=${POSTGRES_PASSWORD}
DB_NAME="$1"
DB_USERNAME="$2"
DB_PASSWORD="$3"
psql -c "CREATE DATABASE ${DB_NAME};"
psql -c "REVOKE ALL ON DATABASE ${DB_NAME} FROM PUBLIC;"
psql -c "CREATE USER ${DB_USERNAME} WITH ENCRYPTED PASSWORD '${DB_PASSWORD}';"
psql -c "GRANT ALL ON DATABASE ${DB_NAME} TO ${DB_USERNAME};"
}

create_user_and_database "${DCM4CHEE_DB_NAME}" "${DCM4CHEE_DB_USERNAME}" "${DCM4CHEE_DB_PASSWORD}"
create_user_and_database "${PACS_INTEGRATION_DB_NAME}" "${PACS_INTEGRATION_DB_USERNAME}" "${PACS_INTEGRATION_DB_PASSWORD}"

0 comments on commit 34aef8e

Please sign in to comment.