Skip to content

Commit

Permalink
Merge pull request #43 from ministryofjustice/refine-intervention-man…
Browse files Browse the repository at this point in the history
…ager

Specify Intervention Manager interactions in more detail
  • Loading branch information
sldblog authored Aug 11, 2020
2 parents b29a8f7 + 5d972c1 commit 76f15d8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 14 deletions.
5 changes: 1 addition & 4 deletions src/main/kotlin/defineModelWithDeprecatedSyntax.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ fun defineModelWithDeprecatedSyntax(model: Model) {
val contractManager = model.addPerson("Contract Manager for CRCs", null)
val courtAdmin = model.addPerson("NPS court administrator", null)
val crcProgrammeManager = model.addPerson("CRC programme manager", "People who provide interventions on behalf of Community Rehabilitation Companies").apply { Tags.PROVIDER.addTo(this) }
val deliusSupport = model.addPerson("National Delius Support Team", null)
val sentencingPolicy = model.addPerson("Sentencing Policy", "Pseudo-team to capture sentencing policy meeting participants")

val hmip = model.addPerson("HM Inspectorate of Probation", "Reports to the government on the effectiveness of work with people who offended to reduce reoffending and protect the public")
Expand All @@ -39,10 +38,8 @@ fun defineModelWithDeprecatedSyntax(model: Model) {
courtAdmin.uses(Delius.system, "records CAS decision, referrals in")
courtAdmin.uses(prepareCaseForCourt, "captures court judgements in")
ProbationPractitioners.crc.uses(oasys, "records offender risk (attendance, contact, etc.) and assessment in")
crcProgrammeManager.interactsWith(deliusSupport, "opens tickets to update interventions")
crcProgrammeManager.interactsWith(Delius.supportTeam, "opens tickets to update interventions")
Delius.system.uses(oasys, "offender details, offence details, sentence info are copied into", "NDH")
deliusSupport.uses(Delius.system, "administers everything in")
deliusSupport.uses(Delius.system, "updates interventions in")
EPF.projectManager.interactsWith(sentencingPolicy, "listens to owners of interventions for changes in policy")
Reporting.ndmis.uses(OffenderManagementInCustody.allocationManager, "sends extracts containing service user allocation to", "email")
NOMIS.system.uses(Delius.system, "offender data is copied into", "NDH")
Expand Down
13 changes: 11 additions & 2 deletions src/main/kotlin/model/Delius.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package uk.gov.justice.hmpps.architecture

import com.structurizr.model.Model
import com.structurizr.model.Person
import com.structurizr.model.SoftwareSystem
import com.structurizr.view.AutomaticLayout
import com.structurizr.view.ViewSet

class Delius private constructor() {
companion object : HMPPSSoftwareSystem {
lateinit var system: SoftwareSystem
lateinit var supportTeam: Person

override fun defineModelEntities(model: Model) {
system = model.addSoftwareSystem(
Expand All @@ -17,6 +19,11 @@ class Delius private constructor() {
ProblemArea.GETTING_THE_RIGHT_REHABILITATION.addTo(this)
}

supportTeam = model.addPerson(
"NDST",
"(National Delius Support Team) Team supporting changes to data in National Delius"
)

val db = system.addContainer("nDelius database", null, "Oracle").apply {
Tags.DATABASE.addTo(this)
Tags.SOFTWARE_AS_A_SERVICE.addTo(this)
Expand Down Expand Up @@ -47,10 +54,12 @@ class Delius private constructor() {
}

override fun defineRelationships() {
IM.system.uses(system, "pushes contact information of interest to", "IAPS")
IM.system.uses(system, "pushes service user contact information to", "IAPS")
ProbationPractitioners.crc.uses(system, "records and reviews assessment decision, sentence plan in")
ProbationPractitioners.nps.uses(system, "records and reviews assessment decision, sentence plan, pre-sentence report, referrals in")
InterventionTeams.interventionServicesTeam.uses(system, "creates new interventions in")

InterventionTeams.interventionServicesTeam.interactsWith(supportTeam, "raises task to create or update an accredited programme with")
supportTeam.uses(system, "updates interventions in")
}

override fun defineViews(views: ViewSet) {
Expand Down
27 changes: 21 additions & 6 deletions src/main/kotlin/model/IM.kt
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
package uk.gov.justice.hmpps.architecture

import com.structurizr.model.Model
import com.structurizr.model.Person
import com.structurizr.model.SoftwareSystem
import com.structurizr.view.AutomaticLayout
import com.structurizr.view.ViewSet

class IM private constructor() {
companion object : HMPPSSoftwareSystem {
lateinit var system: SoftwareSystem
lateinit var i2nTeam: Person

override fun defineModelEntities(model: Model) {
system = model.addSoftwareSystem(
"IM",
"Interventions Manager\nHolds records of interventions delivered to services users in the community"
"Interventions Manager",
"(IM) Used to schedule accredited programmes and record service users' progress on them"
).apply {
ProblemArea.GETTING_THE_RIGHT_REHABILITATION.addTo(this)
}

i2nTeam = model.addPerson(
"i2n (formerly Northgate)",
"Provides and maintains the Intervention Manager service"
).apply {
addProperty("previous-name", "Northgate")
Tags.PROVIDER.addTo(this)
}
}

override fun defineRelationships() {
Delius.system.uses(system, "pushes active sentence requirements or licence conditions which are of interest to IM to", "IAPS")
InterventionTeams.interventionServicesTeam.uses(system, "create new interventions in")
InterventionTeams.npsProgrammeManager.uses(system, "create new interventions in")
InterventionTeams.crcTreatmentManager.uses(system, "create new interventions in")
Delius.system.uses(system, "pushes active sentence requirements or licence conditions to", "IAPS")
InterventionTeams.npsTreatmentManager.uses(system, "schedules accredited programme appointments, tracks service user attendance and evaluate service user progress in")
InterventionTeams.crcTreatmentManager.uses(system, "schedules accredited programme appointments, tracks service user attendance and evaluate service user progress in")

Delius.supportTeam.interactsWith(i2nTeam, "notify an accredited programme is updated", "email")
i2nTeam.uses(system, "creates new accredited programmes in")
}

override fun defineViews(views: ViewSet) {
views.createSystemContextView(system, "interventions-manager-context", null).apply {
addDefaultElements()
add(i2nTeam)
add(Delius.supportTeam)
add(InterventionTeams.interventionServicesTeam)
enableAutomaticLayout(AutomaticLayout.RankDirection.TopBottom, 300, 300)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/model/InterventionTeams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import com.structurizr.view.ViewSet
class InterventionTeams private constructor() {
companion object : HMPPSSoftwareSystem {
lateinit var interventionServicesTeam: Person
lateinit var npsProgrammeManager: Person
lateinit var npsTreatmentManager: Person
lateinit var crcTreatmentManager: Person

override fun defineModelEntities(model: Model) {
interventionServicesTeam = model.addPerson(
"Intervention Services Team",
"They accredit intervention programmes and do business development of the interventions"
)
npsProgrammeManager = model.addPerson("NPS programme manager")
npsTreatmentManager = model.addPerson("NPS treatment manager")
crcTreatmentManager = model.addPerson("CRC treatment manager")
.apply { Tags.PROVIDER.addTo(this) }
}
Expand Down

0 comments on commit 76f15d8

Please sign in to comment.