Making LOINC filenames configurable; initial commit.

This commit is contained in:
Diederik Muylwyk 2019-08-26 18:32:21 -04:00
parent e5c8ffdc20
commit 0765254024
4 changed files with 33 additions and 7 deletions

View File

@ -472,13 +472,13 @@ public class TerminologyLoaderSvcImpl implements IHapiTerminologyLoaderSvc {
Properties uploadProperties = new Properties();
for (FileDescriptor next : theDescriptors.getUncompressedFileDescriptors()) {
if (next.getFilename().endsWith("loincupload.properties")) {
if (next.getFilename().endsWith(LOINC_UPLOAD_PROPERTIES_FILE)) {
try {
try (InputStream inputStream = next.getInputStream()) {
uploadProperties.load(inputStream);
}
} catch (IOException e) {
throw new InternalErrorException("Failed to read loincupload.properties", e);
throw new InternalErrorException("Failed to read " + LOINC_UPLOAD_PROPERTIES_FILE, e);
}
}
}

View File

@ -114,7 +114,7 @@ public abstract class BaseLoincHandler implements IRecordHandler {
conceptMap.setId(theMapping.getConceptMapId());
conceptMap.setUrl(theMapping.getConceptMapUri());
conceptMap.setName(theMapping.getConceptMapName());
conceptMap.setVersion(myUploadProperties.getProperty("conceptmap.version"));
conceptMap.setVersion(myUploadProperties.getProperty("loinc.conceptmap.version"));
conceptMap.setPublisher(REGENSTRIEF_INSTITUTE_INC);
conceptMap.addContact()
.setName(REGENSTRIEF_INSTITUTE_INC)

View File

@ -72,7 +72,7 @@ public class LoincAnswerListHandler extends BaseLoincHandler {
}
// Answer list ValueSet
ValueSet vs = getValueSet(answerListId, "http://loinc.org/vs/" + answerListId, answerListName, "answerlist.version");
ValueSet vs = getValueSet(answerListId, "http://loinc.org/vs/" + answerListId, answerListName, "loinc.answerlist.version");
if (vs.getIdentifier().isEmpty()) {
vs.addIdentifier()
.setSystem("urn:ietf:rfc:3986")

View File

@ -1,7 +1,33 @@
loinc.answerlist.file=AnswerList.csv
loinc.answerlist.link.file=LoincAnswerListLink.csv
# This is the version identifier for the AnswerList file
answerlist.version=Beta.1
loinc.answerlist.version=Beta.1
# This is the version identifier for uploaded ConceptMap resources
conceptmap.version=Beta.1
loinc.conceptmap.version=Beta.1
loinc.document.ontology.file=DocumentOntology.csv
loinc.file=LoincTable/Loinc.csv
loinc.group.file=Group.csv
loinc.group.terms.file=GroupLoincTerms.csv
loinc.hierarchy.file=MultiAxialHierarchy.csv
loinc.ieee.medical.device.code.mapping.table.csv=LoincIeeeMedicalDeviceCodeMappingTable.csv
loinc.imaging.document.codes.file=ImagingDocumentCodes.csv
loinc.parent.group.file=ParentGroup.csv
loinc.part.file=Part.csv
loinc.part.link.file=LoincPartLink.csv
loinc.part.related.code.mapping.file=PartRelatedCodeMapping.csv
loinc.rsna.playbook.file=LoincRsnaRadiologyPlaybook.csv
loinc.top2000.common.lab.results.si.file=Top2000CommonLabResultsSi.csv
loinc.top2000.common.lab.results.us.file=Top2000CommonLabResultsUs.csv
loinc.universal.lab.order.valueset.file=LoincUniversalLabOrdersValueSet.csv