Information on the GMDN mapping project.
- ModuleId: 466707005
- RefsetId: 467614008
The following steps were used to create the projects:
- Load the terminology
- The data is available in the repo (see GMDN folder):
- The data is available in the repo (see GMDN folder):
- Create and configure the project
- Including users, scope definition, reports and QA checks.
- 707732003 |Device material (physical object)|
- Load the previously published map records.
- NOTE: the scope for "device" was computed for 20150131 and each SNOMED device not mapped to GMDN was added as a blank entry, allowing this scope to be reliably used going forward.
- After this, the effectiveTime = lastModified
- Compute workflow
- A .zip file of GMDN data is put on to the mapping.backup.ihtsdo Amazon S3 bucket
The "pullGmdn.csh" script on the prod server (in /home/ihtsdo/bin, and also in the repository as part of the prod config package) a cron job every 20 min to check for the availablility fo a GMDN package. NOTE: this requires the cron user to be able to run "sudo aws s3 ls mapping.backup.ihtsdo"
- Any files containing "gmdn" in the filename are downloaded
- For each
- A file name with the pattern "gmdn.*(\d\d_\d\d).zip" is expected and a directory of the digits is created (e.g. 17_1) in the /home/ihtsdo/data/GMDN folder.
- If the filename does not follow this pattern, it gets unzipped into a directory matching the filename without .zip
- It is expected that this top-level directory contains the actual XML GMDN files
As a separate (and currently manual process), the GMDN version should be loaded (the server must be taken down for this process). NOTE: if there are any problems, download the GMDN version (e.g. zip and copy to the "doc" folder and the file should be accessible, e.g. https://mapping.ihtsdotools.org/doc/17_1.zip) and try loading it into a local dev environment to track down the errors. The loader assumes the structure of the .xml files is constant - if it changes that may cause problems.
Determine the older version(s) of GMDN
Remove the older version, then restart the server
- Navigate to the mapping tool (e.g. https://mapping.ihtsdotools.org).
- Log in as "mappingadmin"
- Change to the GMDN project
- Find the GMDN project in the "map projects" accordion
- Update the destination terminology version the latest version (e.g. 17_1)
- Save the map project.
- Concepts from the updated GMDN version should now be available to mappers.
Helpful Admin Commands
mvn install -PMapRecords -D$rc -Drefset.id=467614008
mvn install -PTerminology -D$rc -Dterminology=GMDN -Dversion=latest
mvn install -PGMDN -Dinput.dir=/home/ihtsdo/data/GMDN/16_10 -Dterminology=GMDN -Dversion=17_1 -D$rc
set file = /home/ihtsdo/data/doc/release/20160731/gmdn/der2_sRefset_SimpleMapSnapshot_INT_20160731.txt
/bin/rm -f /tmp/x.txt
perl -ne '@_=split/\t/; print if $_ eq "467614008"' $file > /tmp/x.txt
mvn install -PSimpleMapRecords -D$rc -Dinput.file=/tmp/x.txt -Dmember.flag=true -Drecord.flag=false
mvn install -PComputeWorkflow -D$rc -Drefset.id=467614008
mvn install -PBeginRelease -D$rc -Drefset.id=467614008 -Dtest.mode.flag=true
mvn install -PRelease -D$rc -Drefset.id=467614008 -Doutput.dir=. -Dtime=20170131 -Dmodule.id=466707005 -Dtest.mode.flag=true
mvn install -PFinishRelease -D$rc -Drefset.id=467614008
mvn install -PBeginEditingCycle -D$rc -Drefset.id=467614008
Loading "Human Readable" View
Similar approach to ICD10 but using the "simple" map loader. e.g.
cd ~/code/admin/loader set file = ~/data/GMDN/*2016*txt grep -v 900000000000207008 $file | perl -pe 's/467614008/P467614008/;' >! x.txt mvn install -PSimpleMapRecords -Drun.config=/home/ihtsdo/config/config.properties -Dinput.file=x.txt -Dmember.flag=false -Drecord.flag=true >&! mvn.log
Derivative Release Process
- Determine the source terminology version (SNOMEDCT), the destination terminology version (GMDN) and the effective time for the release. The effective time and the source terminology version will be the same release date as the immediately previous SNOMED International release (e.g. 20XX0731 or 20XX0131). The destination version should include the last GMDN content that got included in the International Edition before the content cut off date (for July release, this would be early May, e.g. 17_5). Examples below are based on SNOMEDCT 20170731 to GMDN 17_5 release.
- Stop editing on Prod
- Check Prod database for no tracking records on the project.
- Clone the final prod backup to the release server.
- Begin next editing cycle on the Prod server.
- Compute Workflow on Prod.
On release server, stop the server
On release server, remove simple map refset members with GMDN refsetId.
On release server, load previous release simple map refset members with GMDN refsetId from previous (e.g.20170131) release. Andrew will provide this file, or it should be on server in previous release file.
Remove SNOMEDCT 20170131.
Add SNOMEDCT 20170731 (this took 2 1/2 hours on the release server)
Add GMDN 17_05. (OK if later versions remain in the db as long as the project references the correct release version)
Reindex (is this necessary?)
Start the server
- Update the project to point to the SNOMEDCT and GMDN release versions.
- Compute Workflow. Watch log at tail -f /var/log/tomcat.log.
- Begin release. (Use effectiveTime 20170731 given example dates above) ModuleId is 466707005.
- Check QA report
- Have mappers fix any errors.
- Compute Workflow
- Check database for no tracking records on the project.
- Begin release
- Process release
- Copy ActiveSnapshot file back to Prod
- On Prod, run Preview Finish
- Check Release Finalization report
- Run Finish Release.
- Question: we loaded sources onto the release server. What needs to be loaded into prod?
NOTE: No need to create 'Published SNOMED to GMDN'. GMDN project is private.