From 215e224e3dc74e95af29db984e00ba50dad25f3f Mon Sep 17 00:00:00 2001 From: Rob Hausam Date: Thu, 14 Jun 2018 17:42:52 -0500 Subject: [PATCH] Updated terminology upload tests and artifacts to the new LOINC filenames. --- .../dstu3/TerminologyUploaderProviderDstu3Test.java | 8 ++++---- .../r4/TerminologyUploaderProviderR4Test.java | 8 ++++---- .../fhir/jpa/term/TerminologyLoaderSvcLoincTest.java | 12 ++++++------ .../loinc/{AnswerList_Beta_1.csv => AnswerList.csv} | 0 .../test/resources/loinc/{loinc.csv => Loinc.csv} | 0 ...erListLink_Beta_1.csv => LoincAnswerListLink.csv} | 0 .../{LoincPartLink_Beta_1.csv => LoincPartLink.csv} | 0 ...I-AXIAL_HIERARCHY.CSV => MultiAxialHierarchy.csv} | 0 .../resources/loinc/{Part_Beta_1.csv => Part.csv} | 0 ...Mapping_Beta_1.csv => PartRelatedCodeMapping.csv} | 0 ...abResultsSI.csv => Top2000CommonLabResultsSi.csv} | 0 ...abResultsUS.csv => Top2000CommonLabResultsUs.csv} | 0 .../src/test/resources/loinc/hierarchy.csv | 10 ---------- 13 files changed, 14 insertions(+), 24 deletions(-) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{AnswerList_Beta_1.csv => AnswerList.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{loinc.csv => Loinc.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{LoincAnswerListLink_Beta_1.csv => LoincAnswerListLink.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{LoincPartLink_Beta_1.csv => LoincPartLink.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV => MultiAxialHierarchy.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{Part_Beta_1.csv => Part.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{PartRelatedCodeMapping_Beta_1.csv => PartRelatedCodeMapping.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{LOINC_1.6_Top2000CommonLabResultsSI.csv => Top2000CommonLabResultsSi.csv} (100%) rename hapi-fhir-jpaserver-base/src/test/resources/loinc/{LOINC_1.6_Top2000CommonLabResultsUS.csv => Top2000CommonLabResultsUs.csv} (100%) delete mode 100644 hapi-fhir-jpaserver-base/src/test/resources/loinc/hierarchy.csv diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/TerminologyUploaderProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/TerminologyUploaderProviderDstu3Test.java index 60b94ec3d2c..052af9d5d9b 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/TerminologyUploaderProviderDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/TerminologyUploaderProviderDstu3Test.java @@ -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(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java index b732bf86800..560b3b082db 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java @@ -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(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java index d98f7a9f0ae..20fd44822a3 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcLoincTest.java @@ -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 diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/AnswerList_Beta_1.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/AnswerList.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/AnswerList_Beta_1.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/AnswerList.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/loinc.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/Loinc.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/loinc.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/Loinc.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincAnswerListLink_Beta_1.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincAnswerListLink.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincAnswerListLink_Beta_1.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincAnswerListLink.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincPartLink_Beta_1.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincPartLink.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincPartLink_Beta_1.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/LoincPartLink.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV b/hapi-fhir-jpaserver-base/src/test/resources/loinc/MultiAxialHierarchy.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/LOINC_2.54_MULTI-AXIAL_HIERARCHY.CSV rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/MultiAxialHierarchy.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/Part_Beta_1.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/Part.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/Part_Beta_1.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/Part.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/PartRelatedCodeMapping_Beta_1.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/PartRelatedCodeMapping.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/PartRelatedCodeMapping_Beta_1.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/PartRelatedCodeMapping.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/LOINC_1.6_Top2000CommonLabResultsSI.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/Top2000CommonLabResultsSi.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/LOINC_1.6_Top2000CommonLabResultsSI.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/Top2000CommonLabResultsSi.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/LOINC_1.6_Top2000CommonLabResultsUS.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/Top2000CommonLabResultsUs.csv similarity index 100% rename from hapi-fhir-jpaserver-base/src/test/resources/loinc/LOINC_1.6_Top2000CommonLabResultsUS.csv rename to hapi-fhir-jpaserver-base/src/test/resources/loinc/Top2000CommonLabResultsUs.csv diff --git a/hapi-fhir-jpaserver-base/src/test/resources/loinc/hierarchy.csv b/hapi-fhir-jpaserver-base/src/test/resources/loinc/hierarchy.csv deleted file mode 100644 index d7bd6d54884..00000000000 --- a/hapi-fhir-jpaserver-base/src/test/resources/loinc/hierarchy.csv +++ /dev/null @@ -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