Skip to content
Snippets Groups Projects
Commit bc065d35 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'redcap-sync' into 'master'

new location is added, fix on bug with prefixes

See merge request NCER-PD/scheduling-system!243
parents f856763c 7557430d
No related branches found
No related tags found
1 merge request!243new location is added, fix on bug with prefixes
Pipeline #25367 passed
......@@ -136,74 +136,76 @@ class TnsCsvVisitImportReader:
if text is None:
text = data['lab_id']
if text.startswith('lab-reunis-1'):
text='Laboratoires réunis, 23 Route de Diekirch, 6555, Bollendorf-Pont'
if text.startswith('lab-reunis-2'):
text='Laboratoires réunis, 38 Rue Hiehl, 6131, Junglinster'
if text.startswith('lab-reunis-3'):
text='Laboratoires réunis, 16 Rue de la Gare, 6117, Junglinster'
if text.startswith('lab-reunis-4'):
text='Laboratoires réunis, 456 Rue de Neudorf, 2222, Luxembourg'
if text.startswith('lab-reunis-5'):
text='Laboratoires réunis, 14 Place St Michel, 7556, Mersch'
if text.startswith('lab-reunis-6'):
text='Laboratoires réunis, 2 Avenue des Bains, 5610, Mondorf-les-Bains'
if text.startswith('lab-reunis-7'):
text='Laboratoires réunis, 239 Route d\'Arlon, 8011, Strassen'
if text.startswith('lab-reunis-8'):
text='Laboratoires réunis, 123 Route de Diekirch, 7220, Walferdange'
if text.startswith('lab-reunis-9'):
text='Laboratoires réunis, 20 Rue de Luxembourg, 4220, Esch-sur-Alzette'
if text.startswith('lab-reunis-10'):
text='Laboratoires réunis, 124 Avenue de Luxembourg, 4940, Bascharage'
if text.startswith('lab-reunis-11'):
text='Laboratoires réunis, 1 Marbuergerstrooss, 9764, Marnach'
if text.startswith('lab-reunis-12'):
text='Laboratoires réunis, 51 Avenue Lucien Salentiny, 9080, Ettelbruck'
if text.startswith('lab-reunis-13'):
text='Laboratoires réunis, 14 route de l\'Europe, 5531, Remich'
if text.startswith('lab-reunis-14'):
text='Laboratoires réunis, 27, rue Principale, 5240, Sandweiler'
if text.startswith('lab-reunis-15'):
text='Laboratoires réunis, booking by phone 780 290-1, , '
if text.startswith('lab-bionext-16'):
text='BioneXt, 2 Rue du Chateau d\'Eau, 3364, Leudelange'
if text.startswith('lab-bionextpd-17'):
text='BioneXt, PickenDoheem'
if text.startswith('lab-ketterthill-18'):
text='Ketterthill, 11, rue Schwaarze Wee , 3474, Dudelange'
if text.startswith('lab-ketterthill-19'):
text='Ketterthill, 52, bd J.-F. Kennedy , 4170, Esch-sur-Alzette'
if text.startswith('lab-ketterthill-20'):
text='Ketterthill, 7, route de Bettembourg , 5810, Hesperange'
if text.startswith('lab-ketterthill-21'):
text='Ketterthill, Avenue des Bains (Dom. Thermal) , 5601, Mondorf-les-Bains'
if text.startswith('lab-ketterthill-22'):
text='Ketterthill, 8, avenue du Swing , 4367, Belvaux'
if text.startswith('lab-ketterthill-23'):
text='Ketterthill, 1-3, rue de la Continentale , 4917, Bascharage'
if text.startswith('lab-ketterthill-24'):
text='Ketterthill, 14, rue d\'Esch, 3920, Mondercange'
if text.startswith('lab-ketterthill-25'):
text='Ketterthill, 21, rue d\'Orval , 2270, Luxembourg'
if text.startswith('lab-ketterthill-26'):
text='Ketterthill, 24, rue Glesener , 1630, Luxembourg'
if text.startswith('lab-ketterthill-27'):
text='Ketterthill, 36, avenue Victor Hugo , 1750, Luxembourg'
if text.startswith('lab-ketterthill-28'):
text='Ketterthill, 70, rue de Luxembourg , 8140, Bridel'
if text.startswith('lab-ketterthill-29'):
text='Ketterthill, 15, rue Edward Steichen , 2540, Luxembourg'
if text.startswith('lab-ketterthill-30'):
text='Ketterthill, 29, rue Cents , 1319, Luxembourg'
if text.startswith('lab-ketterthill-31'):
text='Ketterthill, 155, rue Lucien Salentiny , 9080, Ettelbruck'
if text.startswith('lab-ketterthill-32'):
text='Ketterthill, 12, rue G.-D. Charlotte , 7520, Mersch'
if text.startswith('lab-ketterthill-33'):
text='Ketterthill, 18, rue de la Piscine , 8508, Redange-sur-Atert'
if text.startswith('lab-ketterthill-34'):
text='Ketterthill, 19, rue Grande-Duchesse Charlotte , 9515, Wiltz'
if text == 'lab-reunis-1':
text = 'Laboratoires réunis, 23 Route de Diekirch, 6555, Bollendorf-Pont'
if text == 'lab-reunis-2':
text = 'Laboratoires réunis, 38 Rue Hiehl, 6131, Junglinster'
if text == 'lab-reunis-3':
text = 'Laboratoires réunis, 16 Rue de la Gare, 6117, Junglinster'
if text == 'lab-reunis-4':
text = 'Laboratoires réunis, 456 Rue de Neudorf, 2222, Luxembourg'
if text == 'lab-reunis-5':
text = 'Laboratoires réunis, 14 Place St Michel, 7556, Mersch'
if text == 'lab-reunis-6':
text = 'Laboratoires réunis, 2 Avenue des Bains, 5610, Mondorf-les-Bains'
if text == 'lab-reunis-7':
text = 'Laboratoires réunis, 239 Route d\'Arlon, 8011, Strassen'
if text == 'lab-reunis-8':
text = 'Laboratoires réunis, 123 Route de Diekirch, 7220, Walferdange'
if text == 'lab-reunis-9':
text = 'Laboratoires réunis, 20 Rue de Luxembourg, 4220, Esch-sur-Alzette'
if text == 'lab-reunis-10':
text = 'Laboratoires réunis, 124 Avenue de Luxembourg, 4940, Bascharage'
if text == 'lab-reunis-11':
text = 'Laboratoires réunis, 1 Marbuergerstrooss, 9764, Marnach'
if text == 'lab-reunis-12':
text = 'Laboratoires réunis, 51 Avenue Lucien Salentiny, 9080, Ettelbruck'
if text == 'lab-reunis-13':
text = 'Laboratoires réunis, 14 route de l\'Europe, 5531, Remich'
if text == 'lab-reunis-14':
text = 'Laboratoires réunis, 27, rue Principale, 5240, Sandweiler'
if text == 'lab-reunis-15':
text = 'Laboratoires réunis, booking by phone 780 290-1, , '
if text == 'lab-bionext-16':
text = 'BioneXt, 2 Rue du Chateau d\'Eau, 3364, Leudelange'
if text == 'lab-bionextpd-17':
text = 'BioneXt, PickenDoheem'
if text == 'lab-ketterthill-18':
text = 'Ketterthill, 11, rue Schwaarze Wee , 3474, Dudelange'
if text == 'lab-ketterthill-19':
text = 'Ketterthill, 52, bd J.-F. Kennedy , 4170, Esch-sur-Alzette'
if text == 'lab-ketterthill-20':
text = 'Ketterthill, 7, route de Bettembourg , 5810, Hesperange'
if text == 'lab-ketterthill-21':
text = 'Ketterthill, Avenue des Bains (Dom. Thermal) , 5601, Mondorf-les-Bains'
if text == 'lab-ketterthill-22':
text = 'Ketterthill, 8, avenue du Swing , 4367, Belvaux'
if text == 'lab-ketterthill-23':
text = 'Ketterthill, 1-3, rue de la Continentale , 4917, Bascharage'
if text == 'lab-ketterthill-24':
text = 'Ketterthill, 14, rue d\'Esch, 3920, Mondercange'
if text == 'lab-ketterthill-25':
text = 'Ketterthill, 21, rue d\'Orval , 2270, Luxembourg'
if text == 'lab-ketterthill-26':
text = 'Ketterthill, 24, rue Glesener , 1630, Luxembourg'
if text == 'lab-ketterthill-27':
text = 'Ketterthill, 36, avenue Victor Hugo , 1750, Luxembourg'
if text == 'lab-ketterthill-28':
text = 'Ketterthill, 70, rue de Luxembourg , 8140, Bridel'
if text == 'lab-ketterthill-29':
text = 'Ketterthill, 15, rue Edward Steichen , 2540, Luxembourg'
if text == 'lab-ketterthill-30':
text = 'Ketterthill, 29, rue Cents , 1319, Luxembourg'
if text == 'lab-ketterthill-31':
text = 'Ketterthill, 155, rue Lucien Salentiny , 9080, Ettelbruck'
if text == 'lab-ketterthill-32':
text = 'Ketterthill, 12, rue G.-D. Charlotte , 7520, Mersch'
if text == 'lab-ketterthill-33':
text = 'Ketterthill, 18, rue de la Piscine , 8508, Redange-sur-Atert'
if text == 'lab-ketterthill-34':
text = 'Ketterthill, 19, rue Grande-Duchesse Charlotte , 9515, Wiltz'
if text == 'lab-reunis-37':
text = 'Laboratoires réunis, 5, route de Trèves , 6793, Grevenmacher'
locations = Location.objects.filter(name=text)
if len(locations) > 0:
return locations[0]
......@@ -224,5 +226,6 @@ class TnsCsvVisitImportReader:
result += "<p><font " + style + ">Number of raised warnings: <b>" + str(self.warning_count) + "</b></font></p>"
return result
def remove_bom(line):
return line[3:] if line.startswith(codecs.BOM_UTF8) else line
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment