Skip to content

Commit

Permalink
IS-2112: Add behandlingsnummer header to pdl request
Browse files Browse the repository at this point in the history
  • Loading branch information
andersrognstad committed Feb 28, 2024
1 parent e1be5e3 commit a113d16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
7 changes: 6 additions & 1 deletion src/main/kotlin/no/nav/syfo/client/pdl/PdlClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PdlClient(
setBody(request)
header(HttpHeaders.ContentType, "application/json")
header(HttpHeaders.Authorization, bearerHeader(token.accessToken))
header(TEMA_HEADER, ALLE_TEMA_HEADERVERDI)
header(BEHANDLINGSNUMMER_HEADER_KEY, BEHANDLINGSNUMMER_HEADER_VALUE)
header(IDENTER_HEADER, IDENTER_HEADER)
}

Expand Down Expand Up @@ -82,5 +82,10 @@ class PdlClient(
companion object {
private val logger = LoggerFactory.getLogger(PdlClient::class.java)
const val IDENTER_HEADER = "identer"

// Se behandlingskatalog https://behandlingskatalog.intern.nav.no/
// Behandling: Sykefraværsoppfølging: Vurdere behov for oppfølging og rett til sykepenger etter §§ 8-4 og 8-8
private const val BEHANDLINGSNUMMER_HEADER_KEY = "behandlingsnummer"
private const val BEHANDLINGSNUMMER_HEADER_VALUE = "B426"
}
}
11 changes: 0 additions & 11 deletions src/main/kotlin/no/nav/syfo/util/RequestUtil.kt
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
package no.nav.syfo.util

import io.ktor.server.application.*
import io.ktor.util.pipeline.*
import net.logstash.logback.argument.StructuredArguments

const val TEMA_HEADER = "Tema"
const val ALLE_TEMA_HEADERVERDI = "GEN"

fun bearerHeader(token: String): String {
return "Bearer $token"
}

const val NAV_CALL_ID_HEADER = "Nav-Call-Id"

fun callIdArgument(callId: String) = StructuredArguments.keyValue("callId", callId)!!

const val NAV_CONSUMER_ID_HEADER = "Nav-Consumer-Id"

0 comments on commit a113d16

Please sign in to comment.