CodeForPhilly / CodeForPhilly/MATchMapper

Conversation about chicken-egg problem with provider and site ids in database

オープン
#15 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
7
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

In our previous meeting, we faced the chicken-egg dilemma of deciding how we should assign provider ids as foreign keys for the npi, xwaiver, and pals listings that were scraped.

The solution that Josephine and I propose is that we will first "scrape" samhsa's master list of providers and apply the samhsa comparison script on it to identify new providers as well as the providers that were either edited or removed. It's not really a scraping process because we are just downloading a csv file and importing the information to the Django API. Before we proceed to create these new providers based on the list of new providers, we will perform a fuzzy search on our database for providers with the same first and last name. This is done to ensure that we do not add any provider that already exists in the database. Following which, we will create new provider entities based on the list of new providers. They will not have npi, xwaiver, pals foreign keys on them for now. Following which, the pipeline will proceed to scrape our three sources (npi, xwaiver, and pals) with the new list of providers. The new listings will then be tagged with their respective provider ids and likewise, the new providers will be given their npi, xwaiver, and pals foreign keys.

If we were to adopt the above solution, we will have to do the following:

1. Make npi, xwaiver, and pals foreign keys optional for the provider entity. A provider can be created without us knowing its npi, xwaiver, or pals data. However, npi, xwaiver, and pals must have a provider foreign key because they can only be scraped and obtained after we know that the provider (as well as its provider id) exists.

2. Finish issue #2 to make sure that we can scrape npi entries based on their names alone. This will allow us to directly use the little information we have about the providers from samhsa's spreadsheet to match npi data with the provider.

3. Finish issue #14 to find a more robust method to fill in the blanks for our xwaiver data for each provider

4. Create a new GitHub issue that addresses our current lack of a script that allows us to automatically download samhsa's spreadsheet of providers and apply our samhsa comparison script on it before linking it to our Django API

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、提案されているproviderとlistingのworkflowを確認し、次にissue #2、issue #14、SAMHSA comparison script、Django APIを調査します。完了とは、依存関係の順序について合意し、listingの外部キーが判明する前にproviderが存在できるようにし、SAMHSAスプレッドシートのダウンロードとインポート用に別のissueを作成することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
django, python
領域
backend, data-engineering, databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。