dcm_dict 0.26.0 → 0.31.0

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/LICENSE +1 -1
  4. data/README.md +80 -65
  5. data/bin/dcm_dict_converter.rb +3 -3
  6. data/lib/dcm_dict.rb +1 -1
  7. data/lib/dcm_dict/dictionary/base_dictionary.rb +1 -1
  8. data/lib/dcm_dict/dictionary/base_record.rb +1 -1
  9. data/lib/dcm_dict/dictionary/data_element_dictionary.rb +1 -1
  10. data/lib/dcm_dict/dictionary/data_element_record.rb +1 -1
  11. data/lib/dcm_dict/dictionary/uid_dictionary.rb +2 -4
  12. data/lib/dcm_dict/dictionary/uid_record.rb +6 -1
  13. data/lib/dcm_dict/encoder/data_to_code.rb +2 -2
  14. data/lib/dcm_dict/error/dictionary_error.rb +1 -1
  15. data/lib/dcm_dict/ext/object_extension.rb +1 -1
  16. data/lib/dcm_dict/refine/array_refine.rb +1 -1
  17. data/lib/dcm_dict/refine/data_element_refine.rb +1 -1
  18. data/lib/dcm_dict/refine/internal/array_refine_internal.rb +1 -1
  19. data/lib/dcm_dict/refine/internal/hash_refine_internal.rb +14 -1
  20. data/lib/dcm_dict/refine/internal/string_refine_internal.rb +1 -1
  21. data/lib/dcm_dict/refine/string_refine.rb +1 -1
  22. data/lib/dcm_dict/refine/symbol_refine.rb +2 -1
  23. data/lib/dcm_dict/refine/uid_refine.rb +1 -1
  24. data/lib/dcm_dict/rubies/rb_ext.rb +1 -1
  25. data/lib/dcm_dict/source_data/data_elements_data.rb +84 -3
  26. data/lib/dcm_dict/source_data/detached_data.rb +1 -1
  27. data/lib/dcm_dict/source_data/uid_values_data.rb +445 -421
  28. data/lib/dcm_dict/version.rb +3 -3
  29. data/lib/dcm_dict/xml/constant.rb +3 -2
  30. data/lib/dcm_dict/xml/field_data.rb +1 -1
  31. data/lib/dcm_dict/xml/nokogiri_tool.rb +1 -1
  32. data/lib/dcm_dict/xml/rexml_tool.rb +1 -1
  33. data/lib/dcm_dict/xml/tag_field_data.rb +1 -1
  34. data/lib/dcm_dict/xml/uid_field_data.rb +14 -4
  35. data/lib/dcm_dict/xml/xml_tool.rb +1 -1
  36. data/spec/data_element_sample_spec_helper.rb +12 -2
  37. data/spec/data_element_shared_example_spec_helper.rb +1 -1
  38. data/spec/dcm_dict/dictionary/data_element_dictionary_spec.rb +1 -1
  39. data/spec/dcm_dict/dictionary/data_element_record_spec.rb +1 -1
  40. data/spec/dcm_dict/dictionary/uid_dictionary_spec.rb +62 -17
  41. data/spec/dcm_dict/dictionary/uid_record_spec.rb +8 -4
  42. data/spec/dcm_dict/encoder/data_to_code_spec.rb +2 -2
  43. data/spec/dcm_dict/ext/object_extension_spec.rb +1 -1
  44. data/spec/dcm_dict/refine/array_refine_spec.rb +1 -1
  45. data/spec/dcm_dict/refine/internal/array_refine_internal_spec.rb +1 -1
  46. data/spec/dcm_dict/refine/internal/hash_refine_internal_spec.rb +19 -1
  47. data/spec/dcm_dict/refine/internal/string_refine_internal_spec.rb +1 -1
  48. data/spec/dcm_dict/refine/string_refine_spec.rb +4 -4
  49. data/spec/dcm_dict/refine/symbol_refine_spec.rb +26 -1
  50. data/spec/dcm_dict/rubies/rb_ext_spec.rb +1 -1
  51. data/spec/dcm_dict/source_data/data_elements_data_spec.rb +1 -1
  52. data/spec/dcm_dict/source_data/detached_data_spec.rb +1 -1
  53. data/spec/dcm_dict/source_data/uid_values_data_spec.rb +1 -1
  54. data/spec/dcm_dict/version_spec.rb +1 -1
  55. data/spec/dcm_dict/xml/tag_field_data_spec.rb +1 -1
  56. data/spec/dcm_dict/xml/uid_field_data_spec.rb +1 -1
  57. data/spec/dictionary_shared_example_spec_helper.rb +3 -3
  58. data/spec/refine_shared_example_spec_helper.rb +1 -1
  59. data/spec/spec_helper.rb +1 -1
  60. data/spec/xml_sample_spec_helper.rb +80 -32
  61. metadata +18 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0627be15ab63f2b1e0ce46d5a2126e20383e555fe5246ff1f8cb5bffdef0daf6
4
- data.tar.gz: 563970212fa5af8f38d63da810db4baa9406b172999ec80d1ba00e990f90e254
3
+ metadata.gz: 42df833b727fc0e7b679b29d7ff02fc27b9c4f05c9aabb67cbe52c4cdb79281c
4
+ data.tar.gz: fe23e15bf141c9184979e2450b4ec558190c736fdddbb0c2cafc79f1bfb3a7ff
5
5
  SHA512:
6
- metadata.gz: 54ac5404466a49764555f411dcef5be9c98235f38c59d623c344b068e4a1124d4621e16bb159acad9a89a3114ccb3687e85a668c94b570b5cf32b2df5d6d9f5c
7
- data.tar.gz: 2d7061e974fdad3a56d1ecf910c9917874e915fd6f3667b79feabeb77dbf8a6260d4afd9727592f087e9b4952adf5a3df8e6227af0a05411482196bf5eaa06cc
6
+ metadata.gz: e2d0df30790bfcb71c48d0fbf9b674a8b1a6150ec77db1148280126ec7a0dd558be0c5d960670497a6491fd29431470cf21389dff424d157174c3b169f4f8f2f
7
+ data.tar.gz: 00a86d7fbb1bd1e932df26a139642e7d83336969db99d6ce4828bf9cc85e981c89c8210391e7c05811fdf481c65befff566d4e4469405d052f68a8edefae0ba2
@@ -1,5 +1,43 @@
1
1
  # DcmDict project Changelog
2
2
 
3
+ ## v0.31.0 (2020-12-07)
4
+ * Update to 2020e Base Standard
5
+ ___
6
+ ## v0.30.0 (2020-10-03)
7
+ * Update to 2020d Base Standard
8
+ * Add keywords support for standard UIDs
9
+ ___
10
+ ## v0.29.0 (2020-07-21)
11
+ * Update to 2020c Base Standard
12
+ ___
13
+ ## v0.28.1 (2020-03-18)
14
+ * Updated dcm_dict.gemspec due to a security vulnerabilities into the Rake gem as defined into gemspec (>=10.3 to >=12.3.3)
15
+ #### Note for gemspec security report:
16
+ >rake vulnerability found in dcm_dict.gemspec:
17
+ >CVE-2020-8130 (moderate severity)
18
+ >Vulnerable versions: <= 12.3.2
19
+ >Patched version: 12.3.3
20
+ >There is an OS command injection vulnerability in Ruby Rake before 12.3.3 in Rake::FileList when supplying a filename that begins with the pipe character |.
21
+ >
22
+ >Remediation:
23
+ >Upgrade rake to version 12.3.3 or later.
24
+ >
25
+ >["OS Command Injection in Rake"](https://github.com/advisories/GHSA-jppv-gw3r-w3q8)
26
+ >["CVE-2020-8130 Detail"](https://nvd.nist.gov/vuln/detail/CVE-2020-8130)
27
+ ___
28
+ ## v0.28.0 (2020-03-18)
29
+ * Update to 2020b Base Standard
30
+ * Remove warning for deprecated method 'Kernel#open'
31
+ ___
32
+ ## v0.27.0 (2020-02-05)
33
+ * Update to 2020a Base Standard
34
+ ___
35
+ ## v0.26.2 (2020-02-05)
36
+ * Update copyright year
37
+ ___
38
+ ## v0.26.1 (2020-01-03)
39
+ * Fix test to be compatible with ruby 2.7
40
+ * (No Dictionary Change from 2019e)
3
41
  ___
4
42
  ## v0.26.0 (2019-11-20)
5
43
  * Update to 2019e Base Standard
data/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  DcmDict is a Ruby gem (dcm_dict) to handle
2
2
  in a simple way the Data defined within the DICOM Standard.
3
3
 
4
- Copyright (C) 2014-2019 Enrico Rivarola
4
+ Copyright (C) 2014-2020 Enrico Rivarola
5
5
 
6
6
  DcmDict is free software: you can redistribute it and/or modify
7
7
  it under the terms of the GNU General Public License as published by
data/README.md CHANGED
@@ -4,11 +4,8 @@
4
4
  # Why *DcmDict*
5
5
  With the new releases from year 2014 DICOM documents are available in different format including one particularly interesting, the *DocBook* XML version.
6
6
 
7
- As D. Clunie writes on his web site in the [DICOM Standard Status page][2]:
8
- > "... other formats (such as DocBook, HTML, Word and ODT) are also made available for the convenience of implementors who may need to extract machine-readable content, ..."
9
-
10
- This is confirmed in the DICOM<sup>®</sup> Standard [web site][10] where each part is published in [multiple formats][11] and the XML format is defined:
11
- >"... good for machine readability, e.g. self-updating validators ..."
7
+ As confirmed in the DICOM<sup>®</sup> Standard [web site][10] where each part is published in [multiple formats][11] and XML format is defined by:
8
+ >"... XML good for machine readability, e.g. self-updating validators ..."
12
9
 
13
10
  This is great news for anyone involved in the study of the standard !
14
11
 
@@ -49,6 +46,14 @@ as well for UIDs
49
46
  => :transfer_syntax
50
47
  > "Implicit VR Little Endian: Default Transfer Syntax for DICOM".uid_value
51
48
  => "1.2.840.10008.1.2"
49
+ > "Verification SOP Class".uid_value
50
+ => "1.2.840.10008.1.1"
51
+ > "1.2.840.10008.1.1".uid_type
52
+ => :sop_class
53
+ > "Verification".uid
54
+ => "1.2.840.10008.1.1"
55
+ > :verification.uid
56
+ => "1.2.840.10008.1.1"
52
57
  ```
53
58
 
54
59
  let see all features in detail:
@@ -95,33 +100,33 @@ For these objects is possible to access to Tag (group/element), Name, Keyword, V
95
100
 
96
101
  The main methods supported are:
97
102
 
98
- |Method | Note| Type||
99
- |:------|:------------:|:---:|:---:|
100
- |**tag** | tag as Array| Array of two Fixnum|(alias of *tag_ary*)|
101
- |**tag_name** | name of tag| String|
102
- |**tag_keyword** | keyword| String|
103
- |**tag_key** | keyword| String|
104
- |**tag_vr** | Value Representation| Array of Symbol|
105
- |**tag_vm** | Value Multiplicity| Array of Symbol|
106
- |**tag_ps** | tag as string (as standard doc)| String|
107
- |**tag_ary** | tag as Array|Array of two Fixnum|
108
- |**tag_sym** | tag as Symbol|Symbol|
109
- |**tag_ndm** | tag as in Native DICOM Model|String|
110
- |**tag_str** | tag as string (similar to tag_ps)|String|
111
- |**tag_note** | tag note|String|
112
- |**tag_multiple?** | is a multiple tag ? |boolean|(useful for 'multi tag' attribute)|
103
+ | Method | Note | Type | |
104
+ |:------------------|:---------------------------------:|:-------------------:|:----------------------------------:|
105
+ | **tag** | tag as Array | Array of two Fixnum | (alias of *tag_ary*) |
106
+ | **tag_name** | name of tag | String | |
107
+ | **tag_keyword** | keyword | String | |
108
+ | **tag_key** | keyword | String | |
109
+ | **tag_vr** | Value Representation | Array of Symbol | |
110
+ | **tag_vm** | Value Multiplicity | Array of Symbol | |
111
+ | **tag_ps** | tag as string (as standard doc) | String | |
112
+ | **tag_ary** | tag as Array | Array of two Fixnum | |
113
+ | **tag_sym** | tag as Symbol | Symbol | |
114
+ | **tag_ndm** | tag as in Native DICOM Model | String | |
115
+ | **tag_str** | tag as string (similar to tag_ps) | String | |
116
+ | **tag_note** | tag note | String | |
117
+ | **tag_multiple?** | is a multiple tag ? | boolean | (useful for 'multi tag' attribute) |
113
118
 
114
119
  each data element is indexed by these fields:
115
120
 
116
- |Field|Type|
117
- |:----|:-----:|
118
- |**tag_key** | String|
119
- |**tag_ps** | String|
120
- |**tag_ary** | Array|
121
- |**tag_sym** | Symbol|
122
- |**tag_ndm** | String|
123
- |**tag_str** | String|
124
- |**tag_name** | String|
121
+ | Field | Type |
122
+ |:-------------|:------:|
123
+ | **tag_key** | String |
124
+ | **tag_ps** | String |
125
+ | **tag_ary** | Array |
126
+ | **tag_sym** | Symbol |
127
+ | **tag_ndm** | String |
128
+ | **tag_str** | String |
129
+ | **tag_name** | String |
125
130
 
126
131
  By these fields is possible to access to data element informations.
127
132
  Consider the case of the tag (0010,1005) (*Patient's Birth Name*), the primary fields are:
@@ -173,21 +178,21 @@ will produce
173
178
  The library also manage 'multiple tags' such as *(0020,31XX)* (*Source Image IDs*).
174
179
  As an example for this data element the default tag in array form is [0x0020,0x3122] and all fields are expressed as:
175
180
 
176
- |Method/field | Value|
177
- |:------|:------------:|
178
- |**tag** | [0x0020,0x3122]|
179
- |**tag_name** | "Source Image IDs"|
180
- |**tag_keyword** | 'SourceImageIDs'|
181
- |**tag_key** | 'SourceImageIDs'|
182
- |**tag_vr** | [:CS]|
183
- |**tag_vm** | ["1-n"]|
184
- |**tag_ps** | '(0020,31XX)'|
185
- |**tag_ary** | [0x0020,0x3122]|
186
- |**tag_sym** | :source_image_ids|
187
- |**tag_ndm** | '00203122'
188
- |**tag_str** | '(0020,3122)'|
189
- |**tag_note** | 'RET'|
190
- |**tag_multiple?** | true|
181
+ | Method/field | Value |
182
+ |:------------------|:------------------:|
183
+ | **tag** | [0x0020,0x3122] |
184
+ | **tag_name** | "Source Image IDs" |
185
+ | **tag_keyword** | 'SourceImageIDs' |
186
+ | **tag_key** | 'SourceImageIDs' |
187
+ | **tag_vr** | [:CS] |
188
+ | **tag_vm** | ["1-n"] |
189
+ | **tag_ps** | '(0020,31XX)' |
190
+ | **tag_ary** | [0x0020,0x3122] |
191
+ | **tag_sym** | :source_image_ids |
192
+ | **tag_ndm** | '00203122' |
193
+ | **tag_str** | '(0020,3122)' |
194
+ | **tag_note** | 'RET' |
195
+ | **tag_multiple?** | true |
191
196
 
192
197
  [0x0020,0x3122] is the default value for group/element pair (*[32, 12578]*), but any valid pair of numbers for this tag will be refers that information:
193
198
 
@@ -213,38 +218,44 @@ As an example for this data element the default tag in array form is [0x0020,0x3
213
218
  and so on.
214
219
 
215
220
  ## UID data in detail
216
- Any UID features can be accessed from a *String* object.
221
+ Any UID features can be accessed from a *String* or a *Symbol* object.
217
222
 
218
223
  ### UID Values
219
224
  For these objects is possible to access to value, name and type values for any single uid.
220
225
  Main methods supported are:
221
226
 
222
- |Method | Note| Type||
223
- |:------|:------------:|:---:|:---:|
224
- |**uid** | value of uid| String|(alias of *uid_value*)|
225
- |**uid_value** | value of uid| String|
226
- |**uid_name** | name of uid| String|
227
- |**uid_type** | type of uid| Symbol|
227
+ | Method | Note | Type | |
228
+ |:--------------|:------------------------:|:------:|:----------------------:|
229
+ | **uid** | value of uid | String | (alias of *uid_value*) |
230
+ | **uid_value** | value of uid | String | |
231
+ | **uid_name** | name of uid | String | |
232
+ | **uid_key** | keyword of uid | String | |
233
+ | **uid_sym** | keyword as symbol of uid | Symbol | |
234
+ | **uid_type** | type of uid | Symbol | |
228
235
 
229
236
  each uid is indexed by:
230
237
 
231
- |Field|Type|
232
- |:----|:-----|
233
- |**uid_value** | String|
234
- |**uid_name** | String|
238
+ | Field | Type |
239
+ |:--------------|:-------|
240
+ | **uid_value** | String |
241
+ | **uid_name** | String |
242
+ | **uid_key** | String |
243
+ | **uid_sym** | Symbol |
235
244
 
236
245
  From these fields is possible to access to all uid informations.
237
- Consider the case of the uid *1.2.840.10008.1.1* (*Verification SOP Class*), the primary fields are the strings **'1.2.840.10008.1.1'** and **"Verification SOP Class"**.
238
- - As String key you may use the standard value **'1.2.840.10008.1.1'** and the uid name **"Verification SOP Class"**
246
+ Consider the case of the uid *1.2.840.10008.1.1* (*Verification SOP Class*), the primary fields are the strings **'1.2.840.10008.1.1'**, **"Verification SOP Class"**, **"Verification"**.
247
+ - As key you may use the standard value **'1.2.840.10008.1.1'**, the uid name **"Verification SOP Class"**, the uid keyword **"Verification"** and the symbol **:verification**
239
248
 
240
249
  For this uid all fields are expressed as:
241
250
 
242
- |Method/field | Value|
243
- |:------|:------------:|
244
- |**uid** | '1.2.840.10008.1.1'|
245
- |**uid_value** | '1.2.840.10008.1.1'|
246
- |**uid_name** | "Verification SOP Class"|
247
- |**uid_type** | :sop_class|
251
+ | Method/field | Value |
252
+ |:--------------|:------------------------:|
253
+ | **uid** | '1.2.840.10008.1.1' |
254
+ | **uid_value** | '1.2.840.10008.1.1' |
255
+ | **uid_name** | "Verification SOP Class" |
256
+ | **uid_key** | "Verification" |
257
+ | **uid_sym** | :verification |
258
+ | **uid_type** | :sop_class |
248
259
 
249
260
  ### example:
250
261
 
@@ -257,6 +268,10 @@ For this uid all fields are expressed as:
257
268
  => "Verification SOP Class"
258
269
  > "Verification SOP Class".uid
259
270
  => "1.2.840.10008.1.1"
271
+ > "Verification".uid
272
+ => "1.2.840.10008.1.1"
273
+ > :verification.uid
274
+ => "1.2.840.10008.1.1"
260
275
  ```
261
276
 
262
277
  ## How data is extracted
@@ -272,7 +287,7 @@ Note: the script use the [Nokogiri][3] as XML parser if installed as gem, otherw
272
287
  Check the file for other details.
273
288
 
274
289
  ## Note
275
- Current library version is aligned to *DICOM Base Standard* **2019e**
290
+ Current library version is aligned to *DICOM Base Standard* **2020e**
276
291
 
277
292
  ## Install
278
293
 
@@ -295,7 +310,7 @@ There are many possible *candidates* for inclusion in the *dictionary*, here are
295
310
  TBD
296
311
 
297
312
  ## License
298
- Copyright (C) 2014-2019 Enrico Rivarola.
313
+ Copyright (C) 2014-2020 Enrico Rivarola.
299
314
  See the `LICENSE` and `COPYING` files for license details.
300
315
 
301
316
  ## Ruby Gem
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # -*- ruby -*-
3
3
  #
4
- # Copyright (C) 2014-2019 Enrico Rivarola
4
+ # Copyright (C) 2014-2020 Enrico Rivarola
5
5
  #
6
6
  # This file is part of DcmDict gem (dcm_dict).
7
7
  #
@@ -29,7 +29,7 @@ require 'dcm_dict'
29
29
  require 'dcm_dict/xml/xml_tool'
30
30
 
31
31
  LICENSE_TEXT=<<END_LICENSE
32
- Copyright (C) 2014-2019 Enrico Rivarola
32
+ Copyright (C) 2014-2020 Enrico Rivarola
33
33
 
34
34
  This file is part of DcmDict gem (dcm_dict).
35
35
 
@@ -89,7 +89,7 @@ class DcmDictConverter
89
89
  def pull_standard_draft(url, output)
90
90
  buffer_size = 256 * 1_024
91
91
  trace("Downloading #{url}\n")
92
- open(url, "r",
92
+ URI.open(url, "r",
93
93
  :content_length_proc => lambda {|content_length| trace("Content Length: #{content_length} bytes\n.") },
94
94
  :progress_proc => lambda { |size| trace(".") }) do |src|
95
95
  while (buffer = src.read(buffer_size))
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -25,7 +25,7 @@ module DcmDict
25
25
  module Dictionary
26
26
  using DcmDict::Refine::Internal::StringRefineInternal
27
27
 
28
- UidIndexKey = [:uid_value, :uid_name]
28
+ UidIndexKey = [:uid_value, :uid_name, :uid_key, :uid_sym]
29
29
 
30
30
  # Main class to handle uid data as dictionary
31
31
  class UidDictionary < BaseDictionary
@@ -70,9 +70,7 @@ module DcmDict
70
70
 
71
71
  def try_to_find_unknown_uid(uid)
72
72
  raise "Unknown UID value" unless uid.uid_value?
73
- UidRecord.new({ uid_value: uid,
74
- uid_name: 'Unknown UID',
75
- uid_type: :unknown })
73
+ UidRecord.new({ uid_value: uid })
76
74
  end
77
75
  end
78
76
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -25,8 +25,12 @@ require_relative 'base_record'
25
25
 
26
26
  module DcmDict
27
27
  module Dictionary
28
+ using DcmDict::Refine::Internal::HashRefineInternal
29
+
28
30
  UidMethodMap = {uid_value: :uid_value,
29
31
  uid: :uid_value,
32
+ uid_key: :uid_key,
33
+ uid_sym: :uid_sym,
30
34
  uid_name: :uid_name,
31
35
  uid_type: :uid_type }.freeze
32
36
 
@@ -35,6 +39,7 @@ module DcmDict
35
39
  # Class to handle uid record from source dictionary data
36
40
  class UidRecord < BaseRecord
37
41
  def initialize(data)
42
+ data.check_base_data_uid_field!
38
43
  super
39
44
  end
40
45
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -72,7 +72,7 @@ END
72
72
  # Convert uid +data+ to Ruby code using +indent+ spaces indentation
73
73
  def self.uid_data_to_code(data, indent=4)
74
74
  indent = 4 unless indent
75
- "#{' '*indent}{ uid_value: '#{data[:uid_value]}', uid_name: \"#{data[:uid_name]}\", uid_type: #{data[:uid_type].inspect}},"
75
+ "#{' '*indent}{ uid_value: '#{data[:uid_value]}', uid_name: '#{data[:uid_name]}', uid_key: '#{data[:uid_key]}', uid_sym: #{data[:uid_sym].inspect}, uid_type: #{data[:uid_type].inspect}},"
76
76
  end
77
77
  end
78
78
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (C) 2014-2019 Enrico Rivarola
2
+ # Copyright (C) 2014-2020 Enrico Rivarola
3
3
  #
4
4
  # This file is part of DcmDict gem (dcm_dict).
5
5
  #