You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
148 lines
2.5 KiB
148 lines
2.5 KiB
2 years ago
|
module Exports::LettingsLogExportConstants
|
||
2 years ago
|
MAX_XML_RECORDS = 10_000
|
||
|
LOG_ID_OFFSET = 300_000_000_000
|
||
|
|
||
2 years ago
|
EXPORT_MODE = {
|
||
|
xml: 1,
|
||
|
csv: 2,
|
||
|
}.freeze
|
||
|
|
||
2 years ago
|
QUARTERS = {
|
||
|
0 => "jan_mar",
|
||
|
1 => "apr_jun",
|
||
|
2 => "jul_sep",
|
||
|
3 => "oct_dec",
|
||
|
}.freeze
|
||
|
|
||
|
EXPORT_FIELDS = Set[
|
||
|
"armedforces",
|
||
|
"beds",
|
||
|
"benefits",
|
||
|
"brent",
|
||
|
"builtype",
|
||
|
"cap",
|
||
|
"cbl",
|
||
|
"chcharge",
|
||
|
"chr",
|
||
|
"cligrp1",
|
||
|
"cligrp2",
|
||
|
"createddate", # New metadata coming from our system
|
||
|
"confidential",
|
||
|
"earnings",
|
||
|
"ethnic",
|
||
|
"form",
|
||
|
"has_benefits",
|
||
|
"hb",
|
||
|
"hbrentshortfall",
|
||
|
"hcnum",
|
||
|
"hhmemb",
|
||
2 years ago
|
"hhtype",
|
||
2 years ago
|
"homeless",
|
||
|
"housingneeds",
|
||
|
"illness",
|
||
|
"incfreq",
|
||
|
"income",
|
||
|
"incref",
|
||
|
"intstay",
|
||
|
"irproduct",
|
||
|
"irproduct_other",
|
||
|
"joint",
|
||
|
"la",
|
||
|
"lar",
|
||
|
"layear",
|
||
|
"leftreg",
|
||
|
"lettype",
|
||
|
"manhcnum",
|
||
|
"maningorgid",
|
||
|
"maningorgname",
|
||
2 years ago
|
"mantype",
|
||
2 years ago
|
"mobstand",
|
||
|
"mrcdate",
|
||
|
"national",
|
||
|
"needstype",
|
||
|
"new_old",
|
||
|
"newprop",
|
||
|
"nocharge",
|
||
|
"offered",
|
||
|
"owningorgid",
|
||
|
"owningorgname",
|
||
|
"period",
|
||
|
"postcode_full",
|
||
|
"ppcodenk",
|
||
|
"ppostcode_full",
|
||
|
"preg_occ",
|
||
|
"prevloc",
|
||
|
"prevten",
|
||
|
"propcode",
|
||
|
"providertype",
|
||
|
"pscharge",
|
||
|
"reason",
|
||
|
"reasonother",
|
||
|
"reasonpref",
|
||
|
"referral",
|
||
|
"refused",
|
||
|
"reghome",
|
||
|
"renttype",
|
||
|
"renewal",
|
||
|
"reservist",
|
||
|
"rp_dontknow",
|
||
|
"rp_hardship",
|
||
|
"rp_homeless",
|
||
|
"rp_insan_unsat",
|
||
|
"rp_medwel",
|
||
|
"rsnvac",
|
||
|
"scharge",
|
||
|
"scheme",
|
||
|
"schtype",
|
||
2 years ago
|
"sheltered",
|
||
2 years ago
|
"startdate",
|
||
|
"startertenancy",
|
||
|
"supcharg",
|
||
|
"support",
|
||
|
"status", # New metadata coming from our system
|
||
|
"tcharge",
|
||
|
"tshortfall",
|
||
|
"tenancy",
|
||
|
"tenancycode",
|
||
|
"tenancylength",
|
||
|
"tenancyother",
|
||
|
"totadult",
|
||
|
"totchild",
|
||
|
"totelder",
|
||
|
"underoccupation_benefitcap",
|
||
|
"unitletas",
|
||
|
"units",
|
||
2 years ago
|
"units_scheme",
|
||
2 years ago
|
"unittype_gn",
|
||
|
"unittype_sh",
|
||
|
"uploaddate",
|
||
|
"username",
|
||
2 years ago
|
"vacdays",
|
||
2 years ago
|
"voiddate",
|
||
|
"waityear",
|
||
|
"wchair",
|
||
|
"wchchrg",
|
||
|
"wpschrge",
|
||
|
"wrent",
|
||
|
"wscharge",
|
||
|
"wsupchrg",
|
||
|
"wtcharge",
|
||
|
"wtshortfall",
|
||
|
]
|
||
|
|
||
|
(1..8).each do |index|
|
||
|
EXPORT_FIELDS << "age#{index}"
|
||
|
EXPORT_FIELDS << "ecstat#{index}"
|
||
|
EXPORT_FIELDS << "sex#{index}"
|
||
|
end
|
||
|
(2..8).each do |index|
|
||
|
EXPORT_FIELDS << "relat#{index}"
|
||
|
end
|
||
|
(1..10).each do |index|
|
||
|
EXPORT_FIELDS << "illness_type_#{index}"
|
||
|
end
|
||
|
%w[a b c d e f g h].each do |letter|
|
||
|
EXPORT_FIELDS << "housingneeds_#{letter}"
|
||
|
end
|
||
|
end
|