caruby-tissue 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,6 +1,10 @@
1
1
  This history lists major release themes. See the GitHub commits (https://github.com/caruby/tissue)
2
2
  for change details.
3
3
 
4
+ 2.1.3 / 2012-04-13
5
+ ------------------
6
+ * Fix example.
7
+
4
8
  2.1.2 / 2012-04-13
5
9
  ------------------
6
10
  * Add caruby-core dependency.
@@ -49,17 +49,19 @@ Migrate the Galena `simple` example as follows:
49
49
 
50
50
  This command initializes the administrative objects in the Galena test database,
51
51
  including the Galena collection protocol, site, cancer center, tissue bank and coordinator.
52
+
53
+ 3. Run `crtmigrate --help` to see the migration options.
52
54
 
53
- 3. Run the following:
55
+ 4. Run the following:
54
56
 
55
- `crtmigrate --target TissueSpecimen --mapping conf/simple/fields.yaml data/simple.csv`
57
+ `crtmigrate --target TissueSpecimen --mapping conf/simple/fields.yaml --defaults conf/defaults.yaml data/simple.csv`
56
58
 
57
59
  This command migrates the CSV record in the `simple.csv` input file into a caTissue
58
60
  `TissueSpecimen` based on the `simple/fields.yaml` mapping file.
59
61
  Peruse the configuration and data files to see which data are migrated and
60
62
  where this data ends up in caTissue.
61
63
 
62
- 4. Open the caTissue application on the test server and verify the content of the
64
+ 5. Open the caTissue application on the test server and verify the content of the
63
65
  Galena CP collection protocol.
64
66
 
65
67
  The other examples are run in a similar manner. Each example demonstrates different
@@ -69,10 +71,6 @@ features of the caRuby Migration utility as follows:
69
71
 
70
72
  `crtmigrate --target CollectionProtocolRegistration --mapping conf/registration/fields.yaml --defaults conf/defaults.yaml data/registration.csv`
71
73
 
72
- * <tt>simple</tt> - migrates one specimen with limited input fields
73
-
74
- `crtmigrate --target TissueSpecimen --mapping conf/simple/fields.yaml --defaults conf/defaults.yaml data/simple.csv`
75
-
76
74
  * <tt>general</tt> - migrates specimens with lots of input fields and a minimal configuration
77
75
 
78
76
  `crtmigrate --target TissueSpecimen --mapping conf/general/fields.yaml data/general.csv`
@@ -87,11 +85,15 @@ features of the caRuby Migration utility as follows:
87
85
 
88
86
  * <tt>annotation</tt> - annotates the specimens with Dynamic Extensions
89
87
 
90
- `crtmigrate --target SpecimenCollectionGroup::Pathology::RadicalProstatectomyPathologyAnnotation --mapping conf/annotation/fields.yaml --defaults conf/defaults.yaml,conf/annotation/defaults.yaml data/annotation.csv`
88
+ `crtmigrate --debug --log log/galena.log --target SpecimenCollectionGroup::Pathology::RadicalProstatectomyPathologyAnnotation --mapping conf/annotation/fields.yaml --defaults conf/defaults.yaml,conf/annotation/defaults.yaml data/annotation.csv`
91
89
 
92
- Try running an example with the `--debug` flag and look at the `log/migration.log` file to see
90
+ The annotation migration prints debug log messages. Take a look at the `log/migration.log` file to see
93
91
  what caRuby is up to behind the scenes (hint: a lot!).
94
92
 
93
+ The `--unique` flag is useful for testing. This flag places the migrated objects in a unique name space with their own collection protocol.
94
+
95
+ If you have a lot of records to migrate, the `--verbose` flag prints the migration progress.
96
+
95
97
  Input data
96
98
  ----------
97
99
  The sample Galena Tissue Bank CSV input files hold one row for each specimen.
@@ -99,8 +99,7 @@ module Galena
99
99
  # CPE has default 1.0 event point and label
100
100
  cpe = CaTissue::CollectionProtocolEvent.new(
101
101
  :collection_protocol => @protocol,
102
- :event_point => 1.0,
103
- :label => 'Galena Migration_1'
102
+ :event_point => 1.0
104
103
  )
105
104
 
106
105
  # The sole specimen requirement. Setting the requirement collection_event attribute to a CPE automatically
@@ -319,7 +319,14 @@ module CaTissue
319
319
  end
320
320
  rcvr = cp.coordinators.first
321
321
  if rcvr.nil? then
322
- raise Jinx::ValidationError.new("SCG with status Complete default CollectionEventParameters could not be created since there is no collection protocol coordinator: #{self}")
322
+ # Try to fetch the CP
323
+ if cp.identifier.nil? then
324
+ cp.find
325
+ rcvr = cp.coordinators.first
326
+ if rcvr.nil? then
327
+ raise Jinx::ValidationError.new("SCG with status Complete default CollectionEventParameters could not be created since there is no collection protocol coordinator: #{self}")
328
+ end
329
+ end
323
330
  end
324
331
  # make the REP
325
332
  ev = CaTissue::SpecimenEventParameters.create_parameters(:received, self, :user => rcvr)
@@ -1,6 +1,6 @@
1
1
  module CaTissue
2
2
  # The version of this caRuby Tissue release.
3
- VERSION = "2.1.2"
3
+ VERSION = "2.1.3"
4
4
 
5
5
  # The supported caTissue release versions.
6
6
  CATISSUE_VERSIONS = "1.1.2-1.2"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: caruby-tissue
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.1.2
5
+ version: 2.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - OHSU