As UCSD, so that I can ingest an NBS result message, I need the accession number OBX removed (as this uses a local code that can't be supported).
Pre-conditions
Work for story #1277 is complete. These stories have similar requirements, so this will build on the work we've done for the previous story.
Acceptance Criteria
[x] For ORUs sent by ReportStream to UCSD, the accession number OBX (as identified by OBX-3.4 as '99717-5' AND OBX-3.6 as 'L') is removed.
[x] The Observation set ID (OBX-1) values for all OBX segments are renumbered to be sequential (Note: This happens automatically as part of the RS FHIR => HL7 conversion; if not, we should discuss this as a team to see how essential this scope is)
Tasks
Research
[x] Determine if the transformation should be configurable for "coding" and "alt-coding" matches (OBX-3.1/2/3 vs 4/5/6). [Yes]
[x] Based on the above, should it still be considered a match if the other triplet has other data? [Yes, as long as we get a match in the fields we're looking for, anything else can be in the other triplet]
Engineering
Phase 1: Working code for testing session with CA and UCSD
[x] Implement the transform class. See notes below.
[x] Tests
[x] Happy path - remove observation when code, coding system, and cwe-coding match the arguments (e.g. 99717-5/L/alt-coding) @jbiskie
[x] Similar to above, but use coding instead of alt-coding. Might also use different code and coding system. @jbiskie
[x] Similar to above, but has data in both coding and alt-coding. Should still remove the observation. @jbiskie
[x] No removal when there is only a partial match of the code, coding system, and/or cwe-coding @jbiskie
[x] No removal when there is no observation identifier (OBX-3 is completely empty)
[x] Ensure all matching observations are removed if there's >1 matching observation (corner case to ensure correctness, but not an expected scenario for CA)
[x] Ensure matching observation is removed with an example message (can use 002 or other examples)
[x] Configure the transformation in transformation_definitions.json
Phase 2: Refactor
[x] Refactor similar code to the mapping transform #1277
Definition of Done
[x] Documentation tasks completed
[x] Documentation and diagrams created or updated
[x] ADRs (/adr folder)
[x] Main README.md
[x] Other READMEs in the repo
[x] If applicable, update the ReportStream Setup section in README.md
After discussing with @dbgolson, we've decided to generalize the transformation function to accept three parameters. For the accession number in OBX-3.4/5/6, the implementation will resemble:
arguments
---------
code 99717-5
extension-coding system L
extension-coding alt-coding
By examining the coding extension (which can be either "coding" or "alt-coding"), the transform will be more flexible. This allows us to retrieve codes from either OBX-3.1/2/3 or OBX-3.4/5/6, depending on partner-specific requirements.
Story tasks and notes updated after discussion with @dbgolson. Tentatively, @luis-pabon-tf is going to start on the implementation and @jbiskie will start on tests.
Story
As UCSD, so that I can ingest an NBS result message, I need the accession number OBX removed (as this uses a local code that can't be supported).
Pre-conditions
Acceptance Criteria
Tasks
Research
Engineering
Phase 1: Working code for testing session with CA and UCSD
transformation_definitions.json
Phase 2: Refactor
Definition of Done
/adr
folder)README.md
ReportStream Setup
section inREADME.md
Research Questions
Decisions
Notes
Implementation
After discussing with @dbgolson, we've decided to generalize the transformation function to accept three parameters. For the accession number in OBX-3.4/5/6, the implementation will resemble:
By examining the coding extension (which can be either "coding" or "alt-coding"), the transform will be more flexible. This allows us to retrieve codes from either OBX-3.1/2/3 or OBX-3.4/5/6, depending on partner-specific requirements.