Changeset a78e3e4 in osmose-backend


Ignore:
Timestamp:
Oct 8, 2014 1:53:25 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
64b86be
Parents:
954dd43
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (08/10/2014 13:52:55)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (08/10/2014 13:53:25)
Message:

Import analyser_merge_pharmacy_FR with finess ref

File:
1 edited

Legend:

Unmodified
Added
Removed
  • analysers/analyser_merge_pharmacy_FR.py

    r1b438a8 ra78e3e4  
    2727    def __init__(self, config, logger = None): 
    2828        self.missing_official = {"item":"8210", "class": 1, "level": 3, "tag": ["merge"], "desc": T_(u"Pharmacy not integrated") } 
    29         #self.missing_osm      = {"item":"7150", "class": 2, "level": 3, "tag": ["merge"], "desc": T_(u"Unknown Pharmacy") } 
     29        self.missing_osm      = {"item":"7150", "class": 2, "level": 3, "tag": ["merge"], "desc": T_(u"Pharmacy without ref:FR:FINESS") } 
     30        self.missing_official = {"item":"8211", "class": 3, "level": 3, "tag": ["merge"], "desc": T_(u"Pharmacy, integration suggestion") } 
    3031        Analyser_Merge.__init__(self, config, logger, 
    3132            Source( 
     
    4546                        "source": "Celtipharm - 10/2014"}, 
    4647                    mapping = { 
    47                         "name": lambda res: res['CTPM_NOMUSAGE'].replace('PHARMACIE', 'Pharmacie').replace(' D ', " d'").replace(' DE ', ' de ').replace(' DU ', ' du ').replace(' DES ', ' des ').replace(' LA ', ' la ').replace(' LES ', ' les ').replace(' ET ', ' et ') }, 
     48                        "name": lambda res: res['CTPM_NOMUSAGE'].replace('PHARMACIE', 'Pharmacie').replace(' D ', " d'").replace(' DE ', ' de ').replace(' DU ', ' du ').replace(' DES ', ' des ').replace(' LA ', ' la ').replace(' LES ', ' les ').replace(' ET ', ' et '), 
     49                        "ref:FR:FINESS": "CTPM_FINESSGEOGRAPHIQUE"}, 
    4850                text = lambda tags, fields: {"en": ', '.join(filter( lambda x: x and x != 'None', [fields["CTPM_ADR1"], fields["CTPM_ADR2"], fields["CTPM_ADR3"], fields["CTPM_CP"], fields["CTPM_VILLE"]]))} ))) 
Note: See TracChangeset for help on using the changeset viewer.