     (> 33 score) "E")
 )
 
-(defn gen-saa [districtName schoolName student assessment date]
+(defn student-ref [schoolName student]
+  (element :StudentReference {}
+    (element :StudentIdentity {}
+      (element :StudentUniqueStateId {} (join "-" [schoolName student]))
+    )
+  )
+)
+
+(defn gen-saa [schoolName student assessment date]
   (let [score (rand-nth (range 6 33))]
     (element :StudentAssessment {}
       (element :AdministrationDate {} date)
+      (element :AdministrationEndDate {} date)
+      (element :SerialNumber {} "2")
       (element :ScoreResults {:AssessmentReportingMethod "Scale score"}
         (element :Result {} (str score)))
         (element :PerformanceLevels {}
           (element :CodeValue {} (get-perf-level score))
         )
-        (student-ref districtName schoolName student)
+        (student-ref schoolName student)
         (element :AssessmentReference {}
           (element :AssessmentIdentity {}
             (element :AssessmentIdentificationCode {:IdentificationSystem "Test Contractor"}

  )
)

(defn gen-students [districtName schoolName ids output-file]
  (gen-edfi :InterchangeStudentParent output-file
    (into ()
      [
        (for [id ids
          :let [tmp (gen-student districtName schoolName id)]]
          tmp
        )
      ]
    )
  )
)

(defn student-ref [districtName schoolName student]
  (element :StudentReference {}
    (element :StudentIdentity {}
      (element :StudentUniqueStateId {} (join "-" [schoolName student]))
    )
  )
)

  )
)

(defn gen-sections [districtName output-file]
  (gen-edfi :InterchangeMasterSchedule output-file (reverse (create-section districtName)))
)


(def districts
    ["Abbott","Addison","Adirondack","Afton","Akron","Albany-City","Albion","Alden","Alexander","Alexandria","Alfred",
     "Allegany","Altmar-Parish","Amagansett","Amherst","Amityville","Amsterdam","Andes","Andover",
     "Ardsley","Argyle","Arkport","Arlington","Attica","Auburn-City","Ausable-Valley","Averill-Park","Avoca","Avon","Babylon",
     "Bainbridge","Baldwin","Baldwinsville","Ballston","Barker","Batavia","Bath","Bay-Shore","Bayport-Blue",
     "Beacon-City","Beaver-River","Bedford","Beekmantown","Belfast","Belleville","Bellmore","Bellmore-Merrick",
     "Bemus","Berkshire","Berlin","Berne-Knox","Bethlehem","Bethpage","Binghamton","Brook-Rye",
     "Bolivar","Bolton","Bradford","Brasher","Brentwood","Brewster","Briarcliff","Bridgehampton","Brighton",
     "Broadalbin","Brockport","Brocton","Bronxville","Brookfield","Brookhaven","Broome",
     "Brunswic","Brushton","Buffalo","Burnt-Hills","Byram Hills","Byron-Bergen","Cairo-Durham",
     "Caledonia","Cambridge","Camden","Campbell","Canajoharie","Canandaigua","Canaseraga","Canastota",
     "Candor","Canisteo","Canton","Capital","Carle-Place","Carmel","Carthage","Cassadaga",
     "Cato-Meridian","Catskill","Cattar-Allegany","Cattaraugus","Cayuga",
     "Cazenovia","Center","Central-Islip","Central-Square","Chappaqua","Charlotte","Chateaugay","Chatham",
     "Chautauqua","Chazy","Cheektowaga","Maryvale","Sloan","Chenango-Forks","Chenango",
     "Cherry-Valley","Chester","Chittenango","Churchville","Cincinnatus","Clarence","Clarkstown","Cleveland",
     "Clifton-Fin","Clinton","Clinton-Essex","Clyde","Clymer","Cobleskill","Cohoes-City",
     "Cold-Spring","Colton","Commack","Connetquot","Cooperstown","Copenhagen","Copiague","Corinth","Corning-City",
     "Cornwall","Cortland-City","Coxsackie","Croton-Harmon","Crown-Point","Cuba-Rushford","Dalton-Nunda",
     "Dansville","Deer-Park","Delaware","Delaw-","Depew","Deposit","Deruyter",
     "Dobbs-Ferry","Dolgeville","Dover","Downsville","Dryden","Duanesburg","Dundee","Dunkirk-City","Dutchess","East-Aurora",
     "East-Bloomfield","East-Greenbush","East-Hampton","East-Irondequoit","East-Islip","East-Meadow","East-Moriches",
     "East-Quogue","East-Ramapo","East-Rochester","East-Rockaway","East-Syracuse","East-Williston",
     "Eastchester","Eastern-Suffolk","Eastport-South","Eden","Edgemont","Edinburg-Common","Edmeston","Edwards-Knox",
     "Elba","Eldred","Elizabethtown","Ellenville","Ellicottville","Elmira-City","Elmira-Heights","Elmont","Elmsford",
     "Elwood","Erie","Erie-2","Evans-Brant","Fabius-Pompey","Fairport",
     "Falconer","Fallsburg","Farmingdale","Fayetteville","Fillmore","Fire-Island","Fishers-Island","Floral-Park",
     "Florida","Fonda","Forestville","Fort-Ann","Fort-Edward","Fort-Plain","Frankfort","Franklin",
     "Garden-City","Garrison","Gates-Chili","General-Brown","Genesee-Valley","Geneseo","Geneva-City",
     "Hadley-Luzerne","Haldane","Half-Hollow","Hamburg","Hamilton","Hamilton","Hammond",
     "Homer","Honeoye","Honeoye","Hoosic-Valley","Hoosick-Falls","Hopevale","Hornell-City",
     "Inlet-Comn","Iroquois","Irvington","Island-Park","Island-Trees","Islip","Ithaca-City","Jamestown-City","Jamesville",
     "Keene","Kendall","Kenmore","Kinderhook","Kings-Park","Kingston-City","Kiryas","La-Fargeville",
     "Livonia","Lockport-City","Locust-Valley","Long-Beach","Long-Lake","Longwood","Lowville-Academy","Lyme",
     "Middletown","1 - Manhattan","2- Manhattan","3 - Manhattan",
     "4 - Manhattan","5 - Manhattan","6 - Manhattan","7 - Bronx",
     "8 - Bronx","9 - Bronx","10 - Bronx","11 - Bronx",
     "12 - Bronx","13 - Brooklyn","14 - Brooklyn","15 - Brooklyn",
     "16 - Brooklyn","17 - Brooklyn","18 - Brooklyn","19 - Brooklyn",
     "20 - Brooklyn","21 - Brooklyn","22 - Brooklyn","23 - Brooklyn",
     "24 - Queens","25 - Queens","26 - Queens","27 - Queens",
     "31 - Staten Island","32 - Brooklyn","NYC Spec Schools","Oakfield",
     "Ossining","Oswego","Oswego-City","Otego-Unadilla","Otsego-Delaw","Owego-Apalachin",
     "Panama","Parishville","Patchogue","Pavilion","Pawling","Pearl-River","Peekskill","Poland",
     "Randolph","Raquette","Ravena","Red-Creek","Red-Hook","Remsen","Remsenburg",
     "Salem","Salmon","Sandy-Creek","Saranac","Saranac-Lake","Saratoga-Springs","Saugerties","Sauquoit-Valley" ] )

(defn gen-district-schools
  [districtCount schoolsPerDistrict studentsPerSchool]
