Updated terminology upload tests and artifacts to the new LOINC filenames.

This commit is contained in:
Rob Hausam 2018-06-14 17:42:52 -05:00
parent 75c1b7baa8
commit 215e224e3d
13 changed files with 14 additions and 24 deletions

View File

@ -37,10 +37,10 @@ public class TerminologyUploaderProviderDstu3Test extends BaseResourceProviderDs
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(bos);
zos.putNextEntry(new ZipEntry("loinc.csv"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/loinc.csv")));
zos.putNextEntry(new ZipEntry("LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV")));
zos.putNextEntry(new ZipEntry("Loinc.csv"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/Loinc.csv")));
zos.putNextEntry(new ZipEntry("MultiAxialHierarchy.csv"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/MultiAxialHierarchy.csv")));
zos.close();
byte[] packageBytes = bos.toByteArray();

View File

@ -29,10 +29,10 @@ public class TerminologyUploaderProviderR4Test extends BaseResourceProviderR4Tes
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(bos);
zos.putNextEntry(new ZipEntry("loinc.csv"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/loinc.csv")));
zos.putNextEntry(new ZipEntry("LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV")));
zos.putNextEntry(new ZipEntry("Loinc.csv"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/Loinc.csv")));
zos.putNextEntry(new ZipEntry("MultiAxialHierarchy.csv"));
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/MultiAxialHierarchy.csv")));
zos.close();
byte[] packageBytes = bos.toByteArray();

View File

@ -341,19 +341,19 @@ public class TerminologyLoaderSvcLoincTest {
mySvc.loadLoinc(myFiles.getFiles(), details);
fail();
} catch (UnprocessableEntityException e) {
assertEquals("Could not find the following mandatory files in input: [loinc.csv, MULTI-AXIAL_HIERARCHY.CSV]", e.getMessage());
assertEquals("Could not find the following mandatory files in input: [Loinc.csv, MultiAxialHierarchy.csv]", e.getMessage());
}
}
static void addLoincMandatoryFilesToZip(ZipCollectionBuilder theFiles) throws IOException {
theFiles.addFileZip("/loinc/", "loinc.csv", TerminologyLoaderSvcImpl.LOINC_FILE);
theFiles.addFileZip("/loinc/", "hierarchy.csv", TerminologyLoaderSvcImpl.LOINC_HIERARCHY_FILE);
theFiles.addFileZip("/loinc/", "Loinc.csv", TerminologyLoaderSvcImpl.LOINC_FILE);
theFiles.addFileZip("/loinc/", "MultiAxialHierarchy.csv", TerminologyLoaderSvcImpl.LOINC_HIERARCHY_FILE);
}
static void addLoincOptionalFilesToZip(ZipCollectionBuilder theFiles) throws IOException {
theFiles.addFileZip("/loinc/", "loincupload.properties");
theFiles.addFileZip("/loinc/", "AnswerList_Beta_1.csv", TerminologyLoaderSvcImpl.LOINC_ANSWERLIST_FILE);
theFiles.addFileZip("/loinc/", "AnswerList.csv", TerminologyLoaderSvcImpl.LOINC_ANSWERLIST_FILE);
theFiles.addFileZip("/loinc/", TerminologyLoaderSvcImpl.LOINC_ANSWERLIST_LINK_FILE, TerminologyLoaderSvcImpl.LOINC_ANSWERLIST_LINK_FILE);
theFiles.addFileZip("/loinc/", TerminologyLoaderSvcImpl.LOINC_PART_FILE, TerminologyLoaderSvcImpl.LOINC_PART_FILE);
theFiles.addFileZip("/loinc/", TerminologyLoaderSvcImpl.LOINC_PART_LINK_FILE, TerminologyLoaderSvcImpl.LOINC_PART_LINK_FILE);
@ -368,8 +368,8 @@ public class TerminologyLoaderSvcLoincTest {
* Top 2000 files have versions in the filename so don't use the
* constant.. that way this is a better test
*/
theFiles.addFilePlain("/loinc/", "LOINC_1.6_Top2000CommonLabResultsSI.csv");
theFiles.addFilePlain("/loinc/", "LOINC_1.6_Top2000CommonLabResultsUS.csv");
theFiles.addFilePlain("/loinc/", "Top2000CommonLabResultsSi.csv");
theFiles.addFilePlain("/loinc/", "Top2000CommonLabResultsUs.csv");
}
@AfterClass

View File

Can't render this file because it contains an unexpected character in line 1 and column 31.

View File

Can't render this file because it contains an unexpected character in line 1 and column 23.

View File

Can't render this file because it contains an unexpected character in line 1 and column 30.

View File

@ -1,10 +0,0 @@
PATH_TO_ROOT,SEQUENCE,IMMEDIATE_PARENT,CODE,CODE_TEXT
,1,,LP31755-9,Microbiology
LP31755-9,1,LP31755-9,LP14559-6,Microorganism
LP31755-9.LP14559-6,1,LP14559-6,LP98185-9,Bacteria
LP31755-9.LP14559-6.LP98185-9,1,LP98185-9,LP14082-9,Bacteria
LP31755-9.LP14559-6.LP98185-9.LP14082-9,1,LP14082-9,LP52258-8,Bacteria | Body Fluid
LP31755-9.LP14559-6.LP98185-9.LP14082-9.LP52258-8,1,LP52258-8,41599-2,Bacteria Fld Ql Micro
LP31755-9.LP14559-6.LP98185-9.LP14082-9,2,LP14082-9,LP52260-4,Bacteria | Cerebral spinal fluid
LP31755-9.LP14559-6.LP98185-9.LP14082-9.LP52260-4,1,LP52260-4,41602-4,Bacteria CSF Ql Micro
LP31755-9.LP14559-6.LP98185-9.LP14082-9,3,LP14082-9,LP52960-9,Bacteria | Cervix
1 PATH_TO_ROOT SEQUENCE IMMEDIATE_PARENT CODE CODE_TEXT
2 1 LP31755-9 Microbiology
3 LP31755-9 1 LP31755-9 LP14559-6 Microorganism
4 LP31755-9.LP14559-6 1 LP14559-6 LP98185-9 Bacteria
5 LP31755-9.LP14559-6.LP98185-9 1 LP98185-9 LP14082-9 Bacteria
6 LP31755-9.LP14559-6.LP98185-9.LP14082-9 1 LP14082-9 LP52258-8 Bacteria | Body Fluid
7 LP31755-9.LP14559-6.LP98185-9.LP14082-9.LP52258-8 1 LP52258-8 41599-2 Bacteria Fld Ql Micro
8 LP31755-9.LP14559-6.LP98185-9.LP14082-9 2 LP14082-9 LP52260-4 Bacteria | Cerebral spinal fluid
9 LP31755-9.LP14559-6.LP98185-9.LP14082-9.LP52260-4 1 LP52260-4 41602-4 Bacteria CSF Ql Micro
10 LP31755-9.LP14559-6.LP98185-9.LP14082-9 3 LP14082-9 LP52960-9 Bacteria | Cervix