| 1 |
ninoborges |
8 |
"""Making an XFS file for davita ga, with their bates that does not enumerate well with the current methods,
|
| 2 |
|
|
so that I can then load it in as a lfp overwriting the annotations. However, this just makes the xfs, so you
|
| 3 |
|
|
can use it for lots of stuff. I also used this xsf to make a targeted production where BegNo = prodBegNo. so
|
| 4 |
|
|
you can make a prod that skips around.
|
| 5 |
|
|
|
| 6 |
|
|
|
| 7 |
|
|
>>> outputFile = open(r"\\lisdisdss01\dis20\C_D\39323292\Prod\20100622_Re_Prod.xfs",'w')
|
| 8 |
|
|
>>> for line in contents:
|
| 9 |
|
|
... line = line.replace("\n","")
|
| 10 |
|
|
... begprod, endprod, begNo, endNo = line.split(",")
|
| 11 |
|
|
... prodList = FixBatesRange_func.EnumerateBates(begprod, endprod)
|
| 12 |
|
|
... if len(endNo) < 17:
|
| 13 |
|
|
... begNoAlpha = ""
|
| 14 |
|
|
... begNoList = FixBatesRange_func.EnumerateBates(begNo,endNo)
|
| 15 |
|
|
... elif len(endNo) == 20:
|
| 16 |
|
|
... begNoAlpha = begNo
|
| 17 |
|
|
... begNo = begNo + "_0001"
|
| 18 |
|
|
... tempList = FixBatesRange_func.EnumerateBates(begNo.split('_')[1],endNo.split('_')[1])
|
| 19 |
|
|
... begNoList = []
|
| 20 |
|
|
... for i in tempList:
|
| 21 |
|
|
... begNoList.append(begNoAlpha + "_" + i)
|
| 22 |
|
|
... elif len(endNo) == 21:
|
| 23 |
|
|
... begNoAlpha = begNo
|
| 24 |
|
|
... begNo = begNo + "_00001"
|
| 25 |
|
|
... tempList = FixBatesRange_func.EnumerateBates(begNo.split('_')[1],endNo.split('_')[1])
|
| 26 |
|
|
... begNoList = []
|
| 27 |
|
|
... for i in tempList:
|
| 28 |
|
|
... begNoList.append(begNoAlpha + "_" + i)
|
| 29 |
|
|
... else:
|
| 30 |
|
|
... print "ERROR!!!"
|
| 31 |
|
|
... masterlist = zip(begNoList,prodList)
|
| 32 |
|
|
... for x in masterlist:
|
| 33 |
|
|
... outputFile.write("%s|%s\n"% x)
|
| 34 |
|
|
...
|
| 35 |
|
|
>>> outputFile.close() |