{"v":[{"id":861,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/76#issuecomment-861","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/76","user":{"id":3,"login":"connect-bot","login_name":"","source_id":0,"full_name":"","email":"connect-bot@noreply.www-s01.apinet.com","avatar_url":"https:\/\/www-s01.apinet.com\/codeforge\/avatars\/68a2723f7ad70dee2e1415be7488d84b","html_url":"https:\/\/www-s01.apinet.com\/codeforge\/connect-bot","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-10-01T08:49:35-05:00","restricted":false,"active":false,"prohibit_login":false,"location":"","pronouns":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"connect-bot"},"original_author":"","original_author_id":0,"body":"**Charles W.** _(via Connect)_\n<!-- connect:user=1 -->\n\nThis is a test comment.","assets":[{"id":3,"name":"photo-20261001-131430-1.jpg","size":223494,"download_count":4,"created_at":"2026-10-01T13:14:31-05:00","uuid":"fc4ae3b8-8e92-4711-beed-c73428143432","browser_download_url":"https:\/\/www-s01.apinet.com\/codeforge\/attachments\/fc4ae3b8-8e92-4711-beed-c73428143432","type":"attachment"}],"created_at":"2026-10-01T13:14:30-05:00","updated_at":"2026-10-01T13:14:31-05:00"},{"id":866,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/132#issuecomment-866","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/132","user":{"id":1,"login":"charles","login_name":"","source_id":0,"full_name":"Charles Willgren","email":"charles@noreply.www-s01.apinet.com","avatar_url":"https:\/\/www-s01.apinet.com\/codeforge\/avatars\/d3c894f7297c5a18eb3f6ac837c335b11a00aa9cc0961323771632b1e2d61bb2","html_url":"https:\/\/www-s01.apinet.com\/codeforge\/charles","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2025-12-08T10:03:41-06:00","restricted":false,"active":false,"prohibit_login":false,"location":"","pronouns":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"charles"},"original_author":"","original_author_id":0,"body":"Done in 6c07bb9: the idle sign-out is now 15 minutes (was 3). It is one constant, `SESSION_IDLE_TIMEOUT` in `code\/functions_auth.inc.php`. The browser countdown reads its remaining time from `\/do\/sessionCheck`, so the \"Stay Signed In\" warning still appears with 1 minute remaining (after 14 minutes of inactivity). The 12-hour absolute limit is unchanged.\n\nTakes effect once deployed. Note: 3 minutes was the documented HIPAA automatic-logoff setting, so any policy document that states 3 minutes should be updated to say 15.","assets":[],"created_at":"2026-10-01T13:45:51-05:00","updated_at":"2026-10-01T13:48:15-05:00"},{"id":874,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/82#issuecomment-874","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/82","user":{"id":1,"login":"charles","login_name":"","source_id":0,"full_name":"Charles Willgren","email":"charles@noreply.www-s01.apinet.com","avatar_url":"https:\/\/www-s01.apinet.com\/codeforge\/avatars\/d3c894f7297c5a18eb3f6ac837c335b11a00aa9cc0961323771632b1e2d61bb2","html_url":"https:\/\/www-s01.apinet.com\/codeforge\/charles","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2025-12-08T10:03:41-06:00","restricted":false,"active":false,"prohibit_login":false,"location":"","pronouns":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"charles"},"original_author":"","original_author_id":0,"body":"## Proposal: use a local copy of the NPPES file, not the live API\n\nCMS publishes the whole NPI registry as a free download (https:\/\/download.cms.gov\/nppes\/NPI_Files.html): a **full file each month**, a **weekly update file**, and a **monthly list of deactivated NPIs**. We can load it into our own table and search that table, so a visit never calls out to anything.\n\n**Import** (`scripts\/import-npi.php`, run on a monthly timer, then weekly for updates):\n- Stream the CSV inside the zip. The full file is about 9 GB with 300+ columns, so read it row by row and keep only what we use.\n- Keep **individuals** (entity type 1) whose practice location is in **Texas**, plus **organisations** (entity type 2) with a pharmacy taxonomy (`3336*`), which covers E1 as well.\n- Columns to keep: NPI, last\/first\/middle name, credential, primary taxonomy (shown as specialty), practice address, city, ZIP, phone, fax, deactivation date.\n- Upsert by NPI. Mark deactivated NPIs inactive rather than deleting them, so an old visit still resolves to the doctor it named.\n- New table `npi_provider` via `migrations\/`. It holds only public data, so it is stored in plaintext with no PHI. Index it on (last name, first name) and ZIP.\n\n**Lookup** (`\/do\/npiSearch`, gated like the visit screens):\n- Staff type a last name and optionally a first name, and can narrow by city or ZIP. We return up to about 20 matches showing name, credential, specialty and city. Staff pick one, address and phone fill in, and staff can still edit them.\n- Searching by name alone isn't precise enough for common surnames. Narrowing by city or ZIP fixes that. Defaulting to the client's own ZIP would also work, and it is safe because the search stays on our server.\n- Store the **NPI** with the answer, not just the address text, so we can trace which record was picked.\n\n**Why a download beats the API:** nothing about the client, not even the doctor's name, leaves our server. Production needs no outbound access at visit time. Search speed doesn't depend on CMS being up. The weekly update file keeps us at most a week behind the registry.\n\nThe open question for the customer still applies: if they keep their own list of doctors, we could load it into the same table as an extra source.","assets":[],"created_at":"2026-10-01T15:22:54-05:00","updated_at":"2026-10-01T15:22:54-05:00"},{"id":875,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/99#issuecomment-875","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/99","user":{"id":1,"login":"charles","login_name":"","source_id":0,"full_name":"Charles Willgren","email":"charles@noreply.www-s01.apinet.com","avatar_url":"https:\/\/www-s01.apinet.com\/codeforge\/avatars\/d3c894f7297c5a18eb3f6ac837c335b11a00aa9cc0961323771632b1e2d61bb2","html_url":"https:\/\/www-s01.apinet.com\/codeforge\/charles","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2025-12-08T10:03:41-06:00","restricted":false,"active":false,"prohibit_login":false,"location":"","pronouns":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"charles"},"original_author":"","original_author_id":0,"body":"## Proposal: use the same NPI download as #82\n\nPharmacies are already in the NPPES file proposed in #82: organisations (entity type 2) with a pharmacy taxonomy (`3336*`). The import keeps them in the same `npi_provider` table, so we need no second source and no second import.\n\n**Where the answer comes from, in order:**\n1. **On file.** If the client's last visit recorded a pharmacy, start with that one already selected. VESTA as a source is still the open question for the customer.\n2. **Look it up.** Staff type part of the name. Results are limited to the **client's ZIP or city** first, because a name like \"Walgreens\" or \"CVS\" matches hundreds of stores and only the location tells them apart. Each match shows the name, street address and phone.\n3. Staff pick one. Name and phone fill in, and both can still be edited.\n\n**Details:**\n- Also import the NPPES \"other name\" file, so a store's DBA name (e.g. \"CVS Pharmacy #1234\") can be searched as well as its legal company name.\n- Show the pharmacies this agency has picked before at the top of the results. That gives the requested drop-down of known pharmacies with no separate list to maintain.\n- Store the pharmacy's **NPI** with the answer, as for the doctor.\n- The search runs against our own table, so nothing about the client leaves our server.\n\n**Still needed from the customer:** does VESTA or their own records already hold each client's pharmacy? If so, we prefill from that and use the lookup only when nothing is on file.","assets":[],"created_at":"2026-10-01T15:24:26-05:00","updated_at":"2026-10-01T15:24:26-05:00"},{"id":877,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/99#issuecomment-877","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/99","user":{"id":3,"login":"connect-bot","login_name":"","source_id":0,"full_name":"","email":"connect-bot@noreply.www-s01.apinet.com","avatar_url":"https:\/\/www-s01.apinet.com\/codeforge\/avatars\/68a2723f7ad70dee2e1415be7488d84b","html_url":"https:\/\/www-s01.apinet.com\/codeforge\/connect-bot","language":"","is_admin":false,"last_login":"0001-01-01T00:00:00Z","created":"2026-10-01T08:49:35-05:00","restricted":false,"active":false,"prohibit_login":false,"location":"","pronouns":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"connect-bot"},"original_author":"","original_author_id":0,"body":"**Charles W.** _(via Connect)_\n<!-- connect:user=1 -->\n\nVESTA does not record (and thus does not export) any pharmacy information. We'll need to record it in our member record (after being accepted by office review) and prefill any future forms from that.","assets":[],"created_at":"2026-10-01T15:59:22-05:00","updated_at":"2026-10-01T15:59:22-05:00"}]}