Skip to content

Commit 39497da

Browse files
authored
Merge pull request #64 from awell-health/oxford-inverted
feat(oxford): added inverted oxford hip score to support remediation 1.0.19
2 parents 657bfbf + 2ad15cb commit 39497da

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@awell-health/awell-score",
3-
"version": "1.0.18",
3+
"version": "1.0.19",
44
"description": "Library of Medical Score functions",
55
"packageManager": "yarn@4.6.0",
66
"main": "dist/index.js",

src/scores/library.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ import { oas } from './oas/oas'
8282
import { ompq, ompq_10 } from './orebro'
8383
import { oswestry } from './oswestry/oswestry'
8484
import { oxford_hip_score } from './oxford_hip_score/oxford_hip_score'
85+
import { oxford_hip_score_inverted } from './oxford_hip_score/oxford_hip_score_inverted'
8586
import { oxford_knee_score } from './oxford_knee_score/oxford_knee_score'
8687
import { packyears } from './packyears/packyears'
8788
import { panss_6 } from './panss_6/panss_6'
@@ -226,6 +227,7 @@ export const ScoreLibrary = createScoreLibrary({
226227
ompq_short_form: ompq_10,
227228
oswestry,
228229
oxford_hip_score,
230+
oxford_hip_score_inverted,
229231
oxford_knee_score,
230232
packyears,
231233
panss_6,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { sum } from 'lodash'
2+
import { ScoreType } from '../../types'
3+
import { OHS_OUTPUT, OHS_INPUTS } from './definition'
4+
5+
export const oxford_hip_score_inverted: ScoreType<typeof OHS_INPUTS, typeof OHS_OUTPUT> =
6+
{
7+
name: 'Inverted Oxford Hip Score (48 minus OHS)',
8+
readmeLocation: __dirname,
9+
inputSchema: OHS_INPUTS,
10+
outputSchema: OHS_OUTPUT,
11+
calculate: ({ data }) => {
12+
const score = 48 - sum(Object.values(data))
13+
14+
return {
15+
OXFORD_HIP_SCORE: score,
16+
}
17+
},
18+
}

0 commit comments

Comments
 (0)