cqm-parsers 4.1.1.0 → 4.1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ab2f0fafb17c1c9415e34a3732ed3c941c57c5efe3efc87509baa866b1df0cb
4
- data.tar.gz: 821f980170ae280b0bb604a2cb8fe6b577ac1f4d21d6b23ec9deb3bc31c1dcfa
3
+ metadata.gz: b9b0bee12a929d0136433e447f3f1ca09c6b8cdcab405df84c0e6e5c1e92eede
4
+ data.tar.gz: 07c77e3ec393bd42ccfd530d6ba0e382f90db2aed2692321c1982cafc8c9649e
5
5
  SHA512:
6
- metadata.gz: 6ef8af2c1fa8bdd7a6e3abcffb6a01c0ff531a6540cb04bf2a362dc8065d75caf682c0c95efa559ec3e926cdd1ecc52411d65df85e66f6724212da9e63678304
7
- data.tar.gz: 441a018ffe31ead27d482d0fa70c019739de1ac96dab583cd0c317553af0e4c118c0c4f5e1c9ab62160c052e36630a40c7d45de0db6f99b5a6678eb56978969f
6
+ metadata.gz: 405b50182bd98c4f992117ce952d4b6e459b366fd14cd40362de22f23724a26d5d991c81af629eef2d6d1dddab7a65e13497012f79d97c70825db006f02819c5
7
+ data.tar.gz: '0149756917fa64eab95b587a0c21800406ccf90423d341381af9f46dcc89060f78f66c1734d5603568a9c9fca57c2d6f2e9640fca29a8591c04effee860fcf1d'
@@ -61,7 +61,8 @@ module Measures
61
61
  def extract_cms_identifier(qmd)
62
62
  cms_identifier =
63
63
  (qmd.at_xpath('./xmlns:subjectOf/xmlns:measureAttribute[xmlns:code/xmlns:originalText[@value="eCQM Identifier (Measure Authoring Tool)"]]/xmlns:value') ||
64
- qmd.at_xpath('./xmlns:subjectOf/xmlns:measureAttribute[xmlns:code/xmlns:originalText[@value="eMeasure Identifier (Measure Authoring Tool)"]]/xmlns:value'))
64
+ qmd.at_xpath('./xmlns:subjectOf/xmlns:measureAttribute[xmlns:code/xmlns:originalText[@value="eMeasure Identifier (Measure Authoring Tool)"]]/xmlns:value') ||
65
+ qmd.at_xpath('./xmlns:subjectOf/xmlns:measureAttribute[xmlns:code/xmlns:originalText[@value="CMS ID"]]/xmlns:value'))
65
66
  return cms_identifier['value']
66
67
  end
67
68
 
@@ -58,8 +58,20 @@ module Measures
58
58
  pn = Pathname(f.name)
59
59
  next if '__MACOSX'.in? pn.each_filename # ignore anything in a __MACOSX folder
60
60
  next unless pn.basename.extname.in? ['.xml','.cql','.json','.html']
61
- folders[pn.dirname][:files] << { basename: pn.basename, contents: f.get_input_stream.read.force_encoding('UTF-8') }
62
- folders[pn.dirname][:depth] = pn.each_filename.count # this is just a count of how many folders are in the path
61
+
62
+ # The root directory for a measure may contain a sub directory 'resources' which includes the elm files (MADiE export)
63
+ # The root directory for a measure may contain a sub directory 'cql' which includes the cql files (MADiE export)
64
+ # The root directory for a measure may also contain the elm files and cql (MAT export)
65
+ # Categorize the files by measure's rootpath
66
+ measure_rootpath = pn.dirname
67
+ measure_rootpath = measure_rootpath.sub('/resources','')
68
+ measure_rootpath = measure_rootpath.sub('resources','')
69
+ measure_rootpath = measure_rootpath.sub('/cql','')
70
+ measure_rootpath = measure_rootpath.sub('cql','')
71
+ measure_rootpath = Pathname.new('.') if measure_rootpath.to_s == ''
72
+
73
+ folders[measure_rootpath][:files] << { basename: pn.basename, contents: f.get_input_stream.read.force_encoding('UTF-8') }
74
+ folders[measure_rootpath][:depth] = pn.each_filename.count # this is just a count of how many folders are in the path
63
75
  end
64
76
  end
65
77
  return folders
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cqm-parsers
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1.0
4
+ version: 4.1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MITRE Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-31 00:00:00.000000000 Z
11
+ date: 2025-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cqm-models