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 +4 -4
- data/VERSION +1 -1
- data/VERSION.yml +1 -1
- data/lib/core_ext/segments/in1.rb +6 -2
- data/lib/core_ext/segments/pv1.rb +42 -0
- data/ruby-hl7-extensions.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30ee6dc65c27f5620fdb4c4ad14c21f96abbe1bb
|
4
|
+
data.tar.gz: bc99754d6c01fae7c53df5acc5140a157de78502
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 161d670daca9691ac64c41c8bfefa7ac7f3d1961505687e8b8d2aac27294cbef72e30eaa64f77c97c08d7d19689892799cf9521b4c19ff6e1a019681f0e2f410
|
7
|
+
data.tar.gz: e86e69c5d58304fed34bcd560fe2730974c10feeb79cc29d2827e203ce1033d2aec230ebc23dda5a535cca6f744bf748d9a95cb006666a5def92e1a2247e05dd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/VERSION.yml
CHANGED
@@ -25,8 +25,12 @@ module Extensions
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def insured_address
|
28
|
-
|
29
|
-
|
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
|
data/ruby-hl7-extensions.gemspec
CHANGED