cqm-converter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/cqm-converter.gemspec +1 -1
- data/lib/cqm/converter/hds_record.rb +6 -3
- data/lib/cqm/converter/qdm_patient.rb +2 -2
- data/lib/cqm/converter/utils.rb +0 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2013eed018ac0dfe435f6fdc11b204a2e6fc56bb
|
4
|
+
data.tar.gz: 122698a2044e38ab28aeb9bdc0debdbcaa2da79e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 477b5f80c86f5abaf7fd317d03fb1fc757fe0408c6477061764f36da3c8e1fad1149b6f763c2ac054642c05e78ecdcf27d71eedd6944d6278e8635779554e3f2
|
7
|
+
data.tar.gz: b8078f43329462b1c04ea77fb7fabb5dd96bfd9273d31ec0c51bedfa74f619c804e9df4e3c812f870c2676c72abee66d23d37125313bfaf5b6b8ec254cb1b3d2
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/projecttacoma/cqm-converter.svg?branch=master)](https://travis-ci.org/projecttacoma/cqm-converter)
|
2
|
+
|
1
3
|
# HDS <=> QDM Models Converter
|
2
4
|
|
3
5
|
This repository includes a Ruby Gem that provides a module for converting between the older HDS based models (https://github.com/projectcypress/health-data-standards) and the newer QDM based models (https://github.com/projecttacoma/cqm-models).
|
data/cqm-converter.gemspec
CHANGED
@@ -71,7 +71,8 @@ module CQM::Converter
|
|
71
71
|
# Convert patient characteristic ethnicity.
|
72
72
|
ethnicity = record.ethnicity
|
73
73
|
if ethnicity
|
74
|
-
|
74
|
+
# See: https://phinvads.cdc.gov/vads/ViewCodeSystem.action?id=2.16.840.1.113883.6.238
|
75
|
+
code = QDM::Code.new(ethnicity['code'], 'cdcrec', ethnicity['name'], '2.16.840.1.113883.6.238')
|
75
76
|
patient.dataElements << QDM::PatientCharacteristicEthnicity.new(dataElementCodes: [code])
|
76
77
|
end
|
77
78
|
|
@@ -86,14 +87,16 @@ module CQM::Converter
|
|
86
87
|
# Convert patient characteristic race.
|
87
88
|
race = record.race
|
88
89
|
if race
|
89
|
-
|
90
|
+
# See: https://phinvads.cdc.gov/vads/ViewCodeSystem.action?id=2.16.840.1.113883.6.238
|
91
|
+
code = QDM::Code.new(race['code'], 'cdcrec', race['name'], '2.16.840.1.113883.6.238')
|
90
92
|
patient.dataElements << QDM::PatientCharacteristicRace.new(dataElementCodes: [code])
|
91
93
|
end
|
92
94
|
|
93
95
|
# Convert patient characteristic sex.
|
94
96
|
sex = record.gender
|
95
97
|
if sex
|
96
|
-
|
98
|
+
# See: https://phinvads.cdc.gov/vads/ViewCodeSystem.action?id=2.16.840.1.113883.5.1
|
99
|
+
code = QDM::Code.new(sex, 'AdministrativeGender', sex, '2.16.840.1.113883.5.1')
|
97
100
|
patient.dataElements << QDM::PatientCharacteristicSex.new(dataElementCodes: [code])
|
98
101
|
end
|
99
102
|
|
@@ -278,7 +278,7 @@ module CQM::Converter
|
|
278
278
|
# Convert patient characteristic ethnicity.
|
279
279
|
ethnicity = get_data_elements(patient, 'patient_characteristic', 'ethnicity').first
|
280
280
|
ethnicity_code = ethnicity.dataElementCodes.first.symbolize_keys if ethnicity.dataElementCodes.any?
|
281
|
-
record.ethnicity = { code: ethnicity_code[:code], name: ethnicity_code[:descriptor], codeSystem:
|
281
|
+
record.ethnicity = { code: ethnicity_code[:code], name: ethnicity_code[:descriptor], codeSystem: 'CDC Race' } if ethnicity_code
|
282
282
|
|
283
283
|
# Convert patient characteristic expired.
|
284
284
|
expired = get_data_elements_by_type(patient, 'QDM::PatientCharacteristicExpired').first
|
@@ -288,7 +288,7 @@ module CQM::Converter
|
|
288
288
|
# Convert patient characteristic race.
|
289
289
|
race = get_data_elements(patient, 'patient_characteristic', 'race').first
|
290
290
|
race_code = race.dataElementCodes.first.symbolize_keys if race.dataElementCodes.any?
|
291
|
-
record.race = { code: race_code[:code], name: race_code[:descriptor], codeSystem:
|
291
|
+
record.race = { code: race_code[:code], name: race_code[:descriptor], codeSystem: 'CDC Race' } if race_code
|
292
292
|
|
293
293
|
# Convert patient characteristic sex.
|
294
294
|
sex = get_data_elements_by_type(patient, 'QDM::PatientCharacteristicSex').first
|
data/lib/cqm/converter/utils.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cqm-converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aholmes@mitre.org
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|