rtp-connect 1.10 → 1.11

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
  SHA1:
3
- metadata.gz: d562152c2ccba6301fcf82f5bdd7329c8efb0515
4
- data.tar.gz: ef3af37f9d5960f1821073345950b7523aa66ee3
3
+ metadata.gz: 2db1a736ead6fae51226632142ccc6e4621d75d9
4
+ data.tar.gz: c06e7b7c16fc57c546189a5a71c7ffafdf89116d
5
5
  SHA512:
6
- metadata.gz: bc23ea92ce17778ec1c0c253d68c976d3b5079fb80dc7b3f85f3d93afccb3e95f502d812bf0d408ff347d9f88251cd4caa34a1c87febf3847b4ca74ad55db5bd
7
- data.tar.gz: 7c5b9a0174462db12b0c015915a9a655ed943f37dc611225b8620444bf47b5c77a54da8ab433766f87cf37851dfe0cd2257ad25b21fd66a7f4b9c5c407349332
6
+ metadata.gz: 118d1fbe6c5134a53eaf4a7c4b67f6d6814f0fdbbe125fbd991c5bc508cc6d40c942bd695bfb18e77cd004a50a763556765697b0a68d3760e9a7b1f3f5ddda29
7
+ data.tar.gz: 8fa7b1fdb963848b17e92b4c4164c92873c61303b976aa58be62368fa107670a3f8d8a33988cfedd51694e808abf7c0eae4d092698f5f55b0dc6ce7538c88f21
@@ -1,6 +1,13 @@
1
+ # 1.11
2
+
3
+ ## 10th September 2020
4
+
5
+ * Added support for Mosaiq 2.65, which includes four new attributes in the SiteSetup record and two new attributes in the ExtendedField record.
6
+ * Added support for Mosaiq 2.81, which includes two new attributes in the SiteSetup record and one new attribute in the ExtendedPlan record.
7
+
1
8
  # 1.10
2
9
 
3
- ## (Unreleased)
10
+ ## 28th November 2018
4
11
 
5
12
  * Added support for Mosaiq 2.64, which includes three new iso_pos_x/y/z attributes in the Field and ControlPoint records.
6
13
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rtp-connect (1.10)
4
+ rtp-connect (1.11)
5
5
 
6
6
  GEM
7
7
  remote: http://www.rubygems.org/
data/README.md CHANGED
@@ -136,7 +136,7 @@ If you encounter an RTP file with an unsupported record type, please contact me.
136
136
 
137
137
  ## COPYRIGHT
138
138
 
139
- Copyright 2011-2018 Christoffer Lervåg
139
+ Copyright 2011-2020 Christoffer Lervåg
140
140
 
141
141
  This program is free software: you can redistribute it and/or modify
142
142
  it under the terms of the GNU General Public License as published by
@@ -18,6 +18,8 @@ module RTP
18
18
  attr_reader :accessory_code
19
19
  attr_reader :accessory_type
20
20
  attr_reader :high_dose_authorization
21
+ attr_reader :referenced_rt_plan_uid
22
+ attr_reader :referenced_rt_plan_relationship
21
23
 
22
24
  # Creates a new (treatment) ExtendedField by parsing a RTPConnect string line.
23
25
  #
@@ -36,7 +38,7 @@ module RTP
36
38
  # @param [Record] parent a record which is used to determine the proper parent of this instance
37
39
  #
38
40
  def initialize(parent)
39
- super('EXTENDED_FIELD_DEF', 4, 10)
41
+ super('EXTENDED_FIELD_DEF', 4, 12)
40
42
  # Parent relation (may get more than one type of record here):
41
43
  @parent = get_parent(parent.to_record, Field)
42
44
  @parent.add_extended_field(self)
@@ -51,7 +53,9 @@ module RTP
51
53
  :is_fff,
52
54
  :accessory_code,
53
55
  :accessory_type,
54
- :high_dose_authorization
56
+ :high_dose_authorization,
57
+ :referenced_rt_plan_uid,
58
+ :referenced_rt_plan_relationship
55
59
  ]
56
60
  end
57
61
 
@@ -161,6 +165,22 @@ module RTP
161
165
  @high_dose_authorization = value && value.to_s
162
166
  end
163
167
 
168
+ # Sets the referenced_rt_plan_uid attribute.
169
+ #
170
+ # @param [nil, #to_s] value the new attribute value
171
+ #
172
+ def referenced_rt_plan_uid=(value)
173
+ @referenced_rt_plan_uid = value && value.to_s
174
+ end
175
+
176
+ # Sets the referenced_rt_plan_relationship attribute.
177
+ #
178
+ # @param [nil, #to_s] value the new attribute value
179
+ #
180
+ def referenced_rt_plan_relationship=(value)
181
+ @referenced_rt_plan_relationship = value && value.to_s
182
+ end
183
+
164
184
 
165
185
  private
166
186
 
@@ -12,6 +12,7 @@ module RTP
12
12
  attr_accessor :parent
13
13
  attr_reader :encoding
14
14
  attr_reader :fullname
15
+ attr_reader :patient_comments
15
16
 
16
17
  # Creates a new ExtendedPlan by parsing a RTPConnect string line.
17
18
  #
@@ -30,7 +31,7 @@ module RTP
30
31
  # @param [Record] parent a record which is used to determine the proper parent of this instance
31
32
  #
32
33
  def initialize(parent)
33
- super('EXTENDED_PLAN_DEF', 4, 4)
34
+ super('EXTENDED_PLAN_DEF', 4, 5)
34
35
  # Parent relation (may get more than one type of record here):
35
36
  @parent = get_parent(parent.to_record, Plan)
36
37
  @parent.add_extended_plan(self)
@@ -38,7 +39,9 @@ module RTP
38
39
  # Required:
39
40
  :keyword,
40
41
  :encoding,
41
- :fullname
42
+ :fullname,
43
+ # Optional:
44
+ :patient_comments
42
45
  ]
43
46
  end
44
47
 
@@ -100,6 +103,14 @@ module RTP
100
103
  @fullname = value && value.to_s
101
104
  end
102
105
 
106
+ # Sets the patient_comments attribute.
107
+ #
108
+ # @param [nil, #to_s] value the new attribute value
109
+ #
110
+ def patient_comments=(value)
111
+ @patient_comments = value && value.to_s
112
+ end
113
+
103
114
 
104
115
  private
105
116
 
@@ -1,4 +1,4 @@
1
- # Copyright 2011-2018 Christoffer Lervag
1
+ # Copyright 2011-2020 Christoffer Lervag
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -190,15 +190,32 @@ module RTP
190
190
  # @return [Array<String>] an array of attributes where some of the recent attributes may have been removed
191
191
  #
192
192
  def discard_unsupported_attributes(values, options={})
193
+ ver = options[:version].to_f
193
194
  case self
194
195
  when SiteSetup
195
- options[:version].to_f >= 2.6 ? values : values[0..-4]
196
+ if ver >= 2.81
197
+ values
198
+ elsif ver >= 2.65
199
+ values[0..-3]
200
+ elsif ver >= 2.6
201
+ values[0..-7]
202
+ else
203
+ values[0..-10]
204
+ end
196
205
  when Field
197
- options[:version].to_f >= 2.64 ? values : values[0..-4]
206
+ ver >= 2.64 ? values : values[0..-4]
198
207
  when ExtendedField
199
- options[:version].to_f >= 2.4 ? values : values[0..-5]
208
+ if ver >= 2.65
209
+ values
210
+ elsif ver >= 2.4
211
+ values[0..-3]
212
+ else
213
+ values[0..-7]
214
+ end
200
215
  when ControlPoint
201
- options[:version].to_f >= 2.64 ? values : values[0..31] + values[35..-1]
216
+ ver >= 2.64 ? values : values[0..31] + values[35..-1]
217
+ when ExtendedPlan
218
+ ver >= 2.81 ? values : values[0..-2]
202
219
  else
203
220
  values
204
221
  end
@@ -27,6 +27,12 @@ module RTP
27
27
  attr_reader :table_top_vert_displacement
28
28
  attr_reader :table_top_long_displacement
29
29
  attr_reader :table_top_lat_displacement
30
+ attr_reader :mrl_coil_name
31
+ attr_reader :mrl_coil_index
32
+ attr_reader :couch_reference
33
+ attr_reader :couch_reference_index
34
+ attr_reader :respiratory_motion_compensation_technique
35
+ attr_reader :respiratory_signal_source
30
36
 
31
37
  # Creates a new SiteSetup by parsing a RTPConnect string line.
32
38
  #
@@ -45,7 +51,7 @@ module RTP
45
51
  # @param [Record] parent a record which is used to determine the proper parent of this instance
46
52
  #
47
53
  def initialize(parent)
48
- super('SITE_SETUP_DEF', 5, 19)
54
+ super('SITE_SETUP_DEF', 5, 25)
49
55
  # Parent relation (always expecting a Prescription here):
50
56
  @parent = get_parent(parent.to_prescription, Prescription)
51
57
  @parent.add_site_setup(self)
@@ -69,7 +75,13 @@ module RTP
69
75
  :couch_pedestal,
70
76
  :table_top_vert_displacement,
71
77
  :table_top_long_displacement,
72
- :table_top_lat_displacement
78
+ :table_top_lat_displacement,
79
+ :mrl_coil_name,
80
+ :mrl_coil_index,
81
+ :couch_reference,
82
+ :couch_reference_index,
83
+ :respiratory_motion_compensation_technique,
84
+ :respiratory_signal_source
73
85
  ]
74
86
  end
75
87
 
@@ -251,6 +263,54 @@ module RTP
251
263
  @table_top_lat_displacement = value && value.to_s.strip
252
264
  end
253
265
 
266
+ # Sets the mrl_coil_name attribute.
267
+ #
268
+ # @param [nil, #to_s] value the new attribute value
269
+ #
270
+ def mrl_coil_name=(value)
271
+ @mrl_coil_name = value && value.to_s.strip
272
+ end
273
+
274
+ # Sets the mrl_coil_index attribute.
275
+ #
276
+ # @param [nil, #to_s] value the new attribute value
277
+ #
278
+ def mrl_coil_index=(value)
279
+ @mrl_coil_index = value && value.to_s.strip
280
+ end
281
+
282
+ # Sets the couch_reference attribute.
283
+ #
284
+ # @param [nil, #to_s] value the new attribute value
285
+ #
286
+ def couch_reference=(value)
287
+ @couch_reference = value && value.to_s.strip
288
+ end
289
+
290
+ # Sets the couch_reference_index attribute.
291
+ #
292
+ # @param [nil, #to_s] value the new attribute value
293
+ #
294
+ def couch_reference_index=(value)
295
+ @couch_reference_index = value && value.to_s.strip
296
+ end
297
+
298
+ # Sets the respiratory_motion_compensation_technique attribute.
299
+ #
300
+ # @param [nil, #to_s] value the new attribute value
301
+ #
302
+ def respiratory_motion_compensation_technique=(value)
303
+ @respiratory_motion_compensation_technique = value && value.to_s.strip
304
+ end
305
+
306
+ # Sets the respiratory_signal_source attribute.
307
+ #
308
+ # @param [nil, #to_s] value the new attribute value
309
+ #
310
+ def respiratory_signal_source=(value)
311
+ @respiratory_signal_source = value && value.to_s.strip
312
+ end
313
+
254
314
 
255
315
  private
256
316
 
@@ -1,6 +1,6 @@
1
1
  module RTP
2
2
 
3
3
  # The RTPConnect library version string.
4
- VERSION = '1.10'
4
+ VERSION = '1.11'
5
5
 
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtp-connect
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.10'
4
+ version: '1.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoffer Lervag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-28 00:00:00.000000000 Z
11
+ date: 2020-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler