onc-healthit / reference-ccda-validator

Deployable C-CDA Validator war source code. Use this repository to build and deploy a validator on your local environment.
BSD 2-Clause "Simplified" License
36 stars 37 forks source link

SNOMED-CT or other Code Systems loading not working? #21

Closed FredKnieper closed 6 years ago

FredKnieper commented 6 years ago

I'm still trying to figure out the correct file locations for everything relative to the paths I give in referenceccdaservice.xml. I thought I've finally figured it out:

${vocabulary.localValueSetRepositoryDir}/VSAC/2.16.840.1.etc.from.VSAC.xlsx
${vocabulary.localValueSetRepositoryDir}/VSAC/Postal Codes.etc.from.code-validator-api.xlsx
${vocabulary.localCodeRepositoryDir}/SNOMED-CT/sct2_Description_Full-en_US1000124_20150901.txt
${vocabulary.localCodeRepositoryDir}/ICD10CM/icd10cm_order_2015.txt
${vocabulary.localCodeRepositoryDir}/LOINC/loinc.csv

and so on, with the code repository folders named after the first column in the Code Systems.xlsx file from the code-validator-api project, and the filename(s) inside that folder after the 4th column.

When deploy the 1.0.24 war file (it seems 1.0.25 doesn't have one yet) from Manager, it takes several minutes, during which I receive messages like:

17:08:16,335 INFO  [VocabularyLoadRunner:92] Loading vocabularies at: /data/codes/...
17:08:16,335 DEBUG [VocabularyLoadRunner:40] Building Loader for directory: SNOMED-CT...
17:08:16,335 DEBUG [DefaultListableBeanFactory:251] Returning cached instance of singleton bean 'SNOMED-CT'
17:08:16,336 DEBUG [VocabularyLoadRunner:43] Loader built...
17:08:16,336 INFO  [VocabularyLoadRunner:44] Loading files in : SNOMED-CT...
17:08:16,340 DEBUG [SnomedLoader:36] Loading SNOMED File: sct2_Description_Full-en_US1000124_20150901.txt
17:10:01,074 DEBUG [VocabularyLoadRunner:46] File loaded...

so it appears to be taking a couple of minutes to load my data files.

With this arrangement, I can use the /getvaluesetsbyoids webservice to get the contents of any of the files I've placed in the VSAC folder by OID. BUT when I ask about the SNOMED CT concept 138875005, using /getbycodeincodesystem?code=138875005&codeSystems=2.16.840.1.113883.6.96 or /iscodeincodesystem?code=138875005&codeSystems=2.16.840.1.113883.6.96 I get an empty result or false. Likewise, ICD10CM E11.9 or codes from the other code systems I've set up.

Am I still not placing the correct code system data files in the correct folder/filename/format (for instance the SNOMED CT file above is a tab-delimited text file straight from the release zip, not an Excel Workbook like the VSAC files)? Or is there some other reason the codesystem webservices are not returning the expected result?

FredKnieper commented 6 years ago

OK, after digging deeper into the code, it appears that the Value Sets are referred to by OID, but the Code Systems are referred to by name for the purpose of this query. Therefore, I should have used /getbycodeincodesystem?code=138875005&codeSystems=SNOMED-CT instead of codeSystems=2.16.840.1.113883.6.96 to confirm that data was being loaded correctly.

The directory structure above is the correct layout of the value sets and code system data files.