prime-simplereport icon indicating copy to clipboard operation
prime-simplereport copied to clipboard

Address STLT feedback from AIMS testing

Open mpbrown opened this issue 1 month ago • 1 comments

BACKEND PULL REQUEST

Related Issue

  • Resolves #9267
  • Resolves #9268
  • Resolves #9269
  • Resolves #9273
  • Resolves #9274

Changes Proposed

  • Use APHL-assigned IDs for message header (MSH) segments MSH-3 Sending Application and MSH-4 Sending Facility as well as File Header Segment (FHS) and Batch Header Segment (BHS)
  • Add telecom equipment type PH in all phone number fields
  • Add telecom use codes PRN (Personal Residence Number) for patient phones and WPN (Work Number) for provider and facility phones
  • Remove millisecond precision from HL7 timestamps since it caused issues in Alabama's system
  • Ensure timestamps in FHS and BHS are earlier than or equal to timestamp in MSH

Additional Information

  • For MSH-3 Sending Application, I created HL7Properties since are values that will change depending on the environment
  • For MSH-4 Sending Facility, I added these to HL7Constants since these will stay the same for all environments, but open to moving them to HL7Properties if we prefer
  • As of 11/4/2025, APHL stated we should continue to use the existing CDC OID we've been using for other HL7 fields like ORC-3.3 where SimpleReport is identified as the assigning authority.

Testing

  • Deployed on dev5
  • Submit a bulk upload file
  • Check AIM S3 bucket with AIMSCLI tool to see if the HL7 message was created node aims.ts ls
  • Verify contents on the HL7 message created node aim.ts getmessage object_key_here

Locally

  • Make sure aimsReportingEnabled is set to true
  • Run backend in debug with a breakpoint here in AimsReportingService
  • Verify contents on the batchMessage string and the generated objectKey

mpbrown avatar Nov 12 '25 15:11 mpbrown