Skip to content

Commit

Permalink
Removed magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
heinharaldsen committed Dec 4, 2024
1 parent 33d00f7 commit 2a58f5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class SmregistreringClient(

val uri =
UriComponentsBuilder.fromHttpUrl("$url/api/v1/sykmelder/{hprNummer}")
.buildAndExpand(hprNummer)
.pathSegment(hprNummer)
.build()
.toUri()

return smregisteringRestTemplate.exchange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import no.nav.sykdig.digitalisering.sykmelding.RuleInfo
import no.nav.sykdig.digitalisering.sykmelding.Status
import no.nav.sykdig.digitalisering.sykmelding.ValidationResult

const val HPR_GODKJENNING_KODE = 7704

fun checkValidState(
smRegistreringManuell: SmRegistreringManuell,
sykmelder: Sykmelder,
Expand Down Expand Up @@ -139,7 +141,7 @@ fun studentBehandlerUtenAutorisasjon(
val erStudent =
sykmelder.godkjenninger?.any {
it.autorisasjon?.aktiv == true &&
it.autorisasjon.oid == 7704 &&
it.autorisasjon.oid == HPR_GODKJENNING_KODE &&
it.autorisasjon.verdi == "3"
}

Expand Down

0 comments on commit 2a58f5a

Please sign in to comment.