Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teleivo/import-radlex-openmrs
Helper scripts to import RadLex into OpenMRS
https://github.com/teleivo/import-radlex-openmrs
Last synced: 1 day ago
JSON representation
Helper scripts to import RadLex into OpenMRS
- Host: GitHub
- URL: https://github.com/teleivo/import-radlex-openmrs
- Owner: teleivo
- License: mit
- Created: 2016-09-07T12:02:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-07T14:21:13.000Z (over 8 years ago)
- Last Synced: 2024-11-08T18:52:59.150Z (about 2 months ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Import Radlex to OpenMRS
## Overview
This guide shows how you can import the Radlex Playbook into OpenMRS concept
reference terms.ATTENTION: I only tested this on linux!
## Background
Search the OpenMRS wiki for some backround information about concepts/concept
sources, like:https://wiki.openmrs.org/display/docs/Standard+and+Non-standard+Terminology+Mapping
## Howto
### Get Radlex
You need to download it yourself since you need to accept their license terms
http://www.rsna.org/radlexdownloads/
### Import into OpenMRS
_Create Concept Source Radlex_
You first need to create Radlex as an OpenMRS concept source.
You can directly execute this sql statement in your database:
```sql
INSERT concept_reference_source (concept_source_id,name,description,creator,date_created,uuid) VALUES
(1,"RADLEX","RadLex Playbook is a project of the Radiological Society of North America (RSNA)",1,"2016-08-01 09:00:00","616a9691-a1bf-4426-85a6-21a60c558265");
```_Create Concept Reference Terms for Radlex terms_
We need to generate UUIDs for every concept reference term.
I am doing this with [uuidgen command](http://man7.org/linux/man-pages/man1/uuidgen.1.html) on linux.
Execute the following to create sql insert statements for Radlex terms as
OpenMRS concept reference terms.```bash
#!/bin/bash[ -f import-radlex.sql ] && rm import-radlex.sql
awk -vFPAT='[^,]*|"[^"]*"'']"' '{if (NR!=1) {print "\42" sq $1 "\42," $3 sq ","sq $4 sq ");" }}' core-playbook-2_1 > radlex-columns.csv
while read; do
echo "INSERT concept_reference_term
(concept_source_id,version,creator,date_created,uuid,code,name,description)
VALUES (1,\"2.1\",1,\"2016-08-01 12:00:00\",\"$(uuidgen)\",${REPLY}" >>
import-radlex.sql done < radlex-columns.csv
```NOTE: if you use a different Radlex version adjust it in the command, if you
dont agree with the Radlex columns I use to populate the reference terms just
adjust them ;)If you have suggestions/improvements please share!!
## Limitations
ATTENTION: still having issues with the complete radlex, guess there is a
special character getting in the way of the awk/scripting magic. First to find
it gets a :beer: ;)