Gnumed.business.gmVaccDefs

Package Gnumed :: Package business :: Module gmVaccDefs |
[frames] | no frames]

# Source Code for Module Gnumed.business.gmVaccDefs

      1  # -*- coding: utf-8 -*-
      2
      3
      4
      5  """GNUmed vaccination related definitions (only).
      6
      7  Based on WHO ATC data.
      8
      9  Interestingly, WHO does not list ATC codes for a few
     10  vaccination indications, such as Q-fever. It also misses some
     11  common multi-component vaccines, such as TdaP."""
     12
     13  #============================================================
     14  __author__ = "K.Hilbert <Karsten.Hilbert@gmx.net>"
     15  __license__ = "GPL v2"
     16
     17  import sys
     18  import logging
     19
     20  if __name__ == '__main__':
     21          sys.path.insert(0, '../../')
     22  from Gnumed.pycommon import gmI18N
     23  if __name__ == '__main__':
     24          gmI18N.activate_locale()
     25          gmI18N.install_domain('gnumed')
     26
     27
     28  _log = logging.getLogger('gm.vacc')
     29
     30  #============================================================
     31  _VACCINE_SUBSTANCES = {
     32
     33          # bacterial
     34
     35          'anthrax': {
     36                  'name': 'bacillus anthracis antigen',
     37                  'atc4target': 'J07AC01',
     38                  'target': _('J07AC01-target::anthrax'),
     39                  'v21_indications': ['bacillus anthracis (Anthrax)']
     40          },
     41
     42          'brucellosis': {
     43                  'name': 'brucella antigen',
     44                  'atc4target': 'J07AD01',
     45                  'target': _('J07AD01-target::brucellosis')
     46          },
     47
     48          'cholera': {
     49                  'name': 'cholera, inactivated',
     50                  'atc4target': 'J07AE0',
     51                  'target': _('J07AE0-target::cholera'),
     52                  'v21_indications': ['cholera']
     53          },
     54          'cholera-live': {
     55                  'name': 'cholera, live, attenuated',
     56                  'atc4target': 'J07AE0',
     57                  'target': _('J07AE0-target::cholera'),
     58                  'v21_indications_live': ['cholera']
     59          },
     60
     61          'diphtheria': {
     62                  'name': 'diphtheria toxoid',
     63                  'atc4target': 'J07AF01',
     64                  'target': _('J07AF01-target::diphtheria'),
     65                  'v21_indications': ['diphtheria']
     66          },
     67
     68          'HiB': {
     69                  'name': 'hemophilus influenzae B antigen',
     70                  'atc4target': 'J07AG01',
     71                  'target': _('J07AG01-target::HiB'),
     72                  'v21_indications': ['haemophilus influenzae b']
     73          },
     74
     75          'menA': {
     76                  'name': 'meningococcus A antigen',
     77                  'atc4target': 'J07AH01',
     78                  'target': _('J07AH01-target::meningococcus A'),
     79                  'v21_indications': ['meningococcus A']
     80          },
     81  #       'menA-conj': {
     82  #               'name': u'meningococcus A antigen, conjugated',
     83  #               'atc4target': u'J07AH10',
     84  #               'target': _(u'J07AH10-target::meningococcus A')
     85  #       },
     86          'menBmem': {
     87                  'name': 'meningococcus B membrane',
     88                  'atc4target': 'J07AH06',
     89                  'target': _('J07AH06-target::meningococcus B')
     90          },
     91  #       'menBmulti': {
     92  #               'name': u'meningococcus B multicomponent',
     93  #               'atc4target': u'J07AH09',
     94  #               'target': _(u'J07AH09-target::meningococcus B'),
     95  #       },
     96          'menC': {
     97                  'name': 'meningococcus C antigen',
     98                  'atc4target': 'J07AH07',
     99                  'target': _('J07AH07-target::meningococcus C'),
    100                  'v21_indications': ['meningococcus C']
    101          },
    102          'menY': {               # fake
    103                  'name': 'meningococcus Y antigen',
    104                  'atc4target': 'J07AH0Y',
    105                  'target': _('J07AH0Y-target::meningococcus Y'),
    106                  'v21_indications': ['meningococcus Y']
    107          },
    108          'menW': {               # fake
    109                  'name': 'meningococcus W-135 antigen',
    110                  'atc4target': 'J07AH0W',
    111                  'target': _('J07AH0W-target::meningococcus W'),
    112                  'v21_indications': ['meningococcus W']
    113          },
    114
    115          'pertussis': {          # fake
    116                  'name': 'pertussis',
    117                  'atc4target': 'J07AJ0',
    118                  'target': _('J07AJ0-target::pertussis'),
    119                  'v21_indications': ['pertussis']
    120          },
    121  #       'pertussis-inactivated': {
    122  #               'name': u'pertussis, inactivated',
    123  #               'atc4target': u'J07AJ01',
    124  #               'target': _(u'J07AJ01-target::pertussis')
    125  #       },
    126  #       'pertussis-antigen': {
    127  #               'name': u'pertussis, antigen',
    128  #               'atc4target': u'J07AJ02',
    129  #               'target': _(u'J07AJ02-target::pertussis')
    130  #       },
    131
    132          'plague': {
    133                  'name': 'yersinia pestis, inactivated',
    134                  'atc4target': 'J07AK01',
    135                  'target': _('J07AK01-target::plague'),
    136                  'v21_indications': ['yersinia pestis']
    137          },
    138
    139          'pneumococcus': {
    140                  'name': 'pneumococcus antigen',
    141                  'atc4target': 'J07AL0',
    142                  'target': _('J07AL0-target::pneumococcus'),
    143                  'v21_indications': ['pneumococcus']
    144          },
    145  #       'pneumococcus-conjugated': {
    146  #               'name': u'pneumococcus antigen, conjugated',
    147  #               'atc4target': u'J07AL02',
    148  #               'target': _(u'J07AL02-target::pneumococcus'),
    149  #       },
    150
    151          'tetanus': {
    152                  'name': 'tetanus toxoid',
    153                  'atc4target': 'J07AM01',
    154                  'target': _('J07AM01-target::tetanus'),
    155                  'v21_indications': ['tetanus']
    156          },
    157
    158          'tbc-live': {
    159                  'name': 'tuberculosis, live, attenuated',
    160                  'atc4target': 'J07AN01',
    161                  'target': _('J07AN01-target::tbc'),
    162                  'v21_indications_live': ['tuberculosis']
    163          },
    164
    165          'salmo-live': {
    166                  'name': 'salmonella typhi, live, attenuated',
    167                  'atc4target': 'J07AP0',
    168                  'target': _('J07AP0-target::typhoid'),
    169                  'v21_indications_live': ['salmonella typhi (typhoid)']
    170          },
    171          'salmo-inact': {
    172                  'name': 'salmonella typhi, inactivated',
    173                  'atc4target': 'J07AP0',
    174                  'target': _('J07AP0-target::typhoid')
    175          },
    176  #       'salmo-antigen': {
    177  #               'name': u'salmonella typhi antigen',
    178  #               'atc4target': u'J07AP03',
    179  #               'target': _(u'J07AP03-target::typhoid')
    180  #       },
    181          'salmo-typh+ent': {
    182                  'name': 'salmonella typhi, enterica',
    183                  'atc4target': 'J07AP1',
    184                  'target': _('J07AP1-target::typhoid, paratyphus'),
    185                  'v21_indications': ['salmonella typhi (typhoid)']
    186          },
    187
    188          'typh-exanth': {
    189                  'name': 'rickettsia prowazekii, inactivated',
    190                  'atc4target': 'J07AR01',
    191                  'target': _('J07AR01-target::typhus exanthematicus')
    192          },
    193
    194          'qfever': {             # fake
    195                  'name': 'coxiella burnetii',
    196                  'atc4target': 'J07AXQF',
    197                  'target': _('J07AXQF-target::Q fever'),
    198                  'v21_indications': ['coxiella burnetii (Q fever)']
    199          },
    200
    201          # viral
    202
    203          'fsme': {
    204                  'name': 'flavivirus, tick-borne',
    205                  'atc4target': 'J07BA01',
    206                  'target': _('J07BA01-target::tick-borne encephalitis'),
    207                  'v21_indications': ['tick-borne meningoencephalitis']
    208          },
    209
    210          'japEnc': {
    211                  'name': 'flavivirus, japanese',
    212                  'atc4target': 'J07BA0J',                # fake
    213                  'target': _('J07BA0J-target::japanese encephalitis'),
    214                  'v21_indications': ['japanese B encephalitis']
    215          },
    216          'japEnc-live': {
    217                  'name': 'flavivirus, japanese, live, attenuated',
    218                  'atc4target': 'J07BA0J',                # fake
    219                  'target': _('J07BA0J-target::japanese encephalitis'),
    220                  'v21_indications_live': ['japanese B encephalitis']
    221          },
    222
    223          'influ-inact': {
    224                  'name': 'influenza, inactivated',
    225                  'atc4target': 'J07BB0',
    226                  'target': _('J07BB0-target::influenza'),
    227                  'v21_indications': ['influenza (seasonal)', 'influenza (H3N2)', 'influenza (H1N1)']
    228          },
    229  #       'influ-inact-surf': {
    230  #               'name': u'influenza, inactivated, surface',
    231  #               'atc4target': u'J07BB0',
    232  #               'target': _(u'J07BB0-target::influenza')
    233  #       },
    234          'influ-live': {
    235                  'name': 'influenza, live, attenuated',
    236                  'atc4target': 'J07BB0',
    237                  'target': _('J07BB0-target::influenza'),
    238                  'v21_indications_live': ['influenza (seasonal)', 'influenza (H3N2)', 'influenza (H1N1)']
    239          },
    240
    241          'hepB': {
    242                  'name': 'hepatitis B antigen',
    243                  'atc4target': 'J07BC01',
    244                  'target': _('J07BC01-target::hepatitis B'),
    245                  'v21_indications': ['hepatitis B']
    246          },
    247
    248          'hepA-inact': {
    249                  'name': 'hepatitis A, inactivated',
    250                  'atc4target': 'J07BC0', # 02
    251                  'target': _('J07BC0-target::hepatitis A'),
    252                  'v21_indications': ['hepatitis A']
    253          },
    254  #       'hepA-antig': {
    255  #               'name': u'hepatitis A antigen',
    256  #               'atc4target': u'J07BC0', # 03
    257  #               'target': _(u'J07BC0-target::hepatitis A')
    258  #       },
    259
    260          'measles-live': {
    261                  'name': 'measles, live, attenuated',
    262                  'atc4target': 'J07BD01',
    263                  'target': _('J07BD01-target::measles'),
    264                  'v21_indications_live': ['measles']
    265          },
    266
    267          'mumps-live': {
    268                  'name': 'mumps, live, attenuated',
    269                  'atc4target': 'J07BE01',
    270                  'target': _('J07BE01-target::mumps'),
    271                  'v21_indications_live': ['mumps']
    272          },
    273
    274          'polio-live': {
    275                  'name': 'poliomyelitis, live, attenuated',
    276                  'atc4target': 'J07BF0', # 01
    277                  'target': _('J07BF0-target::poliomyelitis'),
    278                  'v21_indications_live': ['poliomyelitis']
    279          },
    280          'polio-inact': {
    281                  'name': 'poliomyelitis, inactivated',
    282                  'atc4target': 'J07BF0',
    283                  'target': _('J07BF0-target::poliomyelitis'),
    284                  'v21_indications': ['poliomyelitis']
    285          },
    286
    287          'rabies': {
    288                  'name': 'rabies, inactivated',
    289                  'atc4target': 'J07BG01',
    290                  'target': _('J07BG01-target::rabies'),
    291                  'v21_indications': ['rabies']
    292          },
    293
    294          'rota-live-atten': {
    295                  'name': 'rotavirus, live, attenuated',
    296                  'atc4target': 'J07BH0',         # 01
    297                  'target': _('J07BH0-target::rotavirus diarrhea')
    298          },
    299  #       'rota-live': {
    300  #               'name': u'rotavirus, live',
    301  #               'atc4target': u'J07BH0',                # 02
    302  #               'target': _(u'J07BH0-target::rotavirus diarrhea'),
    303  #               'v21_indications_live': [u'rotavirus']
    304  #       },
    305
    306          'rubella-live': {
    307                  'name': 'rubella, live',
    308                  'atc4target': 'J07BJ01',
    309                  'target': _('J07BJ01-target::rubella'),
    310                  'v21_indications_live': ['rubella']
    311          },
    312
    313          'chickenpox-live': {
    314                  'name': 'herpes virus (chickenpox), live',
    315                  'atc4target': 'J07BK0', # 01
    316                  'target': _('J07BK0-target::varicella (chickenpox)'),
    317                  'v21_indications_live': ['varicella (chickenpox, shingles)']
    318          },
    319          'shingles-live': {
    320                  'name': 'herpes virus (shingles), live',
    321                  'atc4target': 'J07BK0', # 02
    322                  'target': _('J07BK0-target::zoster (shingles)')
    323          },
    324
    325          'yellow_fever-live': {
    326                  'name': 'yellow fever virus, live',
    327                  'atc4target': 'J07BL01',
    328                  'target': _('J07BL01-target::yellow fever'),
    329                  'v21_indications_live': ['yellow fever']
    330          },
    331
    332          'pap-generic': {                # fake
    333                  'name': 'papillomavirus',
    334                  'atc4target': 'J07BM0',
    335                  'target': _('J07BM0-target::HPV'),
    336                  'v21_indications': ['human papillomavirus']
    337          },
    338          'pap6-11-16-18': {
    339                  'name': 'papillomavirus 6,11,16,18',
    340                  'atc4target': 'J07BM01',
    341                  'target': _('J07BM01-target::HPV')
    342          },
    343          'pap16-18': {
    344                  'name': 'papillomavirus 16,18',
    345                  'atc4target': 'J07BM02',
    346                  'target': _('J07BM02-target::HPV')
    347          },
    348          'pap6-11-16-18-31-33-45-52-58': {
    349                  'name': 'papillomavirus 6,11,16,18,31,33,45,52,58',
    350                  'atc4target': 'J07BM03',
    351                  'target': _('J07BM03-target::HPV')
    352          },
    353
    354          'smallpox': {
    355                  'name': 'variola virus, live',
    356                  'atc4target': 'J07BX01',
    357                  'target': _('J07BX01-target::variola (smallpox)'),
    358                  'v21_indications_live': ['variola virus (smallpox)']
    359          }
    360
    361  }
    362
    363  #------------------------------------------------------------
    364  # J07 - vaccines
    365  _GENERIC_VACCINES = {
    366
    367          # J07A - antibacterial vaccines
    368
    369          'anthrax': {
    370                  'name': _('generic anthrax vaccine'),
    371                  'atc': 'J07AC',
    372                  'live': False,
    373                  'ingredients': ['anthrax']
    374          },
    375
    376          'brucellosis': {
    377                  'name': _('generic brucellosis vaccine'),
    378                  'atc': 'J07AD',
    379                  'live': False,
    380                  'ingredients': ['brucellosis']
    381          },
    382
    383          'cholera': {
    384                  'name': _('generic cholera vaccine'),
    385                  'atc': 'J07AE01',
    386                  'live': False,
    387                  'ingredients': ['cholera']
    388          },
    389          'cholera, live': {
    390                  'name': _('generic cholera vaccine, live'),
    391                  'atc': 'J07AE02',
    392                  'live': True,
    393                  'ingredients': ['cholera-live']
    394          },
    395
    396          'diphtheria': {
    397                  'name': _('generic diphtheria vaccine'),
    398                  'atc': 'J07AF',
    399                  'live': False,
    400                  'ingredients': ['diphtheria']
    401          },
    402
    403          'HiB': {
    404                  'name': _('generic HiB vaccine'),
    405                  'atc': 'J07AG',
    406                  'live': False,
    407                  'ingredients': ['HiB']
    408          },
    409
    410          'meningococcus A': {
    411                  'name': _('generic meningococcus A vaccine'),
    412                  'atc': 'J07AH01',
    413                  'live': False,
    414                  # for generic vaccine do not differentiate between conjugated or not
    415                  'ingredients': ['menA']
    416          },
    417          'meningococcus B': {
    418                  'name': _('generic meningococcus B vaccine'),
    419                  'atc': 'J07AH06',
    420                  'live': False,
    421                  # do not differentiate membrane vs multicomponent in generic vaccine
    422                  'ingredients': ['menBmem']
    423          },
    424          'meningococcus C': {
    425                  'name': _('generic meningococcus C vaccine'),
    426                  'atc': 'J07AH',
    427                  'live': False,
    428                  'ingredients': ['menC']
    429          },
    430
    431          'pertussis': {
    432                  'name': _('generic pertussis vaccine'),
    433                  'atc': 'J07AJ01',
    434                  'live': False,
    435                  'ingredients': ['pertussis']
    436          },
    437
    438          'plague': {
    439                  'name': _('generic plague vaccine'),
    440                  'atc': 'J07AK',
    441                  'live': False,
    442                  'ingredients': ['plague']
    443          },
    444
    445          'pneumococcus': {
    446                  'name': _('generic pneumococcus vaccine'),
    447                  'atc': 'J07AL0',
    448                  'live': False,
    449                  # for generic vaccine do not differentiate between conjugated or not
    450                  'ingredients': ['pneumococcus']
    451          },
    452
    453          'tetanus': {
    454                  'name': _('generic tetanus vaccine'),
    455                  'atc': 'J07AM',
    456                  'live': False,
    457                  'ingredients': ['tetanus']
    458          },
    459
    460          'Tbc': {
    461                  'name': _('generic Tbc vaccine'),
    462                  'atc': 'J07AN',
    463                  'live': True,
    464                  'ingredients': ['tbc-live']
    465          },
    466
    467          'typhoid': {
    468                  'name': _('generic typhoid vaccine'),
    469                  'atc': 'J07AP02',
    470                  'live': False,
    471                  'ingredients': ['salmo-inact']
    472          },
    473          'typhoid, live': {
    474                  'name': _('generic typhoid vaccine, live'),
    475                  'atc': 'J07AP01',
    476                  'live': True,
    477                  'ingredients': ['salmo-live']
    478          },
    479          'typhoid, paratyphus': {
    480                  'name': _('generic typhoid/paratyphus vaccine'),
    481                  'atc': 'J07AP10',
    482                  'live': False,
    483                  'ingredients': ['salmo-typh+ent']
    484          },
    485
    486          'typhus exanthematicus': {
    487                  'name': _('generic typhus exanthematicus vaccine'),
    488                  'atc': 'J07AR',
    489                  'live': False,
    490                  'ingredients': ['typh-exanth']
    491          },
    492
    493          'q fever': {
    494                  'name': _('generic Q fever vaccine'),
    495                  'atc': 'J07AXQF',
    496                  'live': False,
    497                  'ingredients': ['qfever']
    498          },
    499
    500          # J07B - antiviral vaccines
    501
    502          'tick-borne encephalitis': {
    503                  'name': _('generic tick-borne encephalitis vaccine'),
    504                  'atc': 'J07BA',
    505                  'live': False,
    506                  'ingredients': ['fsme']
    507          },
    508
    509          'japanese encephalitis': {
    510                  'name': _('generic japanese encephalitis vaccine'),
    511                  'atc': 'J07BA02',
    512                  'live': False,
    513                  'ingredients': ['japEnc']
    514          },
    515          'japanese encephalitis, live': {
    516                  'name': _('generic japanese encephalitis vaccine, live'),
    517                  'atc': 'J07BA03',
    518                  'live': True,
    519                  'ingredients': ['japEnc-live']
    520          },
    521
    522          'influenza': {
    523                  'name': _('generic influenza vaccine'),
    524                  'atc': 'J07BB01',
    525                  'live': False,
    526                  'ingredients': ['influ-inact']
    527          },
    528          'influenza, live': {
    529                  'name': _('generic influenza vaccine, live'),
    530                  'atc': 'J07BB03',
    531                  'live': True,
    532                  'ingredients': ['influ-live']
    533          },
    534
    535          'hepatitis A': {
    536                  'name': _('generic hepatitis A vaccine'),
    537                  'atc': 'J07BC02',
    538                  'live': False,
    539                  'ingredients': ['hepA-inact']
    540          },
    541
    542          'hepatitis B': {
    543                  'name': _('generic hepatitis B vaccine'),
    544                  'atc': 'J07BC01',
    545                  'live': False,
    546                  'ingredients': ['hepB']
    547          },
    548
    549          'measles-live': {
    550                  'name': _('generic measles vaccine, live'),
    551                  'atc': 'J07BD',
    552                  'live': True,
    553                  'ingredients': ['measles-live']
    554          },
    555
    556          'mumps-live': {
    557                  'name': _('generic mumps vaccine, live'),
    558                  'atc': 'J07BE',
    559                  'live': True,
    560                  'ingredients': ['mumps-live']
    561          },
    562
    563          'poliomyelitis': {
    564                  'name': _('generic poliomyelitis vaccine'),
    565                  'atc': 'J07BF03',
    566                  'live': False,
    567                  'ingredients': ['polio-inact']
    568          },
    569
    570          'poliomyelitis, live': {
    571                  'name': _('generic poliomyelitis vaccine, live'),
    572                  'atc': 'J07BF01',
    573                  'live': True,
    574                  'ingredients': ['polio-live']
    575          },
    576
    577          'rabies': {
    578                  'name': _('generic rabies vaccine'),
    579                  'atc': 'J07BG',
    580                  'live': False,
    581                  'ingredients': ['rabies']
    582          },
    583
    584          'rotavirus, live': {
    585                  'name': _('generic rotavirus vaccine, live'),
    586                  'atc': 'J07BH01',
    587                  'live': True,
    588                  'ingredients': ['rota-live-atten']
    589          },
    590
    591          'rubella': {
    592                  'name': _('generic rubella vaccine, live'),
    593                  'atc': 'J07BJ',
    594                  'live': True,
    595                  'ingredients': ['rubella-live']
    596          },
    597
    598          'varicella': {
    599                  'name': _('generic varicella vaccine, live'),
    600                  'atc': 'J07BK01',
    601                  'live': True,
    602                  'ingredients': ['chickenpox-live']
    603          },
    604          'zoster': {
    605                  'name': _('generic zoster vaccine, live'),
    606                  'atc': 'J07BK02',
    607                  'live': True,
    608                  'ingredients': ['shingles-live']
    609          },
    610
    611          'yellow fever': {
    612                  'name': _('generic yellow fever vaccine'),
    613                  'atc': 'J07BL',
    614                  'live': True,
    615                  'ingredients': ['yellow_fever-live']
    616          },
    617
    618          'HPV': {
    619                  'name': _('generic HPV vaccine'),
    620                  'atc': 'J07BM',
    621                  'live': False,
    622                  'ingredients': ['pap-generic']
    623          },
    624
    625          'variola': {
    626                  'name': _('generic variola vaccine, live'),
    627                  'atc': 'J07BX01',
    628                  'live': True,
    629                  'ingredients': ['smallpox']
    630          },
    631
    632          # combinations
    633
    634          'meningococcus AC': {
    635                  'name': _('generic meningococcus AC vaccine'),
    636                  'atc': 'J07AH03',
    637                  'live': False,
    638                  'ingredients': ['menA', 'menC']
    639          },
    640          'meningococcus ACYW135': {
    641                  'name': _('generic meningococcus ACYW135 vaccine'),
    642                  'atc': 'J07AH04', # 4/8
    643                  'live': False,
    644                  'ingredients': ['menA', 'menC', 'menY', 'menW']
    645          },
    646
    647          'measles, mumps': {
    648                  'name': _('generic measles-mumps vaccine, live'),
    649                  'atc': 'J07BD51',
    650                  'live': True,
    651                  'ingredients': ['measles-live', 'mumps-live']
    652          },
    653
    654          'measles, mumps, rubella': {
    655                  'name': _('generic MMR vaccine, live'),
    656                  'atc': 'J07BD52',
    657                  'live': True,
    658                  'ingredients': ['measles-live', 'mumps-live', 'rubella-live']
    659          },
    660
    661          'measles, mumps, rubella, varicella': {
    662                  'name': _('generic MMRV vaccine, live'),
    663                  'atc': 'J07BD54',
    664                  'live': True,
    665                  'ingredients': ['measles-live', 'mumps-live', 'rubella-live', 'chickenpox-live']
    666          },
    667
    668          'measles, rubella': {
    669                  'name': _('generic measles-rubella vaccine, live'),
    670                  'atc': 'J07BD53',
    671                  'live': True,
    672                  'ingredients': ['measles-live', 'rubella-live']
    673          },
    674
    675          'mumps, rubella': {
    676                  'name': _('generic mumps-rubella vaccine, live'),
    677                  'atc': 'J07BJ51',
    678                  'live': True,
    679                  'ingredients': ['mumps-live', 'rubella-live']
    680          },
    681
    682          'cholera, typhoid': {
    683                  'name': _('generic cholera-typhoid vaccine'),
    684                  'atc': 'J07AE51',
    685                  'live': False,
    686                  'ingredients': ['cholera', 'salmo-inact']
    687          },
    688
    689          'typhoid, hepatitis A': {
    690                  'name': _('generic typhoid-hepA vaccine'),
    691                  'atc': 'J07CA10',
    692                  'live': False,
    693                  'ingredients': ['salmo-inact', 'hepA-inact']
    694          },
    695
    696          'tetanus, diphtheria': {
    697                  'name': _('generic Td vaccine'),
    698                  'atc': 'J07AM51',
    699                  'live': False,
    700                  'ingredients': ['tetanus', 'diphtheria']
    701          },
    702  #       'Diphtheria, tetanus': {
    703  #               'name': _(u'generic DT vaccine'),
    704  #               'atc': u'J07AM51',
    705  #               'live': False,
    706  #               'ingredients': ['diphtheria', 'tetanus']
    707  #       },
    708          #J07AM52,,"Tetanus-Toxoid, Kombinationen mit Tetanus-Immunglobulin",,,,,,
    709
    710          'tetanus, diphtheria, poliomyelitis': {
    711                  'name': _('generic TdPol vaccine'),
    712                  'atc': 'J07CA01',
    713                  'live': False,
    714                  'ingredients': ['tetanus', 'diphtheria', 'polio-inact']
    715          },
    716          'tetanus, diphtheria, poliomyelitis': {
    717                  'name': _('generic DTPol vaccine'),
    718                  'atc': 'J07CA01',
    719                  'live': False,
    720                  'ingredients': ['tetanus', 'diphtheria', 'polio-inact']
    721          },
    722
    723          'tetanus, diphtheria, HepB': {
    724                  'name': _('generic Td-HepB vaccine'),
    725                  'atc': 'J07CA07',
    726                  'live': False,
    727                  'ingredients': ['tetanus', 'diphtheria', 'hepB']
    728          },
    729
    730          'tetanus, diphtheria, rubella': {
    731                  'name': _('generic Td-rubella vaccine'),
    732                  'atc': 'J07CA03',
    733                  'live': True,
    734                  'ingredients': ['tetanus', 'diphtheria', 'rubella-live']
    735          },
    736
    737          'tetanus, diphtheria, pertussis, poliomyelitis': {
    738                  'name': _('generic TdaPPol vaccine'),
    739                  'atc': 'J07CA02',
    740                  'live': False,
    741                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'polio-inact']
    742          },
    743
    744          'tetanus, diphtheria, pertussis, HepB': {
    745                  'name': _('generic TdaP-HepB vaccine'),
    746                  'atc': 'J07CA05',
    747                  'live': False,
    748                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'hepB']
    749          },
    750
    751          'tetanus, diphtheria, pertussis': {
    752                  'name': _('generic TdaP vaccine'),
    753                  'atc': 'J07CA',
    754                  'live': False,
    755                  'ingredients': ['tetanus', 'diphtheria', 'pertussis']
    756          },
    757
    758          'tetanus, diphtheria, pertussis, poliomyelitis, HiB': {
    759                  'name': _('generic DTaPPol-Hib vaccine'),
    760                  'atc': 'J07CA06',
    761                  'live': False,
    762                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'polio-inact', 'HiB']
    763          },
    764
    765          'tetanus, diphtheria, pertussis, HiB, HepB': {
    766                  'name': _('generic TdaP-Hib-HepB vaccine'),
    767                  'atc': 'J07CA11',
    768                  'live': False,
    769                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'HiB', 'hepB']
    770          },
    771
    772          'tetanus, diphtheria, pertussis, poliomyelitis, HepB': {
    773                  'name': _('generic TdaPPol-HepB vaccine'),
    774                  'atc': 'J07CA12',
    775                  'live': False,
    776                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'polio-inact', 'hepB']
    777          },
    778
    779          'tetanus, diphtheria, pertussis, poliomyelitis, HiB, HepB': {
    780                  'name': _('generic TdaPPol-HiB-HepB vaccine'),
    781                  'atc': 'J07CA09',
    782                  'live': False,
    783                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'polio-inact', 'HiB', 'hepB']
    784          },
    785
    786          'tetanus, diphtheria, pertussis, poliomyelitis, HiB, HepB, MenAC': {
    787                  'name': _('generic TdaPPol-HiB-HepB-MenAC vaccine'),
    788                  'atc': 'J07CA13',
    789                  'live': False,
    790                  'ingredients': ['tetanus', 'diphtheria', 'pertussis', 'polio-inact', 'HiB', 'hepB', 'menA', 'menC']
    791          }
    792
    793  }
    794
    795  #------------------------------------------------------------
    796  """
    797  # single
    798
    799  J07AX  ,,Andere bakterielle Impfstoffe,,,,,,
    800  J07AX01,,Lactobacillus acidophilus,,,,,,
    801  J07AX52,,"Lactobacillus Stämme, Kombinationen",,Standarddosis: 1 Einzeldosis P ,,,,
    802  J07AX53,,"Enterobacteriacae Stämme, Kombinationen",,Standarddosis: 1 Einzeldosis P ,,,,
    803
    804  J07BX  ,,Andere virale Impfstoffe,,,,,,
    805  J07BX02,,Inaktiviertes Herpes-simplex-Virus,,Standarddosis: 1 Einzeldosis P ,,,,
    806
    807  J07X   ,,ANDERE IMPFSTOFFE,,,,,,
    808
    809  J07AH05,,"Andere Meningokokken polyvalent, gereinigtes Polysaccharid-Antigen",,,,,,
    810
    811  # combi
    812
    813  J07AG51,,"Haemophilus influenzae B, Kombinationen mit Toxoiden",,Standarddosis: 1 Einzeldosis P ,,,,
    814  J07AG52,,"Haemophilus influenzae B, Kombinationen mit Pertussis und Toxoiden",,Standarddosis: 1 Einzeldosis P ,,,,
    815  J07AG53,,"Haemophilus influenzae B, Kombinationen mit Meningokokken C, konjugiert",,,,,,
    816
    817  J07AJ51,,"Pertussis, inaktiviert, ganze Zelle, Kombinationen mit Toxoiden",,,,,,
    818  J07AJ52,,"Pertussis, gereinigtes Antigen, Kombinationen mit Toxoiden",,Standarddosis: 1 Einzeldosis P ,,,,
    819
    820  J07AL52,,"Pneumokokken, gereinigtes Polysaccharid-Antigen und Haemophilus influenzae B, konjugiert",,Standarddosis: 1 Einzeldosis P ,,,,
    821
    822  Hep: J07BC20,,Kombinationen,,Standarddosis: 1 Einzeldosis P ,,,,
    823
    824  J07CA04,,Haemophilus influenzae B und Poliomyelitis,,,,,,
    825
    826  J07CA08,,Haemophilus influenzae B und Hepatitis B,,Standarddosis: 1 Einzeldosis P ,,,,
    827
    828          '': {
    829                  'name': _(u'generic NNN vaccine'),
    830                  'atc': u'',
    831                  'live': True/False,
    832                  'ingredients': [u'']
    833          },
    834  """
    835
    836  #============================================================
    837  # main - unit testing
    838  #------------------------------------------------------------
    839  if __name__ == '__main__':
    840
    841          if len(sys.argv) < 2:
    842                  sys.exit()
    843
    844          if sys.argv[1] != 'test':
    845                  sys.exit()
    846
    847
    848 -        def print_substs():
    849                  for moniker in _VACCINE_SUBSTANCES:
    850                          subst = _VACCINE_SUBSTANCES[moniker]
    851                          print(moniker)
    852                          print(' substance:', subst['name'])
    853                          print(' target:', subst['target'])
    854
    855
    856 -        def print_vaccs():
    857                  for key in _GENERIC_VACCINES:
    858                          vacc = _GENERIC_VACCINES[key]
    859                          print('vaccine "%s" (ATC %s)' % (vacc['name'], vacc['atc']))
    860                          for key in vacc['ingredients']:
    861                                  subst = _VACCINE_SUBSTANCES[key]
    862                                  atc = subst['atc4target']
    863                                  print(' contains: %s (ATC %s)' % (subst['name'], atc))
    864                                  print('  protects against: "%s" [%s]' % (_(subst['target']).lstrip('%s-target::' % atc), subst['target']))
    865
    866
    867          print_vaccs()
    868