Stéphane Meny
3 years ago
committed by
GitHub
44 changed files with 2111 additions and 746 deletions
@ -0,0 +1,392 @@
|
||||
module Imports |
||||
class CaseLogsImportService < ImportService |
||||
def create_logs(folder) |
||||
import_from(folder, :create_log) |
||||
end |
||||
|
||||
private |
||||
|
||||
GN_SH = { |
||||
general_needs: 1, |
||||
supported_housing: 2, |
||||
}.freeze |
||||
|
||||
SR_AR_IR = { |
||||
social_rent: 1, |
||||
affordable_rent: 2, |
||||
intermediate_rent: 3, |
||||
}.freeze |
||||
|
||||
# For providertype, values are reversed!!! |
||||
PRP_LA = { |
||||
private_registered_provider: 1, |
||||
local_authority: 2, |
||||
}.freeze |
||||
|
||||
IRPRODUCT = { |
||||
rent_to_buy: 1, |
||||
london_living_rent: 2, |
||||
other_intermediate_rent_product: 3, |
||||
}.freeze |
||||
|
||||
# These must match our form |
||||
RENT_TYPE = { |
||||
social_rent: 0, |
||||
affordable_rent: 1, |
||||
london_affordable_rent: 2, |
||||
rent_to_buy: 3, |
||||
london_living_rent: 4, |
||||
other_intermediate_rent_product: 5, |
||||
}.freeze |
||||
|
||||
def create_log(xml_doc) |
||||
attributes = {} |
||||
|
||||
# Required fields for status complete or logic to work |
||||
# Note: order matters when we derive from previous values (attributes parameter) |
||||
attributes["startdate"] = compose_date(xml_doc, "DAY", "MONTH", "YEAR") |
||||
attributes["owning_organisation_id"] = find_organisation_id(xml_doc, "OWNINGORGID", "OWNINGORGNAME", "HCNUM") |
||||
attributes["managing_organisation_id"] = find_organisation_id(xml_doc, "MANINGORGID", "MANINGORGNAME", "MANHCNUM") |
||||
attributes["startertenancy"] = unsafe_string_as_integer(xml_doc, "_2a") |
||||
attributes["tenancy"] = unsafe_string_as_integer(xml_doc, "Q2b") |
||||
attributes["tenancyother"] = string_or_nil(xml_doc, "Q2ba") |
||||
attributes["tenancylength"] = safe_string_as_integer(xml_doc, "_2cYears") |
||||
attributes["needstype"] = needs_type(xml_doc) |
||||
attributes["lar"] = london_affordable_rent(xml_doc) |
||||
attributes["irproduct"] = unsafe_string_as_integer(xml_doc, "IRProduct") |
||||
attributes["irproduct_other"] = string_or_nil(xml_doc, "IRProductOther") |
||||
attributes["rent_type"] = rent_type(xml_doc, attributes["lar"], attributes["irproduct"]) |
||||
attributes["hhmemb"] = safe_string_as_integer(xml_doc, "HHMEMB") |
||||
(1..8).each do |index| |
||||
attributes["age#{index}"] = safe_string_as_integer(xml_doc, "P#{index}Age") |
||||
attributes["age#{index}_known"] = age_known(xml_doc, index, attributes["hhmemb"]) |
||||
attributes["sex#{index}"] = sex(xml_doc, index) |
||||
attributes["ecstat#{index}"] = unsafe_string_as_integer(xml_doc, "P#{index}Eco") |
||||
end |
||||
(2..8).each do |index| |
||||
attributes["relat#{index}"] = relat(xml_doc, index) |
||||
end |
||||
attributes["ethnic"] = unsafe_string_as_integer(xml_doc, "P1Eth") |
||||
attributes["ethnic_group"] = ethnic_group(attributes["ethnic"]) |
||||
attributes["national"] = unsafe_string_as_integer(xml_doc, "P1Nat") |
||||
attributes["preg_occ"] = unsafe_string_as_integer(xml_doc, "Preg") |
||||
|
||||
attributes["armedforces"] = unsafe_string_as_integer(xml_doc, "ArmedF") |
||||
attributes["leftreg"] = unsafe_string_as_integer(xml_doc, "LeftAF") |
||||
attributes["reservist"] = unsafe_string_as_integer(xml_doc, "Inj") |
||||
|
||||
attributes["hb"] = unsafe_string_as_integer(xml_doc, "Q6Ben") |
||||
attributes["benefits"] = unsafe_string_as_integer(xml_doc, "Q7Ben") |
||||
attributes["earnings"] = safe_string_as_decimal(xml_doc, "Q8Money") |
||||
attributes["net_income_known"] = net_income_known(xml_doc, attributes["earnings"]) |
||||
attributes["incfreq"] = unsafe_string_as_integer(xml_doc, "Q8a") |
||||
|
||||
attributes["reason"] = unsafe_string_as_integer(xml_doc, "Q9a") |
||||
attributes["reasonother"] = string_or_nil(xml_doc, "Q9aa") |
||||
attributes["underoccupation_benefitcap"] = unsafe_string_as_integer(xml_doc, "_9b") |
||||
%w[a b c f g h].each do |letter| |
||||
attributes["housingneeds_#{letter}"] = housing_needs(xml_doc, letter) |
||||
end |
||||
|
||||
attributes["illness"] = unsafe_string_as_integer(xml_doc, "Q10ia") |
||||
(1..10).each do |index| |
||||
attributes["illness_type_#{index}"] = illness_type(xml_doc, index) |
||||
end |
||||
|
||||
attributes["prevten"] = unsafe_string_as_integer(xml_doc, "Q11") |
||||
attributes["prevloc"] = string_or_nil(xml_doc, "Q12aONS") |
||||
attributes["previous_postcode_known"] = previous_postcode_known(xml_doc) |
||||
attributes["ppostcode_full"] = compose_postcode(xml_doc, "PPOSTC1", "PPOSTC2") |
||||
attributes["layear"] = unsafe_string_as_integer(xml_doc, "Q12c") |
||||
attributes["waityear"] = unsafe_string_as_integer(xml_doc, "Q12d") |
||||
attributes["homeless"] = unsafe_string_as_integer(xml_doc, "Q13") |
||||
|
||||
attributes["reasonpref"] = unsafe_string_as_integer(xml_doc, "Q14a") |
||||
attributes["rp_homeless"] = unsafe_string_as_integer(xml_doc, "Q14b1") |
||||
attributes["rp_insan_unsat"] = unsafe_string_as_integer(xml_doc, "Q14b2") |
||||
attributes["rp_medwel"] = unsafe_string_as_integer(xml_doc, "Q14b3") |
||||
attributes["rp_hardship"] = unsafe_string_as_integer(xml_doc, "Q14b4") |
||||
attributes["rp_dontknow"] = unsafe_string_as_integer(xml_doc, "Q14b5") |
||||
|
||||
attributes["cbl"] = unsafe_string_as_integer(xml_doc, "Q15CBL") |
||||
attributes["chr"] = unsafe_string_as_integer(xml_doc, "Q15CHR") |
||||
attributes["cap"] = unsafe_string_as_integer(xml_doc, "Q15CAP") |
||||
|
||||
attributes["referral"] = unsafe_string_as_integer(xml_doc, "Q16") |
||||
attributes["period"] = unsafe_string_as_integer(xml_doc, "Q17") |
||||
|
||||
attributes["brent"] = safe_string_as_decimal(xml_doc, "Q18ai") |
||||
attributes["scharge"] = safe_string_as_decimal(xml_doc, "Q18aii") |
||||
attributes["pscharge"] = safe_string_as_decimal(xml_doc, "Q18aiii") |
||||
attributes["supcharg"] = safe_string_as_decimal(xml_doc, "Q18aiv") |
||||
attributes["tcharge"] = safe_string_as_decimal(xml_doc, "Q18av") |
||||
|
||||
attributes["hbrentshortfall"] = unsafe_string_as_integer(xml_doc, "Q18d") |
||||
|
||||
attributes["voiddate"] = compose_date(xml_doc, "VDAY", "VMONTH", "VYEAR") |
||||
attributes["mrcdate"] = compose_date(xml_doc, "MRCDAY", "MRCMONTH", "MRCYEAR") |
||||
|
||||
attributes["offered"] = safe_string_as_integer(xml_doc, "Q20") |
||||
attributes["propcode"] = string_or_nil(xml_doc, "Q21a") |
||||
attributes["beds"] = safe_string_as_integer(xml_doc, "Q22") |
||||
attributes["unittype_gn"] = unsafe_string_as_integer(xml_doc, "Q23") |
||||
attributes["builtype"] = unsafe_string_as_integer(xml_doc, "Q24") |
||||
attributes["wchair"] = unsafe_string_as_integer(xml_doc, "Q25") |
||||
attributes["unitletas"] = unsafe_string_as_integer(xml_doc, "Q26") |
||||
attributes["rsnvac"] = unsafe_string_as_integer(xml_doc, "Q27") |
||||
attributes["renewal"] = renewal(attributes["rsnvac"]) |
||||
|
||||
attributes["la"] = string_or_nil(xml_doc, "Q28ONS") |
||||
attributes["postcode_full"] = compose_postcode(xml_doc, "POSTCODE", "POSTCOD2") |
||||
attributes["postcode_known"] = attributes["postcode_full"].nil? ? 0 : 1 |
||||
|
||||
# Not specific to our form but required for CDS and can't be inferred |
||||
attributes["old_form_id"] = Integer(field_value(xml_doc, "xmlns", "FORM")) |
||||
|
||||
# Specific to us |
||||
attributes["previous_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["updated_at"] = Date.parse(field_value(xml_doc, "meta", "modified-date")) |
||||
|
||||
case_log = CaseLog.new(attributes) |
||||
case_log.save! |
||||
end |
||||
|
||||
# Safe: A string that represents only an integer (or empty/nil) |
||||
def safe_string_as_integer(xml_doc, attribute) |
||||
str = field_value(xml_doc, "xmlns", attribute) |
||||
Integer(str, exception: false) |
||||
end |
||||
|
||||
# Safe: A string that represents only a decimal (or empty/nil) |
||||
def safe_string_as_decimal(xml_doc, attribute) |
||||
str = field_value(xml_doc, "xmlns", attribute) |
||||
BigDecimal(str, exception: false) |
||||
end |
||||
|
||||
# Unsafe: A string that has more than just the integer value |
||||
def unsafe_string_as_integer(xml_doc, attribute) |
||||
str = field_value(xml_doc, "xmlns", attribute) |
||||
if str.blank? |
||||
nil |
||||
else |
||||
str.to_i |
||||
end |
||||
end |
||||
|
||||
def compose_date(xml_doc, day_str, month_str, year_str) |
||||
day = Integer(field_value(xml_doc, "xmlns", day_str), exception: false) |
||||
month = Integer(field_value(xml_doc, "xmlns", month_str), exception: false) |
||||
year = Integer(field_value(xml_doc, "xmlns", year_str), exception: false) |
||||
if day.nil? || month.nil? || year.nil? |
||||
nil |
||||
else |
||||
Date.new(year, month, day) |
||||
end |
||||
end |
||||
|
||||
def get_form_name_component(xml_doc, index) |
||||
form_name = field_value(xml_doc, "meta", "form-name") |
||||
form_type_components = form_name.split("-") |
||||
form_type_components[index] |
||||
end |
||||
|
||||
def needs_type(xml_doc) |
||||
gn_sh = get_form_name_component(xml_doc, -1) |
||||
case gn_sh |
||||
when "GN" |
||||
GN_SH[:general_needs] |
||||
when "SH" |
||||
GN_SH[:supported_housing] |
||||
else |
||||
raise "Unknown needstype value: #{gn_sh}" |
||||
end |
||||
end |
||||
|
||||
# This does not match renttype (CDS) which is derived by case log logic |
||||
def rent_type(xml_doc, lar, irproduct) |
||||
sr_ar_ir = get_form_name_component(xml_doc, -2) |
||||
|
||||
case sr_ar_ir |
||||
when "SR" |
||||
RENT_TYPE[:social_rent] |
||||
when "AR" |
||||
if lar == 1 |
||||
RENT_TYPE[:london_affordable_rent] |
||||
else |
||||
RENT_TYPE[:affordable_rent] |
||||
end |
||||
when "IR" |
||||
if irproduct == IRPRODUCT[:rent_to_buy] |
||||
RENT_TYPE[:rent_to_buy] |
||||
elsif irproduct == IRPRODUCT[:london_living_rent] |
||||
RENT_TYPE[:london_living_rent] |
||||
elsif irproduct == IRPRODUCT[:other_intermediate_rent_product] |
||||
RENT_TYPE[:other_intermediate_rent_product] |
||||
end |
||||
else |
||||
raise "Could not infer rent type with '#{sr_ar_ir}'" |
||||
end |
||||
end |
||||
|
||||
def find_organisation_id(xml_doc, id_field, name_field, reg_field) |
||||
old_visible_id = unsafe_string_as_integer(xml_doc, id_field) |
||||
organisation = Organisation.find_by(old_visible_id:) |
||||
# Quick hack: should be removed when all organisations are imported |
||||
# Will fail in the future if the organisation is missing |
||||
if organisation.nil? |
||||
organisation = Organisation.new |
||||
organisation.old_visible_id = old_visible_id |
||||
let_type = unsafe_string_as_integer(xml_doc, "landlord") |
||||
organisation.provider_type = if let_type == PRP_LA[:local_authority] |
||||
1 |
||||
else |
||||
2 |
||||
end |
||||
organisation.name = string_or_nil(xml_doc, name_field) |
||||
organisation.housing_registration_no = string_or_nil(xml_doc, reg_field) |
||||
organisation.save! |
||||
end |
||||
organisation.id |
||||
end |
||||
|
||||
def sex(xml_doc, index) |
||||
sex = field_value(xml_doc, "xmlns", "P#{index}Sex") |
||||
case sex |
||||
when "Male" |
||||
"M" |
||||
when "Female" |
||||
"F" |
||||
when "Other", "Non-binary" |
||||
"X" |
||||
when "Refused" |
||||
"R" |
||||
end |
||||
end |
||||
|
||||
def relat(xml_doc, index) |
||||
relat = field_value(xml_doc, "xmlns", "P#{index}Rel") |
||||
case relat |
||||
when "Child" |
||||
"C" |
||||
when "Partner" |
||||
"P" |
||||
when "Other", "Non-binary" |
||||
"X" |
||||
when "Refused" |
||||
"R" |
||||
end |
||||
end |
||||
|
||||
def age_known(xml_doc, index, hhmemb) |
||||
return nil if index > hhmemb |
||||
|
||||
age_refused = field_value(xml_doc, "xmlns", "P#{index}AR") |
||||
if age_refused == "AGE_REFUSED" |
||||
1 # No |
||||
else |
||||
0 # Yes |
||||
end |
||||
end |
||||
|
||||
def previous_postcode_known(xml_doc) |
||||
previous_postcode_known = field_value(xml_doc, "xmlns", "Q12bnot") |
||||
if previous_postcode_known == "Temporary or Unknown" |
||||
0 |
||||
else |
||||
1 |
||||
end |
||||
end |
||||
|
||||
def compose_postcode(xml_doc, outcode, incode) |
||||
outcode_value = field_value(xml_doc, "xmlns", outcode) |
||||
incode_value = field_value(xml_doc, "xmlns", incode) |
||||
if outcode_value.blank? || incode_value.blank? |
||||
nil |
||||
else |
||||
"#{outcode_value} #{incode_value}" |
||||
end |
||||
end |
||||
|
||||
def london_affordable_rent(xml_doc) |
||||
lar = unsafe_string_as_integer(xml_doc, "LAR") |
||||
if lar == 1 |
||||
1 |
||||
else |
||||
# We default to No for any other values (nil, not known) |
||||
2 |
||||
end |
||||
end |
||||
|
||||
def renewal(rsnvac) |
||||
# Relet – renewal of fixed-term tenancy |
||||
if rsnvac == 14 |
||||
1 |
||||
else |
||||
0 |
||||
end |
||||
end |
||||
|
||||
def string_or_nil(xml_doc, attribute) |
||||
str = field_value(xml_doc, "xmlns", attribute) |
||||
str.presence |
||||
end |
||||
|
||||
def ethnic_group(ethnic) |
||||
case ethnic |
||||
when 1, 2, 3, 18 |
||||
# White |
||||
0 |
||||
when 4, 5, 6, 7 |
||||
# Mixed |
||||
1 |
||||
when 8, 9, 10, 11, 15 |
||||
# Asian |
||||
2 |
||||
when 12, 13, 14 |
||||
# Black |
||||
3 |
||||
when 16, 19 |
||||
# Others |
||||
4 |
||||
when 17 |
||||
# Refused |
||||
5 |
||||
end |
||||
end |
||||
|
||||
# Letters should be lowercase to match case |
||||
def housing_needs(xml_doc, letter) |
||||
housing_need = field_value(xml_doc, "xmlns", "Q10-#{letter}") |
||||
if housing_need == "Yes" |
||||
1 |
||||
else |
||||
0 |
||||
end |
||||
end |
||||
|
||||
def net_income_known(xml_doc, earnings) |
||||
incref = field_value(xml_doc, "xmlns", "Q8Refused") |
||||
if incref == "Refused" |
||||
# Tenant prefers not to say |
||||
2 |
||||
elsif earnings.nil? |
||||
# No |
||||
1 |
||||
else |
||||
# Yes |
||||
0 |
||||
end |
||||
end |
||||
|
||||
def illness_type(xml_doc, index) |
||||
illness_type = string_or_nil(xml_doc, "Q10ib-#{index}") |
||||
if illness_type == "Yes" |
||||
1 |
||||
else |
||||
0 |
||||
end |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,13 @@
|
||||
class UpdateCaseLogsFields < ActiveRecord::Migration[7.0] |
||||
def change |
||||
change_table :case_logs, bulk: true do |t| |
||||
t.integer :old_form_id, :lar, :irproduct |
||||
t.remove :day, :month, :year, :vday, :vmonth, :vyear, :mrcday, :mrcmonth, :mrcyear, :other_hhmemb, :accessibility_requirements_prefer_not_to_say, :landlord, type: :integer |
||||
t.remove :ppostc1, :ppostc2, :postcode, :postcod2, type: :string |
||||
t.rename :intermediate_rent_product_name, :irproduct_other |
||||
t.rename :lawaitlist, :waityear |
||||
t.rename :other_reason_for_leaving_last_settled_home, :reasonother |
||||
t.rename :property_void_date, :voiddate |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,532 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<Group xmlns="http://data.gov.uk/core/logs/2021-CORE-SR-GN" |
||||
xmlns:app="http://www.w3.org/2007/app" |
||||
xmlns:atom="http://www.w3.org/2005/Atom" |
||||
xmlns:ev="http://www.w3.org/2001/xml-events" |
||||
xmlns:meta="http://data.gov.uk/core/metadata" |
||||
xmlns:svc="http://www.w3.org/2007/app" |
||||
xmlns:xf="http://www.w3.org/2002/xforms" |
||||
xmlns:xfimpl="http://www.w3.org/2002/xforms/implementation" |
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" |
||||
xmlns:xxf="http://orbeon.org/oxf/xml/xforms" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
||||
<meta:metadata xmlns:es="http://www.ecmascript.org/" |
||||
xmlns:xqx="http://www.w3.org/2005/XQueryX" |
||||
xmlns:XSLT="http://www.w3.org/1999/XSL/Transform/compile"> |
||||
<meta:form-name>2021-CORE-SR-GN</meta:form-name> |
||||
<meta:document-id>0ead17cb-1668-442d-898c-0d52879ff592</meta:document-id> |
||||
<meta:owner-user-id>c3061a2e6ea0b702e6f6210d5c52d2a92612d2aa |
||||
</meta:owner-user-id> |
||||
<meta:owner-institution-id>7c5bd5fb549c09a2c55d7cb90d7ba84927e64618 |
||||
</meta:owner-institution-id> |
||||
<meta:managing-institution-id>7c5bd5fb549c09a2c55d7cb90d7ba84927e64618 |
||||
</meta:managing-institution-id> |
||||
<meta:created-date>2021-10-08T14:48:17.096123Z</meta:created-date> |
||||
<meta:modified-date>2021-10-08T14:48:17.096123Z</meta:modified-date> |
||||
<meta:status>submitted-valid</meta:status> |
||||
<meta:reporting-year>2021</meta:reporting-year> |
||||
<meta:upload-method>Manual Entry</meta:upload-method> |
||||
<meta:schema assert-valid="true"/> |
||||
<meta:rules assert-valid="true"/> |
||||
</meta:metadata> |
||||
<Group> |
||||
<Qdp>Yes</Qdp> |
||||
<KeyDate>2021-09-30</KeyDate> |
||||
<FORM>5786509</FORM> |
||||
<Landlord source-value="1">1 Private Registered Provider</Landlord> |
||||
<Group> |
||||
<_1btenagree>1 This Landlord</_1btenagree> |
||||
<_1bifanother/> |
||||
<_1bCOREcode/> |
||||
</Group> |
||||
</Group> |
||||
<Group> |
||||
<_2a>1 Yes</_2a> |
||||
<Q2b>2 Assured</Q2b> |
||||
<Q2ba/> |
||||
<_2bTenCode>MAC003</_2bTenCode> |
||||
<_2cYears/> |
||||
</Group> |
||||
<Group> |
||||
<P1Age override-field="">23</P1Age> |
||||
<P1AR/> |
||||
<P1Sex override-field="">Female</P1Sex> |
||||
<P1Eco>6) Not Seeking Work</P1Eco> |
||||
<P1Eth>1 White: English/Scottish/Welsh/Northern Irish/British</P1Eth> |
||||
<P1Nat>1 UK national resident in UK</P1Nat> |
||||
<P2Age override-field="">2</P2Age> |
||||
<P2AR/> |
||||
<P2Sex override-field="">Male</P2Sex> |
||||
<P2Rel>Child</P2Rel> |
||||
<P2Eco>9) Child under 16</P2Eco> |
||||
<P3Age override-field=""/> |
||||
<P3AR/> |
||||
<P3Sex override-field=""/> |
||||
<P3Rel/> |
||||
<P3Eco/> |
||||
<P4Age override-field=""/> |
||||
<P4AR/> |
||||
<P4Sex override-field=""/> |
||||
<P4Rel/> |
||||
<P4Eco/> |
||||
<P5Age override-field=""/> |
||||
<P5AR/> |
||||
<P5Sex override-field=""/> |
||||
<P5Rel/> |
||||
<P5Eco/> |
||||
<P6Age override-field=""/> |
||||
<P6AR/> |
||||
<P6Sex override-field=""/> |
||||
<P6Rel/> |
||||
<P6Eco/> |
||||
<P7Age override-field=""/> |
||||
<P7AR/> |
||||
<P7Sex override-field=""/> |
||||
<P7Rel/> |
||||
<P7Eco/> |
||||
<P8Age override-field=""/> |
||||
<P8AR/> |
||||
<P8Sex override-field=""/> |
||||
<P8Rel/> |
||||
<P8Eco/> |
||||
<Group> |
||||
<ArmedF>2 No</ArmedF> |
||||
<LeftAF/> |
||||
<Inj/> |
||||
<Preg override-field="">2 No</Preg> |
||||
</Group> |
||||
<Group> |
||||
<Q6Ben>6 UC – with housing element (and not in receipt of Housing |
||||
Benefit) |
||||
</Q6Ben> |
||||
</Group> |
||||
<Group> |
||||
<Q7Ben>1 All</Q7Ben> |
||||
<Q8Refused/> |
||||
<Q8Money override-field="">600.00</Q8Money> |
||||
<Q8a>2 Monthly</Q8a> |
||||
</Group> |
||||
<Group> |
||||
<Q9a>12 Property unsuitable because of overcrowding</Q9a> |
||||
<Q9aa/> |
||||
</Group> |
||||
<Group> |
||||
<_9b override-field="">2 No</_9b> |
||||
<Q10-a/> |
||||
<Q10-b/> |
||||
<Q10-c/> |
||||
<Q10-f/> |
||||
<Q10-g>Yes</Q10-g> |
||||
<Q10-h/> |
||||
<Q10ia>2 No</Q10ia> |
||||
<Q10ib-1/> |
||||
<Q10ib-2/> |
||||
<Q10ib-3/> |
||||
<Q10ib-4/> |
||||
<Q10ib-5/> |
||||
<Q10ib-6/> |
||||
<Q10ib-7/> |
||||
<Q10ib-8/> |
||||
<Q10ib-9/> |
||||
<Q10ib-10/> |
||||
<Q11 override-field="">30 Fixed term Local Authority General Needs |
||||
tenancy |
||||
</Q11> |
||||
<Q12a>Leeds</Q12a> |
||||
<Q12aONS>E08000035</Q12aONS> |
||||
<Q12b override-field="">LS8 3HX</Q12b> |
||||
<Q12bnot/> |
||||
<Q12c>5 5 years or more</Q12c> |
||||
<Q12d>2 Less than 1 year</Q12d> |
||||
</Group> |
||||
<Group> |
||||
<Q13>1 Not homeless</Q13> |
||||
<Q14a>1 Yes</Q14a> |
||||
<Q14b1/> |
||||
<Q14b2>2_Living_in_insanitary_or_overcrowded_or_unsatisfactory_housing |
||||
</Q14b2> |
||||
<Q14b3/> |
||||
<Q14b4/> |
||||
<Q14b5/> |
||||
</Group> |
||||
<Group> |
||||
<Q15CBL>1 Yes</Q15CBL> |
||||
<Q15CHR>2 No</Q15CHR> |
||||
<Q15CAP>2 No</Q15CAP> |
||||
</Group> |
||||
<Group> |
||||
<Q16>3 PRP lettings only - nominated by a local housing authority</Q16> |
||||
</Group> |
||||
</Group> |
||||
<Group> |
||||
<Q17>4 Calendar monthly</Q17> |
||||
<Q18ai override-field="">406.09</Q18ai> |
||||
<Q18aii override-field="">32.02</Q18aii> |
||||
<Q18aiii override-field=""/> |
||||
<Q18aiv override-field=""/> |
||||
<Q18av override-field="">438.11</Q18av> |
||||
<Q18d>2 No</Q18d> |
||||
<Q18dyes override-field=""/> |
||||
<Q19void>2021-09-30</Q19void> |
||||
<Q19repair/> |
||||
<Q20 override-field="">0</Q20> |
||||
<Q21a>MCB003</Q21a> |
||||
</Group> |
||||
<Group> |
||||
<Q22 override-field="">2</Q22> |
||||
<Q23>1 Flat / maisonette</Q23> |
||||
<Q24>1 Purpose built</Q24> |
||||
<Q25>2 No</Q25> |
||||
<Q26/> |
||||
<Q27>15 First let of newbuild property</Q27> |
||||
</Group> |
||||
<Group> |
||||
<Q28Auth>Leeds</Q28Auth> |
||||
<Q28ONS>E08000035</Q28ONS> |
||||
<Q28pc override-field="">LS16 6FT</Q28pc> |
||||
</Group> |
||||
<Group> |
||||
<F1Age>1</F1Age> |
||||
<F2Age>0</F2Age> |
||||
<F3Age>0</F3Age> |
||||
<F4Age>0</F4Age> |
||||
<F5Age>0</F5Age> |
||||
<F6Age>0</F6Age> |
||||
<F7Age>0</F7Age> |
||||
<F8Age>0</F8Age> |
||||
<FAge>1</FAge> |
||||
<F1>1</F1> |
||||
<F2>0</F2> |
||||
<F3>0</F3> |
||||
<F4>0</F4> |
||||
<F5>0</F5> |
||||
<F6>0</F6> |
||||
<F7>0</F7> |
||||
<F8>0</F8> |
||||
<F>1</F> |
||||
<P1100>0</P1100> |
||||
<P2100>0</P2100> |
||||
<P3100>0</P3100> |
||||
<P4100>0</P4100> |
||||
<P5100>0</P5100> |
||||
<P6100>0</P6100> |
||||
<P7100>0</P7100> |
||||
<P8100>0</P8100> |
||||
<_100>0</_100> |
||||
<P170>0</P170> |
||||
<P270>0</P270> |
||||
<P370>0</P370> |
||||
<P470>0</P470> |
||||
<P570>0</P570> |
||||
<P670>0</P670> |
||||
<P770>0</P770> |
||||
<P870>0</P870> |
||||
<_70>0</_70> |
||||
<P1PT>0</P1PT> |
||||
<P2PT>0</P2PT> |
||||
<P3PT>0</P3PT> |
||||
<P4PT>0</P4PT> |
||||
<P5PT>0</P5PT> |
||||
<P6PT>0</P6PT> |
||||
<P7PT>0</P7PT> |
||||
<P8PT>0</P8PT> |
||||
<PT>0</PT> |
||||
<P1FT>0</P1FT> |
||||
<P2FT>0</P2FT> |
||||
<P3FT>0</P3FT> |
||||
<P4FT>0</P4FT> |
||||
<P5FT>0</P5FT> |
||||
<P6FT>0</P6FT> |
||||
<P7FT>0</P7FT> |
||||
<P8FT>0</P8FT> |
||||
<FT>0</FT> |
||||
<P1Stud>0</P1Stud> |
||||
<P2Stud>0</P2Stud> |
||||
<P3Stud>0</P3Stud> |
||||
<P4Stud>0</P4Stud> |
||||
<P5Stud>0</P5Stud> |
||||
<P6Stud>0</P6Stud> |
||||
<P7Stud>0</P7Stud> |
||||
<P8Stud>0</P8Stud> |
||||
<Stud>0</Stud> |
||||
<P2Child>1</P2Child> |
||||
<P3Child>0</P3Child> |
||||
<P4Child>0</P4Child> |
||||
<P5Child>0</P5Child> |
||||
<P6Child>0</P6Child> |
||||
<P7Child>0</P7Child> |
||||
<P8Child>0</P8Child> |
||||
<Child>1</Child> |
||||
<P2Partner>0</P2Partner> |
||||
<P3Partner>0</P3Partner> |
||||
<P4Partner>0</P4Partner> |
||||
<P5Partner>0</P5Partner> |
||||
<P6Partner>0</P6Partner> |
||||
<P7Partner>0</P7Partner> |
||||
<P8Partner>0</P8Partner> |
||||
<Partner>0</Partner> |
||||
<Q1bV1>0</Q1bV1> |
||||
<Q1bV2>0</Q1bV2> |
||||
<Q1bV3>1</Q1bV3> |
||||
<Q1bVT>1</Q1bVT> |
||||
<P1Adult>1</P1Adult> |
||||
<P2Adult>0</P2Adult> |
||||
<P3Adult>0</P3Adult> |
||||
<P4Adult>0</P4Adult> |
||||
<P5Adult>0</P5Adult> |
||||
<P6Adult>0</P6Adult> |
||||
<P7Adult>0</P7Adult> |
||||
<P8Adult>0</P8Adult> |
||||
<PAdultT>1</PAdultT> |
||||
<P2PAge>0</P2PAge> |
||||
<P3PAge>0</P3PAge> |
||||
<P4PAge>0</P4PAge> |
||||
<P5PAge>0</P5PAge> |
||||
<P6PAge>0</P6PAge> |
||||
<P7PAge>0</P7PAge> |
||||
<P8PAge>0</P8PAge> |
||||
<PAGE>23</PAGE> |
||||
<P2ChildAge>2</P2ChildAge> |
||||
<P3ChildAge>0</P3ChildAge> |
||||
<P4ChildAge>0</P4ChildAge> |
||||
<P5ChildAge>0</P5ChildAge> |
||||
<P6ChildAge>0</P6ChildAge> |
||||
<P7ChildAge>0</P7ChildAge> |
||||
<P8ChildAge>0</P8ChildAge> |
||||
<ChildAgeMin>2</ChildAgeMin> |
||||
<AgeDiff1>23</AgeDiff1> |
||||
<AgeDiff2>21</AgeDiff2> |
||||
<AgeDiff3>23</AgeDiff3> |
||||
<TODAY>2021-10-08Z</TODAY> |
||||
<FutureLimit>2021-10-23Z</FutureLimit> |
||||
<minmax1/> |
||||
<minmax2/> |
||||
<minmax3/> |
||||
<minmax4/> |
||||
<minmax5/> |
||||
<minmax6/> |
||||
<minmax7/> |
||||
<minmax8/> |
||||
<minmax9/> |
||||
<minmax0/> |
||||
<minmax10/> |
||||
<minmaxT/> |
||||
<Q10av>0</Q10av> |
||||
<Q10bv>0</Q10bv> |
||||
<Q10cv>0</Q10cv> |
||||
<Q10fv>0</Q10fv> |
||||
<Q10gv>20</Q10gv> |
||||
<Q10hv>0</Q10hv> |
||||
<Q10Validate>20</Q10Validate> |
||||
<Q2bv>C</Q2bv> |
||||
<P2Agev>1</P2Agev> |
||||
<P2Sexv>1</P2Sexv> |
||||
<P2Relv>1</P2Relv> |
||||
<P2Ecov>1</P2Ecov> |
||||
<P2valid>4</P2valid> |
||||
<P3Agev>0</P3Agev> |
||||
<P3Sexv>0</P3Sexv> |
||||
<P3Relv>0</P3Relv> |
||||
<P3Ecov>0</P3Ecov> |
||||
<P3valid>0</P3valid> |
||||
<P4Agev>0</P4Agev> |
||||
<P4Sexv>0</P4Sexv> |
||||
<P4Relv>0</P4Relv> |
||||
<P4Ecov>0</P4Ecov> |
||||
<P4valid>0</P4valid> |
||||
<P5Agev>0</P5Agev> |
||||
<P5Sexv>0</P5Sexv> |
||||
<P5Relv>0</P5Relv> |
||||
<P5Ecov>0</P5Ecov> |
||||
<P5valid>0</P5valid> |
||||
<P6Agev>0</P6Agev> |
||||
<P6Sexv>0</P6Sexv> |
||||
<P6Relv>0</P6Relv> |
||||
<P6Ecov>0</P6Ecov> |
||||
<P6valid>0</P6valid> |
||||
<P7Agev>0</P7Agev> |
||||
<P7Sexv>0</P7Sexv> |
||||
<P7Relv>0</P7Relv> |
||||
<P7Ecov>0</P7Ecov> |
||||
<P7valid>0</P7valid> |
||||
<P8Agev>0</P8Agev> |
||||
<P8Sexv>0</P8Sexv> |
||||
<P8Relv>0</P8Relv> |
||||
<P8Ecov>0</P8Ecov> |
||||
<P8valid>0</P8valid> |
||||
<Q14b1v>0</Q14b1v> |
||||
<Q14b2v>1</Q14b2v> |
||||
<Q14b3v>0</Q14b3v> |
||||
<Q14b4v>0</Q14b4v> |
||||
<Q14b5v>0</Q14b5v> |
||||
<Q14bv>1</Q14bv> |
||||
<P2Other>0</P2Other> |
||||
<P3Other>0</P3Other> |
||||
<P4Other>0</P4Other> |
||||
<P5Other>0</P5Other> |
||||
<P6Other>0</P6Other> |
||||
<P7Other>0</P7Other> |
||||
<P8Other>0</P8Other> |
||||
<Other>0</Other> |
||||
<P2ARefused>0</P2ARefused> |
||||
<P3ARefused>0</P3ARefused> |
||||
<P4ARefused>0</P4ARefused> |
||||
<P5ARefused>0</P5ARefused> |
||||
<P6ARefused>0</P6ARefused> |
||||
<P7ARefused>0</P7ARefused> |
||||
<P8ARefused>0</P8ARefused> |
||||
<TAREUSED>0</TAREUSED> |
||||
<P2RRefused>0</P2RRefused> |
||||
<P3RRefused>0</P3RRefused> |
||||
<P4RRefused>0</P4RRefused> |
||||
<P5RRefused>0</P5RRefused> |
||||
<P6RRefused>0</P6RRefused> |
||||
<P7RRefused>0</P7RRefused> |
||||
<P8RRefused>0</P8RRefused> |
||||
<TotRRefused>0</TotRRefused> |
||||
<TOTREFUSED>0</TOTREFUSED> |
||||
</Group> |
||||
<Group> |
||||
<ChildBen>21.05</ChildBen> |
||||
<TOTADULT>1</TOTADULT> |
||||
<NEW_OLD>2 Existing Tenant</NEW_OLD> |
||||
<Q18aValid>1</Q18aValid> |
||||
<Q18Valid>1</Q18Valid> |
||||
<VACDAYS>0</VACDAYS> |
||||
<HHMEMB>2</HHMEMB> |
||||
<HHTYPEP1A>1</HHTYPEP1A> |
||||
<HHTYPEP2A>0</HHTYPEP2A> |
||||
<HHTYPEP3A>0</HHTYPEP3A> |
||||
<HHTYPEP4A>0</HHTYPEP4A> |
||||
<HHTYPEP5A>0</HHTYPEP5A> |
||||
<HHTYPEP6A>0</HHTYPEP6A> |
||||
<HHTYPEP7A>0</HHTYPEP7A> |
||||
<HHTYPEP8A>0</HHTYPEP8A> |
||||
<TADULT>1</TADULT> |
||||
<HHTYPEP1E>0</HHTYPEP1E> |
||||
<HHTYPEP2E>0</HHTYPEP2E> |
||||
<HHTYPEP3E>0</HHTYPEP3E> |
||||
<HHTYPEP4E>0</HHTYPEP4E> |
||||
<HHTYPEP5E>0</HHTYPEP5E> |
||||
<HHTYPEP6E>0</HHTYPEP6E> |
||||
<HHTYPEP7E>0</HHTYPEP7E> |
||||
<HHTYPEP8E>0</HHTYPEP8E> |
||||
<TELDER>0</TELDER> |
||||
<HHTYPEP1C>0</HHTYPEP1C> |
||||
<HHTYPEP2C>1</HHTYPEP2C> |
||||
<HHTYPEP3C>0</HHTYPEP3C> |
||||
<HHTYPEP4C>0</HHTYPEP4C> |
||||
<HHTYPEP5C>0</HHTYPEP5C> |
||||
<HHTYPEP6C>0</HHTYPEP6C> |
||||
<HHTYPEP7C>0</HHTYPEP7C> |
||||
<HHTYPEP8C>0</HHTYPEP8C> |
||||
<TCHILD>1</TCHILD> |
||||
<HHTYPE>5 = 1 adult + 1 or more children</HHTYPE> |
||||
<WEEKLYINC>133.33</WEEKLYINC> |
||||
<INCOME>154.38</INCOME> |
||||
<TYPEHB>7.00</TYPEHB> |
||||
<AFFRATE/> |
||||
<Weekinc>154.38</Weekinc> |
||||
<LETTYPE>1 Private Registered Provider</LETTYPE> |
||||
<PLOACODE/> |
||||
<OACODE/> |
||||
<GOVREG>E12000003</GOVREG> |
||||
<OWNINGORGID>1034</OWNINGORGID> |
||||
<OWNINGORGNAME>LEEDS & YORKSHIRE HA Ltd</OWNINGORGNAME> |
||||
<MANINGORGNAME>LEEDS & YORKSHIRE HA Ltd</MANINGORGNAME> |
||||
<HCNUM>LH0704</HCNUM> |
||||
<MANHCNUM>LH0704</MANHCNUM> |
||||
<LAHA/> |
||||
<MANINGORGID>1034</MANINGORGID> |
||||
<HBTYPE1/> |
||||
<HBTYPE2/> |
||||
<HBTYPE3/> |
||||
<HBTYPE4/> |
||||
<HBTYPE5/> |
||||
<HBTYPE6/> |
||||
<HBTYPE7>7</HBTYPE7> |
||||
<HBTYPE8/> |
||||
<HBTYPE9/> |
||||
<HBTYPE10/> |
||||
<HBTYPE11/> |
||||
<HBTYPE12/> |
||||
<HBTYPE13/> |
||||
<HBTYPE14/> |
||||
<HBTYPE15/> |
||||
<HBTYPE>7</HBTYPE> |
||||
<P1R>0</P1R> |
||||
<P2R>0</P2R> |
||||
<P3R>0</P3R> |
||||
<P4R>0</P4R> |
||||
<P5R>0</P5R> |
||||
<P6R>0</P6R> |
||||
<P7R>0</P7R> |
||||
<P8R>0</P8R> |
||||
<REFUSEDTOT>0</REFUSEDTOT> |
||||
<REFUSED/> |
||||
<WTSHORTFALL/> |
||||
<WRENT>93.71</WRENT> |
||||
<WTCHARGE>101.10</WTCHARGE> |
||||
<WSCHARGE>7.39</WSCHARGE> |
||||
<WPSCHRGE/> |
||||
<WSUPCHRG/> |
||||
<WTSHORTFALL1/> |
||||
<WTSHORTFALLHB/> |
||||
<WTSHORTFALLHE/> |
||||
<WRENT1>93.71</WRENT1> |
||||
<WTCHARGE1>101.10</WTCHARGE1> |
||||
<WSCHARGE1>7.39</WSCHARGE1> |
||||
<WPSCHRGE1/> |
||||
<WSUPCHRG1/> |
||||
</Group> |
||||
<Group> |
||||
<BSa>0</BSa> |
||||
<BSb>1</BSb> |
||||
<BSc>0</BSc> |
||||
<BScm>0</BScm> |
||||
<BScf>0</BScf> |
||||
<BSd>0</BSd> |
||||
<BSdm>0.5</BSdm> |
||||
<BSdf>0</BSdf> |
||||
<BSe>0</BSe> |
||||
<BSem>0</BSem> |
||||
<BSef>0</BSef> |
||||
<BSf>1</BSf> |
||||
<BSfm>0</BSfm> |
||||
<BSff>0</BSff> |
||||
<BSfmx>1</BSfmx> |
||||
<BSffx>0</BSffx> |
||||
<BEDROOMSTAND>2</BEDROOMSTAND> |
||||
<BEDMINUSBEDS>0</BEDMINUSBEDS> |
||||
<WRENTreduced>93.71</WRENTreduced> |
||||
<NonDepDeduct>0</NonDepDeduct> |
||||
<RENTHB/> |
||||
<ChildAllowan>68.6</ChildAllowan> |
||||
<PrsnlAllowan>74.7</PrsnlAllowan> |
||||
<HousBenDisAl>25</HousBenDisAl> |
||||
<PAIDHB/> |
||||
<HCNETAF/> |
||||
<ChldAlloCat1>1</ChldAlloCat1> |
||||
<ChldAlloCat2>0</ChldAlloCat2> |
||||
<P2NnDepDedct>0</P2NnDepDedct> |
||||
<P3NnDepDedct>0</P3NnDepDedct> |
||||
<P4NnDepDedct>0</P4NnDepDedct> |
||||
<P5NnDepDedct>0</P5NnDepDedct> |
||||
<P6NnDepDedct>0</P6NnDepDedct> |
||||
<P7NnDepDedct>0</P7NnDepDedct> |
||||
<P8NnDepDedct>0</P8NnDepDedct> |
||||
<DAY>30</DAY> |
||||
<MONTH>9</MONTH> |
||||
<YEAR>2021</YEAR> |
||||
<VDAY>30</VDAY> |
||||
<VMONTH>9</VMONTH> |
||||
<VYEAR>2021</VYEAR> |
||||
<MRCDAY/> |
||||
<MRCMONTH/> |
||||
<MRCYEAR/> |
||||
<PPOSTC1>LS8</PPOSTC1> |
||||
<PPOSTC2>3HX</PPOSTC2> |
||||
<POSTCODE>LS16</POSTCODE> |
||||
<POSTCOD2>6FT</POSTCOD2> |
||||
</Group> |
||||
</Group> |
@ -0,0 +1,514 @@
|
||||
<Group xmlns="http://data.gov.uk/core/logs/2021-CORE-IR-GN" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:meta="http://data.gov.uk/core/metadata" xmlns:svc="http://www.w3.org/2007/app" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xfimpl="http://www.w3.org/2002/xforms/implementation" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
||||
<meta:metadata xmlns:es="http://www.ecmascript.org/" xmlns:xqx="http://www.w3.org/2005/XQueryX" xmlns:XSLT="http://www.w3.org/1999/XSL/Transform/compile"> |
||||
<meta:form-name>2021-CORE-IR-GN</meta:form-name> |
||||
<meta:document-id>166fc004-392e-47a8-acb8-1c018734882b</meta:document-id> |
||||
<meta:owner-user-id>e29c492473446dca4d50224f2bb7cf965a261d6f</meta:owner-user-id> |
||||
<meta:owner-institution-id>26139d1be7a44ebb1af23d3f8882c14025e9903c</meta:owner-institution-id> |
||||
<meta:managing-institution-id>26139d1be7a44ebb1af23d3f8882c14025e9903c</meta:managing-institution-id> |
||||
<meta:created-date>2022-04-12T14:10:59.953121Z</meta:created-date> |
||||
<meta:modified-date>2022-04-12T14:10:59.953121Z</meta:modified-date> |
||||
<meta:status>submitted-valid</meta:status> |
||||
<meta:reporting-year>2021</meta:reporting-year> |
||||
<meta:upload-method>Manual Entry</meta:upload-method> |
||||
<meta:schema assert-valid="true"/> |
||||
<meta:rules assert-valid="true"/> |
||||
</meta:metadata> |
||||
<Group> |
||||
<Qdp>Yes</Qdp> |
||||
<IRProduct>2 London Living Rent</IRProduct> |
||||
<IRProductOther/> |
||||
<KeyDate>2021-11-10</KeyDate> |
||||
<FORM>300072</FORM> |
||||
<Landlord source-value="9">1 Private Registered Provider</Landlord> |
||||
<Group> |
||||
<_1btenagree>1 This Landlord</_1btenagree> |
||||
<_1bifanother/> |
||||
<_1bCOREcode/> |
||||
</Group> |
||||
</Group> |
||||
<Group> |
||||
<_2a>2 No</_2a> |
||||
<Q2b>2 Assured</Q2b> |
||||
<Q2ba/> |
||||
<_2bTenCode>TEN0021</_2bTenCode> |
||||
<_2cYears/> |
||||
</Group> |
||||
<Group> |
||||
<P1Age override-field="">37</P1Age> |
||||
<P1AR/> |
||||
<P1Sex override-field="">Female</P1Sex> |
||||
<P1Eco>1) Full Time</P1Eco> |
||||
<P1Eth>1 White: English/Scottish/Welsh/Northern Irish/British</P1Eth> |
||||
<P1Nat>1 UK national resident in UK</P1Nat> |
||||
<P2Age override-field="">34</P2Age> |
||||
<P2AR/> |
||||
<P2Sex override-field="">Female</P2Sex> |
||||
<P2Rel>Other</P2Rel> |
||||
<P2Eco>1) Full Time</P2Eco> |
||||
<P3Age override-field=""/> |
||||
<P3AR/> |
||||
<P3Sex override-field=""/> |
||||
<P3Rel/> |
||||
<P3Eco/> |
||||
<P4Age override-field=""/> |
||||
<P4AR/> |
||||
<P4Sex override-field=""/> |
||||
<P4Rel/> |
||||
<P4Eco/> |
||||
<P5Age override-field=""/> |
||||
<P5AR/> |
||||
<P5Sex override-field=""/> |
||||
<P5Rel/> |
||||
<P5Eco/> |
||||
<P6Age override-field=""/> |
||||
<P6AR/> |
||||
<P6Sex override-field=""/> |
||||
<P6Rel/> |
||||
<P6Eco/> |
||||
<P7Age override-field=""/> |
||||
<P7AR/> |
||||
<P7Sex override-field=""/> |
||||
<P7Rel/> |
||||
<P7Eco/> |
||||
<P8Age override-field=""/> |
||||
<P8AR/> |
||||
<P8Sex override-field=""/> |
||||
<P8Rel/> |
||||
<P8Eco/> |
||||
<Group> |
||||
<ArmedF>2 No</ArmedF> |
||||
<LeftAF/> |
||||
<Inj/> |
||||
<Preg override-field="">2 No</Preg> |
||||
</Group> |
||||
<Group> |
||||
<Q6Ben>9 Not in receipt of either UC or HB</Q6Ben> |
||||
</Group> |
||||
<Group> |
||||
<Q7Ben>3 None</Q7Ben> |
||||
<Q8Refused/> |
||||
<Q8Money override-field="">200.00</Q8Money> |
||||
<Q8a>1 Weekly</Q8a> |
||||
</Group> |
||||
<Group> |
||||
<Q9a>8 (Non-violent) relationship breakdown with partner</Q9a> |
||||
<Q9aa/> |
||||
</Group> |
||||
<Group> |
||||
<_9b override-field="">2 No</_9b> |
||||
<Q10-a/> |
||||
<Q10-b/> |
||||
<Q10-c/> |
||||
<Q10-f/> |
||||
<Q10-g>Yes</Q10-g> |
||||
<Q10-h/> |
||||
<Q10ia>1 Yes</Q10ia> |
||||
<Q10ib-1/> |
||||
<Q10ib-2/> |
||||
<Q10ib-3/> |
||||
<Q10ib-4>Yes</Q10ib-4> |
||||
<Q10ib-5/> |
||||
<Q10ib-6/> |
||||
<Q10ib-7/> |
||||
<Q10ib-8/> |
||||
<Q10ib-9/> |
||||
<Q10ib-10/> |
||||
<Q11 override-field="">28 Living with friends or family</Q11> |
||||
<Q12a>Blackpool</Q12a> |
||||
<Q12aONS>E09000009</Q12aONS> |
||||
<Q12b override-field="">FY1 1JD</Q12b> |
||||
<Q12bnot/> |
||||
<Q12c>1 Just moved to Local Authority area</Q12c> |
||||
<Q12d>1 Just moved to Local Authority area</Q12d> |
||||
</Group> |
||||
<Group> |
||||
<Q13>1 Not homeless</Q13> |
||||
<Q14a>2 No</Q14a> |
||||
<Q14b1/> |
||||
<Q14b2/> |
||||
<Q14b3/> |
||||
<Q14b4/> |
||||
<Q14b5/> |
||||
</Group> |
||||
<Group> |
||||
<Q15CBL>2 No</Q15CBL> |
||||
<Q15CHR>2 No</Q15CHR> |
||||
<Q15CAP>2 No</Q15CAP> |
||||
</Group> |
||||
<Group> |
||||
<Q16>10 Other social landlord</Q16> |
||||
</Group> |
||||
</Group> |
||||
<Group> |
||||
<Q17>1 Weekly for 52 weeks</Q17> |
||||
<Q18ai override-field="">100.00</Q18ai> |
||||
<Q18aii override-field=""/> |
||||
<Q18aiii override-field=""/> |
||||
<Q18aiv override-field=""/> |
||||
<Q18av override-field="">100.00</Q18av> |
||||
<Q18d/> |
||||
<Q18dyes override-field=""/> |
||||
<Q19void>2021-04-15</Q19void> |
||||
<Q19repair/> |
||||
<Q20 override-field="">0</Q20> |
||||
<Q21a>PROPREF0042</Q21a> |
||||
</Group> |
||||
<Group> |
||||
<Q22 override-field="">2</Q22> |
||||
<Q23>1 Flat / maisonette</Q23> |
||||
<Q24>1 Purpose built</Q24> |
||||
<Q25>2 No</Q25> |
||||
<Q26>4 An Intermediate Rent basis</Q26> |
||||
<Q27>10 Relet - tenant evicted due to arrears</Q27> |
||||
</Group> |
||||
<Group> |
||||
<Q28Auth>Basingstoke & Deane</Q28Auth> |
||||
<Q28ONS>E07000084</Q28ONS> |
||||
<Q28pc override-field="">RG21 3HU</Q28pc> |
||||
</Group> |
||||
<Group> |
||||
<F1Age>1</F1Age> |
||||
<F2Age>1</F2Age> |
||||
<F3Age>0</F3Age> |
||||
<F4Age>0</F4Age> |
||||
<F5Age>0</F5Age> |
||||
<F6Age>0</F6Age> |
||||
<F7Age>0</F7Age> |
||||
<F8Age>0</F8Age> |
||||
<FAge>2</FAge> |
||||
<F1>1</F1> |
||||
<F2>1</F2> |
||||
<F3>0</F3> |
||||
<F4>0</F4> |
||||
<F5>0</F5> |
||||
<F6>0</F6> |
||||
<F7>0</F7> |
||||
<F8>0</F8> |
||||
<F>2</F> |
||||
<P1100>0</P1100> |
||||
<P2100>0</P2100> |
||||
<P3100>0</P3100> |
||||
<P4100>0</P4100> |
||||
<P5100>0</P5100> |
||||
<P6100>0</P6100> |
||||
<P7100>0</P7100> |
||||
<P8100>0</P8100> |
||||
<_100>0</_100> |
||||
<P170>0</P170> |
||||
<P270>0</P270> |
||||
<P370>0</P370> |
||||
<P470>0</P470> |
||||
<P570>0</P570> |
||||
<P670>0</P670> |
||||
<P770>0</P770> |
||||
<P870>0</P870> |
||||
<_70>0</_70> |
||||
<P1PT>0</P1PT> |
||||
<P2PT>0</P2PT> |
||||
<P3PT>0</P3PT> |
||||
<P4PT>0</P4PT> |
||||
<P5PT>0</P5PT> |
||||
<P6PT>0</P6PT> |
||||
<P7PT>0</P7PT> |
||||
<P8PT>0</P8PT> |
||||
<PT>0</PT> |
||||
<P1FT>1</P1FT> |
||||
<P2FT>1</P2FT> |
||||
<P3FT>0</P3FT> |
||||
<P4FT>0</P4FT> |
||||
<P5FT>0</P5FT> |
||||
<P6FT>0</P6FT> |
||||
<P7FT>0</P7FT> |
||||
<P8FT>0</P8FT> |
||||
<FT>2</FT> |
||||
<P1Stud>0</P1Stud> |
||||
<P2Stud>0</P2Stud> |
||||
<P3Stud>0</P3Stud> |
||||
<P4Stud>0</P4Stud> |
||||
<P5Stud>0</P5Stud> |
||||
<P6Stud>0</P6Stud> |
||||
<P7Stud>0</P7Stud> |
||||
<P8Stud>0</P8Stud> |
||||
<Stud>0</Stud> |
||||
<P2Child>0</P2Child> |
||||
<P3Child>0</P3Child> |
||||
<P4Child>0</P4Child> |
||||
<P5Child>0</P5Child> |
||||
<P6Child>0</P6Child> |
||||
<P7Child>0</P7Child> |
||||
<P8Child>0</P8Child> |
||||
<Child>0</Child> |
||||
<P2Partner>0</P2Partner> |
||||
<P3Partner>0</P3Partner> |
||||
<P4Partner>0</P4Partner> |
||||
<P5Partner>0</P5Partner> |
||||
<P6Partner>0</P6Partner> |
||||
<P7Partner>0</P7Partner> |
||||
<P8Partner>0</P8Partner> |
||||
<Partner>0</Partner> |
||||
<Q1bV1>0</Q1bV1> |
||||
<Q1bV2>0</Q1bV2> |
||||
<Q1bV3>1</Q1bV3> |
||||
<Q1bVT>1</Q1bVT> |
||||
<P1Adult>1</P1Adult> |
||||
<P2Adult>1</P2Adult> |
||||
<P3Adult>0</P3Adult> |
||||
<P4Adult>0</P4Adult> |
||||
<P5Adult>0</P5Adult> |
||||
<P6Adult>0</P6Adult> |
||||
<P7Adult>0</P7Adult> |
||||
<P8Adult>0</P8Adult> |
||||
<PAdultT>2</PAdultT> |
||||
<P2PAge>0</P2PAge> |
||||
<P3PAge>0</P3PAge> |
||||
<P4PAge>0</P4PAge> |
||||
<P5PAge>0</P5PAge> |
||||
<P6PAge>0</P6PAge> |
||||
<P7PAge>0</P7PAge> |
||||
<P8PAge>0</P8PAge> |
||||
<PAGE>37</PAGE> |
||||
<P2ChildAge>0</P2ChildAge> |
||||
<P3ChildAge>0</P3ChildAge> |
||||
<P4ChildAge>0</P4ChildAge> |
||||
<P5ChildAge>0</P5ChildAge> |
||||
<P6ChildAge>0</P6ChildAge> |
||||
<P7ChildAge>0</P7ChildAge> |
||||
<P8ChildAge>0</P8ChildAge> |
||||
<ChildAgeMin>0</ChildAgeMin> |
||||
<AgeDiff1>37</AgeDiff1> |
||||
<AgeDiff2>0</AgeDiff2> |
||||
<AgeDiff3>37</AgeDiff3> |
||||
<TODAY>2022-04-12Z</TODAY> |
||||
<FutureLimit>2022-04-27Z</FutureLimit> |
||||
<minmax1/> |
||||
<minmax2/> |
||||
<minmax3/> |
||||
<minmax4/> |
||||
<minmax5/> |
||||
<minmax6/> |
||||
<minmax7/> |
||||
<minmax8/> |
||||
<minmax9/> |
||||
<minmax0/> |
||||
<minmax10/> |
||||
<minmaxT/> |
||||
<Q10av>0</Q10av> |
||||
<Q10bv>0</Q10bv> |
||||
<Q10cv>0</Q10cv> |
||||
<Q10fv>0</Q10fv> |
||||
<Q10gv>20</Q10gv> |
||||
<Q10hv>0</Q10hv> |
||||
<Q10Validate>20</Q10Validate> |
||||
<Q2bv>C</Q2bv> |
||||
<P2Agev>1</P2Agev> |
||||
<P2Sexv>1</P2Sexv> |
||||
<P2Relv>1</P2Relv> |
||||
<P2Ecov>1</P2Ecov> |
||||
<P2valid>4</P2valid> |
||||
<P3Agev>0</P3Agev> |
||||
<P3Sexv>0</P3Sexv> |
||||
<P3Relv>0</P3Relv> |
||||
<P3Ecov>0</P3Ecov> |
||||
<P3valid>0</P3valid> |
||||
<P4Agev>0</P4Agev> |
||||
<P4Sexv>0</P4Sexv> |
||||
<P4Relv>0</P4Relv> |
||||
<P4Ecov>0</P4Ecov> |
||||
<P4valid>0</P4valid> |
||||
<P5Agev>0</P5Agev> |
||||
<P5Sexv>0</P5Sexv> |
||||
<P5Relv>0</P5Relv> |
||||
<P5Ecov>0</P5Ecov> |
||||
<P5valid>0</P5valid> |
||||
<P6Agev>0</P6Agev> |
||||
<P6Sexv>0</P6Sexv> |
||||
<P6Relv>0</P6Relv> |
||||
<P6Ecov>0</P6Ecov> |
||||
<P6valid>0</P6valid> |
||||
<P7Agev>0</P7Agev> |
||||
<P7Sexv>0</P7Sexv> |
||||
<P7Relv>0</P7Relv> |
||||
<P7Ecov>0</P7Ecov> |
||||
<P7valid>0</P7valid> |
||||
<P8Agev>0</P8Agev> |
||||
<P8Sexv>0</P8Sexv> |
||||
<P8Relv>0</P8Relv> |
||||
<P8Ecov>0</P8Ecov> |
||||
<P8valid>0</P8valid> |
||||
<Q14b1v>0</Q14b1v> |
||||
<Q14b2v>0</Q14b2v> |
||||
<Q14b3v>0</Q14b3v> |
||||
<Q14b4v>0</Q14b4v> |
||||
<Q14b5v>0</Q14b5v> |
||||
<Q14bv>0</Q14bv> |
||||
<P2Other>1</P2Other> |
||||
<P3Other>0</P3Other> |
||||
<P4Other>0</P4Other> |
||||
<P5Other>0</P5Other> |
||||
<P6Other>0</P6Other> |
||||
<P7Other>0</P7Other> |
||||
<P8Other>0</P8Other> |
||||
<Other>1</Other> |
||||
<P2ARefused>0</P2ARefused> |
||||
<P3ARefused>0</P3ARefused> |
||||
<P4ARefused>0</P4ARefused> |
||||
<P5ARefused>0</P5ARefused> |
||||
<P6ARefused>0</P6ARefused> |
||||
<P7ARefused>0</P7ARefused> |
||||
<P8ARefused>0</P8ARefused> |
||||
<TAREUSED>0</TAREUSED> |
||||
<P2RRefused>0</P2RRefused> |
||||
<P3RRefused>0</P3RRefused> |
||||
<P4RRefused>0</P4RRefused> |
||||
<P5RRefused>0</P5RRefused> |
||||
<P6RRefused>0</P6RRefused> |
||||
<P7RRefused>0</P7RRefused> |
||||
<P8RRefused>0</P8RRefused> |
||||
<TotRRefused>0</TotRRefused> |
||||
<TOTREFUSED>0</TOTREFUSED> |
||||
</Group> |
||||
<Group> |
||||
<TOTADULT>2</TOTADULT> |
||||
<NEW_OLD>2 Existing Tenant</NEW_OLD> |
||||
<Q18aValid>1</Q18aValid> |
||||
<Q18Valid>1</Q18Valid> |
||||
<VACDAYS>209</VACDAYS> |
||||
<HHMEMB>2</HHMEMB> |
||||
<HHTYPEP1A>1</HHTYPEP1A> |
||||
<HHTYPEP2A>1</HHTYPEP2A> |
||||
<HHTYPEP3A>0</HHTYPEP3A> |
||||
<HHTYPEP4A>0</HHTYPEP4A> |
||||
<HHTYPEP5A>0</HHTYPEP5A> |
||||
<HHTYPEP6A>0</HHTYPEP6A> |
||||
<HHTYPEP7A>0</HHTYPEP7A> |
||||
<HHTYPEP8A>0</HHTYPEP8A> |
||||
<TADULT>2</TADULT> |
||||
<HHTYPEP1E>0</HHTYPEP1E> |
||||
<HHTYPEP2E>0</HHTYPEP2E> |
||||
<HHTYPEP3E>0</HHTYPEP3E> |
||||
<HHTYPEP4E>0</HHTYPEP4E> |
||||
<HHTYPEP5E>0</HHTYPEP5E> |
||||
<HHTYPEP6E>0</HHTYPEP6E> |
||||
<HHTYPEP7E>0</HHTYPEP7E> |
||||
<HHTYPEP8E>0</HHTYPEP8E> |
||||
<TELDER>0</TELDER> |
||||
<HHTYPEP1C>0</HHTYPEP1C> |
||||
<HHTYPEP2C>0</HHTYPEP2C> |
||||
<HHTYPEP3C>0</HHTYPEP3C> |
||||
<HHTYPEP4C>0</HHTYPEP4C> |
||||
<HHTYPEP5C>0</HHTYPEP5C> |
||||
<HHTYPEP6C>0</HHTYPEP6C> |
||||
<HHTYPEP7C>0</HHTYPEP7C> |
||||
<HHTYPEP8C>0</HHTYPEP8C> |
||||
<TCHILD>0</TCHILD> |
||||
<HHTYPE>4 = 2 adults</HHTYPE> |
||||
<WEEKLYINC>200.00</WEEKLYINC> |
||||
<INCOME>200.00</INCOME> |
||||
<TYPEHB>13</TYPEHB> |
||||
<AFFRATE/> |
||||
<Weekinc>200.00</Weekinc> |
||||
<LETTYPE>1 Private Registered Provider</LETTYPE> |
||||
<PLOACODE/> |
||||
<OACODE/> |
||||
<GOVREG>E12000008</GOVREG> |
||||
<OWNINGORGID>107138</OWNINGORGID> |
||||
<OWNINGORGNAME>1 Test</OWNINGORGNAME> |
||||
<MANINGORGNAME>1 Test</MANINGORGNAME> |
||||
<HCNUM>655</HCNUM> |
||||
<MANHCNUM>655</MANHCNUM> |
||||
<LAHA/> |
||||
<MANINGORGID>107138</MANINGORGID> |
||||
<HBTYPE1/> |
||||
<HBTYPE2/> |
||||
<HBTYPE3/> |
||||
<HBTYPE4/> |
||||
<HBTYPE5/> |
||||
<HBTYPE6/> |
||||
<HBTYPE7/> |
||||
<HBTYPE8/> |
||||
<HBTYPE9/> |
||||
<HBTYPE10/> |
||||
<HBTYPE11/> |
||||
<HBTYPE12/> |
||||
<HBTYPE13>13</HBTYPE13> |
||||
<HBTYPE14/> |
||||
<HBTYPE15/> |
||||
<HBTYPE>13</HBTYPE> |
||||
<P1R>0</P1R> |
||||
<P2R>0</P2R> |
||||
<P3R>0</P3R> |
||||
<P4R>0</P4R> |
||||
<P5R>0</P5R> |
||||
<P6R>0</P6R> |
||||
<P7R>0</P7R> |
||||
<P8R>0</P8R> |
||||
<REFUSEDTOT>0</REFUSEDTOT> |
||||
<REFUSED/> |
||||
<WTSHORTFALL/> |
||||
<WRENT>100.00</WRENT> |
||||
<WTCHARGE>100.00</WTCHARGE> |
||||
<WSCHARGE/> |
||||
<WPSCHRGE/> |
||||
<WSUPCHRG/> |
||||
<ChildBen>0.00</ChildBen> |
||||
<WTSHORTFALL1/> |
||||
<WTSHORTFALLHB/> |
||||
<WTSHORTFALLHE/> |
||||
<WRENT1>100.00</WRENT1> |
||||
<WTCHARGE1>100.00</WTCHARGE1> |
||||
<WSCHARGE1/> |
||||
<WPSCHRGE1/> |
||||
<WSUPCHRG1/> |
||||
<ChildBen1>0</ChildBen1> |
||||
</Group> |
||||
<Group> |
||||
<BSa>0</BSa> |
||||
<BSb>2</BSb> |
||||
<BSc>0</BSc> |
||||
<BScm>0</BScm> |
||||
<BScf>0</BScf> |
||||
<BSd>0</BSd> |
||||
<BSdm>0</BSdm> |
||||
<BSdf>0</BSdf> |
||||
<BSe>0</BSe> |
||||
<BSem>0</BSem> |
||||
<BSef>0</BSef> |
||||
<BSf>0</BSf> |
||||
<BSfm>0</BSfm> |
||||
<BSff>0</BSff> |
||||
<BSfmx>0</BSfmx> |
||||
<BSffx>0</BSffx> |
||||
<BEDROOMSTAND>2</BEDROOMSTAND> |
||||
<BEDMINUSBEDS>0</BEDMINUSBEDS> |
||||
<WRENTreduced>100.00</WRENTreduced> |
||||
<NonDepDeduct>23.35</NonDepDeduct> |
||||
<RENTHB/> |
||||
<ChildAllowan>0</ChildAllowan> |
||||
<PrsnlAllowan>0</PrsnlAllowan> |
||||
<HousBenDisAl>0</HousBenDisAl> |
||||
<PAIDHB/> |
||||
<HCNETAF/> |
||||
<ChldAlloCat1>0</ChldAlloCat1> |
||||
<ChldAlloCat2>0</ChldAlloCat2> |
||||
<P2NnDepDedct>23.35</P2NnDepDedct> |
||||
<P3NnDepDedct>0</P3NnDepDedct> |
||||
<P4NnDepDedct>0</P4NnDepDedct> |
||||
<P5NnDepDedct>0</P5NnDepDedct> |
||||
<P6NnDepDedct>0</P6NnDepDedct> |
||||
<P7NnDepDedct>0</P7NnDepDedct> |
||||
<P8NnDepDedct>0</P8NnDepDedct> |
||||
<DAY>10</DAY> |
||||
<MONTH>11</MONTH> |
||||
<YEAR>2021</YEAR> |
||||
<VDAY>15</VDAY> |
||||
<VMONTH>4</VMONTH> |
||||
<VYEAR>2021</VYEAR> |
||||
<MRCDAY/> |
||||
<MRCMONTH/> |
||||
<MRCYEAR/> |
||||
<PPOSTC1>FY1</PPOSTC1> |
||||
<PPOSTC2>1JD</PPOSTC2> |
||||
<POSTCODE/> |
||||
<POSTCOD2/> |
||||
</Group> |
||||
</Group> |
@ -0,0 +1,34 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe Imports::CaseLogsImportService do |
||||
let(:remote_folder) { "case_logs" } |
||||
let(:fixture_directory) { "spec/fixtures/softwire_imports/case_logs" } |
||||
let(:case_log_id) { "0ead17cb-1668-442d-898c-0d52879ff592" } |
||||
let(:case_log_id2) { "166fc004-392e-47a8-acb8-1c018734882b" } |
||||
let(:case_log_file) { File.open("#{fixture_directory}/#{case_log_id}.xml") } |
||||
let(:case_log_file2) { File.open("#{fixture_directory}/#{case_log_id2}.xml") } |
||||
let(:storage_service) { instance_double(StorageService) } |
||||
let(:real_2021_2022_form) { Form.new("config/forms/2021_2022.json", "2021_2022") } |
||||
|
||||
context "when importing users" do |
||||
subject(:case_log_service) { described_class.new(storage_service) } |
||||
|
||||
before do |
||||
# Stub the S3 file listing and download |
||||
allow(storage_service).to receive(:list_files) |
||||
.and_return(%W[#{remote_folder}/#{case_log_id}.xml #{remote_folder}/#{case_log_id2}.xml]) |
||||
allow(storage_service).to receive(:get_file_io) |
||||
.with("#{remote_folder}/#{case_log_id}.xml") |
||||
.and_return(case_log_file) |
||||
allow(storage_service).to receive(:get_file_io) |
||||
.with("#{remote_folder}/#{case_log_id2}.xml") |
||||
.and_return(case_log_file2) |
||||
# Stub the form handler to use the real form |
||||
allow(FormHandler.instance).to receive(:get_form).with(anything).and_return(real_2021_2022_form) |
||||
end |
||||
|
||||
it "successfully create a case log with the expected data" do |
||||
case_log_service.create_logs(remote_folder) |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue