Update tests + fix 11073 codesystem
This commit is contained in:
parent
6ecd4c70fe
commit
99bd733fe0
|
@ -141,6 +141,8 @@ public class TerminologyCache {
|
||||||
return getVersionedSystem("ucum", systemVersion);
|
return getVersionedSystem("ucum", systemVersion);
|
||||||
if (systemBaseName.startsWith(HL7_SID_CODESYSTEM_BASE_URL))
|
if (systemBaseName.startsWith(HL7_SID_CODESYSTEM_BASE_URL))
|
||||||
return getVersionedSystem(normalizeBaseURL(HL7_SID_CODESYSTEM_BASE_URL, systemBaseName), systemVersion);
|
return getVersionedSystem(normalizeBaseURL(HL7_SID_CODESYSTEM_BASE_URL, systemBaseName), systemVersion);
|
||||||
|
if (systemBaseName.equals(_11073_CODESYSTEM_URN))
|
||||||
|
return getVersionedSystem("11073", systemVersion);
|
||||||
if (systemBaseName.startsWith(ISO_CODESYSTEM_URN))
|
if (systemBaseName.startsWith(ISO_CODESYSTEM_URN))
|
||||||
return getVersionedSystem("iso"+systemBaseName.substring(ISO_CODESYSTEM_URN.length()).replace(":", ""), systemVersion);
|
return getVersionedSystem("iso"+systemBaseName.substring(ISO_CODESYSTEM_URN.length()).replace(":", ""), systemVersion);
|
||||||
if (systemBaseName.startsWith(HL7_TERMINOLOGY_CODESYSTEM_BASE_URL))
|
if (systemBaseName.startsWith(HL7_TERMINOLOGY_CODESYSTEM_BASE_URL))
|
||||||
|
@ -151,8 +153,6 @@ public class TerminologyCache {
|
||||||
return getVersionedSystem("lang", systemVersion);
|
return getVersionedSystem("lang", systemVersion);
|
||||||
if (systemBaseName.equals(MIMETYPES_CODESYSTEM_URN))
|
if (systemBaseName.equals(MIMETYPES_CODESYSTEM_URN))
|
||||||
return getVersionedSystem("mimetypes", systemVersion);
|
return getVersionedSystem("mimetypes", systemVersion);
|
||||||
if (systemBaseName.equals(_11073_CODESYSTEM_URN))
|
|
||||||
return getVersionedSystem("11073", systemVersion);
|
|
||||||
if (systemBaseName.equals(DICOM_CODESYSTEM_URL))
|
if (systemBaseName.equals(DICOM_CODESYSTEM_URL))
|
||||||
return getVersionedSystem("dicom", systemVersion);
|
return getVersionedSystem("dicom", systemVersion);
|
||||||
return getVersionedSystem(systemBaseName.replace("/", "_").replace(":", "_").replace("?", "X").replace("#", "X"), systemVersion);
|
return getVersionedSystem(systemBaseName.replace("/", "_").replace(":", "_").replace("?", "X").replace("#", "X"), systemVersion);
|
||||||
|
|
|
@ -464,6 +464,15 @@ public class TerminologyCacheTests implements ResourceLoaderTests {
|
||||||
"http://hl7.org/fhir/sid/id,id",
|
"http://hl7.org/fhir/sid/id,id",
|
||||||
"http://www.nlm.nih.gov/research/umls/rxnorm,rxnorm",
|
"http://www.nlm.nih.gov/research/umls/rxnorm,rxnorm",
|
||||||
"http://snomed.info/sct,snomed",
|
"http://snomed.info/sct,snomed",
|
||||||
|
"http://www.nlm.nih.gov/research/umls/rxnorm,rxnorm",
|
||||||
|
"http://loinc.org,loinc",
|
||||||
|
"http://unitsofmeasure.org,ucum",
|
||||||
|
"urn:iso:std:iso:id,isoid",
|
||||||
|
"urn:ietf:bcp:47,lang",
|
||||||
|
"urn:ietf:bcp:13,mimetypes",
|
||||||
|
"urn:iso:std:iso:11073:10101,11073",
|
||||||
|
"my://random/system?with#chars,my___random_systemXwithXchars",
|
||||||
|
"http://dicom.nema.org/resources/ontology/DCM,dicom"
|
||||||
})
|
})
|
||||||
public void testCacheTokenGeneration(String system, String expectedName) throws IOException, URISyntaxException {
|
public void testCacheTokenGeneration(String system, String expectedName) throws IOException, URISyntaxException {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue