mirror of
https://github.com/pcvolkmer/onco-analytics-monitor.git
synced 2025-04-19 19:16:52 +00:00
refactor: rename to FhirObdsTopicMonitor and related parts
This commit is contained in:
parent
c24587a5bd
commit
3dc5d79808
@ -23,7 +23,7 @@ class OncoAnalyticsMonitorApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
fun obdsFhirConditionRepository(): ConditionInMemoryRepository {
|
fun fhirObdsConditionRepository(): ConditionInMemoryRepository {
|
||||||
return ConditionInMemoryRepository()
|
return ConditionInMemoryRepository()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ import org.springframework.messaging.handler.annotation.Payload
|
|||||||
import org.springframework.stereotype.Component
|
import org.springframework.stereotype.Component
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
class ObdsFhirTopicMonitor(
|
class FhirObdsTopicMonitor(
|
||||||
@Qualifier("obdsFhirConditionRepository")
|
@Qualifier("fhirObdsConditionRepository")
|
||||||
private val conditionRepository: ConditionInMemoryRepository,
|
private val conditionRepository: ConditionInMemoryRepository,
|
||||||
statisticsEventProducer: StatisticsSink,
|
statisticsEventProducer: StatisticsSink,
|
||||||
) : TopicMonitor(statisticsEventProducer) {
|
) : TopicMonitor(statisticsEventProducer) {
|
||||||
@ -45,7 +45,7 @@ class ObdsFhirTopicMonitor(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
sendUpdatedStatistics(fetchStatistics("obdsfhir", conditionRepository))
|
sendUpdatedStatistics(fetchStatistics("fhirobds", conditionRepository))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RestController
|
|||||||
class StatisticsController(
|
class StatisticsController(
|
||||||
@Qualifier("obdsXmlConditionRepository")
|
@Qualifier("obdsXmlConditionRepository")
|
||||||
private val obdsXmlConditionRepository: ConditionInMemoryRepository,
|
private val obdsXmlConditionRepository: ConditionInMemoryRepository,
|
||||||
@Qualifier("obdsFhirConditionRepository")
|
@Qualifier("fhirObdsConditionRepository")
|
||||||
private val obdsFhirConditionRepository: ConditionInMemoryRepository,
|
private val fhirObdsConditionRepository: ConditionInMemoryRepository,
|
||||||
@Qualifier("fhirPseudonymizedConditionRepository")
|
@Qualifier("fhirPseudonymizedConditionRepository")
|
||||||
private val fhirPseudonymizedConditionRepository: ConditionInMemoryRepository,
|
private val fhirPseudonymizedConditionRepository: ConditionInMemoryRepository,
|
||||||
) {
|
) {
|
||||||
@ -24,9 +24,9 @@ class StatisticsController(
|
|||||||
return fetchStatistics("obdsxml", obdsXmlConditionRepository)
|
return fetchStatistics("obdsxml", obdsXmlConditionRepository)
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(path = ["obdsfhir"])
|
@GetMapping(path = ["fhirobds"])
|
||||||
fun obdsfhirStatistics(): Statistics {
|
fun obdsfhirStatistics(): Statistics {
|
||||||
return fetchStatistics("obdfhir", obdsFhirConditionRepository)
|
return fetchStatistics("fhirobds", fhirObdsConditionRepository)
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(path = ["fhirpseudonymized"])
|
@GetMapping(path = ["fhirpseudonymized"])
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<img class="logo" th:src="@{/images/topic.png}" alt="topic"/>
|
<img class="logo" th:src="@{/images/topic.png}" alt="topic"/>
|
||||||
<div class="description">Kafka Topic<br/>oBDS FHIR</div>
|
<div class="description">Kafka Topic<br/>oBDS FHIR</div>
|
||||||
<div class="statistics">
|
<div class="statistics">
|
||||||
<table id="obdsfhir"></table>
|
<table id="fhirobds"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><div class="step">
|
</div><div class="step">
|
||||||
@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetch('/statistics/obdsxml').then(res => res.json()).then(data => updateData(data, 'obdsxml'));
|
fetch('/statistics/obdsxml').then(res => res.json()).then(data => updateData(data, 'obdsxml'));
|
||||||
fetch('/statistics/obdsfhir').then(res => res.json()).then(data => updateData(data, 'obdsfhir'));
|
fetch('/statistics/fhirobds').then(res => res.json()).then(data => updateData(data, 'fhirobds'));
|
||||||
fetch('/statistics/fhirpseudonymized').then(res => res.json()).then(data => updateData(data, 'fhirpseudonymized'));
|
fetch('/statistics/fhirpseudonymized').then(res => res.json()).then(data => updateData(data, 'fhirpseudonymized'));
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
@ -88,8 +88,8 @@
|
|||||||
updateData(JSON.parse(event.data), 'obdsxml')
|
updateData(JSON.parse(event.data), 'obdsxml')
|
||||||
});
|
});
|
||||||
|
|
||||||
evtSource.addEventListener('obdsfhir', (event) => {
|
evtSource.addEventListener('fhirobds', (event) => {
|
||||||
updateData(JSON.parse(event.data), 'obdsfhir')
|
updateData(JSON.parse(event.data), 'fhirobds')
|
||||||
});
|
});
|
||||||
|
|
||||||
evtSource.addEventListener('fhirpseudonymized', (event) => {
|
evtSource.addEventListener('fhirpseudonymized', (event) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user