Updated terminology upload tests and artifacts to the new LOINC filenames.
This commit is contained in:
parent
75c1b7baa8
commit
215e224e3d
|
@ -37,10 +37,10 @@ public class TerminologyUploaderProviderDstu3Test extends BaseResourceProviderDs
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
ZipOutputStream zos = new ZipOutputStream(bos);
|
ZipOutputStream zos = new ZipOutputStream(bos);
|
||||||
|
|
||||||
zos.putNextEntry(new ZipEntry("loinc.csv"));
|
zos.putNextEntry(new ZipEntry("Loinc.csv"));
|
||||||
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/loinc.csv")));
|
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/Loinc.csv")));
|
||||||
zos.putNextEntry(new ZipEntry("LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV"));
|
zos.putNextEntry(new ZipEntry("MultiAxialHierarchy.csv"));
|
||||||
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV")));
|
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/MultiAxialHierarchy.csv")));
|
||||||
zos.close();
|
zos.close();
|
||||||
|
|
||||||
byte[] packageBytes = bos.toByteArray();
|
byte[] packageBytes = bos.toByteArray();
|
||||||
|
|
|
@ -29,10 +29,10 @@ public class TerminologyUploaderProviderR4Test extends BaseResourceProviderR4Tes
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
ZipOutputStream zos = new ZipOutputStream(bos);
|
ZipOutputStream zos = new ZipOutputStream(bos);
|
||||||
|
|
||||||
zos.putNextEntry(new ZipEntry("loinc.csv"));
|
zos.putNextEntry(new ZipEntry("Loinc.csv"));
|
||||||
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/loinc.csv")));
|
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/Loinc.csv")));
|
||||||
zos.putNextEntry(new ZipEntry("LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV"));
|
zos.putNextEntry(new ZipEntry("MultiAxialHierarchy.csv"));
|
||||||
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV")));
|
zos.write(IOUtils.toByteArray(getClass().getResourceAsStream("/loinc/MultiAxialHierarchy.csv")));
|
||||||
zos.close();
|
zos.close();
|
||||||
|
|
||||||
byte[] packageBytes = bos.toByteArray();
|
byte[] packageBytes = bos.toByteArray();
|
||||||
|
|
|
@ -341,19 +341,19 @@ public class TerminologyLoaderSvcLoincTest {
|
||||||
mySvc.loadLoinc(myFiles.getFiles(), details);
|
mySvc.loadLoinc(myFiles.getFiles(), details);
|
||||||
fail();
|
fail();
|
||||||
} catch (UnprocessableEntityException e) {
|
} 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 {
|
static void addLoincMandatoryFilesToZip(ZipCollectionBuilder theFiles) throws IOException {
|
||||||
theFiles.addFileZip("/loinc/", "loinc.csv", TerminologyLoaderSvcImpl.LOINC_FILE);
|
theFiles.addFileZip("/loinc/", "Loinc.csv", TerminologyLoaderSvcImpl.LOINC_FILE);
|
||||||
theFiles.addFileZip("/loinc/", "hierarchy.csv", TerminologyLoaderSvcImpl.LOINC_HIERARCHY_FILE);
|
theFiles.addFileZip("/loinc/", "MultiAxialHierarchy.csv", TerminologyLoaderSvcImpl.LOINC_HIERARCHY_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addLoincOptionalFilesToZip(ZipCollectionBuilder theFiles) throws IOException {
|
static void addLoincOptionalFilesToZip(ZipCollectionBuilder theFiles) throws IOException {
|
||||||
theFiles.addFileZip("/loinc/", "loincupload.properties");
|
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_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_FILE, TerminologyLoaderSvcImpl.LOINC_PART_FILE);
|
||||||
theFiles.addFileZip("/loinc/", TerminologyLoaderSvcImpl.LOINC_PART_LINK_FILE, TerminologyLoaderSvcImpl.LOINC_PART_LINK_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
|
* Top 2000 files have versions in the filename so don't use the
|
||||||
* constant.. that way this is a better test
|
* constant.. that way this is a better test
|
||||||
*/
|
*/
|
||||||
theFiles.addFilePlain("/loinc/", "LOINC_1.6_Top2000CommonLabResultsSI.csv");
|
theFiles.addFilePlain("/loinc/", "Top2000CommonLabResultsSi.csv");
|
||||||
theFiles.addFilePlain("/loinc/", "LOINC_1.6_Top2000CommonLabResultsUS.csv");
|
theFiles.addFilePlain("/loinc/", "Top2000CommonLabResultsUs.csv");
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
|
|
Can't render this file because it contains an unexpected character in line 1 and column 31.
|
Can't render this file because it contains an unexpected character in line 1 and column 23.
|
Can't render this file because it contains an unexpected character in line 1 and column 30.
|
|
@ -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
|
|
|
Loading…
Reference in New Issue