generated from mgramigna/typescript-node-starter
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Enums.ts
133 lines (125 loc) · 4.8 KB
/
Enums.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/**
* Enum for measure score types. Matching http://terminology.hl7.org/CodeSystem/measure-scoring
*/
export enum MeasureScoreType {
PROP = 'proportion',
RATIO = 'ratio',
CV = 'continuous-variable',
COHORT = 'cohort',
COMPOSITE = 'composite'
}
/**
* Enum for composite score types: Matching http://terminology.hl7.org/CodeSystem/composite-measure-scoring
*/
export const compositeScoringCodes = ['all-or-nothing', 'opportunity', 'linear', 'weighted'] as const;
export type CompositeScoreType = typeof compositeScoringCodes[number];
/**
* Enum for measure aggregation types. Matching // http://build.fhir.org/ig/HL7/cqf-measures/ValueSet-aggregate-method.html
*/
export enum AggregationType {
SUM = 'sum',
AVERAGE = 'average',
MEDIAN = 'median',
MIN = 'minimum',
MAX = 'maximum',
COUNT = 'count'
}
/**
* Enum for population types. Matching http://hl7.org/fhir/valueset-measure-population.html
*/
export enum PopulationType {
IPP = 'initial-population',
DENOM = 'denominator',
DENEX = 'denominator-exclusion',
DENEXCEP = 'denominator-exception',
NUMER = 'numerator',
NUMEX = 'numerator-exclusion',
MSRPOPL = 'measure-population',
MSRPOPLEX = 'measure-population-exclusion',
OBSERV = 'measure-observation'
}
/**
* Final result for a clause or statement.
*
* 'NA' - Not applicable. This statement is not relevant to any population calculation in this population_set. Common
* for unused library statements or statements only used for other population sets.
* !!!IMPORTANT NOTE!!! All define function statements are marked 'NA' since we don't have a strategy for
* highlighting or coverage when it comes to functions.
*
* 'UNHIT' - This statement wasn't hit. This is most likely because the statement was not relevant to population
* calculation for this patient. i.e. 'FALSE' in the the `statement_relevance` map.
*
* 'TRUE' - This statement is relevant and has a truthy result.
*
* 'FALSE' - This statement is relevant and has a falsey result.
*/
export enum FinalResult {
NA = 'NA',
UNHIT = 'UNHIT',
TRUE = 'TRUE',
FALSE = 'FALSE'
}
/**
* 'NA' - Not applicable. This statement is not relevant to any population calculation in this population_set. Common
* for unused library statements or statements only used for other population sets.
*
* 'FALSE' - This statement is not relevant to any of this patient's population inclusion calculations.
*
* 'TRUE' - This statement is relevant for one or more of the population inclusion calculations.
*/
export enum Relevance {
NA = 'NA',
TRUE = 'TRUE',
FALSE = 'FALSE'
}
/**
* https://terminology.hl7.org/2.0.0/CodeSystem-measure-improvement-notation.html
*
* 'POSITIVE': Improvement is indicated as an increase in the score or measurement (e.g. Higher score indicates better quality).
*
* 'NEGATIVE': Improvement is indicated as a decrease in the score or measurement (e.g. Lower score indicates better quality).
*/
export enum ImprovementNotation {
POSITIVE = 'increase',
NEGATIVE = 'decrease'
}
/**
* URL to be defined
* 'NOTFOUND': Gap is detected because desired data cannot be found
* 'MISSING': Gap is detected because data is known to exist but cannot be found
* 'PRESENT': Gap is due to present data
* 'INVALIDATTRIBUTE': Gap is detected because data element was found, but value was not equal to expected value
* 'DATEINRANGE': Gap is due to a date being within a range
* 'DATEOUTOFRANGE': Gap is due to a date being out of range
* 'VALUEINRANGE = Gap is due to value being within a range
* 'VALUEOUTOFRANGE': Gap is due to a value being out of range
* 'COUNTINRANGE': Gap is due to count of data elements being within a range
* 'COUNTOUTOFRANGE': Gap is due to a count of resources being out of range
*/
export enum CareGapReasonCode {
NOTFOUND = 'NotFound',
MISSING = 'Missing',
PRESENT = 'Present',
INVALIDATTRIBUTE = 'InvalidAttribute',
DATEINRANGE = 'DateInRange',
DATEOUTOFRANGE = 'DateOutOfRange',
VALUEINRANGE = 'ValueInRange',
VALUEOUTOFRANGE = 'ValueOutOfRange',
COUNTINRANGE = 'CountInRange',
COUNTOUTOFRANGE = 'CountOutOfRange'
}
/**
* Lookup object for CareGapReasonCode to display text
*/
export const CareGapReasonCodeDisplay = {
[CareGapReasonCode.NOTFOUND]: 'Data Element Not Found',
[CareGapReasonCode.MISSING]: 'Missing Data Element',
[CareGapReasonCode.PRESENT]: 'Data Element is Present',
[CareGapReasonCode.INVALIDATTRIBUTE]: 'Attribute is Invalid',
[CareGapReasonCode.DATEINRANGE]: 'Date is within specified range',
[CareGapReasonCode.DATEOUTOFRANGE]: 'Date is out of specified range',
[CareGapReasonCode.VALUEINRANGE]: 'Value is within specified range',
[CareGapReasonCode.VALUEOUTOFRANGE]: 'Value is out of specified range',
[CareGapReasonCode.COUNTINRANGE]: 'Count is within specified range',
[CareGapReasonCode.COUNTOUTOFRANGE]: 'Count is out of specified range'
};