{"v":[{"id":2860,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/201#issuecomment-2860","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/201","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\nEmail from me to Cassandra and Frank on 10\/20:\r\n\r\nHello,\r\n\r\nThank you for sending the info. In getting the vendor numbers and counties into the system, I've run a report against the current client data to make sure the correct vendor number would be selected.\r\n\r\nThere are two El Paso clients at Legacy Home Care (both active, started Oct 12 2026, on STAR+PLUS, with nothing on the calendar yet). VESTA files them under the El Paso branch but I don't have an El Paso branch for that agency.\r\n\r\nAlso at Legacy Home Care, I show three clients in Victoria County -- one in the Brownsville branch and two in the McAllen branch -- but I don't have a Region 8 number for Legacy Home Care.\r\n\r\nAt Legacy Home Health, I show a client in the San Antonio branch and living in Hays County but I don't have a Region 7 number.\r\n\r\nPlease let me know how those should resolve.\r\n\r\nI also have potential errors in VESTA data.\r\n\r\nLegacy Home Health:\r\n\r\n* A client in the McAllen branch with a McAllen zip code but their record has Travis County.\r\n\r\n* A client in the San Antonio branch with a San Antonio zip code but their record has Smith County.\r\n\r\nCoastal:\r\n\r\n* A client in the Houston branch in Pasadena but their record has San Jacinto County.","assets":[],"created_at":"2026-10-23T13:26:58-05:00","updated_at":"2026-10-23T13:26:58-05:00"},{"id":2861,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/201#issuecomment-2861","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/201","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\nReply from Cassandra on 10\/22:\r\n\r\nGood morning, Charles,\r\n\r\nFor the two members in McAllen, we recently received the license. I added it to the document I previously submitted to you; it is at the end of the second page. I will also follow up with the scheduling team to confirm who should be entering their visits on the calendar.\r\n\r\nFor the three clients in Victoria, please identify them as Region 11. We are approved to provide services in that area for the MCOs; however, Legacy Home Care Services does not have a TMHP license for that region to provide a different vendor number. This applies only to Legacy Home Care Services.\r\n\r\nI will look into the client in Hays County and get back to you with an update.\r\n\r\nFor the client listed under Travis County, the member profile shows Hidalgo County. @Frank Morales, can you confirm whether the county is being pulled from a source other than the member profile? I am seeing a similar issue with the client listed under Smith County, whose member profile shows Bexar County.\r\n\r\nFor the Coastal client, I updated the county to Harris County because the address falls within Harris County.\r\n\r\nPlease let me know of any discrepancies for my compliance team to address or have the coordination managers address. \r\n\r\nThank you, Cassandra Luna-Garcia","assets":[],"created_at":"2026-10-23T13:27:36-05:00","updated_at":"2026-10-23T13:27:36-05:00"},{"id":2862,"html_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/201#issuecomment-2862","pull_request_url":"","issue_url":"https:\/\/www-s01.apinet.com\/codeforge\/apiintl\/hhmanager\/issues\/201","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":"**Checked against the 23 Oct data, after Cassandra's reply of 10\/22**\n\n### Done (on dev, not yet committed or on prod)\n- **Victoria is Region 11 for Legacy Home Care Services** (vendor 1019756), as Cassandra asked. This applies to that agency only. There are now **four** Victoria clients, not three; the fourth is a Brownsville-branch client in Bloomington whose address didn't place on the map. All four came off \"County on no vendor list\". Carried in `scripts\/import-vendor-regions.php`. On prod: dry run, then `--apply --overwrite` (only Legacy Home Care should show as changing), or add Victoria on Admin \u2192 Systems \u2192 Vendor Numbers by County.\n- **El Paso is a known branch city** (`normalizeBranch()`), so VESTA's `EL PASO` is stored as `El Paso` like the others.\n- **Coastal \/ San Jacinto is fixed.** Cassandra changed it to Harris, and the only San Jacinto record left is a closed 2023 case.\n\n### Still open with the customer\n- **El Paso branch office.** The vendor number was already in her 10\/20 table (Region 10, 1035798), so the two El Paso clients print a number. Her reply says \"McAllen\" but means these two. What's missing is the **El Paso office address**, so the branch can go on Admin \u2192 Systems (it's needed for \"far from the branch office\" and the branch lists). The PDF we hold is one page; ask her for the updated one she mentions.\n- **Hays County client** (Legacy Home Health, San Antonio branch). She is checking. Still on the list.\n- **New, for her compliance team:**\n  - Coastal, Corpus Christi branch: a client living in Lago Vista (Travis County, no vendor region). Status NEVER STARTED since Dec 2023, so it may only need closing.\n  - **Counties that change the vendor number** (the county in VESTA and the address fall in different regions): 2 at Coastal (VESTA says Bexar but the client lives in Corpus Christi; VESTA says Harris but the client lives in San Antonio) and 4 at Legacy Home Health. One of those has Kenedy County in VESTA for a client in the *city* of Kenedy, which is in Karnes County.\n\n### Answer for Frank: where the county comes from\nNot the member profile. It comes from the **County column of VESTA's Member Master List** export. That list has several rows per client (member, authorization and schedule rows), and the loader takes `MAX(county)` across them. When the rows disagree, that is simply the alphabetically last value.\n\nBoth bad values fit: Travis comes after Hidalgo, and Smith comes after Bexar. The profiles Cassandra checked showed the right county, and both bad values were gone from the 23 Oct data without anyone correcting them. That points to a stray row (another authorization or schedule row) that carried a different county and has since dropped off the list. **Not yet confirmed**: the raw export isn't kept after loading.\n\n### Changes needed\n\n**1. Loader: stop picking a county (and the other Master List fields) by alphabet.**\nThe same `MAX(NULLIF(TRIM(x), ''))` is in two places, so it affects both routes:\n- `master_clinical_map()` in `scripts\/load-to-mariadb.php`: the report path, grouped by `mem_id`\n- `master_enrichment_by_medicaid()` in the same file: the API path, grouped by Medicaid number, written by `vesta_store_apply_enrichment()`\n\nIt applies to the same degree to **physician, medicare, contact, contact phone, diagnosis and caseworker**. A client with two physicians or two emergency contacts across their rows also gets whichever sorts last. Proposed fix:\n- **(a) Measure first.** Have the loader count, per agency, the clients whose rows carry more than one distinct value for each field. This logs counts only, no values, so no PHI. One night's load confirms the cause and shows how many clients and which fields are affected.\n- **(b) Then refuse to guess.** One distinct value: use it. Several: take it from the **member row** if the export has a way to tell that row apart. Otherwise store **no county** and record the conflict, so the client shows on Internal Reports as *\"VESTA lists more than one county\"* with the counties it found. Something the office can fix in VESTA is better than a quietly wrong vendor number on the 3040. The rule (distinct values \u2192 value or conflict) goes in the pure rules with a test, shared by both routes. Which row is the member row needs one look at a real export header and rows.\n- Diagnosis is the exception, since it really does differ per authorization. It probably needs to be every distinct value joined, as `tasks` already is, rather than one.\n\n**2. Internal Reports: the \"County missing\" list is mostly noise.** It has 909 clients today, because the Master List only carries clients with an **active authorization**. Almost all of them are NEVER STARTED (138 at Legacy Home Care, 304 at Coastal), NEW MEMBER, SERVICE BREAK and similar. Only **9 ACTIVE** clients have no county (3 Coastal, 6 Legacy Home Health). Proposal: list ACTIVE clients by default, with the rest behind \"show all statuses\" or as a count.\n\n**3. El Paso branch office:** data entry once Cassandra sends the address.","assets":[],"created_at":"2026-10-23T13:50:57-05:00","updated_at":"2026-10-23T13:50:57-05:00"}]}