ruby-hl7-extensions 0.1.1 → 0.1.2

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: f38198718bb77f3662ab948656518093f1ef5aec
4
- data.tar.gz: 6911f78b0d4cd3a7975a2dbfda7cea3de3cc5902
3
+ metadata.gz: 443418d6dbdfc5a8552d30a78ace38485aace0fd
4
+ data.tar.gz: a92e24fa561d01f0dbf99971305bdd00b7b5a7c2
5
5
  SHA512:
6
- metadata.gz: 846029a167bd39045c4b28155ccf5388d45480af8478232af1e9c9e5454d5c2b4621af7bdde8aced385da5fb2b6339a0fc049186052019d4ec1c63bd297da02f
7
- data.tar.gz: 902d77ae34cc0be36690264a5b94a06bb4c98327e1b42d044b26d03c55e2eed715db1c58f0df56c8f7b67162cdd9c646e27f3e3986628b3ca5a68adedf595d3a
6
+ metadata.gz: c1ac95c7a58ab511820cd9fc9dc58533ab474ca3707119dabab38d024d7b03c821d71fcf03bca0ecc6552e1a5442a24380a4871f8235b3ae91a7af1dcf5fb4bd
7
+ data.tar.gz: 940c7beafe04abe8940a53d09504e7d0854cfdab00a788fd47fe461919119d834f0b04b3fb562de3510661c823a3959c80d2c0375eabc6431313ddd1057aba43
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 1
4
+ :patch: 2
@@ -57,6 +57,14 @@ module Extensions
57
57
  end
58
58
  end
59
59
 
60
+ if self[:ZNP]
61
+ znp = self[:ZNP]
62
+ znp = [znp] unless znp.is_a?Array
63
+ znp.each do |z|
64
+ providers << {hash: z.provider_hash("znpProvider","ZNP"), segment: z}
65
+ end
66
+ end
67
+
60
68
  providers
61
69
  end
62
70
 
@@ -12,6 +12,7 @@ require 'core_ext/segments/err'
12
12
  require 'core_ext/segments/rol'
13
13
  require 'core_ext/segments/pd1'
14
14
  require 'segments/dg1'
15
+ require 'segments/znp'
15
16
  require 'core_ext/segments/dg1'
16
17
  require 'core_ext/segments/in1'
17
18
 
@@ -0,0 +1,37 @@
1
+ require 'ruby-hl7'
2
+ class HL7::Message::Segment::ZNP < HL7::Message::Segment
3
+ add_field :custom_field_1
4
+ add_field :custom_field_2
5
+ add_field :custom_field_3
6
+ add_field :custom_field_4
7
+ add_field :custom_field_5
8
+ add_field :custom_field_6
9
+ add_field :custom_field_7
10
+ add_field :custom_field_8
11
+ add_field :custom_field_9
12
+ add_field :custom_field_10
13
+ add_field :custom_field_11
14
+ add_field :custom_field_12
15
+ add_field :custom_field_13
16
+ add_field :custom_field_14
17
+ add_field :custom_field_15
18
+ add_field :custom_field_16
19
+ add_field :custom_field_17
20
+ add_field :custom_field_18
21
+ add_field :custom_field_19
22
+ add_field :custom_field_20
23
+
24
+ def to_hash
25
+ return @hash if @hash
26
+
27
+ hash = super.to_hash
28
+ hash["id"] = hash["customField2"]
29
+ hash["npi"] = hash["customField2"]
30
+ hash
31
+ end
32
+
33
+ def provider_hash(key,code)
34
+ to_hash.merge({"providerType"=>code})
35
+ end
36
+
37
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby-hl7-extensions"
6
- s.version = "0.1.1"
6
+ s.version = "0.1.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.extra_rdoc_files = ["LICENSE", "README.md"]
15
15
  s.files = [".gitignore", "Gemfile", "Gemfile.lock", "LICENSE", "README.md", "Rakefile", "VERSION", "VERSION.yml", "lib/core_ext/segments/rol.rb",
16
16
  "lib/core_ext/message.rb", "lib/core_ext/segment.rb", "lib/core_ext/segments/err.rb", "lib/core_ext/segments/sft.rb",
17
- "lib/core_ext/segments/msh.rb", "lib/core_ext/segments/nk1.rb", "lib/core_ext/segments/orc.rb", "lib/core_ext/segments/evn.rb", "lib/core_ext/segments/nte.rb", "lib/core_ext/segments/obr.rb", "lib/core_ext/segments/obx.rb", "lib/core_ext/segments/pid.rb", "lib/core_ext/segments/pv1.rb", "lib/core_ext/segments/pd1.rb", "lib/core_ext/segments/segments.rb", "lib/core_ext/segments/dg1.rb", "lib/core_ext/segments/in1.rb", "lib/segments/dg1.rb", "lib/ruby-hl7-extensions.rb", "ruby-hl7-extensions.gemspec"]
17
+ "lib/core_ext/segments/msh.rb", "lib/core_ext/segments/nk1.rb", "lib/core_ext/segments/orc.rb", "lib/core_ext/segments/evn.rb", "lib/core_ext/segments/nte.rb", "lib/core_ext/segments/obr.rb", "lib/core_ext/segments/obx.rb", "lib/core_ext/segments/pid.rb", "lib/core_ext/segments/pv1.rb", "lib/core_ext/segments/pd1.rb", "lib/core_ext/segments/segments.rb", "lib/core_ext/segments/dg1.rb", "lib/core_ext/segments/in1.rb", "lib/segments/dg1.rb", "lib/segments/znp.rb", "lib/ruby-hl7-extensions.rb", "ruby-hl7-extensions.gemspec"]
18
18
  s.homepage = "http://github.com/nmlynl/ruby-hl7-extensions"
19
19
  s.rdoc_options = ["--charset=UTF-8"]
20
20
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.6")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-hl7-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Lega
@@ -74,6 +74,7 @@ files:
74
74
  - lib/core_ext/segments/sft.rb
75
75
  - lib/ruby-hl7-extensions.rb
76
76
  - lib/segments/dg1.rb
77
+ - lib/segments/znp.rb
77
78
  - ruby-hl7-extensions.gemspec
78
79
  homepage: http://github.com/nmlynl/ruby-hl7-extensions
79
80
  licenses: []