ruby-hl7-extensions 0.1.2 → 0.1.3

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: 443418d6dbdfc5a8552d30a78ace38485aace0fd
4
- data.tar.gz: a92e24fa561d01f0dbf99971305bdd00b7b5a7c2
3
+ metadata.gz: 30ee6dc65c27f5620fdb4c4ad14c21f96abbe1bb
4
+ data.tar.gz: bc99754d6c01fae7c53df5acc5140a157de78502
5
5
  SHA512:
6
- metadata.gz: c1ac95c7a58ab511820cd9fc9dc58533ab474ca3707119dabab38d024d7b03c821d71fcf03bca0ecc6552e1a5442a24380a4871f8235b3ae91a7af1dcf5fb4bd
7
- data.tar.gz: 940c7beafe04abe8940a53d09504e7d0854cfdab00a788fd47fe461919119d834f0b04b3fb562de3510661c823a3959c80d2c0375eabc6431313ddd1057aba43
6
+ metadata.gz: 161d670daca9691ac64c41c8bfefa7ac7f3d1961505687e8b8d2aac27294cbef72e30eaa64f77c97c08d7d19689892799cf9521b4c19ff6e1a019681f0e2f410
7
+ data.tar.gz: e86e69c5d58304fed34bcd560fe2730974c10feeb79cc29d2827e203ce1033d2aec230ebc23dda5a535cca6f744bf748d9a95cb006666a5def92e1a2247e05dd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 2
4
+ :patch: 3
@@ -25,8 +25,12 @@ module Extensions
25
25
  end
26
26
 
27
27
  def insured_address
28
- address1, address2, city, state, zip = self.value_for_field("19").split(@item_delim)
29
- "#{address1}#{address2.blank? ? "," : ", #{address2},"} #{city}, #{state}, #{zip}"
28
+ if self.value_for_field("19")
29
+ address1, address2, city, state, zip = self.value_for_field("19").split(@item_delim)
30
+ "#{address1}#{address2.blank? ? "," : ", #{address2},"} #{city}, #{state}, #{zip}"
31
+ else
32
+ ""
33
+ end
30
34
  end
31
35
  end
32
36
  end
@@ -10,6 +10,48 @@ module Extensions
10
10
 
11
11
  module InstanceMethods
12
12
 
13
+ def discharge_disposition_str
14
+ retval = self.value_for_field("36") rescue ""
15
+ case retval
16
+ when "01","1",1
17
+ retval = "Discharged to home or self care (routine discharge)"
18
+ when "02","2",2
19
+ retval = "Discharged/transferred to another short term general hospital for inpatient care"
20
+ when "03","3",3
21
+ retval = "Discharged/transferred to skilled nursing facility (SNF)"
22
+ when "04","4",4
23
+ retval = "Discharged/transferred to an intermediate care facility (ICF)"
24
+ when "05","5",5
25
+ retval = "Discharged/transferred to another type of institution for inpatient care or referred for outpatient services to another institution"
26
+ when "06","6",6
27
+ retval = "Discharged/transferred to home under care of organized home health service organization"
28
+ when "07","7",7
29
+ retval = "Left against medical advice or discontinued care"
30
+ when "08","8",8
31
+ retval = "Discharged/transferred to home under care of Home IV provider"
32
+ when "09","9",9
33
+ retval = "Admitted as an inpatient to this hospital"
34
+ when "10","11","12","13","14","15","16","17","18","19","010","011","012","013","014","015","016","017","018","019",10,11,12,13,14,15,16,17,18,19
35
+ retval = "Discharge to be defined at state level, if necessary"
36
+ when "20","020",20
37
+ retval = "Expired (i.e. dead)"
38
+ when "21","22","23","24","25","26","27","28","29","021","022","023","024","025","026","027","028","029",21,22,23,24,25,26,27,28,29
39
+ retval = "Expired to be defined at state level, if necessary"
40
+ when "30","030",30
41
+ retval = "Still patient or expected to return for outpatient services (i.e. still a patient)"
42
+ when "31","32","33","34","35","36","37","38","39","031","032","033","034","035","036","037","038","039",31,32,33,34,35,36,37,38,39
43
+ retval = "Still patient to be defined at state level, if necessary (i.e. still a patient)"
44
+ when "40","040",40
45
+ retval = "Expired (i.e. died) at home"
46
+ when "41","041",41
47
+ retval = "Expired (i.e. died) in a medical facility; e.g., hospital, SNF, ICF, or free standing hospice"
48
+ when "42","042",42
49
+ retval = "Expired (i.e. died) - place unknown"
50
+ end
51
+
52
+ retval
53
+ end
54
+
13
55
  def assigned_location_str
14
56
  location = self.assigned_location.split(self.item_delim)
15
57
  point_of_care = location[0] rescue nil
@@ -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.2"
6
+ s.version = "0.1.3"
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Lega