When uploading loinc CodeSystem take copyright from loinc.xml input file. (#3092)
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
This commit is contained in:
parent
3d681134e9
commit
b93f33d4ff
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
type: add
|
||||
issue: 3089
|
||||
title: "LOINC copyright notice is now taken from CodeSystem.copyright entry from loinc.xml input file."
|
|
@ -609,7 +609,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_HIERARCHY_FILE.getCode(), LOINC_HIERARCHY_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Answer lists (ValueSets of potential answers/values for LOINC "questions")
|
||||
handler = new LoincAnswerListHandler(codeSystemVersion, code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincAnswerListHandler(codeSystemVersion, code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_ANSWERLIST_FILE.getCode(), LOINC_ANSWERLIST_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Answer list links (connects LOINC observation codes to answer list codes)
|
||||
|
@ -620,23 +620,23 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
// Note that this should come before the "Part Related Code Mapping"
|
||||
// file because there are some duplicate mappings between these
|
||||
// two files, and the RSNA Playbook file has more metadata
|
||||
handler = new LoincRsnaPlaybookHandler(code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincRsnaPlaybookHandler(code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_RSNA_PLAYBOOK_FILE.getCode(), LOINC_RSNA_PLAYBOOK_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Part related code mapping
|
||||
handler = new LoincPartRelatedCodeMappingHandler(code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincPartRelatedCodeMappingHandler(code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_PART_RELATED_CODE_MAPPING_FILE.getCode(), LOINC_PART_RELATED_CODE_MAPPING_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Document ontology
|
||||
handler = new LoincDocumentOntologyHandler(code2concept, propertyNamesToTypes, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincDocumentOntologyHandler(code2concept, propertyNamesToTypes, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_DOCUMENT_ONTOLOGY_FILE.getCode(), LOINC_DOCUMENT_ONTOLOGY_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Top 2000 codes - US
|
||||
handler = new LoincTop2000LabResultsUsHandler(code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincTop2000LabResultsUsHandler(code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsvOptional(theDescriptors, theUploadProperties.getProperty(LOINC_TOP2000_COMMON_LAB_RESULTS_US_FILE.getCode(), LOINC_TOP2000_COMMON_LAB_RESULTS_US_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Top 2000 codes - SI
|
||||
handler = new LoincTop2000LabResultsSiHandler(code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincTop2000LabResultsSiHandler(code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsvOptional(theDescriptors, theUploadProperties.getProperty(LOINC_TOP2000_COMMON_LAB_RESULTS_SI_FILE.getCode(), LOINC_TOP2000_COMMON_LAB_RESULTS_SI_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Universal lab order ValueSet
|
||||
|
@ -644,7 +644,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_UNIVERSAL_LAB_ORDER_VALUESET_FILE.getCode(), LOINC_UNIVERSAL_LAB_ORDER_VALUESET_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// IEEE medical device codes
|
||||
handler = new LoincIeeeMedicalDeviceCodeHandler(code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincIeeeMedicalDeviceCodeHandler(code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_IEEE_MEDICAL_DEVICE_CODE_MAPPING_TABLE_FILE.getCode(), LOINC_IEEE_MEDICAL_DEVICE_CODE_MAPPING_TABLE_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Imaging document codes
|
||||
|
@ -652,7 +652,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_IMAGING_DOCUMENT_CODES_FILE.getCode(), LOINC_IMAGING_DOCUMENT_CODES_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Group
|
||||
handler = new LoincGroupFileHandler(code2concept, valueSets, conceptMaps, theUploadProperties);
|
||||
handler = new LoincGroupFileHandler(code2concept, valueSets, conceptMaps, theUploadProperties, loincCs.getCopyright());
|
||||
iterateOverZipFileCsv(theDescriptors, theUploadProperties.getProperty(LOINC_GROUP_FILE.getCode(), LOINC_GROUP_FILE_DEFAULT.getCode()), handler, ',', QuoteMode.NON_NUMERIC, false);
|
||||
|
||||
// Group terms
|
||||
|
@ -688,7 +688,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
IOUtils.closeQuietly(theDescriptors);
|
||||
}
|
||||
|
||||
valueSets.add(getValueSetLoincAll(theUploadProperties));
|
||||
valueSets.add(getValueSetLoincAll(theUploadProperties, loincCs.getCopyright()));
|
||||
|
||||
for (Entry<String, TermConcept> next : code2concept.entrySet()) {
|
||||
TermConcept nextConcept = next.getValue();
|
||||
|
@ -713,7 +713,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
}
|
||||
|
||||
|
||||
private ValueSet getValueSetLoincAll(Properties theUploadProperties) {
|
||||
private ValueSet getValueSetLoincAll(Properties theUploadProperties, String theCopyrightStatement) {
|
||||
ValueSet retVal = new ValueSet();
|
||||
|
||||
String codeSystemVersionId = theUploadProperties.getProperty(LOINC_CODESYSTEM_VERSION.getCode());
|
||||
|
@ -731,7 +731,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
|
|||
retVal.setDate(new Date());
|
||||
retVal.setPublisher("Regenstrief Institute, Inc.");
|
||||
retVal.setDescription("A value set that includes all LOINC codes");
|
||||
retVal.setCopyright("This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/");
|
||||
retVal.setCopyright(theCopyrightStatement);
|
||||
retVal.getCompose().addInclude().setSystem(ITermLoaderSvc.LOINC_URI).setVersion(codeSystemVersionId);
|
||||
|
||||
return retVal;
|
||||
|
|
|
@ -40,7 +40,6 @@ import static org.apache.commons.lang3.StringUtils.*;
|
|||
|
||||
public abstract class BaseLoincHandler implements IZipContentsHandlerCsv {
|
||||
private static final Logger ourLog = LoggerFactory.getLogger(BaseLoincHandler.class);
|
||||
public static final String LOINC_COPYRIGHT_STATEMENT = "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/";
|
||||
|
||||
/**
|
||||
* This is <b>NOT</b> the LOINC CodeSystem URI! It is just
|
||||
|
@ -54,14 +53,22 @@ public abstract class BaseLoincHandler implements IZipContentsHandlerCsv {
|
|||
private final Map<String, ValueSet> myIdToValueSet = new HashMap<>();
|
||||
private final Map<String, TermConcept> myCode2Concept;
|
||||
protected final Properties myUploadProperties;
|
||||
protected String myLoincCopyrightStatement;
|
||||
|
||||
BaseLoincHandler(Map<String, TermConcept> theCode2Concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
BaseLoincHandler(Map<String, TermConcept> theCode2Concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
this(theCode2Concept, theValueSets, theConceptMaps, theUploadProperties, null);
|
||||
}
|
||||
|
||||
BaseLoincHandler(Map<String, TermConcept> theCode2Concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
myValueSets = theValueSets;
|
||||
myValueSets.forEach(t -> myIdToValueSet.put(t.getId(), t));
|
||||
myCode2Concept = theCode2Concept;
|
||||
myConceptMaps = theConceptMaps;
|
||||
myConceptMaps.forEach(t -> myIdToConceptMaps.put(t.getId(), t));
|
||||
myUploadProperties = theUploadProperties;
|
||||
myLoincCopyrightStatement = theCopyrightStatement;
|
||||
}
|
||||
|
||||
void addCodeAsIncludeToValueSet(ValueSet theVs, String theCodeSystemUrl, String theCode, String theDisplayName) {
|
||||
|
@ -105,7 +112,7 @@ public abstract class BaseLoincHandler implements IZipContentsHandlerCsv {
|
|||
}
|
||||
|
||||
|
||||
void addConceptMapEntry(ConceptMapping theMapping, String theCopyright) {
|
||||
void addConceptMapEntry(ConceptMapping theMapping, String theExternalCopyright) {
|
||||
if (isBlank(theMapping.getSourceCode())) {
|
||||
return;
|
||||
}
|
||||
|
@ -126,11 +133,14 @@ public abstract class BaseLoincHandler implements IZipContentsHandlerCsv {
|
|||
.addTelecom()
|
||||
.setSystem(ContactPoint.ContactPointSystem.URL)
|
||||
.setValue(LOINC_WEBSITE_URL);
|
||||
String copyright = theCopyright;
|
||||
|
||||
String copyright = theExternalCopyright;
|
||||
if (!copyright.contains("LOINC")) {
|
||||
copyright = LOINC_COPYRIGHT_STATEMENT + ". " + copyright;
|
||||
copyright = myLoincCopyrightStatement +
|
||||
(myLoincCopyrightStatement.endsWith(".") ? " " : ". ") + copyright;
|
||||
}
|
||||
conceptMap.setCopyright(copyright);
|
||||
|
||||
myIdToConceptMaps.put(theMapping.getConceptMapId(), conceptMap);
|
||||
myConceptMaps.add(conceptMap);
|
||||
} else {
|
||||
|
@ -218,7 +228,7 @@ public abstract class BaseLoincHandler implements IZipContentsHandlerCsv {
|
|||
.addTelecom()
|
||||
.setSystem(ContactPoint.ContactPointSystem.URL)
|
||||
.setValue(LOINC_WEBSITE_URL);
|
||||
vs.setCopyright(LOINC_COPYRIGHT_STATEMENT);
|
||||
vs.setCopyright(myLoincCopyrightStatement);
|
||||
myIdToValueSet.put(theValueSetId, vs);
|
||||
myValueSets.add(vs);
|
||||
} else {
|
||||
|
|
|
@ -40,8 +40,10 @@ public class BaseLoincTop2000LabResultsHandler extends BaseLoincHandler implemen
|
|||
private String myValueSetUri;
|
||||
private String myValueSetName;
|
||||
|
||||
public BaseLoincTop2000LabResultsHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, String theValueSetId, String theValueSetUri, String theValueSetName, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public BaseLoincTop2000LabResultsHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
String theValueSetId, String theValueSetUri, String theValueSetName, List<ConceptMap> theConceptMaps,
|
||||
Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
String versionId = myUploadProperties.getProperty(LOINC_CODESYSTEM_VERSION.getCode());
|
||||
if (versionId != null) {
|
||||
myValueSetId = theValueSetId + "-" + versionId;
|
||||
|
|
|
@ -40,8 +40,9 @@ public class LoincAnswerListHandler extends BaseLoincHandler {
|
|||
private final Map<String, TermConcept> myCode2Concept;
|
||||
private final TermCodeSystemVersion myCodeSystemVersion;
|
||||
|
||||
public LoincAnswerListHandler(TermCodeSystemVersion theCodeSystemVersion, Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public LoincAnswerListHandler(TermCodeSystemVersion theCodeSystemVersion, Map<String, TermConcept> theCode2concept,
|
||||
List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
myCodeSystemVersion = theCodeSystemVersion;
|
||||
myCode2Concept = theCode2concept;
|
||||
}
|
||||
|
|
|
@ -43,8 +43,10 @@ public class LoincDocumentOntologyHandler extends BaseLoincHandler implements IZ
|
|||
public static final String DOCUMENT_ONTOLOGY_CODES_VS_NAME = "LOINC Document Ontology Codes";
|
||||
private final Map<String, TermConcept> myCode2Concept;
|
||||
|
||||
public LoincDocumentOntologyHandler(Map<String, TermConcept> theCode2concept, Map<String, CodeSystem.PropertyType> thePropertyNames, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public LoincDocumentOntologyHandler(Map<String, TermConcept> theCode2concept, Map<String,
|
||||
CodeSystem.PropertyType> thePropertyNames, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps,
|
||||
Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
myCode2Concept = theCode2concept;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,9 @@ public class LoincGroupFileHandler extends BaseLoincHandler implements IZipConte
|
|||
|
||||
public static final String VS_URI_PREFIX = "http://loinc.org/vs/";
|
||||
|
||||
public LoincGroupFileHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public LoincGroupFileHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,13 +41,14 @@ public class LoincIeeeMedicalDeviceCodeHandler extends BaseLoincHandler implemen
|
|||
public static final String LOINC_IEEE_CM_ID = "loinc-to-ieee-11073-10101";
|
||||
public static final String LOINC_IEEE_CM_URI = "http://loinc.org/cm/loinc-to-ieee-11073-10101";
|
||||
public static final String LOINC_IEEE_CM_NAME = "LOINC/IEEE Device Code Mappings";
|
||||
private static final String CM_COPYRIGHT = "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/. The LOINC/IEEE Medical Device Code Mapping Table contains content from IEEE (http://ieee.org), copyright © 2017 IEEE.";
|
||||
private static final String CM_COPYRIGHT = "The LOINC/IEEE Medical Device Code Mapping Table contains content from IEEE (http://ieee.org), copyright © 2017 IEEE.";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public LoincIeeeMedicalDeviceCodeHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public LoincIeeeMedicalDeviceCodeHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,8 +89,7 @@ public class LoincIeeeMedicalDeviceCodeHandler extends BaseLoincHandler implemen
|
|||
.setTargetCode(ieeeCode)
|
||||
.setTargetDisplay(ieeeDisplayName)
|
||||
.setEquivalence(Enumerations.ConceptMapEquivalence.EQUAL),
|
||||
CM_COPYRIGHT);
|
||||
|
||||
myLoincCopyrightStatement + " " + CM_COPYRIGHT);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,10 +57,11 @@ public class LoincPartRelatedCodeMappingHandler extends BaseLoincHandler impleme
|
|||
private static final String LOINC_PUBCHEM_PART_MAP_URI = "http://loinc.org/cm/loinc-parts-to-pubchem";
|
||||
private static final String LOINC_PUBCHEM_PART_MAP_NAME = "LOINC Part Map to PubChem";
|
||||
|
||||
private static final String CM_COPYRIGHT = "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/. The LOINC Part File, LOINC/SNOMED CT Expression Association and Map Sets File, RELMA database and associated search index files include SNOMED Clinical Terms (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights are reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO. Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. Under the terms of the Affiliate License, use of SNOMED CT in countries that are not IHTSDO Members is subject to reporting and fee payment obligations. However, IHTSDO agrees to waive the requirements to report and pay fees for use of SNOMED CT content included in the LOINC Part Mapping and LOINC Term Associations for purposes that support or enable more effective use of LOINC. This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.";
|
||||
private static final String CM_COPYRIGHT = "The LOINC Part File, LOINC/SNOMED CT Expression Association and Map Sets File, RELMA database and associated search index files include SNOMED Clinical Terms (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights are reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO. Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. Under the terms of the Affiliate License, use of SNOMED CT in countries that are not IHTSDO Members is subject to reporting and fee payment obligations. However, IHTSDO agrees to waive the requirements to report and pay fees for use of SNOMED CT content included in the LOINC Part Mapping and LOINC Term Associations for purposes that support or enable more effective use of LOINC. This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.";
|
||||
|
||||
public LoincPartRelatedCodeMappingHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public LoincPartRelatedCodeMappingHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -161,7 +162,7 @@ public class LoincPartRelatedCodeMappingHandler extends BaseLoincHandler impleme
|
|||
.setTargetCodeSystemVersion(extCodeSystemVersion)
|
||||
.setEquivalence(equivalence)
|
||||
.setCopyright(extCodeSystemCopyrightNotice),
|
||||
CM_COPYRIGHT
|
||||
myLoincCopyrightStatement + " " + CM_COPYRIGHT
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class LoincRsnaPlaybookHandler extends BaseLoincHandler implements IZipCo
|
|||
* -ja
|
||||
*/
|
||||
public static final String RPID_CS_URI = RID_CS_URI;
|
||||
private static final String CM_COPYRIGHT = "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/. The LOINC/RSNA Radiology Playbook and the LOINC Part File contain content from RadLex® (http://rsna.org/RadLex.aspx), copyright © 2005-2017, The Radiological Society of North America, Inc., available at no cost under the license at http://www.rsna.org/uploadedFiles/RSNA/Content/Informatics/RadLex_License_Agreement_and_Terms_of_Use_V2_Final.pdf.";
|
||||
private static final String CM_COPYRIGHT = "The LOINC/RSNA Radiology Playbook and the LOINC Part File contain content from RadLex® (http://rsna.org/RadLex.aspx), copyright © 2005-2017, The Radiological Society of North America, Inc., available at no cost under the license at http://www.rsna.org/uploadedFiles/RSNA/Content/Informatics/RadLex_License_Agreement_and_Terms_of_Use_V2_Final.pdf.";
|
||||
private final Map<String, TermConcept> myCode2Concept;
|
||||
private final List<ValueSet> myValueSets;
|
||||
private final Map<String, ValueSet> myIdToValueSet = new HashMap<>();
|
||||
|
@ -62,8 +62,9 @@ public class LoincRsnaPlaybookHandler extends BaseLoincHandler implements IZipCo
|
|||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public LoincRsnaPlaybookHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties);
|
||||
public LoincRsnaPlaybookHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
myCode2Concept = theCode2concept;
|
||||
myValueSets = theValueSets;
|
||||
}
|
||||
|
@ -217,8 +218,8 @@ public class LoincRsnaPlaybookHandler extends BaseLoincHandler implements IZipCo
|
|||
.setTargetCodeSystem(RID_CS_URI)
|
||||
.setTargetCode(rid)
|
||||
.setTargetDisplay(preferredName)
|
||||
.setEquivalence(Enumerations.ConceptMapEquivalence.EQUAL),
|
||||
CM_COPYRIGHT);
|
||||
.setEquivalence(Enumerations.ConceptMapEquivalence.EQUAL)
|
||||
,myLoincCopyrightStatement + " " + CM_COPYRIGHT);
|
||||
}
|
||||
|
||||
// LOINC Term -> Radlex RPID code mappings
|
||||
|
@ -237,7 +238,7 @@ public class LoincRsnaPlaybookHandler extends BaseLoincHandler implements IZipCo
|
|||
.setTargetCode(rpid)
|
||||
.setTargetDisplay(longName)
|
||||
.setEquivalence(Enumerations.ConceptMapEquivalence.EQUAL),
|
||||
CM_COPYRIGHT);
|
||||
myLoincCopyrightStatement + " " + CM_COPYRIGHT);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,8 +34,10 @@ public class LoincTop2000LabResultsSiHandler extends BaseLoincTop2000LabResultsH
|
|||
public static final String TOP_2000_SI_VS_URI = "http://loinc.org/vs/top-2000-lab-observations-si";
|
||||
public static final String TOP_2000_SI_VS_NAME = "Top 2000 Lab Results SI";
|
||||
|
||||
public LoincTop2000LabResultsSiHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, TOP_2000_SI_VS_ID, TOP_2000_SI_VS_URI, TOP_2000_SI_VS_NAME, theConceptMaps, theUploadProperties);
|
||||
public LoincTop2000LabResultsSiHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, TOP_2000_SI_VS_ID, TOP_2000_SI_VS_URI, TOP_2000_SI_VS_NAME,
|
||||
theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,8 +34,10 @@ public class LoincTop2000LabResultsUsHandler extends BaseLoincTop2000LabResultsH
|
|||
public static final String TOP_2000_US_VS_URI = "http://loinc.org/vs/top-2000-lab-observations-us";
|
||||
public static final String TOP_2000_US_VS_NAME = "Top 2000 Lab Results US";
|
||||
|
||||
public LoincTop2000LabResultsUsHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets, List<ConceptMap> theConceptMaps, Properties theUploadProperties) {
|
||||
super(theCode2concept, theValueSets, TOP_2000_US_VS_ID, TOP_2000_US_VS_URI, TOP_2000_US_VS_NAME, theConceptMaps, theUploadProperties);
|
||||
public LoincTop2000LabResultsUsHandler(Map<String, TermConcept> theCode2concept, List<ValueSet> theValueSets,
|
||||
List<ConceptMap> theConceptMaps, Properties theUploadProperties, String theCopyrightStatement) {
|
||||
super(theCode2concept, theValueSets, TOP_2000_US_VS_ID, TOP_2000_US_VS_URI, TOP_2000_US_VS_NAME,
|
||||
theConceptMaps, theUploadProperties, theCopyrightStatement);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -120,6 +120,9 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest {
|
|||
@Mock
|
||||
private ITermDeferredStorageSvc myTermDeferredStorageSvc;
|
||||
|
||||
public static final String expectedLoincCopyright = "This material contains content from LOINC (http://loinc.org). LOINC is copyright ©1995-2021, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.";
|
||||
public static final String partMappingsExternalCopyright = "The LOINC Part File, LOINC/SNOMED CT Expression Association and Map Sets File, RELMA database and associated search index files include SNOMED Clinical Terms (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights are reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO. Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. Under the terms of the Affiliate License, use of SNOMED CT in countries that are not IHTSDO Members is subject to reporting and fee payment obligations. However, IHTSDO agrees to waive the requirements to report and pay fees for use of SNOMED CT content included in the LOINC Part Mapping and LOINC Term Associations for purposes that support or enable more effective use of LOINC. This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.";
|
||||
public static final String expectedWhoExternalCopyrightNotice = "Copyright © 2006 World Health Organization. Used with permission. Publications of the World Health Organization can be obtained from WHO Press, World Health Organization, 20 Avenue Appia, 1211 Geneva 27, Switzerland (tel: +41 22 791 2476; fax: +41 22 791 4857; email: bookorders@who.int). Requests for permission to reproduce or translate WHO publications – whether for sale or for noncommercial distribution – should be addressed to WHO Press, at the above address (fax: +41 22 791 4806; email: permissions@who.int). The designations employed and the presentation of the material in this publication do not imply the expression of any opinion whatsoever on the part of the World Health Organization concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Dotted lines on maps represent approximate border lines for which there may not yet be full agreement. The mention of specific companies or of certain manufacturers’ products does not imply that they are endorsed or recommended by the World Health Organization in preference to others of a similar nature that are not mentioned. Errors and omissions excepted, the names of proprietary products are distinguished by initial capital letters. All reasonable precautions have been taken by WHO to verify the information contained in this publication. However, the published material is being distributed without warranty of any kind, either express or implied. The responsibility for the interpretation and use of the material lies with the reader. In no event shall the World Health Organization be liable for damages arising from its use.";
|
||||
|
||||
@BeforeEach
|
||||
public void before() {
|
||||
|
@ -229,8 +232,7 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest {
|
|||
|
||||
// LOINC code with 3rd party copyright
|
||||
code = concepts.get("47239-9");
|
||||
String expectedExternalCopyrightNotice = "Copyright © 2006 World Health Organization. Used with permission. Publications of the World Health Organization can be obtained from WHO Press, World Health Organization, 20 Avenue Appia, 1211 Geneva 27, Switzerland (tel: +41 22 791 2476; fax: +41 22 791 4857; email: bookorders@who.int). Requests for permission to reproduce or translate WHO publications – whether for sale or for noncommercial distribution – should be addressed to WHO Press, at the above address (fax: +41 22 791 4806; email: permissions@who.int). The designations employed and the presentation of the material in this publication do not imply the expression of any opinion whatsoever on the part of the World Health Organization concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Dotted lines on maps represent approximate border lines for which there may not yet be full agreement. The mention of specific companies or of certain manufacturers’ products does not imply that they are endorsed or recommended by the World Health Organization in preference to others of a similar nature that are not mentioned. Errors and omissions excepted, the names of proprietary products are distinguished by initial capital letters. All reasonable precautions have been taken by WHO to verify the information contained in this publication. However, the published material is being distributed without warranty of any kind, either express or implied. The responsibility for the interpretation and use of the material lies with the reader. In no event shall the World Health Organization be liable for damages arising from its use.";
|
||||
assertEquals(expectedExternalCopyrightNotice, code.getStringProperty("EXTERNAL_COPYRIGHT_NOTICE"));
|
||||
assertEquals(expectedWhoExternalCopyrightNotice, code.getStringProperty("EXTERNAL_COPYRIGHT_NOTICE"));
|
||||
|
||||
// Answer list
|
||||
code = concepts.get("LL1001-8");
|
||||
|
@ -276,7 +278,7 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest {
|
|||
assertNull(conceptMap.getSource());
|
||||
assertNull(conceptMap.getTarget());
|
||||
assertEquals(LoincPartRelatedCodeMappingHandler.LOINC_SCT_PART_MAP_URI, conceptMap.getUrl());
|
||||
assertEquals("This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/. The LOINC Part File, LOINC/SNOMED CT Expression Association and Map Sets File, RELMA database and associated search index files include SNOMED Clinical Terms (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights are reserved. SNOMED CT® was originally created by The College of American Pathologists. “SNOMED” and “SNOMED CT” are registered trademarks of the IHTSDO. Use of SNOMED CT content is subject to the terms and conditions set forth in the SNOMED CT Affiliate License Agreement. It is the responsibility of those implementing this product to ensure they are appropriately licensed and for more information on the license, including how to register as an Affiliate Licensee, please refer to http://www.snomed.org/snomed-ct/get-snomed-ct or info@snomed.org. Under the terms of the Affiliate License, use of SNOMED CT in countries that are not IHTSDO Members is subject to reporting and fee payment obligations. However, IHTSDO agrees to waive the requirements to report and pay fees for use of SNOMED CT content included in the LOINC Part Mapping and LOINC Term Associations for purposes that support or enable more effective use of LOINC. This material includes content from the US Edition to SNOMED CT, which is developed and maintained by the U.S. National Library of Medicine and is available to authorized UMLS Metathesaurus Licensees from the UTS Downloads site at https://uts.nlm.nih.gov.", conceptMap.getCopyright());
|
||||
assertEquals(expectedLoincCopyright + " " + partMappingsExternalCopyright, conceptMap.getCopyright());
|
||||
assertEquals("Beta.1", conceptMap.getVersion());
|
||||
assertEquals(1, conceptMap.getGroup().size());
|
||||
group = conceptMap.getGroup().get(0);
|
||||
|
@ -424,7 +426,7 @@ public class TerminologyLoaderSvcLoincTest extends BaseLoaderTest {
|
|||
assertTrue(vs.hasDate());
|
||||
assertEquals("Regenstrief Institute, Inc.", vs.getPublisher());
|
||||
assertEquals("A value set that includes all LOINC codes", vs.getDescription());
|
||||
assertEquals("This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at https://loinc.org/license/", vs.getCopyright());
|
||||
assertEquals(expectedLoincCopyright, vs.getCopyright());
|
||||
assertTrue(vs.hasCompose());
|
||||
assertTrue(vs.getCompose().hasInclude());
|
||||
assertEquals(1, vs.getCompose().getInclude().size());
|
||||
|
|
|
@ -73,7 +73,8 @@ class BaseLoincHandlerTest {
|
|||
setupCSVParser(recordDataMap);
|
||||
|
||||
BaseLoincHandler loincHandler = new BaseLoincTop2000LabResultsHandler(
|
||||
null, Lists.newArrayList(), null, null, null, Lists.newArrayList(), new Properties());
|
||||
null, Lists.newArrayList(), null, null, null,
|
||||
Lists.newArrayList(), new Properties(), null);
|
||||
BaseLoincHandler spiedLoincHandler = spy(loincHandler);
|
||||
|
||||
when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet);
|
||||
|
@ -97,8 +98,8 @@ class BaseLoincHandlerTest {
|
|||
recordDataMap.put("PartName", "test-PartName");
|
||||
setupCSVParser(recordDataMap);
|
||||
|
||||
BaseLoincHandler loincHandler = new LoincDocumentOntologyHandler(
|
||||
Maps.newHashMap(), null, Lists.newArrayList(), Lists.newArrayList(), new Properties());
|
||||
BaseLoincHandler loincHandler = new LoincDocumentOntologyHandler(Maps.newHashMap(), null,
|
||||
Lists.newArrayList(), Lists.newArrayList(), new Properties(), null);
|
||||
BaseLoincHandler spiedLoincHandler = spy(loincHandler);
|
||||
|
||||
when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet);
|
||||
|
@ -192,8 +193,8 @@ class BaseLoincHandlerTest {
|
|||
recordDataMap.put("Long Common Name", "test-Long-Common-Names");
|
||||
setupCSVParser(recordDataMap);
|
||||
|
||||
BaseLoincHandler loincHandler = new BaseLoincTop2000LabResultsHandler(
|
||||
Maps.newHashMap(), Lists.newArrayList(), null, null, null, Lists.newArrayList(), new Properties());
|
||||
BaseLoincHandler loincHandler = new BaseLoincTop2000LabResultsHandler(Maps.newHashMap(), Lists.newArrayList(),
|
||||
null, null, null, Lists.newArrayList(), new Properties(), null);
|
||||
BaseLoincHandler spiedLoincHandler = spy(loincHandler);
|
||||
|
||||
when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet);
|
||||
|
@ -216,8 +217,8 @@ class BaseLoincHandlerTest {
|
|||
recordDataMap.put("PartName", "test-PartName");
|
||||
setupCSVParser(recordDataMap);
|
||||
|
||||
BaseLoincHandler loincHandler = new LoincDocumentOntologyHandler(
|
||||
Maps.newHashMap(), null, Lists.newArrayList(), Lists.newArrayList(), new Properties());
|
||||
BaseLoincHandler loincHandler = new LoincDocumentOntologyHandler(Maps.newHashMap(), null,
|
||||
Lists.newArrayList(), Lists.newArrayList(), new Properties(), null);
|
||||
BaseLoincHandler spiedLoincHandler = spy(loincHandler);
|
||||
|
||||
when(spiedLoincHandler.getValueSet(any(), any(), any(), any())).thenReturn(myValueSet);
|
||||
|
|
Loading…
Reference in New Issue