Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA observation transforms from local code to LOINC or PLT #1306

Merged
merged 62 commits into from
Sep 28, 2024

Conversation

luis-pabon-tf
Copy link
Contributor

@luis-pabon-tf luis-pabon-tf commented Sep 10, 2024

CA observation transforms from local code to LOINC or PLT

This PR adds a new transform that converts local observation codes in the CA result messages to LOINC or PLT codes. The tranform checks each observation in the message, and the mapped LOINC/PLT codes are added to the observation's coding resource as an additional code. Following the ReportStream conversion from fhir back to HL7, the mapped codes are placed in OBX-3.1/2/3, and the local code remains in OBX-3.4/5/6.

Issue

#1277

Checklist

  • I have added tests to cover my changes
  • I have added logging where useful (with appropriate log level)
  • I have added JavaDocs where required
  • I have updated the documentation accordingly

Note: You may remove items that are not applicable

jbiskie and others added 21 commits September 12, 2024 16:53
Add the mapped coding at the beginning of the coding list
jbiskie and others added 19 commits September 27, 2024 13:30
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Replace unused assignment with inline return
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Updating hurl scripts
* Fixed typo in readme, create temp folder, write scrambled file into temp folder
* Fixed directory creation, resolved issue with sed command not copying rest of file
* updated readme to include toggle in options, add comments to scramble doing, alerted user to scrambling, removed folder creation for individual file
* replaced msh header for oru and orm message types
* added msh header replacement for oml message type
* switched to msh-9.2 as subfield in conditional
* remove temp directory after hurl script runs

---------

Co-authored-by: jcrichlake <jeff.crichlake@agile6.com>
Co-authored-by: Sylvie <sschuresko@flexion.us>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-Authored-By: halprin <halprin@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@jorg3lopez jorg3lopez force-pushed the story/1277-observation-local-codes-to-loinc branch from e0dc101 to cb222dd Compare September 27, 2024 20:35
@jorg3lopez
Copy link
Contributor

unsigned commits have been fixed.

Copy link

sonarcloud bot commented Sep 28, 2024

@jorg3lopez jorg3lopez merged commit c8f175b into main Sep 28, 2024
16 checks passed
@jorg3lopez jorg3lopez deleted the story/1277-observation-local-codes-to-loinc branch September 28, 2024 17:53
tjohnson7021 added a commit that referenced this pull request Oct 17, 2024
* Create 020_CA_ORU_R01_CDPH_OBX_to_LOINC_0_initial_message.hl7

Copied from the previous set of HL7 test data, with added OBX examples of the new mapping

* Update 020_CA_ORU_R01_CDPH_OBX_to_LOINC_0_initial_message.hl7

Fixed typo on some local codes

* Adding translated example file #20

* Addin skeleton for transformation

* WIP - add initial implementation of MapLocalObservationCode transform

* Adding unit test for a single observation

* Adding test for local code mappable to a PLT

* Update MapLocalObservationCodes.java

Add the mapped coding at the beginning of the coding list

* Small code cleanup

* Add tests for when the initial code is a LOINC code

* Refactor tests to remove duplicated code

* Add assertion to evaluateCoding

* Adding test for when primary code is also populated

* Add tests for an unmapped local code and empty observation identifer

* Updates to transformation to pass first 2 test cases

* WIP - multiple observation test

* All curent tests pass, but the code is not pretty and has at least one edge case unnacounted for

* Complete the multiple observations test, add the remaining mappings to the lookup

* Minor cleanup and refactoring

* Replace for() loop with if check for a single coding on the observation

* Add MapLocalObservationCodes to transformation_definitions.json

* refactor:
logging for when local codes not found
added method to extract MSH10 to HapiHelper class

* Update sender in log warning, restore mock logger in unit tests

* Commenting out the PLT codes that haven't been mapped yet so they will cause warnings for now

* refactor helper method for msh10

* Minor naming tweaks and comment updates

* add null check for cwe extension

* Address null check for getSystem method

* Missing paren

* refactor:
added hascodingExtensionWithUrl helper method to HapiHelper
added getCodingExtensionByUrl helper method to HapiHelper

* refactor:
added hasCodingSytem helper method to HapiHelper
added getCodingSystem helper method to HapiHelper

* Removed comments and empty lines

* spotlessApply

* WIP: transform refactoring - flatten conditional blocks

* Refactor transform into simpler methods

* Update minor dependencies to v5.4 (#1339)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update HapiHelper.java

Replace unused assignment with inline return

* Update dependency com.azure:azure-storage-blob to v12.28.0 (#1344)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Terraform azurerm to v4.3.0 (#1345)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Move urlForCodeType to HapiHelper for future reusability

* Adding tests for code coverage and addressing Sonar findings

* Adding tests for code coverage and addressing Sonar findings

* Adding tests for null and empty bundle for resourcesInBundle

* Adding tests for urlForCodeType

* HapiHelper: unit test for when bundle is null

* Updated RS Hurl Script to Replace MSH Header When Not Toggled (#1342)

* Updating hurl scripts
* Fixed typo in readme, create temp folder, write scrambled file into temp folder
* Fixed directory creation, resolved issue with sed command not copying rest of file
* updated readme to include toggle in options, add comments to scramble doing, alerted user to scrambling, removed folder creation for individual file
* replaced msh header for oru and orm message types
* added msh header replacement for oml message type
* switched to msh-9.2 as subfield in conditional
* remove temp directory after hurl script runs

---------

Co-authored-by: jcrichlake <jeff.crichlake@agile6.com>
Co-authored-by: Sylvie <sschuresko@flexion.us>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: saquino0827 <saquino@flexion.us>

* Add control id test, update test name

* Fix order of mockLogger registration and injection

* Fixed prod prefix mapping

Co-Authored-By: halprin <halprin@users.noreply.github.com>

* Add post-TI and post-RS example files

* Update dependency gradle to v8.10.2 (#1347)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add final 5 PLT mappings; update mapping for 99717-50

* Add comment to clarify behavior of adding the mapped code

---------

Co-authored-by: Joel Biskie <jbiskie@flexion.us>
Co-authored-by: jorge Lopez <jlopez@flexion.us>
Co-authored-by: Tiffini Johnson <tjohnson@flexion.us>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-authored-by: jcrichlake <jeff.crichlake@agile6.com>
Co-authored-by: Sylvie <sschuresko@flexion.us>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: halprin <halprin@users.noreply.github.com>
Co-authored-by: Jorge Lopez <49923512+jorg3lopez@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants