zdavatz / cpp2sqlite

C++ tool to generate sqlite database containing Swiss Healthcare Public Domain Drug Information
GNU General Public License v3.0
3 stars 1 forks source link

add Chargenrückrufe, DHCP, HPC News, Drugshortage to Fachinfo in DE an FR #140

Closed zdavatz closed 3 years ago

zdavatz commented 3 years ago

running ymeteor with the following options

meteor --once --settings swissmedic.json
meteor --settings drugshortage.json --once

generates the following JSON files in ymeteor/public/exports

  1. chargenrueckrufe_de.json
  2. dhcp_hcp_de.json
  3. chargenrueckrufe_fr.json
  4. dhcp_hcp_fr.json
  5. drugshortage.json

the information of these JSON files has to be parsed by cpp2sqlite added to the Fachinfo (currently if swisspeddose and sappinfo exist, are added to the Fachinfo in the end). Chargenrückrufe, DHCP/HPC and Drugshortage Information has to be added in the same manner, if they exist. You can use the 5 digit Swissmedic Number for matching with the Fachinfos. The 5 digit Swissmedic number is in the JSON files.

chapter_batch_dhcp_hpc_chargen

Chargenrückrufe = Retraits de lots (FR) DHCP/HPC = DHCP/HPC (FR) Drugshortage = Drugshortge (FR)

zdavatz commented 3 years ago

Important: Make a separate module for Drugshortage and one for DHCP/HPC/Chargenrückrufe. Currently we have the following modules

  1. cpp2sqlite
  2. interaction
  3. pharma
  4. sappinfo
  5. zurrose

so then we will have two more:

zdavatz commented 3 years ago

For Drugshortage lets add them in the chapter "Packungen" if the GTIN is in the Drugshortage.json file.

drugshortage

b123400 commented 3 years ago

Why should we add 2 more modules?

The entire sqlite database (amiko_db_fullidx[de|fr].db) is generated by cpp2sqlite, I think it is not designed to create the same database with 3 different modules. I think it will be more straight forward to implement it in cpp2sqlite

zdavatz commented 3 years ago

sappinfo is also a separate module. The point for the new modules is that if something breaks then it does not affect the Fachinfo.

zdavatz commented 3 years ago
  1. If you can not find the field "erste Meldung" in drugshortage.json just skip it for the moment and do not add it. I have to check with @hamzamu about the ymeteor parsing.
  2. If the GTIN is not in drugshortage.json do not add Drugshortage to the chapter name. The sappinfo and swisspeddose chapters are also only added if there is information found for that 5 digit swissmedic number in the input files sappinfo.xlsx and swisspeddosepublication_v3.xml.
b123400 commented 3 years ago

There is something like this in the JSON:

"tageSeitErsterMeldung": 678,

but it is not a date string like "11.01.2021"

zdavatz commented 3 years ago

There is something like this in the JSON:

"tageSeitErsterMeldung": 678,

but it is not a date string like "11.01.2021"

I guess we would have to calculate the date string.