Last active
May 2, 2017 08:43
-
-
Save vlindhol/09290d2386946e06ad21919f6c28bb86 to your computer and use it in GitHub Desktop.
Mapping code system OIDs to URIs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The mapping of code system codes in OID form (numbers) to URLs. FHIR wants all | |
* code systems to be given as a URL (or at least a URI/URN). This is the algorithm | |
* for determining it (https://www.hl7.org/fhir/terminologies.html#system): | |
* 1) If the code system is found in https://www.hl7.org/fhir/terminologies-systems.html use | |
* the URL provided there. | |
* 2) If the publisher of the code system has defined a specific URL to use with FHIR, use that. | |
* 3) If the code system can be found in http://registry.fhir.org/NamingSystem and its status is | |
* active, use that. | |
* 4) If an OID is registered at http://hl7.org/oid use the form 'urn:oid:[oid]' where [oid] is | |
* the original OID. | |
* 5) If all else fails, come up with your own unique URL | |
* | |
* NOTE: the URLs do not need to be working web links, i.e. putting the link in your browser does not need to take you to a working homepage. But it can. | |
*/ | |
const codeServerURL = (classification, version) => | |
// eslint-disable-next-line | |
`http://91.202.112.142/codeserver/pages/classification-view-page.xhtml?classificationKey=${classification}&versionKey=${version}`; | |
// these codes originally taken from dsscodesystems from ebmeds engine | |
const codeSystemMap = { | |
// Diagnoses | |
'2.16.840.1.113883.6.12': 'urn:oid:2.16.840.1.113883.6.12', // CPT | |
'2.16.840.1.113883.6.14': 'urn:oid:2.16.840.1.113883.6.14', // HCPCS, | |
'1.2.246.537.6.1': 'http://hl7.org/fhir/sid/icd-10-fi', | |
'1.2.246.537.6.1.*': 'http://hl7.org/fhir/sid/icd-10-fi', | |
'2.16.840.1.113883.6.3': 'http://hl7.org/fhir/sid/icd-10-fi', | |
ICD10CM: 'http://hl7.org/fhir/sid/icd-10-cm', | |
'2.16.840.1.113883.6.90': 'http://hl7.org/fhir/sid/icd-10-cm', | |
ICD10UK: 'http://hl7.org/fhir/sid/icd-10-uk', | |
'2.16.840.1.113883.6.2': 'http://hl7.org/fhir/sid/icd-9-cm', | |
'2.16.840.1.113883.6.254': 'http://hl7.org/fhir/sid/icf-nl', | |
'1.2.246.537.6.31.*': 'http://hl7.org/fhir/sid/icpc-2 ', | |
'1.2.246.537.6.31': 'http://hl7.org/fhir/sid/icpc-2 ', | |
'2.16.840.1.113883.6.139': 'http://hl7.org/fhir/sid/icpc-2 ', | |
'2.16.840.1.113883.6.96': 'http://snomed.info/sct', | |
// Medication | |
'1.2.246.537.6.10.*': 'http://www.whocc.no/atc', | |
'1.2.246.537.6.32': 'http://www.whocc.no/atc', | |
'1.2.246.537.6.32.*': 'http://www.whocc.no/atc', | |
'2.16.840.1.113883.6.73': 'http://www.whocc.no/atc', | |
'1.2.246.537.6.10': 'http://www.whocc.no/atc', | |
'2.16.840.1.113883.6.69': 'http://hl7.org/fhir/sid/ndc', | |
'2.16.840.1.113883.6.88': 'http://www.nlm.nih.gov/research/umls/rxnorm', | |
// Tests | |
'1.2.246.537.6.96.*': codeServerURL('273', '350'), // FinLOINC | |
'1.2.246.537.6.96': codeServerURL('273', '350'), // FinLOINC | |
'1.2.246.537.6.3.*': codeServerURL('88', '120'), // KL | |
'1.2.246.537.6.3': codeServerURL('88', '120'), // KL | |
'2.16.840.1.113883.6.1*': 'http://loinc.org', | |
// Services | |
'1.2.246.537.6.49': codeServerURL('2023', '2283'), // THL Sosiaali- ja terveysalan palvelunimikkeistö | |
// Custom codes | |
CustomActions: 'http://duodecim.fi/fhir/sid/custom-actions', // Code system that at the moment only contains one code (NOOP), for ActivityDefinitions that only contain text info, but no codable action. Can be expanded later. | |
VKTMultipleChoiceType: 'http://duodecim.fi/fhir/sid/vkt-multiple-choice-type', // For signifying if a QuestionnaireResponse answer is a "radio" or "checkbox" multiple choice answer | |
VKTMultipleChoiceID: 'http://duodecim.fi/fhir/sid/vkt-multiple-choice-id', // ID code referring to a possible answer in a multiple choice question | |
VKTQuestionnaireID: 'http://duodecim.fi/fhir/sid/vkt-questionnaire-id', | |
DMPReminderLevel: 'http://duodecim.fi/fhir/sid/dmp-reminder-level', // Severity classification for the text portion of the ActivityDefinition (0-2, 2 is critical). Perhaps not necessary for ODA. | |
SuggestionUrgency: 'http://duodecim.fi/fhir/sid/suggestion-urgency', // Urgency of the suggested action in an ActivityDefinition, for ODA use. Values P0 [immediate], P1 [2h], P2 [10h], P3 [24h], P4 [72h], L2 [168h], L3 [720h] L4 [more than 720h]. | |
// Codes with unknown OIDs or URL | |
// '2.16.840.1.113883.2.1.6.2': 'READ', // found 2.16.840.1.113883.6.6 for READ at hl7.org/oid, which is READ version 3, but we support version 2. Unknown url still. | |
// 'SCID' // general code system, not used much | |
// 'VNR' // Suomen lääkepakkauskoodisto | |
// 'KL2' // KL-koodiston nimikkeet, aikaisemmin käytössä Pegasos-järjestelmässä | |
// | |
// 'DKD' // danish medication | |
// '1.2.752.108.1': 'NPU', // Danish lab codes | |
// 'COLUMNA' // Expansion of missing lab codes in NPU | |
// 'DM+D' // UK medication | |
// 'HO' // lab codes for the HealthOne system | |
// 'MELD' // The Italian Meldola hospital's lab codes | |
// 'SISS' // Italian lab codes | |
// 'Lab_SoSoeMe': 'SSM' // Belgian lab codes | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment