ruby-hl7-extensions 0.2.1 → 0.2.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: 8f407691dbd0147a0740e0424b57a5ac0450c472
4
- data.tar.gz: 7e6f977155a0a24d210f28820847efb1d88e3689
3
+ metadata.gz: 72750619bb1957057d93f9205ccac89ea761441f
4
+ data.tar.gz: dc43b042ed961f81258654369dd828b94eb3b5fe
5
5
  SHA512:
6
- metadata.gz: 13696619fe12fd229599640378c3ce838e683935c78c643285391bd888feb3890cc577fa1565e1bee69bb88d64ced774b23c42bf1a70a09cf7a9a2dfa08ed566
7
- data.tar.gz: f5172dcc02491a84caf257e5105413a658e5a0d2293dd1a3490da315867f2b55773601c05cd08bb47bf7e289a2bdca391d862cb895da70713804d9729b4c70dd
6
+ metadata.gz: 4e58306192997814d98f915cad3da5f39832dee72d20b28a955055df32395a56931a324cebbd6ed697dadd3006a2a20b303c85b1e356f67968a5aa97a75a76ed
7
+ data.tar.gz: d22546638d519fcea06eca6dc681218137d203787d5fc34303fca459da35bc8fd65ea447e3286fa6f56f08b06afbab5a2f84a47ad890639580000efc9ec74be2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 1
4
+ :patch: 2
@@ -27,7 +27,7 @@ module Extensions
27
27
  end
28
28
 
29
29
  def mrn
30
- to_hash["internalId"]["id"]
30
+ to_hash["internalId"]["id"] || to_hash["pid.2"]["id"]
31
31
  end
32
32
 
33
33
  def gender
@@ -40,10 +40,14 @@ module Extensions
40
40
  patient_name = self.patient_name.split("^") rescue Array.new(10) {|i| "" }
41
41
  address = self.address.split("^") rescue Array.new(10) {|i| "" }
42
42
  patientAccountNumber = self.account_number.split("^") rescue Array.new(10) {|i| "" }
43
+ pid2 = self.patient_id.split("^") rescue Array.new(10) {|i| "" }
43
44
  internalId = self.patient_id_list.split("^") rescue Array.new(10) {|i| "" }
44
45
 
45
46
  @hash = super.to_hash
46
47
 
48
+ @hash["pid.2"] = {"id" => pid2[0], "check_digit" => pid2[1], "check_digit_scheme" => pid2[2],
49
+ "assigning_authority" => pid2[3], "type" => pid2[4], "assigning_facility" => pid2[5]}
50
+
47
51
  @hash["internalId"] = {"id" => internalId[0], "check_digit" => internalId[1], "check_digit_scheme" => internalId[2],
48
52
  "assigning_authority" => internalId[3], "type" => internalId[4], "assigning_facility" => internalId[5]}
49
53
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby-hl7-extensions"
6
- s.version = "0.2.1"
6
+ s.version = "0.2.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"]
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Lega