Skip to content

Commit

Permalink
inline extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg3lopez committed Oct 24, 2024
1 parent 2a961d4 commit 3ca73a5
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public void transform(HealthData<?> resource, Map<String, Object> args) {
var codingMap = getMapFromArgs(args);

var bundle = (Bundle) resource.getUnderlyingData();
var msh41Identifier = extractMsh41Identifier(bundle);
var msh41Identifier =
HapiHelper.getMSH4_1Identifier(bundle) != null
? HapiHelper.getMSH4_1Identifier(bundle).getValue()
: null;
var messageId = HapiHelper.getMessageControlId(bundle);
var observations = HapiHelper.resourcesInBundle(bundle, Observation.class);

Expand All @@ -49,11 +52,6 @@ private boolean isLocalCode(Coding coding) {
coding, HapiHelper.EXTENSION_ALT_CODING, HapiHelper.LOCAL_CODE);
}

private String extractMsh41Identifier(Bundle bundle) {
var msh41Identifier = HapiHelper.getMSH4_1Identifier(bundle);
return msh41Identifier != null ? msh41Identifier.getValue() : null;
}

private void processCoding(
Observation observation,
Map<String, IdentifierCode> codingMap,
Expand Down

0 comments on commit 3ca73a5

Please sign in to comment.