Support for LOINC externally defined answerlists added
This commit is contained in:
parent
8ee701c934
commit
bbe4de2842
|
@ -63,9 +63,6 @@ public class LoincAnswerListHandler extends BaseLoincHandler {
|
|||
String extCodeSystem = trim(theRecord.get("ExtCodeSystem"));
|
||||
String extCodeSystemVersion = trim(theRecord.get("ExtCodeSystemVersion"));
|
||||
|
||||
if (isBlank(answerString)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Answer list code
|
||||
if (!myCode2Concept.containsKey(answerListId)) {
|
||||
|
@ -74,6 +71,16 @@ public class LoincAnswerListHandler extends BaseLoincHandler {
|
|||
myCode2Concept.put(answerListId, concept);
|
||||
}
|
||||
|
||||
// Answer list ValueSet
|
||||
ValueSet vs = getValueSet(answerListId, "http://loinc.org/vs/" + answerListId, answerListName, "answerlist.version");
|
||||
if (vs.getIdentifier().isEmpty()) {
|
||||
vs.addIdentifier()
|
||||
.setSystem("urn:ietf:rfc:3986")
|
||||
.setValue("urn:oid:" + answerListOid);
|
||||
}
|
||||
|
||||
if (isNotBlank(answerString)) {
|
||||
|
||||
// Answer code
|
||||
if (!myCode2Concept.containsKey(answerString)) {
|
||||
TermConcept concept = new TermConcept(myCodeSystemVersion, answerString);
|
||||
|
@ -84,14 +91,6 @@ public class LoincAnswerListHandler extends BaseLoincHandler {
|
|||
myCode2Concept.put(answerString, concept);
|
||||
}
|
||||
|
||||
// Answer list ValueSet
|
||||
ValueSet vs = getValueSet(answerListId, "http://loinc.org/vs/" + answerListId, answerListName, "answerlist.version");
|
||||
if (vs.getIdentifier().isEmpty()) {
|
||||
vs.addIdentifier()
|
||||
.setSystem("urn:ietf:rfc:3986")
|
||||
.setValue("urn:oid:" + answerListOid);
|
||||
}
|
||||
|
||||
vs
|
||||
.getCompose()
|
||||
.getIncludeFirstRep()
|
||||
|
@ -99,6 +98,9 @@ public class LoincAnswerListHandler extends BaseLoincHandler {
|
|||
.addConcept()
|
||||
.setCode(answerString)
|
||||
.setDisplay(displayText);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -156,6 +156,10 @@ public class TerminologyLoaderSvcLoincTest {
|
|||
assertEquals("LA6270-8", vs.getCompose().getInclude().get(0).getConcept().get(0).getCode());
|
||||
assertEquals("Never", vs.getCompose().getInclude().get(0).getConcept().get(0).getDisplay());
|
||||
|
||||
// External AnswerList
|
||||
vs = valueSets.get("LL1892-0");
|
||||
assertEquals(0, vs.getCompose().getIncludeFirstRep().getConcept().size());
|
||||
|
||||
// Part
|
||||
code = concepts.get("LP101394-7");
|
||||
assertEquals("LP101394-7", code.getCode());
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
"LL1001-8" ,"PhenX05_14_30D freq amts","1.3.6.1.4.1.12009.10.1.166" ,"N" , , ,"LA13860-4" ,"04" , ,5 ,"5-6 times per week" , , , , , , , ,
|
||||
"LL1001-8" ,"PhenX05_14_30D freq amts","1.3.6.1.4.1.12009.10.1.166" ,"N" , , ,"LA13827-3" ,"05" , ,6 ,"1 time per day" , , , , , , , ,
|
||||
"LL1001-8" ,"PhenX05_14_30D freq amts","1.3.6.1.4.1.12009.10.1.166" ,"N" , , ,"LA4389-8" ,"97" , ,11 ,"Refused" ,"443390004","Refused (qualifier value)","http://snomed.info/sct","http://snomed.info/sct/900000000000207008/version/20170731","This material includes SNOMED Clinical Terms® (SNOMED CT®) which is used by permission of the International Health Terminology Standards Development Organisation (IHTSDO) under license. All rights reserved. SNOMED CT® was originally created by The College", , ,
|
||||
"LL1892-0" ,"ICD-9_ICD-10" ,"1.3.6.1.4.1.12009.10.1.1069","Y" , ,"http://www.cdc.gov/nchs/icd.htm", , , , , , , , , , , , ,
|
||||
|
|
Can't render this file because it contains an unexpected character in line 1 and column 31.
|
Loading…
Reference in New Issue