Skip to content

Instantly share code, notes, and snippets.

@Mageti
Created July 2, 2017 17:48
Show Gist options
  • Select an option

  • Save Mageti/a8df8328ae3d80530461a619199f10c7 to your computer and use it in GitHub Desktop.

Select an option

Save Mageti/a8df8328ae3d80530461a619199f10c7 to your computer and use it in GitHub Desktop.
Modèle de la base de donnée publique des médicaments
dbs = [
{
'nom': 'CIS_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_bdpm (cis INT, '
'denomination TEXT, '
'forme TEXT, '
'administration TEXT, '
'status_amm TEXT, '
'type_amm TEXT, '
'etat_com TEXT, '
'date_amm DATE, '
'statut_bdm TEXT, '
'autorisation_euro TEXT, '
'titulaire TEXT, '
'surveillance BOOL'
');',
'sql_index': ' CREATE INDEX CIS_bdpm_cis_index ON CIS_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_bdpm (cis,'
'denomination,'
'forme,'
'administration,'
'status_amm,'
'type_amm,'
'etat_com,'
'date_amm,'
'statut_bdm,'
'autorisation_euro,'
'titulaire,'
'surveillance'
') VALUES (?,?,?,?,?,?,?,?,?,?,?,?);'
},
{
'nom': 'CIS_CIP_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_CIP_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_CIP_bdpm (cis INT, '
'cip7 INT, '
'libelle_prez TEXT, '
'statut_administratif TEXT, '
'etat_com TEXT, '
'date_com DATE, '
'cip13 INT, '
'agrement TEXT, '
'taux_remboursement NUMERIC, '
'prix1 NUMERIC, '
'prix2 NUMERIC, '
'prix3 NUMERIC, '
'indications TEXT'
');',
'sql_index': ' CREATE INDEX CIS_CIP_bdpm_cis_index ON CIS_CIP_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_CIP_bdpm (cis,'
'cip7,'
'libelle_prez,'
'statut_administratif,'
'etat_com,'
'date_com,'
'cip13,'
'agrement,'
'taux_remboursement,'
'prix1,'
'prix2,'
'prix3,'
'indications'
') VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?);'
},
{
'nom': 'CIS_COMPO_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_COMPO_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_COMPO_bdpm (cis INT, '
'designation TEXT, '
'code TEXT, '
'denomination TEXT, '
'dosage TEXT, '
'reference TEXT, '
'nature TEXT, '
'liaison INT,'
'rien TEXT'
');',
'sql_index': ' CREATE INDEX CIS_COMPO_bdpm_cis_index ON CIS_COMPO_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_COMPO_bdpm (cis,'
'designation,'
'code,'
'denomination,'
'dosage,'
'reference,'
'nature,'
'liaison,'
'rien'
') VALUES (?,?,?,?,?,?,?,?,?);'
},
{
'nom': 'CIS_HAS_SMR_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_HAS_SMR_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_HAS_SMR_bdpm (cis INT, '
'code_has TEXT, '
'motif TEXT, '
'date_avis DATE, '
'valeur_smr TEXT, '
'libelle_smr TEXT'
');',
'sql_index': ' CREATE INDEX CIS_HAS_SMR_bdpm_cis_index ON CIS_HAS_SMR_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_HAS_SMR_bdpm (cis,'
'code_has,'
'motif,'
'date_avis,'
'valeur_smr,'
'libelle_smr'
') VALUES (?,?,?,?,?,?);'
},
{
'nom': 'CIS_HAS_ASMR_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_HAS_ASMR_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_HAS_ASMR_bdpm (cis INT, '
'code_has TEXT, '
'motif TEXT, '
'date_avis DATE, '
'valeur_asmr TEXT, '
'libelle_asmr TEXT'
');',
'sql_index': ' CREATE INDEX CIS_HAS_ASMR_bdpm_cis_index ON CIS_HAS_ASMR_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_HAS_ASMR_bdpm (cis,'
'code_has,'
'motif,'
'date_avis,'
'valeur_asmr,'
'libelle_asmr'
') VALUES (?,?,?,?,?,?);'
},
{
'nom': 'HAS_LiensPageCT_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=HAS_LiensPageCT_bdpm.txt",
'sql_create': 'CREATE TABLE HAS_LiensPageCT_bdpm (code_has TEXT, '
'lien TEXT'
');',
'sql_index': ' CREATE INDEX HAS_LiensPageCT_bdpm_has_index ON HAS_LiensPageCT_bdpm (code_has);',
'sql_insert': 'INSERT INTO HAS_LiensPageCT_bdpm (code_has,'
'lien'
') VALUES (?,?);'
},
{
'nom': 'CIS_GENER_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_GENER_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_GENER_bdpm (identifiant TEXT, '
'libelle TEXT, '
'cis INT, '
'type_gen INT, '
'tri INT, '
'rien TEXT'
');',
'sql_index': ' CREATE INDEX CIS_GENER_bdpm_cis_index ON CIS_GENER_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_GENER_bdpm (identifiant,'
'libelle,'
'cis,'
'type_gen,'
'tri,'
'rien'
') VALUES (?,?,?,?,?,?);'
},
{
'nom': 'CIS_CPD_bdpm',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_CPD_bdpm.txt",
'sql_create': 'CREATE TABLE CIS_CPD_bdpm (cis INT, '
'conditions TEXT'
');',
'sql_index': ' CREATE INDEX CIS_CPD_bdpm_cis_index ON CIS_CPD_bdpm (cis);',
'sql_insert': 'INSERT INTO CIS_CPD_bdpm (cis,'
'conditions'
') VALUES (?,?);'
},
{
'nom': 'CIS_InfoImportantes',
'url': "http://base-donnees-publique.medicaments.gouv.fr/telechargement.php?fichier=CIS_InfoImportantes.txt",
'sql_create': 'CREATE TABLE CIS_InfoImportantes (cis INT, '
'date_debut DATE, '
'date_fin DATE, '
'texte TEXT'
');',
'sql_index': ' CREATE INDEX CIS_InfoImportantes_cis_index ON CIS_InfoImportantes (cis);',
'sql_insert': 'INSERT INTO CIS_InfoImportantes (cis,'
'date_debut,'
'date_fin,'
'texte'
') VALUES (?,?,?,?);'
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment