animalno = t["Animal #"] testname = t["Test"] else: testdate = getdate(t["Status"]) result = t["Test For"] process_test(animalno, testdate, testname, result) odd = not odd else: for t in test: if t["AnimalID"] == "AnimalID": continue process_test(t["AnimalID"], getdate(t["ItemStatusDateTime"]), t["TestForCondition"], t["Result"]) # Run back through the animals, if we have any that are still # on shelter after 1 year, add an adoption to an unknown owner asm.adopt_older_than(animals, movements, uo.ID, 365) # Now that everything else is done, output stored records for k, v in asm.locations.iteritems(): print v if len(asm.jurisdictions.keys()) > 0: print "DELETE FROM jurisdiction;" for k, v in asm.jurisdictions.iteritems(): print v for a in animals: print a for at in animaltests: print at for av in animalvaccinations: print av for o in owners:
asm.stderr("Process complaint notes") for row in ccomplaintsnotes: if not ppac.has_key(row["tblComplaintsID"]): continue a = ppac[row["tblComplaintsID"]] l = asm.Log() logs.append(l) l.LogTypeID = 3 l.LinkID = a.ID l.LinkType = 6 l.Date = asm.getdate_mmddyy(row["LastUpdate"]) if l.Date is None: l.Date = asm.now() l.Comments = row["Note"] # Take remaining animals off shelter if they've been on longer than ADOPT_LONGER_THAN_DAYS asm.adopt_older_than(animals, movements, ownerid=uo.ID, days=ADOPT_LONGER_THAN_DAYS) # Now that everything else is done, output stored records for a in animals: print a for am in animalmedicals: print am for av in animalvaccinations: print av for l in logs: print l for o in owners: print o for m in movements: print m