File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/diagnosticreport Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -79,15 +79,17 @@ public String mapDiagnosticReportToCompoundStatement(DiagnosticReport diagnostic
7979 List <Specimen > specimens = fetchSpecimens (diagnosticReport , observations );
8080 final IdMapper idMapper = messageContext .getIdMapper ();
8181 markObservationsAsProcessed (idMapper , observations );
82+ observations = assignDummySpecimensToOrphanedTestResults (observations , specimens );
8283
83- final List <Observation > processedObservations =
84- assignDummySpecimensToOrphanedTestResults (observations , specimens );
84+ var processedObservations = observations .stream ()
85+ .filter (Predicate .not (DiagnosticReportMapper ::isFilingComment ))
86+ .toList ();
8587
8688 String mappedSpecimens = specimens .stream ()
8789 .map (specimen -> specimenMapper .mapSpecimenToCompoundStatement (specimen , processedObservations , diagnosticReport ))
8890 .collect (Collectors .joining ());
8991
90- String reportLevelNarrativeStatements = prepareReportLevelNarrativeStatements (diagnosticReport , processedObservations );
92+ String reportLevelNarrativeStatements = prepareReportLevelNarrativeStatements (diagnosticReport , observations );
9193
9294 var diagnosticReportCompoundStatementTemplateParameters = DiagnosticReportCompoundStatementTemplateParameters .builder ()
9395 .compoundStatementId (idMapper .getOrNew (ResourceType .DiagnosticReport , diagnosticReport .getIdElement ()))
You can’t perform that action at this time.
0 commit comments