CDCgov/prime-reportstream

[bug] RADx Mars mappings are broken

Closed this issue · 1 comments

Describe the bug

I had thought this was a surface level fix, but it turned out to be deeper than that. There are several places where a schema under RADx Mars (found in the directory prime-router/src/main/resources/metadata/hl7_mapping/ORU_R01/RADx_MARS/) is pointing to a file that doesn't exist, but even after fixing that, there are other errors.

Impact on ReportStream

Schema for RADx Mars cannot be used.

Steps to reproduce

Steps to reproduce the behavior:

  1. Run ./prime login --env=staging

  2. Run ./prime multiple-settings get -l --env=staging --filter=demo (Note: this is an easy way to get a receiver that is using the schemaName classpath:/metadata/hl7_mapping/ORU_R01/RADx_MARS/RADx_MARS-base.yml for translation)

  3. Add DM to the PID as the state, right before 02139 in prime-router/src/test/resources/validation/marsotcelr/valid.hl7 as shown image.png (this will make sure that the file is routed to the receiver added in step 2)

  4. Send modified valid.hl7 to local ReportStream as a sender on the mars-otc-elr-onboarding topic (if you followed step 1 and 2, you should be able to use demo.mars-otc-elr-onboarding-sender)

  5. You should see errors that a schema doesn't exist

  6. Do a find and replace to replace /hl7_mapping/RADx_MARS/ with /hl7_mapping/ORU_R01/RADx_MARS/ for files in the directory prime-router/src/main/resources/metadata/hl7_mapping/ORU_R01/RADx_MARS/

  7. Repeat step 4

  8. You should now see new invalid schema exception errors for RADx_MARS-base.yml as shown image.png

Expected behavior

A file routed to a receiver using the classpath:/metadata/hl7_mapping/ORU_R01/RADx_MARS/RADx_MARS-base.yml schema is processed without schema errors

  1. This mapping is old and needs to get removed. For RadxMars, we should be using the basic ORU_R01 mapping. We are currently planning to remove this mapping as part of #14992
  2. Engagement is not using or planning to use RADx_MARS-base.yml anywhere