22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/module/sltung.rb', line 22
def self.get_situation(text)
hash = {}
hash[:hospital] = "sltung"
text.split(":").each_with_index do |each_text, index|
next if index == 0
if index == 1
hash[:to_119] = each_text.initial
elsif index == 2
hash[:wait_see] = each_text.initial
elsif index == 3
hash[:wait_push_bed] = each_text.initial
elsif index == 4
hash[:wait_bed] = each_text.initial
elsif index == 5
hash[:wait_cure_bed] = each_text.initial
end
end
return hash
end
|