Skip to content

Commit

Permalink
Use Psychiatric type from imported file
Browse files Browse the repository at this point in the history
  • Loading branch information
jsrobertson committed Aug 19, 2024
1 parent 208d927 commit 8cc17ca
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 16 deletions.
3 changes: 1 addition & 2 deletions integration_tests/mockApis/oasys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import type {
Health,
LearningNeeds,
OffenceDetail,
Psychiatric,
Referral,
RisksAndAlerts,
RoshAnalysis,
} from '@accredited-programmes/models'
import type { Lifestyle, Relationships } from '@accredited-programmes-api'
import type { Lifestyle, Psychiatric, Relationships } from '@accredited-programmes-api'

export default {
stubAssessmentDateInfo: (args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CourseUtils, EmotionalWellbeingUtils } from '../../../../../server/utils'
import Page from '../../../page'
import type { Course, Psychiatric } from '@accredited-programmes/models'
import type { Course } from '@accredited-programmes/models'
import type { Psychiatric } from '@accredited-programmes-api'

export default class EmotionalWellbeing extends Page {
psychiatric: Psychiatric
Expand Down
6 changes: 0 additions & 6 deletions server/@types/models/Psychiatric.ts

This file was deleted.

2 changes: 0 additions & 2 deletions server/@types/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import type { Organisation } from './Organisation'
import type { OrganisationAddress } from './OrganisationAddress'
import type { Paginated } from './Paginated'
import type { KeyDates, Person, SentenceDetails } from './Person'
import type { Psychiatric } from './Psychiatric'
import type {
ConfirmationFields,
CreatedReferralResponse,
Expand Down Expand Up @@ -65,7 +64,6 @@ export type {
OrganisationAddress,
Paginated,
Person,
Psychiatric,
Referral,
ReferralStatus,
ReferralStatusCategory,
Expand Down
3 changes: 1 addition & 2 deletions server/data/accreditedProgrammesApi/oasysClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import type {
Health,
LearningNeeds,
OffenceDetail,
Psychiatric,
Referral,
RisksAndAlerts,
RoshAnalysis,
} from '@accredited-programmes/models'
import type { Lifestyle, Relationships } from '@accredited-programmes-api'
import type { Lifestyle, Psychiatric, Relationships } from '@accredited-programmes-api'
import type { SystemToken } from '@hmpps-auth'

export default class OasysClient {
Expand Down
3 changes: 1 addition & 2 deletions server/services/oasysService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import type {
Health,
LearningNeeds,
OffenceDetail,
Psychiatric,
Referral,
RisksAndAlerts,
RoshAnalysis,
} from '@accredited-programmes/models'
import type { Lifestyle, Relationships } from '@accredited-programmes-api'
import type { Lifestyle, Psychiatric, Relationships } from '@accredited-programmes-api'

export default class OasysService {
constructor(
Expand Down
2 changes: 1 addition & 1 deletion server/testutils/factories/psychiatric.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Factory } from 'fishery'

import FactoryHelpers from './factoryHelpers'
import type { Psychiatric } from '@accredited-programmes/models'
import type { Psychiatric } from '@accredited-programmes-api'

export default Factory.define<Psychiatric>(() => {
const problemOptions = ['0-No problems', '1-Some problems']
Expand Down

0 comments on commit 8cc17ca

Please sign in to comment.