Add support for NCI code rendering

This commit is contained in:
Grahame Grieve 2024-10-22 05:16:45 +10:30
parent ede7628b44
commit d6c3a9df0b
3 changed files with 14 additions and 1 deletions

View File

@ -249,6 +249,9 @@ public class DataRenderer extends Renderer implements CodeResolver {
return (context.formatPhrase(RenderingContext.DATA_REND_DICOM));
if (system.equals("http://unitsofmeasure.org"))
return (context.formatPhrase(RenderingContext.GENERAL_UCUM));
if (system.equals("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl"))
return (context.formatPhrase(RenderingContext.GENERAL_NCI_THES));
CodeSystem cs = context.getContext().fetchCodeSystem(system);
if (cs != null) {
@ -1213,7 +1216,9 @@ public class DataRenderer extends Renderer implements CodeResolver {
} else if ("http://loinc.org".equals(system)) {
return "https://loinc.org/";
} else if ("http://unitsofmeasure.org".equals(system)) {
return "http://ucum.org";
return "http://ucum.org";
} else if ("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl".equals(system)) {
return "https://ncit.nci.nih.gov/ncitbrowser/pages/home.jsf";
} else {
String url = system;
if (version != null) {
@ -1242,6 +1247,12 @@ public class DataRenderer extends Renderer implements CodeResolver {
} else {
return "https://www.nlm.nih.gov/research/umls/rxnorm/index.html";
}
} else if ("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl".equals(system)) {
if (!Utilities.noString(code)) {
return "https://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?code="+code;
} else {
return "https://ncit.nci.nih.gov/ncitbrowser/pages/home.jsf";
}
} else if ("urn:iso:std:iso:3166".equals(system)) {
if (!Utilities.noString(code)) {
return "https://en.wikipedia.org/wiki/ISO_3166-2:"+code;

View File

@ -251,6 +251,7 @@ public class RenderingI18nContext extends I18nBase {
public static final String DATA_REND_TIMING = "DATA_REND_TIMING";
public static final String DATA_REND_TO_DO = "DATA_REND_TO_DO";
public static final String GENERAL_UCUM = "GENERAL_UCUM";
public static final String GENERAL_NCI_THES = "GENERAL_NCI_THES";
public static final String DATA_REND_UNKNWN = "DATA_REND_UNKNWN";
public static final String DATA_REND_UNRD_EX = "DATA_REND_UNRD_EX";
public static final String DATA_REND_UNTIL = "DATA_REND_UNTIL";

View File

@ -245,6 +245,7 @@ DATA_REND_THESE_CODES = One of these codes:
DATA_REND_TIMING = Timing
DATA_REND_TO_DO = to do: {0}
GENERAL_UCUM = UCUM
GENERAL_NCI_THES = NCI Thesaurus
DATA_REND_UNKNWN = unknown
DATA_REND_UNRD_EX = WARNING: Unrenderable Modifier Extension!
DATA_REND_UNTIL = Until {0}