From fa30ce1868ec87544ecf510fe90c6a2af5f0e049 Mon Sep 17 00:00:00 2001 From: Sam Habiel Date: Fri, 15 Nov 2019 13:59:11 -0500 Subject: [PATCH] Parsing error fix. Check for field 8 before using it. --- .../vista/fhir/api/parser/DiagnosticReportParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java-api/src/main/java/com/healthconcourse/vista/fhir/api/parser/DiagnosticReportParser.java b/java-api/src/main/java/com/healthconcourse/vista/fhir/api/parser/DiagnosticReportParser.java index d3d21a8..97ca4da 100644 --- a/java-api/src/main/java/com/healthconcourse/vista/fhir/api/parser/DiagnosticReportParser.java +++ b/java-api/src/main/java/com/healthconcourse/vista/fhir/api/parser/DiagnosticReportParser.java @@ -107,8 +107,8 @@ private Optional 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