Skip to content

Commit

Permalink
Chore/title digitalisertutenlansksykmelding (#368)
Browse files Browse the repository at this point in the history
* chore: add title digitalisert utenlandsk sykmelding

* chore: correct source on sykmeldinger from rina
  • Loading branch information
helehar authored Nov 21, 2024
1 parent 8f30218 commit 4477f27
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ class SykDigOppgaveService(
private val log = applog()
private val securelog = securelog()

fun createOppgave(oppgaveId: String, fnr: String, journalpostId: String, journalpost: SafJournalpost, dokumentInfoId: String, source: String = "syk-dig"): OppgaveDbModel {
val dokumenter =
journalpost.dokumenter.map {
DokumentDbModel(it.dokumentInfoId, it.tittel ?: "Mangler Tittel")
private fun createOppgave(oppgaveId: String, fnr: String, journalpostId: String, journalpost: SafJournalpost, dokumentInfoId: String, source: String = "syk-dig"): OppgaveDbModel {
val dokumenter = journalpost.dokumenter.map {
val oppdatertTittel = if (it.tittel == "Utenlandsk sykmelding") {
"Digitalisert utenlandsk sykmelding"
} else {
it.tittel ?: "Mangler Tittel"
}
DokumentDbModel(it.dokumentInfoId, oppdatertTittel)
}

return OppgaveDbModel(
oppgaveId = oppgaveId,
fnr = fnr,
Expand Down Expand Up @@ -81,7 +86,7 @@ class SykDigOppgaveService(
journalpostId = journalpostId,
journalpost = journalpost,
dokumentInfoId = dokumentInfoId,
source = if (journalpost.kanal == "NAV_NO" || tittel) "navno" else "syk-dig"
source = if (journalpost.kanal == "NAV_NO" || tittel) "navno" else if (journalpost.kanal == "RINA") "rina" else "syk-dig"
)
oppgaveRepository.lagreOppgave(oppgave)
log.info("Oppgave med id $oppgaveId lagret")
Expand Down

0 comments on commit 4477f27

Please sign in to comment.