cql_qdm_patientapi 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +46 -0
- data/.travis.yml +15 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +127 -0
- data/LICENSE +201 -0
- data/README.md +2 -0
- data/README.rdoc +2 -0
- data/Rakefile +32 -0
- data/app/assets/javascripts/cql_qdm_patientapi/.keep +0 -0
- data/app/assets/javascripts/cql_qdm_patientapi.js.coffee +3 -0
- data/app/assets/javascripts/cqlpatient.js.coffee +232 -0
- data/app/assets/javascripts/datatypes/adverseevent.js.coffee +70 -0
- data/app/assets/javascripts/datatypes/allergyintolerance.js.coffee +63 -0
- data/app/assets/javascripts/datatypes/assessment.js.coffee +159 -0
- data/app/assets/javascripts/datatypes/careexperience.js.coffee +47 -0
- data/app/assets/javascripts/datatypes/caregoal.js.coffee +60 -0
- data/app/assets/javascripts/datatypes/characteristic_birthdate.js.coffee +28 -0
- data/app/assets/javascripts/datatypes/communication.js.coffee +116 -0
- data/app/assets/javascripts/datatypes/datatype.js.coffee +44 -0
- data/app/assets/javascripts/datatypes/device.js.coffee +163 -0
- data/app/assets/javascripts/datatypes/diagnosis.js.coffee +67 -0
- data/app/assets/javascripts/datatypes/diagnosticstudy.js.coffee +215 -0
- data/app/assets/javascripts/datatypes/encounter.js.coffee +213 -0
- data/app/assets/javascripts/datatypes/familyhistory.js.coffee +37 -0
- data/app/assets/javascripts/datatypes/immunization.js.coffee +152 -0
- data/app/assets/javascripts/datatypes/intervention.js.coffee +164 -0
- data/app/assets/javascripts/datatypes/laboratorytest.js.coffee +243 -0
- data/app/assets/javascripts/datatypes/medication.js.coffee +486 -0
- data/app/assets/javascripts/datatypes/patient_characteristic.js.coffee +23 -0
- data/app/assets/javascripts/datatypes/patient_characteristic_expired.js.coffee +38 -0
- data/app/assets/javascripts/datatypes/patient_characteristic_payer.js.coffee +33 -0
- data/app/assets/javascripts/datatypes/patient_characteristic_sex.js.coffee +23 -0
- data/app/assets/javascripts/datatypes/physicalexam.js.coffee +223 -0
- data/app/assets/javascripts/datatypes/procedure.js.coffee +296 -0
- data/app/assets/javascripts/datatypes/substance.js.coffee +294 -0
- data/app/assets/javascripts/datatypes/symptom.js.coffee +49 -0
- data/app/assets/javascripts/types/component.js.coffee +71 -0
- data/app/assets/javascripts/types/facility.js.coffee +41 -0
- data/app/assets/javascripts/types/id.js.coffee +23 -0
- data/app/assets/javascripts/utils/helpers.js.coffee +101 -0
- data/bin/rails +12 -0
- data/coffeelint.json +135 -0
- data/cql_qdm_patientapi.gemspec +25 -0
- data/lib/cql_qdm_patientapi/engine.rb +6 -0
- data/lib/cql_qdm_patientapi/version.rb +3 -0
- data/lib/cql_qdm_patientapi.rb +4 -0
- data/vendor/assets/javascripts/cql4browsers.js +53992 -0
- metadata +133 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
###
|
2
|
+
@namespace scoping into the CQL_QDM namespace (all classes and
|
3
|
+
their methods will be accessable through the CQL_QDM namespace)
|
4
|
+
###
|
5
|
+
@CQL_QDM ||= {}
|
6
|
+
|
7
|
+
###
|
8
|
+
Used to represent a patient characteristic QDM datatype
|
9
|
+
###
|
10
|
+
class CQL_QDM.PatientCharacteristic extends CQL_QDM.QDMDatatype
|
11
|
+
###
|
12
|
+
@param {Object} patient - the HDS patient object to use
|
13
|
+
###
|
14
|
+
constructor: (@entry) ->
|
15
|
+
super @entry
|
16
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
17
|
+
@_codes = @entry.codes
|
18
|
+
|
19
|
+
###
|
20
|
+
@returns {Date}
|
21
|
+
###
|
22
|
+
authorDatetime: ->
|
23
|
+
@_authorDatetime
|
@@ -0,0 +1,38 @@
|
|
1
|
+
###
|
2
|
+
@namespace scoping into the CQL_QDM namespace (all classes and
|
3
|
+
their methods will be accessable through the CQL_QDM namespace)
|
4
|
+
###
|
5
|
+
@CQL_QDM ||= {}
|
6
|
+
|
7
|
+
|
8
|
+
###
|
9
|
+
Used to represent a birthdate.
|
10
|
+
###
|
11
|
+
class CQL_QDM.PatientCharacteristicExpired extends CQL_QDM.QDMDatatype
|
12
|
+
###
|
13
|
+
@param {Object} patient - the HDS patient object to use
|
14
|
+
###
|
15
|
+
constructor: (@patient) ->
|
16
|
+
@_patient = @patient
|
17
|
+
|
18
|
+
###
|
19
|
+
@returns {Object}
|
20
|
+
###
|
21
|
+
getCode: ->
|
22
|
+
if @_patient.get('deathdate')?
|
23
|
+
'419099009'
|
24
|
+
else
|
25
|
+
code:
|
26
|
+
''
|
27
|
+
|
28
|
+
###
|
29
|
+
@returns {Code}
|
30
|
+
###
|
31
|
+
cause: ->
|
32
|
+
throw new Error('Bonnie does not currently support PatientCharacteristicExpired.cause')
|
33
|
+
|
34
|
+
###
|
35
|
+
@returns {DateTime}
|
36
|
+
###
|
37
|
+
expiredDatetime: ->
|
38
|
+
CQL_QDM.Helpers.convertDateTime(@_patient.get('deathdate'))
|
@@ -0,0 +1,33 @@
|
|
1
|
+
###
|
2
|
+
@namespace scoping into the CQL_QDM namespace (all classes and
|
3
|
+
their methods will be accessable through the CQL_QDM namespace)
|
4
|
+
###
|
5
|
+
@CQL_QDM ||= {}
|
6
|
+
|
7
|
+
###
|
8
|
+
Used to represent a patient characteristic payer QDM datatype
|
9
|
+
###
|
10
|
+
class CQL_QDM.PatientCharacteristicPayer extends CQL_QDM.QDMDatatype
|
11
|
+
###
|
12
|
+
@param {Object} patient - the HDS patient object to use
|
13
|
+
###
|
14
|
+
constructor: (@entry) ->
|
15
|
+
super @entry
|
16
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
17
|
+
if @entry.end_time
|
18
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(@entry.end_time)
|
19
|
+
else
|
20
|
+
# No end time; high is set to infinity
|
21
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
22
|
+
@_codes = @entry.codes
|
23
|
+
|
24
|
+
###
|
25
|
+
@returns {Interval<Date>}
|
26
|
+
###
|
27
|
+
relevantPeriod: ->
|
28
|
+
low = @_relevantPeriodLow
|
29
|
+
high = @_relevantPeriodHigh
|
30
|
+
if low?
|
31
|
+
new cql.Interval(low, high)
|
32
|
+
else
|
33
|
+
null
|
@@ -0,0 +1,23 @@
|
|
1
|
+
###
|
2
|
+
@namespace scoping into the CQL_QDM namespace (all classes and
|
3
|
+
their methods will be accessable through the CQL_QDM namespace)
|
4
|
+
###
|
5
|
+
@CQL_QDM ||= {}
|
6
|
+
|
7
|
+
|
8
|
+
###
|
9
|
+
Used to represent a sex.
|
10
|
+
###
|
11
|
+
class CQL_QDM.PatientCharacteristicSex extends CQL_QDM.QDMDatatype
|
12
|
+
###
|
13
|
+
@param {Object} patient - the HDS patient object to use
|
14
|
+
###
|
15
|
+
constructor: (@patient) ->
|
16
|
+
@_patient = @patient
|
17
|
+
|
18
|
+
getCode: ->
|
19
|
+
# NOTE: Eventually this could be replaced with actual codes. That would
|
20
|
+
# require modifications to the execution engine in order to handle that
|
21
|
+
# change.
|
22
|
+
code:
|
23
|
+
@_patient.get('gender')
|
@@ -0,0 +1,223 @@
|
|
1
|
+
###
|
2
|
+
@namespace scoping into the CQL_QDM namespace (all classes and
|
3
|
+
their methods will be accessable through the CQL_QDM namespace)
|
4
|
+
###
|
5
|
+
@CQL_QDM ||= {}
|
6
|
+
|
7
|
+
###
|
8
|
+
Data elements that meet criteria using this datatype should document a request
|
9
|
+
for the physical exam indicated by the QDM category and its corresponding value
|
10
|
+
set. The datatype is expected to be used to identify orders such as "vital
|
11
|
+
signs, frequency every x hours,” or "pedal pulse check, frequency every 15
|
12
|
+
minutes for x hours."
|
13
|
+
Timing: The time the order is signed; author time.
|
14
|
+
###
|
15
|
+
class CQL_QDM.PhysicalExamOrder extends CQL_QDM.QDMDatatype
|
16
|
+
###
|
17
|
+
@param {Object} entry - the HDS data criteria object to convert
|
18
|
+
###
|
19
|
+
constructor: (@entry) ->
|
20
|
+
super @entry
|
21
|
+
@_anatomicalLocationSite = @entry.anatomicalLocation
|
22
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
23
|
+
@_method = @entry.method
|
24
|
+
@_negationRationale = @entry.negationReason
|
25
|
+
@_reason = @entry.reason
|
26
|
+
|
27
|
+
###
|
28
|
+
@returns {Code}
|
29
|
+
###
|
30
|
+
anatomicalLocationSite: ->
|
31
|
+
if @_anatomicalLocationSite?
|
32
|
+
new cql.Code(@_anatomicalLocationSite.code, @_anatomicalLocationSite.code_system)
|
33
|
+
else
|
34
|
+
null
|
35
|
+
|
36
|
+
###
|
37
|
+
@returns {Date}
|
38
|
+
###
|
39
|
+
authorDatetime: ->
|
40
|
+
@_authorDatetime
|
41
|
+
|
42
|
+
###
|
43
|
+
@returns {Code}
|
44
|
+
###
|
45
|
+
method: ->
|
46
|
+
if @_method?
|
47
|
+
new cql.Code(@_method.code, @_method.code_system)
|
48
|
+
else
|
49
|
+
null
|
50
|
+
|
51
|
+
###
|
52
|
+
@returns {Code}
|
53
|
+
###
|
54
|
+
negationRationale: ->
|
55
|
+
if @_negationRationale?
|
56
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system)
|
57
|
+
else
|
58
|
+
null
|
59
|
+
|
60
|
+
###
|
61
|
+
@returns {Code}
|
62
|
+
###
|
63
|
+
reason: ->
|
64
|
+
if @_reason?
|
65
|
+
new cql.Code(@_reason.code, @_reason.code_system)
|
66
|
+
else
|
67
|
+
null
|
68
|
+
|
69
|
+
|
70
|
+
###
|
71
|
+
Data elements that meet criteria using this datatype should document the
|
72
|
+
completion of the physical exam indicated by the QDM category and its
|
73
|
+
corresponding value set.
|
74
|
+
###
|
75
|
+
class CQL_QDM.PhysicalExamPerformed extends CQL_QDM.QDMDatatype
|
76
|
+
###
|
77
|
+
@param {Object} entry - the HDS data criteria object to convert
|
78
|
+
###
|
79
|
+
constructor: (@entry) ->
|
80
|
+
super @entry
|
81
|
+
@_anatomicalLocationSite = @entry.anatomicalLocation
|
82
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
83
|
+
@_method = @entry.method
|
84
|
+
@_negationRationale = @entry.negationReason
|
85
|
+
@_reason = @entry.reason
|
86
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
87
|
+
if @entry.end_time
|
88
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(@entry.end_time)
|
89
|
+
else
|
90
|
+
# No end time; high is set to infinity
|
91
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
92
|
+
if @entry.values? && @entry.values.length > 0
|
93
|
+
@_result = @entry.values?[0]
|
94
|
+
@_components = @entry.components
|
95
|
+
|
96
|
+
###
|
97
|
+
@returns {Code}
|
98
|
+
###
|
99
|
+
anatomicalLocationSite: ->
|
100
|
+
if @_anatomicalLocationSite?
|
101
|
+
new cql.Code(@_anatomicalLocationSite.code, @_anatomicalLocationSite.code_system)
|
102
|
+
else
|
103
|
+
null
|
104
|
+
|
105
|
+
###
|
106
|
+
Author date time is only present when this data type has been negated.
|
107
|
+
@returns {Date}
|
108
|
+
###
|
109
|
+
authorDatetime: ->
|
110
|
+
@_authorDatetime
|
111
|
+
|
112
|
+
###
|
113
|
+
@returns {Code}
|
114
|
+
###
|
115
|
+
method: ->
|
116
|
+
if @_method?
|
117
|
+
new cql.Code(@_method.code, @_method.code_system)
|
118
|
+
else
|
119
|
+
null
|
120
|
+
|
121
|
+
###
|
122
|
+
@returns {Code}
|
123
|
+
###
|
124
|
+
negationRationale: ->
|
125
|
+
if @_negationRationale?
|
126
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system)
|
127
|
+
else
|
128
|
+
null
|
129
|
+
|
130
|
+
###
|
131
|
+
@returns {Code}
|
132
|
+
###
|
133
|
+
reason: ->
|
134
|
+
if @_reason?
|
135
|
+
new cql.Code(@_reason.code, @_reason.code_system)
|
136
|
+
else
|
137
|
+
null
|
138
|
+
|
139
|
+
###
|
140
|
+
@returns {Interval<Date>}
|
141
|
+
###
|
142
|
+
relevantPeriod: ->
|
143
|
+
low = @_relevantPeriodLow
|
144
|
+
high = @_relevantPeriodHigh
|
145
|
+
if low?
|
146
|
+
new cql.Interval(low, high)
|
147
|
+
else
|
148
|
+
null
|
149
|
+
|
150
|
+
###
|
151
|
+
The model_info_file also lists Integer, Decimal, and Ratio.
|
152
|
+
Decimal and Integer are covered under Quantity with a nil unit.
|
153
|
+
Ratio is not yet supported with CQL although it appears in the QDM model.
|
154
|
+
@returns {Code|Quantity}
|
155
|
+
###
|
156
|
+
result: ->
|
157
|
+
CQL_QDM.Helpers.formatResult(@_result)
|
158
|
+
|
159
|
+
###
|
160
|
+
@returns {Array}
|
161
|
+
###
|
162
|
+
components: ->
|
163
|
+
CQL_QDM.Helpers.components(@_components)
|
164
|
+
|
165
|
+
|
166
|
+
###
|
167
|
+
Data elements that meet criteria using this datatype should document a
|
168
|
+
recommendation for the physical exam indicated by the QDM category and its
|
169
|
+
corresponding value set.
|
170
|
+
###
|
171
|
+
class CQL_QDM.PhysicalExamRecommended extends CQL_QDM.QDMDatatype
|
172
|
+
###
|
173
|
+
@param {Object} entry - the HDS data criteria object to convert
|
174
|
+
###
|
175
|
+
constructor: (@entry) ->
|
176
|
+
super @entry
|
177
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
178
|
+
@_anatomicalLocationSite = @entry.anatomicalLocation
|
179
|
+
@_method = @entry.method
|
180
|
+
@_negationRationale = @entry.negationReason
|
181
|
+
@_reason = @entry.reason
|
182
|
+
|
183
|
+
###
|
184
|
+
@returns {Code}
|
185
|
+
###
|
186
|
+
anatomicalLocationSite: ->
|
187
|
+
if @_anatomicalLocationSite?
|
188
|
+
new cql.Code(@_anatomicalLocationSite.code, @_anatomicalLocationSite.code_system)
|
189
|
+
else
|
190
|
+
null
|
191
|
+
|
192
|
+
###
|
193
|
+
@returns {Date}
|
194
|
+
###
|
195
|
+
authorDatetime: ->
|
196
|
+
@_authorDatetime
|
197
|
+
|
198
|
+
###
|
199
|
+
@returns {Code}
|
200
|
+
###
|
201
|
+
method: ->
|
202
|
+
if @_method?
|
203
|
+
new cql.Code(@_method.code, @_method.code_system)
|
204
|
+
else
|
205
|
+
null
|
206
|
+
|
207
|
+
###
|
208
|
+
@returns {Code}
|
209
|
+
###
|
210
|
+
negationRationale: ->
|
211
|
+
if @_negationRationale?
|
212
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system)
|
213
|
+
else
|
214
|
+
null
|
215
|
+
|
216
|
+
###
|
217
|
+
@returns {Code}
|
218
|
+
###
|
219
|
+
reason: ->
|
220
|
+
if @_reason?
|
221
|
+
new cql.Code(@_reason.code, @_reason.code_system)
|
222
|
+
else
|
223
|
+
null
|
@@ -0,0 +1,296 @@
|
|
1
|
+
###
|
2
|
+
@namespace scoping into the CQL_QDM namespace (all classes and
|
3
|
+
their methods will be accessable through the CQL_QDM namespace)
|
4
|
+
###
|
5
|
+
@CQL_QDM ||= {}
|
6
|
+
|
7
|
+
###
|
8
|
+
Data elements that meet criteria using this datatype should document a request
|
9
|
+
for the procedure indicated by the QDM category and its corresponding value set.
|
10
|
+
###
|
11
|
+
class CQL_QDM.ProcedureOrder extends CQL_QDM.QDMDatatype
|
12
|
+
###
|
13
|
+
@param {Object} entry - the HDS data criteria object to convert
|
14
|
+
###
|
15
|
+
constructor: (@entry) ->
|
16
|
+
super @entry
|
17
|
+
@_anatomicalApproachSite = @entry.anatomical_approach
|
18
|
+
@_anatomicalLocationSite = @entry.anatomicalLocation
|
19
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
20
|
+
@_method = @entry.method
|
21
|
+
@_negationRationale = @entry.negationReason
|
22
|
+
@_ordinality = @entry.ordinality
|
23
|
+
@_reason = @entry.reason
|
24
|
+
|
25
|
+
###
|
26
|
+
@returns {Code}
|
27
|
+
###
|
28
|
+
anatomicalApproachSite: ->
|
29
|
+
if @_anatomicalApproachSite?
|
30
|
+
new cql.Code(@_anatomicalApproachSite.code, @_anatomicalApproachSite.code_system)
|
31
|
+
else
|
32
|
+
null
|
33
|
+
|
34
|
+
###
|
35
|
+
@returns {Code}
|
36
|
+
###
|
37
|
+
anatomicalLocationSite: ->
|
38
|
+
if @_anatomicalLocationSite?
|
39
|
+
new cql.Code(@_anatomicalLocationSite.code, @_anatomicalLocationSite.code_system)
|
40
|
+
else
|
41
|
+
null
|
42
|
+
|
43
|
+
###
|
44
|
+
@returns {Date}
|
45
|
+
###
|
46
|
+
authorDatetime: ->
|
47
|
+
@_authorDatetime
|
48
|
+
|
49
|
+
###
|
50
|
+
@returns {Code}
|
51
|
+
###
|
52
|
+
method: ->
|
53
|
+
if @_method?
|
54
|
+
new cql.Code(@_method.code, @_method.code_system)
|
55
|
+
else
|
56
|
+
null
|
57
|
+
|
58
|
+
###
|
59
|
+
@returns {Code}
|
60
|
+
###
|
61
|
+
negationRationale: ->
|
62
|
+
if @_negationRationale?
|
63
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system)
|
64
|
+
else
|
65
|
+
null
|
66
|
+
|
67
|
+
###
|
68
|
+
@returns {Code}
|
69
|
+
###
|
70
|
+
ordinality: ->
|
71
|
+
if @_ordinality?
|
72
|
+
new cql.Code(@_ordinality.code, @_ordinality.code_system)
|
73
|
+
else
|
74
|
+
null
|
75
|
+
|
76
|
+
###
|
77
|
+
@returns {Code}
|
78
|
+
###
|
79
|
+
reason: ->
|
80
|
+
if @_reason?
|
81
|
+
new cql.Code(@_reason.code, @_reason.code_system)
|
82
|
+
else
|
83
|
+
null
|
84
|
+
|
85
|
+
|
86
|
+
###
|
87
|
+
Data elements that meet criteria using this datatype should document the
|
88
|
+
completion of the procedure indicated by the QDM category and its corresponding
|
89
|
+
value set.
|
90
|
+
###
|
91
|
+
class CQL_QDM.ProcedurePerformed extends CQL_QDM.QDMDatatype
|
92
|
+
###
|
93
|
+
@param {Object} entry - the HDS data criteria object to convert
|
94
|
+
###
|
95
|
+
constructor: (@entry) ->
|
96
|
+
super @entry
|
97
|
+
@_anatomicalApproachSite = @entry.anatomical_approach
|
98
|
+
@_anatomicalLocationSite = @entry.anatomicalLocation
|
99
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
100
|
+
@_incisionDatetime = CQL_QDM.Helpers.convertDateTime(@entry.incisionTime)
|
101
|
+
@_method = @entry.method
|
102
|
+
@_negationRationale = @entry.negationReason
|
103
|
+
@_ordinality = @entry.ordinality
|
104
|
+
@_reason = @entry.reason
|
105
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
106
|
+
if @entry.end_time
|
107
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(@entry.end_time)
|
108
|
+
else
|
109
|
+
# No end time; high is set to infinity
|
110
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
111
|
+
if @entry.values? && @entry.values.length > 0
|
112
|
+
@_result = @entry.values?[0]
|
113
|
+
@_status = @entry.status
|
114
|
+
@_components = @entry.components
|
115
|
+
|
116
|
+
###
|
117
|
+
@returns {Code}
|
118
|
+
###
|
119
|
+
anatomicalApproachSite: ->
|
120
|
+
if @_anatomicalApproachSite?
|
121
|
+
new cql.Code(@_anatomicalApproachSite.code, @_anatomicalApproachSite.code_system)
|
122
|
+
else
|
123
|
+
null
|
124
|
+
|
125
|
+
###
|
126
|
+
@returns {Code}
|
127
|
+
###
|
128
|
+
anatomicalLocationSite: ->
|
129
|
+
if @_anatomicalLocationSite?
|
130
|
+
new cql.Code(@_anatomicalLocationSite.code, @_anatomicalLocationSite.code_system)
|
131
|
+
else
|
132
|
+
null
|
133
|
+
|
134
|
+
###
|
135
|
+
Author date time is only present when this data type has been negated.
|
136
|
+
@returns {Date}
|
137
|
+
###
|
138
|
+
authorDatetime: ->
|
139
|
+
@_authorDatetime
|
140
|
+
|
141
|
+
###
|
142
|
+
@returns {Date}
|
143
|
+
###
|
144
|
+
incisionDatetime: ->
|
145
|
+
@_incisionDatetime
|
146
|
+
|
147
|
+
###
|
148
|
+
@returns {Code}
|
149
|
+
###
|
150
|
+
method: ->
|
151
|
+
if @_method?
|
152
|
+
new cql.Code(@_method.code, @_method.code_system)
|
153
|
+
else
|
154
|
+
null
|
155
|
+
|
156
|
+
###
|
157
|
+
@returns {Code}
|
158
|
+
###
|
159
|
+
negationRationale: ->
|
160
|
+
if @_negationRationale?
|
161
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system)
|
162
|
+
else
|
163
|
+
null
|
164
|
+
|
165
|
+
###
|
166
|
+
@returns {Code}
|
167
|
+
###
|
168
|
+
ordinality: ->
|
169
|
+
if @_ordinality?
|
170
|
+
new cql.Code(@_ordinality.code, @_ordinality.code_system)
|
171
|
+
else
|
172
|
+
null
|
173
|
+
|
174
|
+
###
|
175
|
+
@returns {Code}
|
176
|
+
###
|
177
|
+
reason: ->
|
178
|
+
if @_reason?
|
179
|
+
new cql.Code(@_reason.code, @_reason.code_system)
|
180
|
+
else
|
181
|
+
null
|
182
|
+
|
183
|
+
###
|
184
|
+
@returns {Interval<Date>}
|
185
|
+
###
|
186
|
+
relevantPeriod: ->
|
187
|
+
low = @_relevantPeriodLow
|
188
|
+
high = @_relevantPeriodHigh
|
189
|
+
if low?
|
190
|
+
new cql.Interval(low, high)
|
191
|
+
else
|
192
|
+
null
|
193
|
+
|
194
|
+
###
|
195
|
+
The model_info_file also lists Integer, Decimal, and Ratio.
|
196
|
+
Decimal and Integer are covered under Quantity with a nil unit.
|
197
|
+
Ratio is not yet supported with CQL although it appears in the QDM model.
|
198
|
+
@returns {Code|Quantity}
|
199
|
+
###
|
200
|
+
result: ->
|
201
|
+
CQL_QDM.Helpers.formatResult(@_result)
|
202
|
+
|
203
|
+
###
|
204
|
+
@returns {Code}
|
205
|
+
###
|
206
|
+
status: ->
|
207
|
+
if @_status?
|
208
|
+
new cql.Code(@_status.code, @_status.code_system)
|
209
|
+
else
|
210
|
+
null
|
211
|
+
|
212
|
+
###
|
213
|
+
@returns {Array}
|
214
|
+
###
|
215
|
+
components: ->
|
216
|
+
CQL_QDM.Helpers.components(@_components)
|
217
|
+
|
218
|
+
|
219
|
+
###
|
220
|
+
Data elements that meet criteria using this datatype should document the
|
221
|
+
recommendation for the procedure indicated by the QDM category and its
|
222
|
+
corresponding value set.
|
223
|
+
###
|
224
|
+
class CQL_QDM.ProcedureRecommended extends CQL_QDM.QDMDatatype
|
225
|
+
###
|
226
|
+
@param {Object} entry - the HDS data criteria object to convert
|
227
|
+
###
|
228
|
+
constructor: (@entry) ->
|
229
|
+
super @entry
|
230
|
+
@_anatomicalApproachSite = @entry.anatomical_approach
|
231
|
+
@_anatomicalLocationSite = @entry.anatomicalLocation
|
232
|
+
@_method = @entry.method
|
233
|
+
@_negationRationale = @entry.negationReason
|
234
|
+
@_ordinality = @entry.ordinality
|
235
|
+
@_reason = @entry.reason
|
236
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
|
237
|
+
|
238
|
+
###
|
239
|
+
@returns {Code}
|
240
|
+
###
|
241
|
+
anatomicalApproachSite: ->
|
242
|
+
if @_anatomicalApproachSite?
|
243
|
+
new cql.Code(@_anatomicalApproachSite.code, @_anatomicalApproachSite.code_system)
|
244
|
+
else
|
245
|
+
null
|
246
|
+
|
247
|
+
###
|
248
|
+
@returns {Code}
|
249
|
+
###
|
250
|
+
anatomicalLocationSite: ->
|
251
|
+
if @_anatomicalLocationSite?
|
252
|
+
new cql.Code(@_anatomicalLocationSite.code, @_anatomicalLocationSite.code_system)
|
253
|
+
else
|
254
|
+
null
|
255
|
+
|
256
|
+
###
|
257
|
+
@returns {Date}
|
258
|
+
###
|
259
|
+
authorDatetime: ->
|
260
|
+
@_authorDatetime
|
261
|
+
|
262
|
+
###
|
263
|
+
@returns {Code}
|
264
|
+
###
|
265
|
+
method: ->
|
266
|
+
if @_method?
|
267
|
+
new cql.Code(@_method.code, @_method.code_system)
|
268
|
+
else
|
269
|
+
null
|
270
|
+
|
271
|
+
###
|
272
|
+
@returns {Code}
|
273
|
+
###
|
274
|
+
negationRationale: ->
|
275
|
+
if @_negationRationale?
|
276
|
+
new cql.Code(@_negationRationale.code, @_negationRationale.code_system)
|
277
|
+
else
|
278
|
+
null
|
279
|
+
|
280
|
+
###
|
281
|
+
@returns {Code}
|
282
|
+
###
|
283
|
+
ordinality: ->
|
284
|
+
if @_ordinality?
|
285
|
+
new cql.Code(@_ordinality.code, @_ordinality.code_system)
|
286
|
+
else
|
287
|
+
null
|
288
|
+
|
289
|
+
###
|
290
|
+
@returns {Code}
|
291
|
+
###
|
292
|
+
reason: ->
|
293
|
+
if @_reason?
|
294
|
+
new cql.Code(@_reason.code, @_reason.code_system)
|
295
|
+
else
|
296
|
+
null
|