001package org.hl7.fhir.utilities; 002 003/*- 004 * #%L 005 * org.hl7.fhir.utilities 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024public class OIDUtils { 025 026 /* 027 2.16.840.1.113883.3.72.5.2 - NIST owns this 028 2.16.840.1.113883.4.6 - National Provider Identifier 029 2.16.840.1.113883.6.21 - UB92 030 2.16.840.1.113883.6.69 - NDC 031 */ 032 033 public static String getUriForOid(String r) { 034 if (r.equals("2.16.840.1.113883.6.96")) 035 return "http://snomed.info/sct"; 036 if (r.equals("2.16.840.1.113883.6.1")) 037 return "http://loinc.org"; 038 if (r.equals("2.16.840.1.113883.6.8")) 039 return "http://unitsofmeasure.org"; 040 if (r.equals("2.16.840.1.113883.6.3")) 041 return "http://hl7.org/fhir/sid/icd-10"; 042 if (r.equals("2.16.840.1.113883.6.42")) 043 return "http://hl7.org/fhir/sid/icd-9"; 044 if (r.equals("2.16.840.1.113883.6.104")) 045 return "http://hl7.org/fhir/sid/icd-9"; 046 if (r.equals("2.16.840.1.113883.6.103")) 047 return "http://hl7.org/fhir/sid/icd-9"; //todo: confirm this 048 if (r.equals("2.16.840.1.113883.6.73")) 049 return "http://hl7.org/fhir/sid/atc"; 050 if (r.equals("2.16.840.1.113883.3.26.1.1")) 051 return "http://ncimeta.nci.nih.gov"; 052 if (r.equals("2.16.840.1.113883.3.26.1.1.1")) 053 return "http://ncimeta.nci.nih.gov"; 054 if (r.equals("2.16.840.1.113883.6.88")) 055 return "http://www.nlm.nih.gov/research/umls/rxnorm"; // todo: confirm this 056 057 if (r.equals("2.16.840.1.113883.5.1008")) 058 return "http://terminology.hl7.org/v3/NullFlavor"; 059 if (r.equals("2.16.840.1.113883.5.111")) 060 return "http://terminology.hl7.org/v3/RoleCode"; 061 if (r.equals("2.16.840.1.113883.5.4")) 062 return "http://terminology.hl7.org/v3/ActCode"; 063 if (r.equals("2.16.840.1.113883.5.8")) 064 return "http://terminology.hl7.org/v3/ActReason"; 065 if (r.equals("2.16.840.1.113883.5.83")) 066 return "http://terminology.hl7.org/v3/ObservationInterpretation"; 067 if (r.equals("2.16.840.1.113883.6.238")) 068 return "http://terminology.hl7.org/v3/Race"; 069 070 if (r.equals("2.16.840.1.113883.6.59")) 071 return "http://hl7.org/fhir/sid/cvx"; 072 if (r.equals("2.16.840.1.113883.12.292")) 073 return "http://hl7.org/fhir/sid/cvx"; 074 075 if (r.equals("2.16.840.1.113883.6.12")) 076 return "http://www.ama-assn.org/go/cpt"; 077 078 if (r.startsWith("2.16.840.1.113883.12.")) 079 return "http://hl7.org/fhir/sid/v2-"+r.substring(21); 080 return null; 081 } 082 083}