Class: HealthDataStandards::Util::CodeSystemHelper
- Inherits:
-
Object
- Object
- HealthDataStandards::Util::CodeSystemHelper
- Defined in:
- lib/health-data-standards/util/code_system_helper.rb
Overview
General helpers for working with codes and code systems
Constant Summary collapse
- CODE_SYSTEMS =
{ '2.16.840.1.113883.6.1' => 'LOINC', '2.16.840.1.113883.6.96' => 'SNOMED-CT', '2.16.840.1.113883.6.12' => 'CPT', #'2.16.840.1.113883.3.88.12.80.32' => 'CPT', # Encounter Type from C32, a subset of CPT '2.16.840.1.113883.6.88' => 'RxNorm', '2.16.840.1.113883.6.103' => 'ICD-9-CM', '2.16.840.1.113883.6.104' => 'ICD-9-CM', '2.16.840.1.113883.6.90' => 'ICD-10-CM', '2.16.840.1.113883.6.14' => 'HCPCS', '2.16.840.1.113883.6.59' => 'CVX', '2.16.840.1.113883.5.83' => 'HITSP C80 Observation Status', '2.16.840.1.113883.3.26.1.1' => 'NCI Thesaurus', '2.16.840.1.113883.3.88.12.80.20' => 'FDA', '2.16.840.1.113883.5.14' => 'HL7 ActStatus', '2.16.840.1.113883.6.259' => 'HL7 Healthcare Service Location', '2.16.840.1.113883.5.4' => 'HL7 Act Code', '2.16.840.1.113883.1.11.18877' => 'HL7 Relationship Code', '2.16.840.1.113883.6.238' => 'CDC Race' }
Class Method Summary collapse
-
.code_system_for(oid) ⇒ String
Returns the name of a code system given an oid.
-
.code_systems ⇒ Object
Returns the whole map of OIDs to code systems.
-
.oid_for_code_system(code_system) ⇒ String
Returns the oid for a code system given a codesystem name.
Class Method Details
.code_system_for(oid) ⇒ String
Returns the name of a code system given an oid
29 30 31 |
# File 'lib/health-data-standards/util/code_system_helper.rb', line 29 def self.code_system_for(oid) CODE_SYSTEMS[oid] || "Unknown" end |
.code_systems ⇒ Object
Returns the whole map of OIDs to code systems
42 43 44 |
# File 'lib/health-data-standards/util/code_system_helper.rb', line 42 def self.code_systems CODE_SYSTEMS end |
.oid_for_code_system(code_system) ⇒ String
Returns the oid for a code system given a codesystem name
36 37 38 |
# File 'lib/health-data-standards/util/code_system_helper.rb', line 36 def self.oid_for_code_system(code_system) CODE_SYSTEMS.invert[code_system] end |