CodeForPhilly / CodeForPhilly/MATchMapper
Conversation about chicken-egg problem with provider and site ids in database
- Ngôn ngữ chính
- Python
- Star
- 7
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng việc xem xét workflow provider và listing được đề xuất, sau đó kiểm tra issue #2, issue #14, SAMHSA comparison script và Django API. Được coi là hoàn tất khi đã thống nhất về thứ tự phụ thuộc, cho phép các provider tồn tại trước khi biết các khóa ngoại listing của chúng, và tạo một issue riêng để tải xuống và nhập bảng tính SAMHSA.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- django, python
- Lĩnh vực
- backend, data-engineering, databases
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100