Skip to content

Commit

Permalink
Parsing error fix.
Browse files Browse the repository at this point in the history
Check for field 8 before using it.
  • Loading branch information
shabiel committed Nov 15, 2019
1 parent 774d3d4 commit fa30ce1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ private Optional<DiagnosticReport> parseDiagnosticReportRecord(String record, bo
result.setCode(ResourceHelper.createCodeableConcept(HcConstants.CPT, fields[6], display));
}

if(fields.length > 7) {
result.addConclusionCode(ResourceHelper.createCodeableConcept(HcConstants.SNOMED_URN, fields[8], fields[7]));
if(fields.length > 8) {
result.addConclusionCode(ResourceHelper.createCodeableConcept(HcConstants.SNOMED_URN, fields[8], fields[7]));
}

// conclusion
Expand Down

0 comments on commit fa30ce1

Please sign in to comment.