Missing zip codes are logged
User Story
As a ReportStream engineer, I need the ability to know when a message gets dropped because of a zip code is missing on zip-code lookup table.
Description/Use Case
Messages from MMTC may not include state information. In these cases, we use a custom FHIR function, getStateFromZipCode, to determine the state based on the ZIP code provided.
This lookup table is manually maintained, which introduces a risk: if an incoming message contains a ZIP code not listed in the table, the system cannot determine the correct state, and the message will fail to route to the appropriate state jurisdiction.
Risks/Impacts/Considerations
- Messages without a resolved state may be dropped and not delivered to the correct jurisdiction.
Dev Notes
-
Examples of how the ZIP code table is used can be found in prime-router/src/main/resources/metadata/fhir_transforms/senders/MMTC/mmtc-sender-transform.yml.
-
Ideally, missing ZIP codes should trigger an Azure event for easier monitoring.
-
It's unclear how to trigger this from within a custom FHIR function, as it likely does not have access to the broader Report metadata (e.g., sender, reportId).
-
If this could be turned into an azure event (maybe FAILED_LOOKUP?) then could be basis for more lookup failure events.
Acceptance Criteria
- [ ] Missing ZIP codes are logged for visibility
- [ ] UP Message Monitoring dashboard tile is created to view whenever zip code lookups fail
Hey team! Please add your planning poker estimate with Zenhub @adegolier @arnejduranovic @wcutshall @jack-h-wang @JFisk42 @kant777
Please add your planning poker estimate with Zenhub @arnejduranovic
~~Updating the ticket a/c and description~~ Looked again and the ticket description was written ambiguous of a specific solution no updates needed there, good job Victor!
An azure event for missing zip codes would have been the ideal result. Unfortunately because of where the ZipCode lookup happens (in the middle of conversion from hl7 to fhir) there is no viable way to log this as an azure event.
The new solution will be to log out a message with the missing zip code and add a tile to the UP Message Monitoring dashboard.