Upgrading the SHR from OpenMRS version 183 to version 190

 

Due to certain changes made to the OpenMRS database structure after OpenMRS version 183, the SHR does not update smoothly with its current complement of NDC data.

To avoid this, the following changes must be made to the SHR database before the upgrade begins.

Step 1: Identify which records of the concept_answer  table have an answer drug value which is not null. From these records, identify the unique drug id's which must exist in the drug table of the database.

Step 2: Add the missing drug records into the drug database.

Assuming that the previous step identified that drug no 1, 2 and 3 were specified in the concept_answer table, identify if these drugs also exist in the drug table. If they do not, mock drugs must be created in their stead. These mock drugs can be edited with actual data once the real drugs they represent are determined.

Assume that we discovered that drugs with primary key id's 1 and 3 must be created, as they are specified in the concept_answer table, but do not exist in the drug table.

Step 3: Insert mock drug records into the drug table to represent the two missing records.

Example : insert into drug values('1','1','Mock Drug No. 1','0',null,null,null,null,null,null,'1','20130723','0',null,null,null, '1111111111');

Now you may proceed with the remainder of the SHR upgrade process.