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

Transformation to update OBR-2 with ORC-4 #1190

Merged
merged 13 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import org.hl7.fhir.r4.model.ServiceRequest;

/**
* Updates Placer Order Number (ORC-2) with content from Placer Group Number (ORC-4). It also
* replaces Placer Order Number's Entity Identifier (ORC-2.1) and Namespace Id (ORC-2.2) with Placer
* Group Number's Entity Identifier (ORC-4.1) and Namespace Id (ORC-4.2) respectively. Effectively,
* we're swapping ORC-2 for ORC-4 and vice versa.
* Updates Placer Order Number in ORC and OBR (ORC-2 and OBR-4) with content from Placer Group
* Number (ORC-4). Specifically, it updated ORC-2.1/OBR-2.1 with OBR-4.1, and ORC-2.2/OBR-2.2 with
* OBR-4.2. It also updates Placer Group Number (ORC-4) with the original value for Placer Order
* Number (ORC-2). Specifically, it updates ORC-4.1 and ORC-4.2 with the original values in ORC-2.1
* and ORC-2.2 respectively.
*/
public class SwapPlacerOrderAndGroupNumbers implements CustomFhirTransformation {

Expand All @@ -28,6 +29,8 @@ public void transform(FhirResource<?> resource, Map<String, String> args) {

HapiHelper.setORC2_1Value(serviceRequest, orc4_1);
HapiHelper.setORC2_2Value(serviceRequest, orc4_2);
HapiHelper.setOBR2_1Value(serviceRequest, orc4_1);
HapiHelper.setOBR2_2Value(serviceRequest, orc4_2);
HapiHelper.setORC4_1Value(serviceRequest, orc2_1);
HapiHelper.setORC4_2Value(serviceRequest, orc2_2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,11 @@

// OBR - Observation Request

// OBR-2 - Placer Order Number
public static void setOBR2_1Value(ServiceRequest serviceRequest, String value) {}
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed

public static void setOBR2_2Value(ServiceRequest serviceRequest, String value) {}
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed

// OBR-4 - Universal Service Identifier

// OBR-4.1 - Identifier
Expand Down