Skip to content

Commit c876647

Browse files
committed
Sanjana,Sukreet | Flipped the system url check to avoid null pointer exception.
1 parent 80abf43 commit c876647

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/org/sharedhealth/datasense/handler/mappers/ObservationValueMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ else if (value instanceof CodeableConceptDt) {
5757
private boolean isValueBoolean(List<CodingDt> codings) {
5858
if (!codings.isEmpty()) {
5959
String system = codings.get(0).getSystem();
60-
return system.equalsIgnoreCase(HL7_FHIR_VS_URL_FOR_BOOLEAN) || system.equalsIgnoreCase(HL7_FHIR_VS_SYSTEM_FOR_BOOLEAN);
60+
return HL7_FHIR_VS_URL_FOR_BOOLEAN.equalsIgnoreCase(system) || HL7_FHIR_VS_SYSTEM_FOR_BOOLEAN.equalsIgnoreCase(system);
6161
}
6262
return false;
6363
}

src/main/java/org/sharedhealth/datasense/scheduler/jobs/CatchmentEncounterCrawlerJob.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import org.springframework.scheduling.annotation.Scheduled;
1616
import org.springframework.stereotype.Component;
1717

18-
import java.net.URISyntaxException;
19-
2018
@Component
2119
public class CatchmentEncounterCrawlerJob {
2220
@Autowired
@@ -46,7 +44,7 @@ public void start() {
4644
transactionManager, shrWebClient, properties, bundleUtil);
4745
try {
4846
feedCrawler.process();
49-
} catch (URISyntaxException e) {
47+
} catch (Exception e) {
5048
String errorMessage = String.format("Unable to process encounter catchment feed [%s]", feedUrl);
5149
log.error(errorMessage);
5250
throw new RuntimeException(errorMessage, e);

0 commit comments

Comments
 (0)