From a1777ce5dade448f49f1a1d26b4dca21ad5e0e89 Mon Sep 17 00:00:00 2001 From: Karl Fogel Date: Fri, 31 Jul 2015 18:13:53 -0500 Subject: [PATCH] Continue work on exporting all clients (#14). Start determining the CSV output format. * public/js/index.js: Start describing the CSV components. * examples/Client.csv: An example CSV export, courtesy of Dave. --- examples/Client.csv | 21 +++++++++++++++++++++ public/js/index.js | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 examples/Client.csv diff --git a/examples/Client.csv b/examples/Client.csv new file mode 100644 index 0000000..9ee5263 --- /dev/null +++ b/examples/Client.csv @@ -0,0 +1,21 @@ +"OrganizationID","PersonalIdentificationNumber","LegalFirstName","LegalMiddleName","LegalLastName","LegalSuffix","SocialSecurityNumber","SocialSecNumberQualityCode","DateOfBirth","DateOfBirthQualityCode","PrimaryRace","SecondaryRace","Ethnicity","Gender","DateAdded","DateUpdated","UpdateOrDelete","IdentityVerification","ReleaseOfInformation","ExportIDStr" +31,30486,"Parish","Y","Phena","","300030486","1","4/24/1988","1","3","","0","0","12/16/2004","","",,,152 +31,33636,"Purlina","Y","Panache","Jr.","300033636","1","2/3/1969","1","5","","0","1","2/24/2005","","",,,152 +31,39976,"Apple","","Papacy","MSW, LISW","300039976","1","4/13/1962","1","5","","0","0","6/28/2005","","",,,152 +31,61985,"Parmida","X","Puptent","","","8","6/26/1968","1","","","9","","11/13/2007","","",,,152 +31,62008,"Paula","Z","Phamily","","300062008","1","5/13/1991","1","3","","0","0","11/14/2007","","",,,152 +31,62009,"Pauletta","F","Phederal","","300062009","1","1/16/1994","1","3","","0","0","11/14/2007","","",,,152 +31,62011,"Paulina","T","Phelicitate","","300062011","1","3/10/1995","1","3","","0","0","11/14/2007","","",,,152 +31,64036,"Miranda","X","Papadakis","","300064036","1","12/5/1988","1","3","","0","0","2/29/2008","","",,,152 +31,64037,"Molly","Y","Paparodis","","300064037","1","","8","3","","0","0","2/29/2008","","",,,152 +31,69239,"Philantha","Z","Pond","","300069239","1","11/17/1970","1","3","","0","0","10/20/2008","","",,,152 +31,70999,"Pebbles","T","Pearson","","300070999","1","","","3","","0","0","1/13/2009","","",,,152 +31,71000,"Pegeen","","Peart","","300071000","1","11/2/2007","1","3","","0","0","1/13/2009","","",,,152 +31,75268,"Pirro","R","Phelan","","300075268","1","9/25/1960","1","3","","0","0","7/8/2009","","",,,152 +31,77525,"Pablo","X","Patel","","300077525","1","3/18/1985","1","3","","1","0","9/7/2009","","",,,152 +31,77526,"Paciencia","Y","Patent","","300077526","8","1/25/2005","1","3","","1","0","9/7/2009","","",,,152 +31,84421,"Opus","Y","Pedagogue","","300084421","1","5/8/1986","1","5","","0","0","2/19/2010","","",,,152 +31,84422,"Orange","Z","Pedant","","300084422","1","1/1/1995","1","5","","1","1","2/19/2010","","",,,152 +31,84423,"Pabla","F","Pediatrics","","300084423","1","1/23/2009","1","5","","1","1","2/19/2010","","",,,152 +31,86711,"Josefina","","Smith","","987123456","1","9/2/1972","2","","","9","0","3/18/2011","","",,,152 +31,86712,"Phineas","","Phylum","","123456987","1","9/2/1993","1","1","4","0","1","3/18/2011","","",,,152 diff --git a/public/js/index.js b/public/js/index.js index 3bf9fac..ca28a45 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -444,6 +444,33 @@ $(function() { // JSON, not CSV, and the JSON is still pretty opaque -- // it's just "[object Object]" over and over. We'll // unpack it when we're really creating CSV, of course. + + // UDE columns to export to CSV (in progress): + // + // 3.13 PersonalID (3.13.1) + // 3.1 Name + // 3.1.1 First Name (null ok) + // 3.1.2 Middle Name (null ok) + // 3.1.3 Last Name (null ok) + // 3.1.4 Name Suffix (null ok) + // 3.2 Social Security Number (null ok) (string, double-quotes padded w/ leading zeros) + // 3.3 Date of Birth (null ok) + // 3.4 Race + // 3.4.1 AmIndAKNative (1 = American Indian or Alaska Native) + // 3.4.1 Asian (1 = Asian) + // 3.4.1 BlackAfAmerican (1 = Black or African American) + // 3.4.1 NativeHIOtherPacific (1 = Native Hawaiian or Other Pacific Islander) + // 3.4.1 White (1 = White) + // 3.4.1 RaceNone (null ok) (Non-null only if all other Race fields = 0 or 99) + // 3.5 Ethnicity (3.5.1) + // 3.6 Gender + // 3.6.1 Gender + // 3.6.A OtherGender (null ok) + // 3.7 Veteran Status (Export 99 (Data not collected) + // for all clients, including minors, for whom there is + // no Veteran Status data. + // 4.41 Veteran Information + var clients_downloadable = new Blob(clients, {type: "text/plain;charset=utf-8"}); // We use the HUD 2014 standard name for this file, // http://www.hudhdx.info/Resources/Vendors/4_0/HMISCSVSpecifications4_0FINAL.pdf