IHTSDO / sct-snapshot-rest-api

Rest API for SNOMED CT Snapshot views, powered by Node.js, Express & MongoDB
Apache License 2.0
60 stars 44 forks source link

Rest API response: The db is not version 2 #34

Closed priyaranjan-tokachichu closed 6 years ago

priyaranjan-tokachichu commented 6 years ago

After following the steps and converting the SNOMED RF2 to JSON, I tried to invoke the API. I got the following message. "The db isnot version 2. It must be created with the new conversion module." The docker installation did not work for me, so I used the manual installation using node.js. I tried searching for this error on the internet but did not get any hits.

priyaranjan-tokachichu commented 6 years ago

Changed the code of snomedv2.js to include docs[0].v="2"; or doc.v="2"; to override the message so that the v2 repository can accept the json output stored in MongoDB from the rf2-to-json repository. Once the rf2-to-json repository becomes compatible with v2 of the rest api, then I plan on undoing those changes.

priyaranjan-tokachichu commented 6 years ago

So far I was trying to convert just the RF2 of extension (not including the edition) with pre-release v1.3 of rf2-to-json which was failing. I tried the RF2 edition and it was successful. I am not able to use the sct-snapshot-rest-api v2. Thanks, @rorydavidson for the suggestion.