CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
71 stars 39 forks source link

Bug: HL7 exception when routing via the CLI #3714

Open jimduff-usds opened 2 years ago

jimduff-usds commented 2 years ago

Bug: Grab the attached file in the comment below, remove the .txt ending, and run this command:

./prime data --input ./junk/device.csv --input-schema primedatainput/pdi-covid-19 --route --output-dir .

You'll see this exception:


Exception in thread "main" ca.uhn.hl7v2.HL7Exception: Can't find OBx as a direct child
        at ca.uhn.hl7v2.util.SegmentFinder.getStructure(SegmentFinder.java:141)
        at ca.uhn.hl7v2.util.SegmentFinder.getSegment(SegmentFinder.java:108)
        at ca.uhn.hl7v2.util.Terser.getSegment(Terser.java:358)
        at ca.uhn.hl7v2.util.Terser.set(Terser.java:432)
        at gov.cdc.prime.router.serializers.Hl7Serializer.buildMessage(Hl7Serializer.kt:538)
        at gov.cdc.prime.router.serializers.Hl7Serializer.createMessage(Hl7Serializer.kt:396)
        at gov.cdc.prime.router.serializers.Hl7Serializer.writeBatch(Hl7Serializer.kt:97)
        at gov.cdc.prime.router.cli.ProcessData$run$2.invoke(ProcessDataCommands.kt:497)
        at gov.cdc.prime.router.cli.ProcessData$run$2.invoke(ProcessDataCommands.kt:463)
        at gov.cdc.prime.router.cli.ProcessData.writeReportsToFile(ProcessDataCommands.kt:320)
        at gov.cdc.prime.router.cli.ProcessData.run(ProcessDataCommands.kt:463)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
        at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:395)
        at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:392)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:410)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:435)

```        at gov.cdc.prime.router.cli.MainKt.main(main.kt:276)

I'm not sure if this is occcurring when submitting to ReportStream API (Docker), or, if its only occurring with the commandline call.
jimduff-usds commented 2 years ago

https://app.zenhub.com/files/304423150/775e3200-8ee2-4e5f-aa13-77cb0da8e92c/download