Skip to content

Commit

Permalink
PI-1630 updates for OPD Assessment processing
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-britton-moj committed Nov 7, 2023
1 parent 1537737 commit 843a1ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ class NsiService(
val type = nsiTypeRepository.getByCode(NsiType.Code.OPD_COMMUNITY_PATHWAY.value)
val subType = opdAssessment.result.subTypeCode?.value?.let { nsiSubTypeRepository.nsiSubType(it) }
val status = nsiStatusRepository.getByCode(NsiStatus.Code.READY_FOR_SERVICE.value)
val nsi = nsiRepository.save(
Nsi(
com.person,
opdAssessment.date.toLocalDate(),
type,
subType,
status,
opdAssessment.date,
opdAssessment.date,
com.providerId
)
val nsi = Nsi(
com.person,
opdAssessment.date.toLocalDate(),
type,
subType,
status,
opdAssessment.date,
opdAssessment.date,
com.providerId
)
nsi.appendNotes(opdAssessment.notes)
nsiRepository.save(nsi)

nsiManagerRepository.save(
NsiManager(
nsi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class OpdService(
val nsi = nsiService.findOpdNsi(com.person.id)

when {
activeEvent && nsi == null -> {
activeEvent && nsi?.active != true -> {
nsiService.createNsi(opdAssessment, com)
}

Expand Down

0 comments on commit 843a1ea

Please sign in to comment.