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

Remove la obr except 54089 8 #1518

Merged
merged 23 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b7bb8c8
started definition for la obr removal
pluckyswan Oct 3, 2024
e35ddb1
swapped out identifier to represent la ochssner
pluckyswan Oct 4, 2024
446b853
fix identifier condition
pluckyswan Oct 4, 2024
3d1eee2
updated test to include new obr removal for la ochsner
pluckyswan Oct 8, 2024
7b8e9fc
Added test file for ORU removal
jherrflexion Oct 8, 2024
3d1c883
Merge branch 'main' into remove-la-obr-except-54089-8
somesylvie Oct 30, 2024
5253f59
Update test based on refactor
somesylvie Oct 30, 2024
07fee0c
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Nov 4, 2024
abda88c
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Nov 22, 2024
e8a347c
Fix filtering for LA ORU flattening
saquino0827 Nov 26, 2024
e9871bc
Add example LA ORU flattened files
saquino0827 Nov 26, 2024
c0e3c74
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Nov 26, 2024
46ecdfc
Add RS e2e test for LA ORU flattening and improve documentation
saquino0827 Nov 26, 2024
e870ab0
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Dec 2, 2024
426b650
Fix la remove obr extension filtering
saquino0827 Dec 2, 2024
7a381b0
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Dec 2, 2024
bc98888
Update assertion name for LADPH to LA-Oschner
saquino0827 Dec 3, 2024
86c91ff
Merge branch 'remove-la-obr-except-54089-8' of https://github.com/CDC…
saquino0827 Dec 3, 2024
89a02b0
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Dec 3, 2024
e177296
Update naming to say UCSD
saquino0827 Dec 5, 2024
38b82ec
Merge branch 'main' into remove-la-obr-except-54089-8
saquino0827 Dec 5, 2024
7049823
Removed the example files from this branch because it will be provide…
saquino0827 Dec 5, 2024
553f315
Merge branch 'remove-la-obr-except-54089-8' of https://github.com/CDC…
saquino0827 Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
router:
build: .
environment:
REPORT_STREAM_URL_PREFIX: http://localhost:7071
REPORT_STREAM_URL_PREFIX: http://host.docker.internal:7071
ports:
- "8080:8080" # default api endpoint port
- "6006:6006" # Java debug port
Expand Down
18 changes: 18 additions & 0 deletions etor/src/main/resources/transformation_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,24 @@
}
]
},
{
"name": "laOchsnerOruRemoveObservationRequests",
"description": "Removes all OBRs from an LA Ochsner ORU message except for the OBR with value '54089-8' in OBR-4.1. All OBXs are attached to the sole remaining OBR",
"message": "",
"conditions": [
"Bundle.entry.resource.ofType(MessageHeader).destination.extension.where(url = 'https://reportstream.cdc.gov/fhir/StructureDefinition/universal-id').value = '1.2.840.114350.1.13.286.2.7.2.695071'",
saquino0827 marked this conversation as resolved.
Show resolved Hide resolved
"Bundle.entry.resource.ofType(MessageHeader).event.code = 'R01'",
"Bundle.entry.resource.ofType(ServiceRequest).code.coding.where(code = '54089-8').exists()"
],
"rules": [
{
"name": "RemoveObservationRequests",
"args": {
"universalServiceIdentifier": "54089-8"
}
}
]
},
{
"name": "ucsdOruUpdateUniversalServiceIdentifier",
"description": "Updates the coding system name (OBR-4.3) for ORU orders to the expected value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,36 @@ class RemoveObservationRequestsTest extends Specification {
thrown(ClassCastException)
}

def "remove all LA Ochsner's OBRs except for the one with OBR-4.1 = '54089-8'"() {
given:
def fhirResource = ExamplesHelper.getExampleFhirResource("../LA/002_LA_ORU_R01_ORU_removal_test_file.fhir")
def bundle = fhirResource.getUnderlyingData() as Bundle

def initialDiagnosticReports = HapiHelper.resourcesInBundle(bundle, DiagnosticReport).toList()
def initialServiceRequests = HapiHelper.resourcesInBundle(bundle, ServiceRequest).toList()
def initialObservations = HapiHelper.resourcesInBundle(bundle, Observation).toList()
def obr4_1Values = initialServiceRequests.collect { HapiHelper.getOBR4_1Value(it) }

expect:
initialDiagnosticReports.size() > 1
initialServiceRequests.size() > 1
initialObservations.size() > 1
obr4_1 in obr4_1Values

when:
transformClass.transform(fhirResource, args)
saquino0827 marked this conversation as resolved.
Show resolved Hide resolved
def diagnosticReports = HapiHelper.resourcesInBundle(bundle, DiagnosticReport).toList()
def serviceRequests = HapiHelper.resourcesInBundle(bundle, ServiceRequest).toList()
def dr = diagnosticReports.first() as DiagnosticReport
def sr = HapiHelper.getServiceRequest(dr)

then:
diagnosticReports.size() == 1
serviceRequests.size() == 1
HapiHelper.getOBR4_1Value(sr) == obr4_1
}

def "remove all OBRs except for the one with OBR-4.1 = '54089-8'"() {
def "remove all CA UCSD's OBRs except for the one with OBR-4.1 = '54089-8'"() {
given:
def fhirResource = ExamplesHelper.getExampleFhirResource("../CA/002_CA_ORU_R01_initial_translation.fhir")
def bundle = fhirResource.getUnderlyingData() as Bundle
Expand Down
Loading
Loading