Script for migrating Coded Audiometry Obs to Numeric Obs(MSF Only)
Context
After 1.5.1 Release, the consortium decided to change the Audiometry Results concepts to Numeric type. For which a liquibase migration was written which did the below.
- Created new Coded Audiometry Results Concepts as a copy of existing concepts.
- All the existing obs moved to new concepts created.
- Changed the old Concepts to Numeric
But the below step is not done as PIH wanted to manually enter the results.
- Migrate the coded value obs to be numeric.
Hence the below query is provided to MSF for migrating value coded Audiometry obs to numeric with below logic.
Current option selected | Numeric equivalent |
---|---|
1= "0 to 20 db" | 10 |
2= "21 to 40 dB" | 30 |
3= "41 to 55 dB" | 48 |
4= "56 to 70 dB" | 63 |
5= "71 to 90 dB" | 80 |
6= "91+ dB" | 100 |
This is available in Release 2.0 only
SQL Script
Below is the SQL script to be run on the Bahmni server as a root user using below commands:
sudo su wget https://bahmni.atlassian.net/wiki/download/attachments/115977107/audiometryMigration.sql mysql -u root -p openmrs < audiometryMigration.sql
SQL Script File
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)