generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sender transform to remove leading zeros for CDPH NBS NM data type (
#16296) * add sender transform to remove leading zeros for CDPH NBS NM data type * add integration tests for hl7 to fhir transform * update tests for multiple Order groups * fix integration test filenames * update expected filepath to correctly identify output file
- Loading branch information
Showing
4 changed files
with
3,428 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...src/main/resources/metadata/fhir_transforms/senders/Flexion/cdph-nbs-sender-transform.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# $schema: ../../../../../../../metadata/json_schema/fhir/fhir-to-fhir-transform.json | ||
# Sender transform for CDPH NBS results | ||
elements: | ||
|
||
# REGEX removes leading zeroes from left of decimal point unless there is only a single zero | ||
- name: remove-leading-zeros-from-nm-data-type | ||
resource: 'Bundle.entry.resource.ofType(Observation).value.ofType(Quantity)' | ||
condition: '%resource.value.toString().matches("^0\\d+(\\.\\d+)?$")' | ||
bundleProperty: '%resource.value' | ||
value: [ '%resource.value.toString().replaceMatches("^0+(\\d*|0)(\\.\\d+)?$", "$1$2")' ] |
Oops, something went wrong.