Skip to content

Commit

Permalink
IS: Move aktivitetskrav folder into personstatus folder structure (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
vetlesolgaard authored Jan 8, 2025
1 parent 649a234 commit 16045ca
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 39 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package no.nav.syfo.personstatus.infrastructure.kafka

import no.nav.syfo.aktivitetskravvurdering.kafka.launchKafkaTaskAktivitetskravVurdering
import no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav.launchKafkaTaskAktivitetskravVurdering
import no.nav.syfo.ApplicationState
import no.nav.syfo.Environment
import no.nav.syfo.personstatus.infrastructure.clients.azuread.AzureAdClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.syfo.aktivitetskravvurdering.kafka
package no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav

import no.nav.syfo.personstatus.application.PersonoversiktStatusService
import no.nav.syfo.personstatus.domain.PersonIdent
Expand All @@ -7,6 +7,12 @@ import org.apache.kafka.clients.consumer.ConsumerRecords
import org.apache.kafka.clients.consumer.KafkaConsumer
import org.slf4j.LoggerFactory
import java.time.Duration
import java.time.LocalDate
import java.time.OffsetDateTime
import kotlin.collections.forEach
import kotlin.collections.isNotEmpty
import kotlin.collections.partition
import kotlin.jvm.java

class AktivitetskravVurderingConsumer(
private val personoversiktStatusService: PersonoversiktStatusService,
Expand Down Expand Up @@ -42,3 +48,15 @@ class AktivitetskravVurderingConsumer(
private val log = LoggerFactory.getLogger(AktivitetskravVurderingRecord::class.java)
}
}

data class AktivitetskravVurderingRecord(
val uuid: String,
val personIdent: String,
val createdAt: OffsetDateTime,
val status: String,
val isFinal: Boolean,
val stoppunktAt: LocalDate,
val beskrivelse: String?,
val sistVurdert: OffsetDateTime?,
val frist: LocalDate?,
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.syfo.aktivitetskravvurdering.kafka
package no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav

import no.nav.syfo.ApplicationState
import no.nav.syfo.personstatus.application.PersonoversiktStatusService
Expand All @@ -8,7 +8,10 @@ import no.nav.syfo.personstatus.infrastructure.kafka.launchKafkaTask
import no.nav.syfo.util.configuredJacksonMapper
import org.apache.kafka.clients.consumer.ConsumerConfig
import org.apache.kafka.common.serialization.Deserializer
import java.util.*
import java.util.Properties
import kotlin.apply
import kotlin.collections.set
import kotlin.jvm.java

const val AKTIVITETSKRAV_VURDERING_TOPIC = "teamsykefravr.aktivitetskrav-vurdering"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ package no.nav.syfo.aktivitetskravvurdering.kafka

import io.mockk.*
import kotlinx.coroutines.runBlocking
import no.nav.syfo.aktivitetskravvurdering.domain.AktivitetskravStatus
import no.nav.syfo.personstatus.application.aktivitetskrav.AktivitetskravStatus
import no.nav.syfo.personstatus.domain.PersonOversiktStatus
import no.nav.syfo.personstatus.infrastructure.database.queries.getPersonOversiktStatusList
import no.nav.syfo.personstatus.infrastructure.database.queries.createPersonOversiktStatus
import no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav.AKTIVITETSKRAV_VURDERING_TOPIC
import no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav.AktivitetskravVurderingConsumer
import no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav.AktivitetskravVurderingRecord
import no.nav.syfo.personstatus.infrastructure.kafka.mockPollConsumerRecords
import no.nav.syfo.testutil.*
import no.nav.syfo.testutil.generator.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package no.nav.syfo.testutil.generator

import no.nav.syfo.aktivitetskravvurdering.domain.AktivitetskravStatus
import no.nav.syfo.aktivitetskravvurdering.kafka.AKTIVITETSKRAV_VURDERING_TOPIC
import no.nav.syfo.aktivitetskravvurdering.kafka.AktivitetskravVurderingRecord
import no.nav.syfo.personstatus.application.aktivitetskrav.AktivitetskravStatus
import no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav.AKTIVITETSKRAV_VURDERING_TOPIC
import no.nav.syfo.personstatus.infrastructure.kafka.aktivitetskrav.AktivitetskravVurderingRecord
import no.nav.syfo.testutil.UserConstants
import org.apache.kafka.clients.consumer.ConsumerRecord
import org.apache.kafka.common.TopicPartition
Expand Down

0 comments on commit 16045ca

Please sign in to comment.