Skip to content

Commit

Permalink
add automated-sender-testing transform (#16392)
Browse files Browse the repository at this point in the history
* add automated-sender-testing transform

* add automated-sender-testing transform
  • Loading branch information
GilmoreA6 authored Oct 30, 2024
1 parent 66869b8 commit 787b61a
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# $schema: ../../../../../../../metadata/json_schema/fhir/fhir-to-fhir-transform.json
# Sender transform for ETOR simulated-sender automated testing. Will be used only for automated tests in staging environment to apply any sender transforms for ETOR-NBS senders.
constants:
cdphSender: 'Bundle.entry.resource.ofType(MessageHeader).source.name = "SISGDSP"'

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+)?$") and
%cdphSender
bundleProperty: '%resource.value'
value: [ '%resource.value.toString().replaceMatches("^0+(\\d*|0)(\\.\\d+)?$", "$1$2")' ]

0 comments on commit 787b61a

Please sign in to comment.