caruby-tissue 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +4 -0
- data/examples/galena/README.md +2 -11
- data/examples/galena/conf/migration/filter_defaults.yaml +1 -0
- data/examples/galena/conf/migration/filter_values.yaml +13 -0
- data/examples/galena/lib/galena/tissue/migration/filter_shims.rb +3 -15
- data/examples/galena/lib/galena/tissue/migration/frozen_shims.rb +3 -6
- data/examples/galena/lib/galena/tissue/seed/defaults.rb +2 -2
- data/lib/catissue/annotation/annotatable_class.rb +10 -8
- data/lib/catissue/annotation/annotation_class.rb +6 -3
- data/lib/catissue/annotation/annotation_module.rb +7 -2
- data/lib/catissue/cli/command.rb +11 -4
- data/lib/catissue/cli/migrate.rb +5 -16
- data/lib/catissue/database/annotation/annotation_service.rb +2 -2
- data/lib/catissue/database/annotation/entity_facade.rb +6 -11
- data/lib/catissue/database/annotation/record_entry_integrator.rb +4 -4
- data/lib/catissue/database/controlled_values.rb +2 -3
- data/lib/catissue/database.rb +64 -35
- data/lib/catissue/domain/abstract_specimen.rb +24 -26
- data/lib/catissue/domain/abstract_specimen_collection_group.rb +1 -1
- data/lib/catissue/domain/capacity.rb +1 -1
- data/lib/catissue/domain/collection_protocol.rb +12 -9
- data/lib/catissue/domain/collection_protocol_event.rb +9 -11
- data/lib/catissue/domain/collection_protocol_registration.rb +5 -5
- data/lib/catissue/domain/container.rb +3 -4
- data/lib/catissue/domain/container_type.rb +11 -12
- data/lib/catissue/domain/disposal_event_parameters.rb +1 -1
- data/lib/catissue/domain/new_specimen_array_order_item.rb +6 -5
- data/lib/catissue/domain/order_details.rb +4 -0
- data/lib/catissue/domain/participant.rb +17 -17
- data/lib/catissue/domain/participant_medical_identifier.rb +2 -3
- data/lib/catissue/domain/site.rb +7 -9
- data/lib/catissue/domain/specimen/pathology/prostate_specimen_gleason_score.rb +2 -3
- data/lib/catissue/domain/specimen/pathology/prostate_specimen_pathology_annotation.rb +4 -3
- data/lib/catissue/domain/specimen/pathology/specimen_additional_finding.rb +5 -7
- data/lib/catissue/domain/specimen/pathology/specimen_base_solid_tissue_pathology_annotation.rb +11 -11
- data/lib/catissue/domain/specimen/pathology/specimen_details.rb +2 -4
- data/lib/catissue/domain/specimen/pathology/specimen_histologic_grade.rb +2 -4
- data/lib/catissue/domain/specimen/pathology/specimen_histologic_type.rb +6 -6
- data/lib/catissue/domain/specimen/pathology/specimen_histologic_variant_type.rb +2 -4
- data/lib/catissue/domain/specimen/pathology/specimen_invasion.rb +2 -4
- data/lib/catissue/domain/specimen.rb +35 -45
- data/lib/catissue/domain/specimen_array.rb +1 -1
- data/lib/catissue/domain/specimen_collection_group/pathology/base_pathology_annotation.rb +4 -4
- data/lib/catissue/domain/specimen_collection_group/pathology/base_solid_tissue_pathology_annotation.rb +4 -4
- data/lib/catissue/domain/specimen_collection_group.rb +40 -46
- data/lib/catissue/domain/specimen_protocol.rb +4 -6
- data/lib/catissue/domain/specimen_requirement.rb +13 -16
- data/lib/catissue/domain/storage_container.rb +5 -2
- data/lib/catissue/domain/storage_type.rb +1 -1
- data/lib/catissue/domain/user.rb +16 -7
- data/lib/catissue/extract/command.rb +1 -1
- data/lib/catissue/extract/delta.rb +7 -15
- data/lib/catissue/migration/migratable.rb +106 -8
- data/lib/catissue/migration/migrator.rb +20 -12
- data/lib/catissue/migration/shims.rb +3 -3
- data/lib/catissue/util/collectible.rb +2 -2
- data/lib/catissue/util/collectible_event_parameters.rb +2 -2
- data/lib/catissue/util/position.rb +3 -3
- data/lib/catissue/version.rb +1 -1
- data/test/lib/catissue/domain/address_test.rb +3 -2
- data/test/lib/catissue/domain/participant_test.rb +11 -0
- data/test/lib/catissue/domain/specimen_collection_group_test.rb +62 -12
- data/test/lib/catissue/domain/specimen_test.rb +0 -1
- data/test/lib/catissue/test_case.rb +2 -2
- data/test/lib/examples/galena/tissue/migration/seedify.rb +5 -5
- data/test/lib/examples/galena/tissue/migration/test_case.rb +9 -5
- metadata +8 -17
- data/conf/extract/simple_fields.yaml +0 -4
- data/conf/migration/filter_fields.yaml +0 -7
- data/conf/migration/filter_migration.yaml +0 -9
- data/conf/migration/frozen_fields.yaml +0 -11
- data/conf/migration/frozen_migration.yaml +0 -9
- data/conf/migration/general_fields.yaml +0 -44
- data/conf/migration/general_migration.yaml +0 -9
- data/conf/migration/simple_fields.yaml +0 -30
- data/conf/migration/simple_migration.yaml +0 -7
- data/conf/migration/small_fields.yaml +0 -24
- data/conf/migration/small_migration.yaml +0 -9
@@ -1,6 +1,8 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'test_case')
|
2
2
|
require 'caruby/util/uniquifier'
|
3
3
|
|
4
|
+
require 'json'
|
5
|
+
|
4
6
|
class ParticipantTest < Test::Unit::TestCase
|
5
7
|
include CaTissue::TestCase
|
6
8
|
|
@@ -91,6 +93,15 @@ class ParticipantTest < Test::Unit::TestCase
|
|
91
93
|
assert_raises(CaTissue::AnnotationError, "Chemotherapy is not deprecated.") { CaTissue::Participant::Clinical::Chemotherapy.new}
|
92
94
|
end
|
93
95
|
end
|
96
|
+
|
97
|
+
def test_json
|
98
|
+
CaTissue::Race.new(:participant => @pnt, :race_name => 'White')
|
99
|
+
dup = JSON[@pnt.to_json]
|
100
|
+
race = dup.races.first
|
101
|
+
assert_not_nil(race, "Race not serialized")
|
102
|
+
assert_equal('White', race.race_name, "Race name not serialized correctly")
|
103
|
+
assert_same(dup, race.participant, "Race participant not serialized correctly")
|
104
|
+
end
|
94
105
|
|
95
106
|
## DATABASE TEST CASES
|
96
107
|
|
@@ -33,28 +33,46 @@ class SpecimenCollectionGroupTest < Test::Unit::TestCase
|
|
33
33
|
assert_equal(collection_event, @scg.collection_event, 'Collection event not set to default')
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
37
|
-
scg = CaTissue::SpecimenCollectionGroup.new
|
36
|
+
def test_prostatectomy_annotation
|
38
37
|
assert(CaTissue::SpecimenCollectionGroup.annotation_attribute?(:pathology))
|
39
|
-
pths = scg.pathology
|
38
|
+
pths = @scg.pathology
|
40
39
|
assert(pths.empty?, "Pathology annotations not empty at start")
|
41
40
|
pa = CaTissue::SpecimenCollectionGroup::Pathology::RadicalProstatectomyPathologyAnnotation.new
|
42
|
-
pa.merge_attributes(:
|
41
|
+
pa.merge_attributes(:specimen_collection_group => @scg)
|
43
42
|
assert_equal(1, pths.size, "SCG pathology proxy not created")
|
44
43
|
pth = pths.first
|
45
44
|
pas = pth.radical_prostatectomy_pathology_annotations
|
46
45
|
epx = CaTissue::SpecimenCollectionGroup::Pathology::ExtraprostaticExtension.new
|
47
46
|
epx.merge_attributes(:status => 'Present', :radical_prostatectomy_pathology_annotation => pa)
|
48
|
-
assert_not_nil(pas.first, "
|
49
|
-
assert_same(pa, pas.first, "
|
50
|
-
assert_same(pth, pa.pathology, "
|
51
|
-
assert_same(pth, pa.proxy, "
|
52
|
-
assert_same(scg, pth.hook, "
|
53
|
-
assert_same(scg, pa.hook, "
|
54
|
-
assert_not_nil(pa.extraprostatic_extension, "#{pa} extraprostatic extension
|
47
|
+
assert_not_nil(pas.first, "#{@scg} prostatectomy annotation not added")
|
48
|
+
assert_same(pa, pas.first, "#{@scg} prostatectomy annotation incorrect")
|
49
|
+
assert_same(pth, pa.pathology, "#{@scg} prostatectomy annotation #{pa} proxy incorrect")
|
50
|
+
assert_same(pth, pa.proxy, "#{@scg} prostatectomy annotation proxy #{pa} alias incorrect")
|
51
|
+
assert_same(@scg, pth.hook, "#{@scg} prostatectomy annotation proxy hook incorrect")
|
52
|
+
assert_same(@scg, pa.hook, "#{@scg} prostatectomy annotation hook incorrect")
|
53
|
+
assert_not_nil(pa.extraprostatic_extension, "#{pa} extraprostatic extension incorrect")
|
55
54
|
assert_same(epx, pa.extraprostatic_extension, "{pa} extraprostatic extension incorrect")
|
56
55
|
end
|
57
56
|
|
57
|
+
def test_prostate_biopsy_annotation
|
58
|
+
pths = @scg.pathology
|
59
|
+
assert(pths.empty?, "Pathology annotations not empty at start")
|
60
|
+
pa = CaTissue::SpecimenCollectionGroup::Pathology::NeedleBiopsyProstatePathologyAnnotation.new
|
61
|
+
pa.merge_attributes(:specimen_procedure => 'Biopsy', :specimen_collection_group => @scg)
|
62
|
+
invn = CaTissue::SpecimenCollectionGroup::Pathology::Invasion.new
|
63
|
+
invn.merge_attributes(:lymphatic_invasion => 'Present', :base_solid_tissue_pathology_annotation => pa)
|
64
|
+
assert_equal(1, pths.size, "SCG pathology proxy not created")
|
65
|
+
pth = pths.first
|
66
|
+
pas = pth.needle_biopsy_prostate_pathology_annotations
|
67
|
+
assert_not_nil(pas.first, "#{@scg} prostate biopsy annotation not added")
|
68
|
+
assert_same(pa, pas.first, "#{@scg} prostate biopsy annotation incorrect")
|
69
|
+
assert_same(pth, pa.pathology, "#{@scg} prostate biopsy annotation #{pa} proxy incorrect")
|
70
|
+
assert_same(pth, pa.proxy, "#{@scg} prostate biopsy annotation proxy #{pa} alias incorrect")
|
71
|
+
assert_same(@scg, pth.hook, "#{@scg} prostate biopsy annotation proxy #{pth} hook incorrect")
|
72
|
+
assert_same(@scg, pa.hook, "#{@scg} prostate biopsy annotation hook incorrect")
|
73
|
+
assert_same(invn, pa.invasion, "#{@scg} prostate biopsy annotation #{pa} invasion incorrect")
|
74
|
+
end
|
75
|
+
|
58
76
|
def test_collect
|
59
77
|
scg = CaTissue::SpecimenCollectionGroup.new
|
60
78
|
cdt = DateTime.now
|
@@ -245,7 +263,7 @@ class SpecimenCollectionGroupTest < Test::Unit::TestCase
|
|
245
263
|
verify_save(scg)
|
246
264
|
end
|
247
265
|
|
248
|
-
def
|
266
|
+
def test_save_prostatectomy_annotation
|
249
267
|
pa = CaTissue::SpecimenCollectionGroup::Pathology::RadicalProstatectomyPathologyAnnotation.new
|
250
268
|
pa.specimen_collection_group = @scg
|
251
269
|
htype = CaTissue::SpecimenCollectionGroup::Pathology::HistologicType.new
|
@@ -267,6 +285,38 @@ class SpecimenCollectionGroupTest < Test::Unit::TestCase
|
|
267
285
|
assert_not_nil(margin.identifier, "#{@scg} annotation #{margin} not saved")
|
268
286
|
end
|
269
287
|
|
288
|
+
# Verifies that SCG create also creates the registered participant clinical annotation. This test
|
289
|
+
# exercises the {CaTissue::Database#finder_parameter} work-around.
|
290
|
+
def test_save_participant_annotation
|
291
|
+
reg = @scg.registration
|
292
|
+
pcl = reg.protocol
|
293
|
+
# unset the registration protocol until the protocol is created
|
294
|
+
reg.protocol = nil
|
295
|
+
# create the protocol
|
296
|
+
pcl.create
|
297
|
+
# reset the registration protocol to the now-existing CP
|
298
|
+
reg.protocol = pcl
|
299
|
+
# the SCG -> CPR -> participant
|
300
|
+
pnt = reg.participant
|
301
|
+
# make a participant annotation
|
302
|
+
lab = CaTissue::Participant::Clinical::LabAnnotation.new
|
303
|
+
lab.merge_attributes(:lab_test_name => 'Test Lab', :participant => pnt)
|
304
|
+
# save the SCG
|
305
|
+
verify_save(@scg)
|
306
|
+
# the SCG -> CPR -> participant annotation should be saved as well
|
307
|
+
assert_not_nil(lab.identifier, "#{@scg} participant #{pnt} annotation #{lab} not saved")
|
308
|
+
end
|
309
|
+
|
310
|
+
def test_save_prostate_biopsy_annotation
|
311
|
+
pa = CaTissue::SpecimenCollectionGroup::Pathology::NeedleBiopsyProstatePathologyAnnotation.new
|
312
|
+
pa.merge_attributes(:specimen_procedure => 'Biopsy', :specimen_collection_group => @scg)
|
313
|
+
invn = CaTissue::SpecimenCollectionGroup::Pathology::Invasion.new
|
314
|
+
invn.merge_attributes(:lymphatic_invasion => 'Present', :base_solid_tissue_pathology_annotation => pa)
|
315
|
+
verify_save(pa)
|
316
|
+
assert_not_nil(pa.identifier, "#{@scg} annotation #{pa} not saved")
|
317
|
+
assert_not_nil(invn.identifier, "#{@scg} annotation #{invn} not saved")
|
318
|
+
end
|
319
|
+
|
270
320
|
# Tests saving a participant lab annotation indirectly by saving a SCG.
|
271
321
|
def test_save_lab_annotation_by_saving_scg
|
272
322
|
pnt = @scg.collection_protocol_registration.participant
|
@@ -164,7 +164,6 @@ class SpecimenTest < Test::Unit::TestCase
|
|
164
164
|
|
165
165
|
# Verifies that caRuby Tissue is compatible with both the caTissue 1.1 and 1.2 Specimen annotation class names.
|
166
166
|
def test_rename
|
167
|
-
assert_same(CaTissue::Specimen::Pathology::ProstateSpecimenPathologyAnnotation, CaTissue::Specimen::Pathology::ProstatePathologyAnnotation, "caTissue 1.2 annotation class rename unsupported")
|
168
167
|
assert_same(CaTissue::Specimen::Pathology::SpecimenAdditionalFinding, CaTissue::Specimen::Pathology::AdditionalFinding, "caTissue 1.2 annotation class rename unsupported")
|
169
168
|
assert_same(CaTissue::Specimen::Pathology::SpecimenBaseSolidTissuePathologyAnnotation, CaTissue::Specimen::Pathology::SpecimenBaseSolidTissuePathologyAnnotation, "caTissue 1.2 annotation class rename unsupported")
|
170
169
|
assert_same(CaTissue::Specimen::Pathology::SpecimenDetails, CaTissue::Specimen::Pathology::Details, "caTissue 1.2 annotation class rename unsupported")
|
@@ -192,8 +192,8 @@ module CaTissue
|
|
192
192
|
# @param [Resource] actual the fetched value
|
193
193
|
def verify_that_saved_matches_fetched(expected, actual)
|
194
194
|
expected.class.saved_nondomain_attributes.each do |attr|
|
195
|
-
#
|
196
|
-
#
|
195
|
+
# available_quantity broken for spc type Not Specified; see quirk above.
|
196
|
+
# TODO - Compare attributes that are fetched and set on create.
|
197
197
|
attr_md = expected.class.attribute_metadata(attr)
|
198
198
|
if verify_saved_attribute?(attr_md) then
|
199
199
|
eval = expected.database.lazy_loader.suspend { expected.send(attr) }
|
@@ -8,7 +8,7 @@ module CaTissue
|
|
8
8
|
shims CollectionProtocol, CollectionProtocolEvent, Site, StorageContainer, User
|
9
9
|
|
10
10
|
class CollectionProtocol
|
11
|
-
# Augments
|
11
|
+
# Augments {CaRuby::Migratable#migrate} for the Galena example by adding the following defaults:
|
12
12
|
# * the CP principal_investigator defaults to the {Galena::Seed::Defaults#protocol} PI
|
13
13
|
# * if the sites is empty, then the {Galena::Seed::Defaults#tissue_bank} is added
|
14
14
|
# to the CP sites
|
@@ -35,7 +35,7 @@ module CaTissue
|
|
35
35
|
end
|
36
36
|
|
37
37
|
class CollectionProtocolEvent
|
38
|
-
# Augments
|
38
|
+
# Augments {CaRuby::Migratable#migrate} for the example by adding the following defaults:
|
39
39
|
# * create a {CaTissue::TissueSpecimenRequirement}
|
40
40
|
# * copy the event point from the matching {Galena::Seed::Defaults} CPE, if any
|
41
41
|
#
|
@@ -57,7 +57,7 @@ module CaTissue
|
|
57
57
|
end
|
58
58
|
|
59
59
|
class Site
|
60
|
-
# Augments
|
60
|
+
# Augments {CaRuby::Migratable#migrate} for the example by merging the content of the
|
61
61
|
# {Galena::Seed::Defaults} site which matches on this Site's name, if any.
|
62
62
|
#
|
63
63
|
# @param (see CaRuby::Migratable#migrate)
|
@@ -76,7 +76,7 @@ module CaTissue
|
|
76
76
|
end
|
77
77
|
|
78
78
|
class StorageContainer
|
79
|
-
# Augments
|
79
|
+
# Augments {CaRuby::Migratable#migrate} for the example by setting the
|
80
80
|
# the container site and type to the {Galena::Seed::Defaults}
|
81
81
|
# box site and type, resp.
|
82
82
|
#
|
@@ -89,7 +89,7 @@ module CaTissue
|
|
89
89
|
end
|
90
90
|
|
91
91
|
class User
|
92
|
-
# Augments
|
92
|
+
# Augments {CaRuby::Migratable#migrate} for the example as follows:
|
93
93
|
# * infer the first and last name from the email address
|
94
94
|
# * copy the address and organizations from the tissue bank coordinator
|
95
95
|
#
|
@@ -44,13 +44,17 @@ module Galena
|
|
44
44
|
opts[:target] ||= CaTissue::TissueSpecimen
|
45
45
|
opts[:mapping] ||= File.join(CONFIGS, "#{fixture}_fields.yaml")
|
46
46
|
unless opts.has_key?(:defaults) then
|
47
|
-
|
48
|
-
if File.exists?(
|
47
|
+
f = File.join(CONFIGS, "#{fixture}_defaults.yaml")
|
48
|
+
if File.exists?(f) then opts[:defaults] = f end
|
49
|
+
end
|
50
|
+
unless opts.has_key?(:filters) then
|
51
|
+
f = File.join(CONFIGS, "#{fixture}_values.yaml")
|
52
|
+
if File.exists?(f) then opts[:filters] = f end
|
49
53
|
end
|
50
54
|
unless opts.has_key?(:shims) then
|
51
|
-
|
52
|
-
if File.exists?(
|
53
|
-
opts[:shims] = [
|
55
|
+
f = File.join(SHIMS, "#{fixture}_shims.rb")
|
56
|
+
if File.exists?(f) then
|
57
|
+
opts[:shims] = [f]
|
54
58
|
end
|
55
59
|
end
|
56
60
|
mgtr = super
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caruby-tissue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 5
|
10
|
+
version: 1.5.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- OHSU
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 9
|
30
30
|
segments:
|
31
31
|
- 1
|
32
32
|
- 5
|
33
|
-
-
|
34
|
-
version: 1.5.
|
33
|
+
- 5
|
34
|
+
version: 1.5.5
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
description: " The caruby-tissue gem applies the caRuby facade to the caTissue application.\n"
|
@@ -52,23 +52,14 @@ files:
|
|
52
52
|
- bin/crtextract
|
53
53
|
- bin/crtmigrate
|
54
54
|
- bin/crtsmoke
|
55
|
-
- conf/extract/simple_fields.yaml
|
56
|
-
- conf/migration/filter_fields.yaml
|
57
|
-
- conf/migration/filter_migration.yaml
|
58
|
-
- conf/migration/frozen_fields.yaml
|
59
|
-
- conf/migration/frozen_migration.yaml
|
60
|
-
- conf/migration/general_fields.yaml
|
61
|
-
- conf/migration/general_migration.yaml
|
62
|
-
- conf/migration/simple_fields.yaml
|
63
|
-
- conf/migration/simple_migration.yaml
|
64
|
-
- conf/migration/small_fields.yaml
|
65
|
-
- conf/migration/small_migration.yaml
|
66
55
|
- conf/wustl/log4j.properties
|
67
56
|
- examples/galena/bin/seed
|
68
57
|
- examples/galena/conf/extract/simple_fields.yaml
|
69
58
|
- examples/galena/conf/migration/annotation_defaults.yaml
|
70
59
|
- examples/galena/conf/migration/annotation_fields.yaml
|
60
|
+
- examples/galena/conf/migration/filter_defaults.yaml
|
71
61
|
- examples/galena/conf/migration/filter_fields.yaml
|
62
|
+
- examples/galena/conf/migration/filter_values.yaml
|
72
63
|
- examples/galena/conf/migration/frozen_defaults.yaml
|
73
64
|
- examples/galena/conf/migration/frozen_fields.yaml
|
74
65
|
- examples/galena/conf/migration/general_fields.yaml
|
@@ -1,7 +0,0 @@
|
|
1
|
-
Protocol: CollectionProtocol.title
|
2
|
-
MRN: ParticipantMedicalIdentifier.medical_record_number
|
3
|
-
Initials: Participant.first_name, Participant.last_name
|
4
|
-
Frozen?: TissueSpecimen.specimen_type
|
5
|
-
SPN: SpecimenCollectionGroup.surgical_pathology_number
|
6
|
-
Collection Date: ReceivedEventParameters.timestamp
|
7
|
-
Quantity: TissueSpecimen.initial_quantity
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# This is the Galena filter example migration configuration file.
|
2
|
-
|
3
|
-
# The field heading => CaTissue mapping file.
|
4
|
-
mapping: examples/galena/conf/migration/filter_fields.yaml
|
5
|
-
|
6
|
-
# The filter code.
|
7
|
-
shims: examples/galena/lib/galena/migration/filter_shims.rb
|
8
|
-
|
9
|
-
target: TissueSpecimen
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# This is the Galena frozen example migration field mapping file.
|
2
|
-
# This example extends the simple migration with storage fields
|
3
|
-
# and the frozen defaults.
|
4
|
-
|
5
|
-
MRN: ParticipantMedicalIdentifier.medical_record_number, Participant.last_name
|
6
|
-
SPN: SpecimenCollectionGroup.surgical_pathology_number
|
7
|
-
Collection Date: ReceivedEventParameters.timestamp
|
8
|
-
Quantity: TissueSpecimen.initial_quantity
|
9
|
-
Box: SpecimenPosition.container.name
|
10
|
-
X: SpecimenPosition.position_dimension_one
|
11
|
-
Y: SpecimenPosition.position_dimension_two
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# This is the Galena frozen example migration configuration file.
|
2
|
-
# The frozen example extends the simple example with storage fields
|
3
|
-
# and shims.
|
4
|
-
|
5
|
-
mapping: examples/galena/conf/migration/frozen_fields.yaml
|
6
|
-
|
7
|
-
shims: examples/galena/lib/galena/migration/frozen_shims.rb
|
8
|
-
|
9
|
-
target: TissueSpecimen
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# This is the Galena general example migration field mapping file in the format:
|
2
|
-
# input field: caTissue property
|
3
|
-
|
4
|
-
Protocol: CollectionProtocol.title
|
5
|
-
|
6
|
-
Collection Site: Site.name
|
7
|
-
|
8
|
-
SPN: SpecimenCollectionGroup.surgical_pathology_number
|
9
|
-
|
10
|
-
PPI: CollectionProtocolRegistration.protocol_participant_identifier
|
11
|
-
|
12
|
-
MRN: ParticipantMedicalIdentifier.medical_record_number
|
13
|
-
|
14
|
-
First Name: Participant.first_name
|
15
|
-
|
16
|
-
Last Name: Participant.last_name
|
17
|
-
|
18
|
-
Collection Point: CollectionProtocolEvent.event_point
|
19
|
-
|
20
|
-
Receiver: ReceivedEventParameters.user.login_name
|
21
|
-
|
22
|
-
Received Timestamp: ReceivedEventParameters.timestamp
|
23
|
-
|
24
|
-
Collector: CollectionEventParameters.user.login_name
|
25
|
-
|
26
|
-
Collected Timestamp: CollectionEventParameters.timestamp
|
27
|
-
|
28
|
-
Diagnosis: SpecimenCollectionGroup.clinical_diagnosis
|
29
|
-
|
30
|
-
Anatomic Site: SpecimenCharacteristics.tissue_site
|
31
|
-
|
32
|
-
Development: TissueSpecimen.pathological_status
|
33
|
-
|
34
|
-
Label: TissueSpecimen.label
|
35
|
-
|
36
|
-
Type: TissueSpecimen.specimen_type
|
37
|
-
|
38
|
-
Quantity: TissueSpecimen.initial_quantity
|
39
|
-
|
40
|
-
Box: SpecimenPosition.container.name
|
41
|
-
|
42
|
-
X: SpecimenPosition.position_dimension_one
|
43
|
-
|
44
|
-
Y: SpecimenPosition.position_dimension_two
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# This is the Galena simple example migration field mapping file.
|
2
|
-
# Each entry is in the format:
|
3
|
-
# heading: paths
|
4
|
-
# The heading is the CSV file label in the leading heading record.
|
5
|
-
# The paths is a comma-separated list of CaTissue domain object attribute paths specifying
|
6
|
-
# how the CSV heading maps to a CaTissue attribute value. Each attribute path is in the format:
|
7
|
-
# class.attribute[.attribute]
|
8
|
-
# where class is a CaTissue class and attribute is a Ruby accessor method defined in the CaTissue class.
|
9
|
-
# The accessor method can be one of the following:
|
10
|
-
# * a Java property name, e.g. lastName
|
11
|
-
# * the pre-defined Rubyized underscore form of the Java property, e.g. last_name
|
12
|
-
|
13
|
-
# The collection protocol title for the specimen
|
14
|
-
Protocol: CollectionProtocol.title
|
15
|
-
|
16
|
-
# The input MRN field is used for the PMI MRN, CPR PPI and Participant last name.
|
17
|
-
# Since the migration source is for a single collection site, the MRN is unique within the protocol.
|
18
|
-
# The simple input does not have a Participant name field. It is a useful practice to set the caTissue
|
19
|
-
# name to some value, since caTissue uses the name for display and sorting. For want of a better
|
20
|
-
# value, the name is set to the MRN.
|
21
|
-
MRN: ParticipantMedicalIdentifier.medical_record_number, Participant.last_name
|
22
|
-
|
23
|
-
# The input SPN field is the SCG SPN value.
|
24
|
-
SPN: SpecimenCollectionGroup.surgical_pathology_number
|
25
|
-
|
26
|
-
# The input Collection Date is the Specimen received timestamp.
|
27
|
-
Collection Date: ReceivedEventParameters.timestamp
|
28
|
-
|
29
|
-
# The input Quantity is the target Specimen initial quantity.
|
30
|
-
Quantity: Specimen.initial_quantity
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# This is the Galena example tiny migration field mapping file.
|
2
|
-
# This example input has all of the fields necessary to create a specimen.
|
3
|
-
# The example does not use a shim.
|
4
|
-
|
5
|
-
# The collection protocol title for the specimen
|
6
|
-
Protocol: CollectionProtocol.title
|
7
|
-
|
8
|
-
# The input MRN field is used for the PMI MRN, CPR PPI and Participant last name
|
9
|
-
MRN: ParticipantMedicalIdentifier.medical_record_number, Participant.last_name
|
10
|
-
|
11
|
-
# The input SPN field is the SCG SPN value
|
12
|
-
SPN: SpecimenCollectionGroup.surgical_pathology_number
|
13
|
-
|
14
|
-
# The date the specimen was received
|
15
|
-
Received Date: ReceivedEventParameters.timestamp
|
16
|
-
|
17
|
-
# The specimen label
|
18
|
-
Label: TissueSpecimen.label
|
19
|
-
|
20
|
-
# The type of the specimen
|
21
|
-
Type: TissueSpecimen.specimen_type
|
22
|
-
|
23
|
-
# The specimen amount
|
24
|
-
Quantity: TissueSpecimen.initial_quantity
|