|
|
@ -148,6 +148,7 @@ module Imports |
|
|
|
attributes["la_known"] = 1 # Defaulting to Yes (Required) |
|
|
|
attributes["la_known"] = 1 # Defaulting to Yes (Required) |
|
|
|
attributes["created_at"] = Date.parse(field_value(xml_doc, "meta", "created-date")) |
|
|
|
attributes["created_at"] = Date.parse(field_value(xml_doc, "meta", "created-date")) |
|
|
|
attributes["updated_at"] = Date.parse(field_value(xml_doc, "meta", "modified-date")) |
|
|
|
attributes["updated_at"] = Date.parse(field_value(xml_doc, "meta", "modified-date")) |
|
|
|
|
|
|
|
attributes |
|
|
|
|
|
|
|
|
|
|
|
# Pending validation with new form |
|
|
|
# Pending validation with new form |
|
|
|
# case_log = CaseLog.new(attributes) |
|
|
|
# case_log = CaseLog.new(attributes) |
|
|
@ -320,8 +321,6 @@ module Imports |
|
|
|
"X" |
|
|
|
"X" |
|
|
|
when "Refused" |
|
|
|
when "Refused" |
|
|
|
"R" |
|
|
|
"R" |
|
|
|
else |
|
|
|
|
|
|
|
nil |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -336,8 +335,6 @@ module Imports |
|
|
|
"X" |
|
|
|
"X" |
|
|
|
when "Refused" |
|
|
|
when "Refused" |
|
|
|
"R" |
|
|
|
"R" |
|
|
|
else |
|
|
|
|
|
|
|
nil |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -392,11 +389,7 @@ module Imports |
|
|
|
|
|
|
|
|
|
|
|
def string_or_nil(xml_doc, attribute) |
|
|
|
def string_or_nil(xml_doc, attribute) |
|
|
|
str = field_value(xml_doc, "xmlns", attribute) |
|
|
|
str = field_value(xml_doc, "xmlns", attribute) |
|
|
|
if str.blank? |
|
|
|
str.presence |
|
|
|
nil |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
str |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def ethnic_group(ethnic) |
|
|
|
def ethnic_group(ethnic) |
|
|
@ -419,8 +412,6 @@ module Imports |
|
|
|
when 17 |
|
|
|
when 17 |
|
|
|
# Refused |
|
|
|
# Refused |
|
|
|
5 |
|
|
|
5 |
|
|
|
else |
|
|
|
|
|
|
|
nil |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -456,6 +447,5 @@ module Imports |
|
|
|
0 |
|
|
|
0 |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|