cql_qdm_patientapi 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +4 -4
- data/app/assets/javascripts/datatypes/adverseevent.js.coffee +9 -9
- data/app/assets/javascripts/datatypes/allergyintolerance.js.coffee +8 -8
- data/app/assets/javascripts/datatypes/assessment.js.coffee +67 -38
- data/app/assets/javascripts/datatypes/careexperience.js.coffee +7 -7
- data/app/assets/javascripts/datatypes/caregoal.js.coffee +8 -8
- data/app/assets/javascripts/datatypes/communication.js.coffee +51 -65
- data/app/assets/javascripts/datatypes/datatype.js.coffee +14 -9
- data/app/assets/javascripts/datatypes/device.js.coffee +21 -31
- data/app/assets/javascripts/datatypes/diagnosis.js.coffee +8 -8
- data/app/assets/javascripts/datatypes/diagnosticstudy.js.coffee +26 -46
- data/app/assets/javascripts/datatypes/encounter.js.coffee +26 -26
- data/app/assets/javascripts/datatypes/familyhistory.js.coffee +5 -5
- data/app/assets/javascripts/datatypes/immunization.js.coffee +19 -28
- data/app/assets/javascripts/datatypes/intervention.js.coffee +23 -23
- data/app/assets/javascripts/datatypes/laboratorytest.js.coffee +28 -48
- data/app/assets/javascripts/datatypes/medication.js.coffee +141 -81
- data/app/assets/javascripts/datatypes/participation.js.coffee +5 -5
- data/app/assets/javascripts/datatypes/patient_characteristic.js.coffee +4 -4
- data/app/assets/javascripts/datatypes/patient_characteristic_payer.js.coffee +6 -6
- data/app/assets/javascripts/datatypes/physicalexam.js.coffee +27 -47
- data/app/assets/javascripts/datatypes/procedure.js.coffee +32 -82
- data/app/assets/javascripts/datatypes/substance.js.coffee +31 -70
- data/app/assets/javascripts/datatypes/symptom.js.coffee +6 -6
- data/app/assets/javascripts/utils/helpers.js.coffee +8 -2
- data/lib/cql_qdm_patientapi/version.rb +1 -1
- data/vendor/assets/javascripts/cql4browsers.js +1520 -556
- metadata +3 -3
@@ -15,29 +15,19 @@ class CQL_QDM.DeviceApplied extends CQL_QDM.QDMDatatype
|
|
15
15
|
###
|
16
16
|
@param {Object} entry - the HDS data criteria object to convert
|
17
17
|
###
|
18
|
-
constructor: (
|
19
|
-
super
|
20
|
-
@
|
21
|
-
@
|
22
|
-
@
|
23
|
-
@
|
24
|
-
@
|
25
|
-
|
26
|
-
|
27
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(@entry.end_time)
|
18
|
+
constructor: (entry) ->
|
19
|
+
super entry
|
20
|
+
@_anatomicalLocationSite = entry.anatomical_location
|
21
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
22
|
+
@_negationRationale = entry.negationReason
|
23
|
+
@_reason = entry.reason
|
24
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
25
|
+
if entry.end_time
|
26
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
28
27
|
else
|
29
28
|
# No end time; high is set to infinity
|
30
29
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
31
30
|
|
32
|
-
###
|
33
|
-
@returns {Code}
|
34
|
-
###
|
35
|
-
anatomicalApproachSite: ->
|
36
|
-
if @_anatomicalApproachSite?
|
37
|
-
new cql.Code(@_anatomicalApproachSite.code, @_anatomicalApproachSite.code_system, null, @_anatomicalApproachSite.title || null)
|
38
|
-
else
|
39
|
-
null
|
40
|
-
|
41
31
|
###
|
42
32
|
@returns {Code}
|
43
33
|
###
|
@@ -92,12 +82,12 @@ class CQL_QDM.DeviceOrder extends CQL_QDM.QDMDatatype
|
|
92
82
|
###
|
93
83
|
@param {Object} entry - the HDS data criteria object to convert
|
94
84
|
###
|
95
|
-
constructor: (
|
96
|
-
super
|
97
|
-
@_negationRationale =
|
98
|
-
@_reason =
|
99
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
100
|
-
delete
|
85
|
+
constructor: (entry) ->
|
86
|
+
super entry
|
87
|
+
@_negationRationale = entry.negationReason
|
88
|
+
@_reason = entry.reason
|
89
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
90
|
+
delete entry.end_time
|
101
91
|
|
102
92
|
###
|
103
93
|
@returns {Code}
|
@@ -133,12 +123,12 @@ class CQL_QDM.DeviceRecommended extends CQL_QDM.QDMDatatype
|
|
133
123
|
###
|
134
124
|
@param {Object} entry - the HDS data criteria object to convert
|
135
125
|
###
|
136
|
-
constructor: (
|
137
|
-
super
|
138
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
139
|
-
@_negationRationale =
|
140
|
-
@_reason =
|
141
|
-
delete
|
126
|
+
constructor: (entry) ->
|
127
|
+
super entry
|
128
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
129
|
+
@_negationRationale = entry.negationReason
|
130
|
+
@_reason = entry.reason
|
131
|
+
delete entry.end_time
|
142
132
|
|
143
133
|
###
|
144
134
|
@returns {Date}
|
@@ -19,17 +19,17 @@ class CQL_QDM.Diagnosis extends CQL_QDM.QDMDatatype
|
|
19
19
|
###
|
20
20
|
@param {Object} entry - the HDS data criteria object to convert
|
21
21
|
###
|
22
|
-
constructor: (
|
23
|
-
super
|
24
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
25
|
-
@_prevalencePeriodLow = CQL_QDM.Helpers.convertDateTime(
|
26
|
-
if
|
27
|
-
@_prevalencePeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
22
|
+
constructor: (entry) ->
|
23
|
+
super entry
|
24
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
25
|
+
@_prevalencePeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
26
|
+
if entry.end_time
|
27
|
+
@_prevalencePeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
28
28
|
else
|
29
29
|
# No end time; high is set to infinity
|
30
30
|
@_prevalencePeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
31
|
-
@_anatomicalLocationSite =
|
32
|
-
@_severity =
|
31
|
+
@_anatomicalLocationSite = entry.anatomical_location
|
32
|
+
@_severity = entry.severity
|
33
33
|
|
34
34
|
###
|
35
35
|
@returns {Code}
|
@@ -19,13 +19,12 @@ class CQL_QDM.DiagnosticStudyOrder extends CQL_QDM.QDMDatatype
|
|
19
19
|
###
|
20
20
|
@param {Object} entry - the HDS data criteria object to convert
|
21
21
|
###
|
22
|
-
constructor: (
|
23
|
-
super
|
24
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
25
|
-
@
|
26
|
-
@
|
27
|
-
|
28
|
-
delete @entry.end_time
|
22
|
+
constructor: (entry) ->
|
23
|
+
super entry
|
24
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
25
|
+
@_negationRationale = entry.negationReason
|
26
|
+
@_reason = entry.reason
|
27
|
+
delete entry.end_time
|
29
28
|
|
30
29
|
###
|
31
30
|
@returns {Date}
|
@@ -33,15 +32,6 @@ class CQL_QDM.DiagnosticStudyOrder extends CQL_QDM.QDMDatatype
|
|
33
32
|
authorDatetime: ->
|
34
33
|
@_authorDatetime
|
35
34
|
|
36
|
-
###
|
37
|
-
@returns {Code}
|
38
|
-
###
|
39
|
-
method: ->
|
40
|
-
if @_method?
|
41
|
-
new cql.Code(@_method.code, @_method.code_system, null, @_method.title || null)
|
42
|
-
else
|
43
|
-
null
|
44
|
-
|
45
35
|
###
|
46
36
|
@returns {Code}
|
47
37
|
###
|
@@ -70,24 +60,24 @@ class CQL_QDM.DiagnosticStudyPerformed extends CQL_QDM.QDMDatatype
|
|
70
60
|
###
|
71
61
|
@param {Object} entry - the HDS data criteria object to convert
|
72
62
|
###
|
73
|
-
constructor: (
|
74
|
-
super
|
75
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
76
|
-
@_facilityLocation =
|
77
|
-
@_method =
|
78
|
-
@_negationRationale =
|
79
|
-
@_reason =
|
80
|
-
if
|
81
|
-
@_result =
|
82
|
-
@_resultDatetime = CQL_QDM.Helpers.convertDateTime(
|
83
|
-
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(
|
84
|
-
if
|
85
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
63
|
+
constructor: (entry) ->
|
64
|
+
super entry
|
65
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
66
|
+
@_facilityLocation = entry.facility
|
67
|
+
@_method = entry.method
|
68
|
+
@_negationRationale = entry.negationReason
|
69
|
+
@_reason = entry.reason
|
70
|
+
if entry.values? && entry.values.length > 0
|
71
|
+
@_result = entry.values?[0]
|
72
|
+
@_resultDatetime = CQL_QDM.Helpers.convertDateTime(entry.result_date_time)
|
73
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
74
|
+
if entry.end_time
|
75
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
86
76
|
else
|
87
77
|
# No end time; high is set to infinity
|
88
78
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
89
|
-
@_status =
|
90
|
-
@_components =
|
79
|
+
@_status = entry.qdm_status
|
80
|
+
@_components = entry.components
|
91
81
|
|
92
82
|
|
93
83
|
###
|
@@ -185,12 +175,11 @@ class CQL_QDM.DiagnosticStudyRecommended extends CQL_QDM.QDMDatatype
|
|
185
175
|
###
|
186
176
|
@param {Object} entry - the HDS data criteria object to convert
|
187
177
|
###
|
188
|
-
constructor: (
|
189
|
-
super
|
190
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
191
|
-
@
|
192
|
-
|
193
|
-
delete @entry.end_time
|
178
|
+
constructor: (entry) ->
|
179
|
+
super entry
|
180
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
181
|
+
@_negationRationale = entry.negationReason
|
182
|
+
delete entry.end_time
|
194
183
|
|
195
184
|
###
|
196
185
|
@returns {Date}
|
@@ -198,15 +187,6 @@ class CQL_QDM.DiagnosticStudyRecommended extends CQL_QDM.QDMDatatype
|
|
198
187
|
authorDatetime: ->
|
199
188
|
@_authorDatetime
|
200
189
|
|
201
|
-
###
|
202
|
-
@returns {Code}
|
203
|
-
###
|
204
|
-
method: ->
|
205
|
-
if @_method?
|
206
|
-
new cql.Code(@_method.code, @_method.code_system, null, @_method.title || null)
|
207
|
-
else
|
208
|
-
null
|
209
|
-
|
210
190
|
###
|
211
191
|
@returns {Code}
|
212
192
|
###
|
@@ -13,13 +13,13 @@ class CQL_QDM.EncounterOrder extends CQL_QDM.QDMDatatype
|
|
13
13
|
###
|
14
14
|
@param {Object} entry - the HDS data criteria object to convert
|
15
15
|
###
|
16
|
-
constructor: (
|
17
|
-
super
|
18
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
19
|
-
@_facilityLocation =
|
20
|
-
@_negationRationale =
|
21
|
-
@_reason =
|
22
|
-
delete
|
16
|
+
constructor: (entry) ->
|
17
|
+
super entry
|
18
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
19
|
+
@_facilityLocation = entry.facility
|
20
|
+
@_negationRationale = entry.negationReason
|
21
|
+
@_reason = entry.reason
|
22
|
+
delete entry.end_time
|
23
23
|
|
24
24
|
###
|
25
25
|
@returns {Date}
|
@@ -64,21 +64,21 @@ class CQL_QDM.EncounterPerformed extends CQL_QDM.QDMDatatype
|
|
64
64
|
###
|
65
65
|
@param {Object} entry - the HDS data criteria object to convert
|
66
66
|
###
|
67
|
-
constructor: (
|
68
|
-
super
|
69
|
-
@_admissionSource =
|
70
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
71
|
-
@_diagnoses =
|
72
|
-
@_dischargeDisposition =
|
73
|
-
@_facilityLocations =
|
74
|
-
@_negationRationale =
|
75
|
-
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(
|
76
|
-
if
|
77
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
67
|
+
constructor: (entry) ->
|
68
|
+
super entry
|
69
|
+
@_admissionSource = entry.admission_source
|
70
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
71
|
+
@_diagnoses = entry.diagnosis
|
72
|
+
@_dischargeDisposition = entry.dischargeDisposition
|
73
|
+
@_facilityLocations = entry.facility
|
74
|
+
@_negationRationale = entry.negationReason
|
75
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
76
|
+
if entry.end_time
|
77
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
78
78
|
else
|
79
79
|
# No end time; high is set to infinity
|
80
80
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
81
|
-
@_principalDiagnosis =
|
81
|
+
@_principalDiagnosis = entry.principalDiagnosis
|
82
82
|
|
83
83
|
###
|
84
84
|
@returns {Code}
|
@@ -173,13 +173,13 @@ class CQL_QDM.EncounterRecommended extends CQL_QDM.QDMDatatype
|
|
173
173
|
###
|
174
174
|
@param {Object} entry - the HDS data criteria object to convert
|
175
175
|
###
|
176
|
-
constructor: (
|
177
|
-
super
|
178
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
179
|
-
@_facilityLocation =
|
180
|
-
@_negationRationale =
|
181
|
-
@_reason =
|
182
|
-
delete
|
176
|
+
constructor: (entry) ->
|
177
|
+
super entry
|
178
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
179
|
+
@_facilityLocation = entry.facility
|
180
|
+
@_negationRationale = entry.negationReason
|
181
|
+
@_reason = entry.reason
|
182
|
+
delete entry.end_time
|
183
183
|
|
184
184
|
###
|
185
185
|
@returns {Date}
|
@@ -16,11 +16,11 @@ class CQL_QDM.FamilyHistory extends CQL_QDM.QDMDatatype
|
|
16
16
|
###
|
17
17
|
@param {Object} entry - the HDS data criteria object to convert
|
18
18
|
###
|
19
|
-
constructor: (
|
20
|
-
super
|
21
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
22
|
-
@_relationship =
|
23
|
-
delete
|
19
|
+
constructor: (entry) ->
|
20
|
+
super entry
|
21
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
22
|
+
@_relationship = entry.relationshipToPatient
|
23
|
+
delete entry.end_time
|
24
24
|
|
25
25
|
###
|
26
26
|
@returns {Date}
|
@@ -14,15 +14,14 @@ class CQL_QDM.ImmunizationAdministered extends CQL_QDM.QDMDatatype
|
|
14
14
|
###
|
15
15
|
@param {Object} entry - the HDS data criteria object to convert
|
16
16
|
###
|
17
|
-
constructor: (
|
18
|
-
super
|
19
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
20
|
-
@_dosage =
|
21
|
-
@_negationRationale =
|
22
|
-
@_reason =
|
23
|
-
@_route =
|
24
|
-
|
25
|
-
delete @entry.end_time
|
17
|
+
constructor: (entry) ->
|
18
|
+
super entry
|
19
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
20
|
+
@_dosage = entry.dose
|
21
|
+
@_negationRationale = entry.negationReason
|
22
|
+
@_reason = entry.reason
|
23
|
+
@_route = entry.route
|
24
|
+
delete entry.end_time
|
26
25
|
|
27
26
|
###
|
28
27
|
@returns {Date}
|
@@ -69,14 +68,6 @@ class CQL_QDM.ImmunizationAdministered extends CQL_QDM.QDMDatatype
|
|
69
68
|
else
|
70
69
|
null
|
71
70
|
|
72
|
-
###
|
73
|
-
@returns {Quantity}
|
74
|
-
###
|
75
|
-
supply: ->
|
76
|
-
if @_supply?
|
77
|
-
new cql.Quantity({unit: @_supply['units'], value: @_supply['scalar']})
|
78
|
-
else
|
79
|
-
null
|
80
71
|
|
81
72
|
|
82
73
|
###
|
@@ -88,22 +79,22 @@ class CQL_QDM.ImmunizationOrder extends CQL_QDM.QDMDatatype
|
|
88
79
|
###
|
89
80
|
@param {Object} entry - the HDS data criteria object to convert
|
90
81
|
###
|
91
|
-
constructor: (
|
92
|
-
super
|
93
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
82
|
+
constructor: (entry) ->
|
83
|
+
super entry
|
84
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
94
85
|
|
95
86
|
# if activeDatetime is provided, use it, otherwise default to authorDatetime per QDM spec
|
96
|
-
if
|
97
|
-
@_activeDatetime = CQL_QDM.Helpers.convertDateTime(
|
87
|
+
if entry.active_datetime?
|
88
|
+
@_activeDatetime = CQL_QDM.Helpers.convertDateTime(entry.active_datetime)
|
98
89
|
else
|
99
90
|
@_activeDatetime = @_authorDatetime
|
100
91
|
|
101
|
-
@_dosage =
|
102
|
-
@_negationRationale =
|
103
|
-
@_reason =
|
104
|
-
@_route =
|
105
|
-
@_supply =
|
106
|
-
delete
|
92
|
+
@_dosage = entry.dose
|
93
|
+
@_negationRationale = entry.negationReason
|
94
|
+
@_reason = entry.reason
|
95
|
+
@_route = entry.route
|
96
|
+
@_supply = entry.supply
|
97
|
+
delete entry.end_time
|
107
98
|
|
108
99
|
###
|
109
100
|
@returns {Date}
|
@@ -14,12 +14,12 @@ class CQL_QDM.InterventionOrder extends CQL_QDM.QDMDatatype
|
|
14
14
|
###
|
15
15
|
@param {Object} entry - the HDS data criteria object to convert
|
16
16
|
###
|
17
|
-
constructor: (
|
18
|
-
super
|
19
|
-
@_negationRationale =
|
20
|
-
@_reason =
|
21
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
22
|
-
delete
|
17
|
+
constructor: (entry) ->
|
18
|
+
super entry
|
19
|
+
@_negationRationale = entry.negationReason
|
20
|
+
@_reason = entry.reason
|
21
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
22
|
+
delete entry.end_time
|
23
23
|
|
24
24
|
###
|
25
25
|
@returns {Date}
|
@@ -55,20 +55,20 @@ class CQL_QDM.InterventionPerformed extends CQL_QDM.QDMDatatype
|
|
55
55
|
###
|
56
56
|
@param {Object} entry - the HDS data criteria object to convert
|
57
57
|
###
|
58
|
-
constructor: (
|
59
|
-
super
|
60
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
61
|
-
@_negationRationale =
|
62
|
-
@_reason =
|
63
|
-
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(
|
64
|
-
if
|
65
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
58
|
+
constructor: (entry) ->
|
59
|
+
super entry
|
60
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
61
|
+
@_negationRationale = entry.negationReason
|
62
|
+
@_reason = entry.reason
|
63
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
64
|
+
if entry.end_time
|
65
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
66
66
|
else
|
67
67
|
# No end time; high is set to infinity
|
68
68
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
69
|
-
if
|
70
|
-
@_result =
|
71
|
-
@_status =
|
69
|
+
if entry.values? && entry.values.length > 0
|
70
|
+
@_result = entry.values?[0]
|
71
|
+
@_status = entry.qdm_status
|
72
72
|
|
73
73
|
###
|
74
74
|
Author date time is only present when this data type has been negated.
|
@@ -134,12 +134,12 @@ class CQL_QDM.InterventionRecommended extends CQL_QDM.QDMDatatype
|
|
134
134
|
###
|
135
135
|
@param {Object} entry - the HDS data criteria object to convert
|
136
136
|
###
|
137
|
-
constructor: (
|
138
|
-
super
|
139
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
140
|
-
@_negationRationale =
|
141
|
-
@_reason =
|
142
|
-
delete
|
137
|
+
constructor: (entry) ->
|
138
|
+
super entry
|
139
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
140
|
+
@_negationRationale = entry.negationReason
|
141
|
+
@_reason = entry.reason
|
142
|
+
delete entry.end_time
|
143
143
|
|
144
144
|
###
|
145
145
|
@returns {Date}
|
@@ -13,22 +13,12 @@ class CQL_QDM.LaboratoryTestOrder extends CQL_QDM.QDMDatatype
|
|
13
13
|
###
|
14
14
|
@param {Object} entry - the HDS data criteria object to convert
|
15
15
|
###
|
16
|
-
constructor: (
|
17
|
-
super
|
18
|
-
@
|
19
|
-
@
|
20
|
-
@
|
21
|
-
|
22
|
-
delete @entry.end_time
|
23
|
-
|
24
|
-
###
|
25
|
-
@returns {Code}
|
26
|
-
###
|
27
|
-
method: ->
|
28
|
-
if @_method?
|
29
|
-
new cql.Code(@_method.code, @_method.code_system)
|
30
|
-
else
|
31
|
-
null
|
16
|
+
constructor: (entry) ->
|
17
|
+
super entry
|
18
|
+
@_negationRationale = entry.negationReason
|
19
|
+
@_reason = entry.reason
|
20
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
21
|
+
delete entry.end_time
|
32
22
|
|
33
23
|
###
|
34
24
|
@returns {Code}
|
@@ -63,25 +53,25 @@ class CQL_QDM.LaboratoryTestPerformed extends CQL_QDM.QDMDatatype
|
|
63
53
|
###
|
64
54
|
@param {Object} entry - the HDS data criteria object to convert
|
65
55
|
###
|
66
|
-
constructor: (
|
67
|
-
super
|
68
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
69
|
-
@_method =
|
70
|
-
@_negationRationale =
|
71
|
-
@_reason =
|
72
|
-
@_referenceRangeLow =
|
73
|
-
@_referenceRangeHigh =
|
74
|
-
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(
|
75
|
-
if
|
76
|
-
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(
|
56
|
+
constructor: (entry) ->
|
57
|
+
super entry
|
58
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
59
|
+
@_method = entry.method
|
60
|
+
@_negationRationale = entry.negationReason
|
61
|
+
@_reason = entry.reason
|
62
|
+
@_referenceRangeLow = entry.referenceRangeLow
|
63
|
+
@_referenceRangeHigh = entry.referenceRangeHigh
|
64
|
+
@_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
65
|
+
if entry.end_time
|
66
|
+
@_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(entry.end_time)
|
77
67
|
else
|
78
68
|
# No end time; high is set to infinity
|
79
69
|
@_relevantPeriodHigh = CQL_QDM.Helpers.infinityDateTime()
|
80
|
-
if
|
81
|
-
@_result =
|
82
|
-
@_resultDatetime = CQL_QDM.Helpers.convertDateTime(
|
83
|
-
@_status =
|
84
|
-
@_components =
|
70
|
+
if entry.values? && entry.values.length > 0
|
71
|
+
@_result = entry.values?[0]
|
72
|
+
@_resultDatetime = CQL_QDM.Helpers.convertDateTime(entry.result_date_time)
|
73
|
+
@_status = entry.qdm_status
|
74
|
+
@_components = entry.components
|
85
75
|
|
86
76
|
###
|
87
77
|
Author date time is only present when this data type has been negated.
|
@@ -202,13 +192,12 @@ class CQL_QDM.LaboratoryTestRecommended extends CQL_QDM.QDMDatatype
|
|
202
192
|
###
|
203
193
|
@param {Object} entry - the HDS data criteria object to convert
|
204
194
|
###
|
205
|
-
constructor: (
|
206
|
-
super
|
207
|
-
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(
|
208
|
-
@
|
209
|
-
@
|
210
|
-
|
211
|
-
delete @entry.end_time
|
195
|
+
constructor: (entry) ->
|
196
|
+
super entry
|
197
|
+
@_authorDatetime = CQL_QDM.Helpers.convertDateTime(entry.start_time)
|
198
|
+
@_negationRationale = entry.negationReason
|
199
|
+
@_reason = entry.reason
|
200
|
+
delete entry.end_time
|
212
201
|
|
213
202
|
###
|
214
203
|
@returns {Date}
|
@@ -216,15 +205,6 @@ class CQL_QDM.LaboratoryTestRecommended extends CQL_QDM.QDMDatatype
|
|
216
205
|
authorDatetime: ->
|
217
206
|
@_authorDatetime
|
218
207
|
|
219
|
-
###
|
220
|
-
@returns {Code}
|
221
|
-
###
|
222
|
-
method: ->
|
223
|
-
if @_method?
|
224
|
-
new cql.Code(@_method.code, @_method.code_system, null, @_method.title || null)
|
225
|
-
else
|
226
|
-
null
|
227
|
-
|
228
208
|
###
|
229
209
|
@returns {Code}
|
230
210
|
###
|