ruby-hl7-extensions 0.0.71 → 0.0.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/VERSION.yml +1 -1
- data/lib/core_ext/segments/pd1.rb +61 -0
- data/ruby-hl7-extensions.gemspec +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 874f371977dc5baf232fa0c75fe0c5a6f91a23c6
|
4
|
+
data.tar.gz: 7c3c296e519764c96f1dd3aa6989b2d968142614
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eaf7af2d515ddb22bfacbb1e1037ff5e1dea3b26e20510aa107d57d4c5048c1bc34770ecf4ac420f53c64a6b6095df15bdcd925365eccf59139c503ac067a97
|
7
|
+
data.tar.gz: 66506677d33d7015cac762f3b0839d2a4b381c443c315d5aa5d642d0a4d45be6ca20406e5154af5f3fe797d2782c768a085e247e7b84f891c0640452b7869de9
|
data/.gitignore
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-hl7-extensions-0.0.71.gem
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.72
|
data/VERSION.yml
CHANGED
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'ruby-hl7'
|
2
|
+
class HL7::Message::Segment::PD1 < HL7::Message::Segment
|
3
|
+
weight 5
|
4
|
+
|
5
|
+
add_field :living_dependency #1-2 character code
|
6
|
+
add_field :living_arrangement #1-2 character code
|
7
|
+
add_field :primary_facility #facility http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7%20v2.5.1&dataType=XON
|
8
|
+
add_field :primary_care_provider #provider http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7%20v2.5.1&dataType=XCN
|
9
|
+
add_field :student_indicator #1-2 character code
|
10
|
+
add_field :handicap #1-2 character code
|
11
|
+
add_field :living_will_code #1-2 character code
|
12
|
+
add_field :organ_donor_code #1-2 character code
|
13
|
+
add_field :separate_bill #1-2 character code
|
14
|
+
add_field :duplicate_patient #hash http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7%20v2.5.1&dataType=CX
|
15
|
+
add_field :publicity_code #hash http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7%20v2.5.1&dataType=CE
|
16
|
+
add_field :protection_indicator #Y or N
|
17
|
+
add_field :protection_indicator_effective_date do |value|
|
18
|
+
convert_to_ts(value)
|
19
|
+
end
|
20
|
+
add_field :place_of_worship #hash http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7%20v2.5.1&dataType=XON
|
21
|
+
add_field :advance_directive_code #hash http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7+v2.5.1&dataType=CE
|
22
|
+
add_field :immunization_registry_status #1 char code
|
23
|
+
add_field :immunization_registry_status_effective_date do |value|
|
24
|
+
convert_to_ts(value)
|
25
|
+
end #date
|
26
|
+
add_field :publicity_code_effective_date do |value|
|
27
|
+
convert_to_ts(value)
|
28
|
+
end #date
|
29
|
+
add_field :military_branch
|
30
|
+
add_field :military_rank
|
31
|
+
add_field :military_status
|
32
|
+
|
33
|
+
def to_hash
|
34
|
+
return @hash if @hash
|
35
|
+
|
36
|
+
hash = super.to_hash
|
37
|
+
|
38
|
+
if self.hash["primaryCareProvider"].blank?
|
39
|
+
hash["primaryCareProvider"] = {}
|
40
|
+
else
|
41
|
+
primaryCareProvider = self.hash["primaryCareProvider"].split("^") rescue Array.new(30) {|i|""}
|
42
|
+
hash["primaryCareProvider"] = {"id" => primaryCareProvider[0],
|
43
|
+
"lastName" => primaryCareProvider[1],
|
44
|
+
"firstName" => primaryCareProvider[2],
|
45
|
+
"middleInitOrName" => primaryCareProvider[3],
|
46
|
+
"suffix" => primaryCareProvider[4],
|
47
|
+
"prefix" => primaryCareProvider[5],
|
48
|
+
"degree" => primaryCareProvider[6],
|
49
|
+
"sourceTable" => primaryCareProvider[7],
|
50
|
+
"assigningAuthority" => primaryCareProvider[8],
|
51
|
+
"nameTypeCode" => primaryCareProvider[9],
|
52
|
+
"identifierCheckDigit" => primaryCareProvider[10],
|
53
|
+
"codeIdCheck" => primaryCareProvider[11],
|
54
|
+
"identifierTypeCode" => primaryCareProvider[12],
|
55
|
+
"assigningFacility" => primaryCareProvider[13]}
|
56
|
+
end
|
57
|
+
|
58
|
+
@hash = hash
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
data/ruby-hl7-extensions.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "ruby-hl7-extensions"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.72"
|
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/segments.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",
|
18
18
|
"lib/ruby-hl7-extensions.rb", "ruby-hl7-extensions.gemspec"]
|
19
19
|
s.homepage = "http://github.com/nmlynl/ruby-hl7-extensions"
|
20
20
|
s.rdoc_options = ["--charset=UTF-8"]
|
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.0.
|
4
|
+
version: 0.0.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Lega
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/core_ext/segments/obr.rb
|
65
65
|
- lib/core_ext/segments/obx.rb
|
66
66
|
- lib/core_ext/segments/orc.rb
|
67
|
+
- lib/core_ext/segments/pd1.rb
|
67
68
|
- lib/core_ext/segments/pid.rb
|
68
69
|
- lib/core_ext/segments/pv1.rb
|
69
70
|
- lib/core_ext/segments/rol.rb
|