-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
131 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
118 changes: 49 additions & 69 deletions
118
...modified_caregiver_strain_index_inputs.ts → ...modified_caregiver_strain_index_inputs.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,141 +1,121 @@ | ||
import type { InputType } from '../../../src/types/calculations.types' | ||
import { NumberInputType } from '../../../src/types/calculations/inputs/calculation-inputs.types' | ||
import { z } from 'zod' | ||
import { ScoreInputSchemaType } from '../../../types' | ||
|
||
const YES_ANSWER = 2 | ||
const SOMETIMES_ANSWER = 1 | ||
const NO_ANSWER = 0 | ||
|
||
const type: NumberInputType = { | ||
type: 'number', | ||
allowed_answers: [ | ||
{ value: NO_ANSWER, label: { en: 'No', nl: 'Nee' } }, | ||
{ | ||
value: SOMETIMES_ANSWER, | ||
label: { en: 'Yes, sometimes', nl: 'Ja, soms' }, | ||
}, | ||
{ | ||
value: YES_ANSWER, | ||
label: { en: 'Yes, on a regular basis', nl: 'Ja, regelmatig' }, | ||
}, | ||
], | ||
const type = { | ||
type: z.union([ | ||
z.literal(NO_ANSWER), | ||
z.literal(SOMETIMES_ANSWER), | ||
z.literal(YES_ANSWER), | ||
]), | ||
uiOptions: { | ||
options: [ | ||
{ value: NO_ANSWER, label: { en: 'No', nl: 'Nee' } }, | ||
{ | ||
value: SOMETIMES_ANSWER, | ||
label: { en: 'Yes, sometimes', nl: 'Ja, soms' }, | ||
}, | ||
{ | ||
value: YES_ANSWER, | ||
label: { en: 'Yes, on a regular basis', nl: 'Ja, regelmatig' }, | ||
}, | ||
], | ||
}, | ||
} | ||
|
||
export const MODIFIED_CAREGIVER_STRAIN_INDEX_INPUTS: Array<InputType> = [ | ||
{ | ||
input_id: 'CSI_Q01', | ||
export const MODIFIED_CAREGIVER_STRAIN_INDEX_INPUTS = { | ||
CSI_Q01: { | ||
label: { | ||
nl: 'Mijn nachtrust is verstoord.', | ||
en: 'My sleep is disturbed (e.g., because the person I care for is in and out of bed or wanders around at night)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q02', | ||
CSI_Q02: { | ||
label: { | ||
nl: 'Hem of haar helpen kost me nogal wat moeite en tijd.', | ||
en: 'Caregiving is inconvenient (e.g., helping takes so much time or it’s a long drive over to help)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q03', | ||
CSI_Q03: { | ||
label: { | ||
nl: 'Ik vind het lichamelijk zwaar.', | ||
en: 'It is a physical strain (e.g., because of lifting in and out of a chair; effort or concentration is required)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q04', | ||
CSI_Q04: { | ||
label: { | ||
nl: 'Het beperkt me in andere dingen die ik wil doen.', | ||
en: 'Caregiving is confining (e.g., helping restricts free time or cannot go visiting)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q05', | ||
CSI_Q05: { | ||
label: { | ||
nl: 'Wij hebben onze dagelijkse manier van doen moeten aanpassen.', | ||
en: 'There have been family adjustments (e.g., because helping has disrupted routine; there has been no privacy)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q06', | ||
CSI_Q06: { | ||
label: { | ||
nl: 'Wij hebben onze plannen moeten wijzigen.', | ||
en: 'There have been changes in personal plans (e.g., had to turn down a job; could not go on vacation)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q07', | ||
CSI_Q07: { | ||
label: { | ||
nl: 'Er zijn ook andere zaken waaraan ik mijn tijd moet besteden.', | ||
en: 'There have been other demands on my time (e.g., other family members need me)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q08', | ||
CSI_Q08: { | ||
label: { | ||
nl: 'Emotioneel gedragen we ons anders ten opzichte van elkaar.', | ||
en: 'There have been emotional adjustments (e.g., because of severe arguments)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q09', | ||
CSI_Q09: { | ||
label: { | ||
nl: 'Het gedrag van mijn man/vrouw maakt me soms van streek.', | ||
en: 'Some behavior is upsetting (e.g., because of incontinence; the person I care for has trouble remembering things; or the person I care for accuses people of taking things)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q10', | ||
CSI_Q10: { | ||
label: { | ||
nl: 'Het is pijnlijk te moeten zien dat hij/zij een ander persoon is geworden.', | ||
en: 'It is upsetting to find that he/she has changed so much from his/her former self (e.g., he/she is a different person than he/she used to be)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q11', | ||
CSI_Q11: { | ||
label: { | ||
nl: 'Ik heb mijn werk/baan moeten aanpassen aan de situatie.', | ||
en: 'There have been work adjustments (e.g., because of having to take time off)', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q12', | ||
CSI_Q12: { | ||
label: { | ||
nl: 'Ik word geheel door deze situatie in beslag genomen.', | ||
en: "I'm feeling completely overwhelmed (e.g., because of worry about the person I care for; concerns about how you I will manage)", | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
{ | ||
input_id: 'CSI_Q13', | ||
CSI_Q13: { | ||
label: { | ||
nl: 'We leven onder financiële druk.', | ||
en: 'It is a financial strain', | ||
}, | ||
input_type, | ||
required: true, | ||
...type, | ||
}, | ||
] | ||
} satisfies ScoreInputSchemaType |
8 changes: 8 additions & 0 deletions
8
...ores/modified_caregiver_strain_index/definition/modified_caregiver_strain_index_output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { z } from 'zod' | ||
import { ScoreOutputSchemaType } from '../../../types' | ||
export const MODIFIED_CAREGIVER_STRAIN_INDEX_OUTPUT = { | ||
MODIFIED_CAREGIVER_STRAIN_INDEX: { | ||
label: { en: 'Modified Caregiver Strain Index Score' }, | ||
type: z.number(), | ||
}, | ||
} satisfies ScoreOutputSchemaType |
Oops, something went wrong.