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.
Files changed (29) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile.lock +4 -4
  3. data/app/assets/javascripts/datatypes/adverseevent.js.coffee +9 -9
  4. data/app/assets/javascripts/datatypes/allergyintolerance.js.coffee +8 -8
  5. data/app/assets/javascripts/datatypes/assessment.js.coffee +67 -38
  6. data/app/assets/javascripts/datatypes/careexperience.js.coffee +7 -7
  7. data/app/assets/javascripts/datatypes/caregoal.js.coffee +8 -8
  8. data/app/assets/javascripts/datatypes/communication.js.coffee +51 -65
  9. data/app/assets/javascripts/datatypes/datatype.js.coffee +14 -9
  10. data/app/assets/javascripts/datatypes/device.js.coffee +21 -31
  11. data/app/assets/javascripts/datatypes/diagnosis.js.coffee +8 -8
  12. data/app/assets/javascripts/datatypes/diagnosticstudy.js.coffee +26 -46
  13. data/app/assets/javascripts/datatypes/encounter.js.coffee +26 -26
  14. data/app/assets/javascripts/datatypes/familyhistory.js.coffee +5 -5
  15. data/app/assets/javascripts/datatypes/immunization.js.coffee +19 -28
  16. data/app/assets/javascripts/datatypes/intervention.js.coffee +23 -23
  17. data/app/assets/javascripts/datatypes/laboratorytest.js.coffee +28 -48
  18. data/app/assets/javascripts/datatypes/medication.js.coffee +141 -81
  19. data/app/assets/javascripts/datatypes/participation.js.coffee +5 -5
  20. data/app/assets/javascripts/datatypes/patient_characteristic.js.coffee +4 -4
  21. data/app/assets/javascripts/datatypes/patient_characteristic_payer.js.coffee +6 -6
  22. data/app/assets/javascripts/datatypes/physicalexam.js.coffee +27 -47
  23. data/app/assets/javascripts/datatypes/procedure.js.coffee +32 -82
  24. data/app/assets/javascripts/datatypes/substance.js.coffee +31 -70
  25. data/app/assets/javascripts/datatypes/symptom.js.coffee +6 -6
  26. data/app/assets/javascripts/utils/helpers.js.coffee +8 -2
  27. data/lib/cql_qdm_patientapi/version.rb +1 -1
  28. data/vendor/assets/javascripts/cql4browsers.js +1520 -556
  29. 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: (@entry) ->
19
- super @entry
20
- @_anatomicalApproachSite = @entry.anatomical_approach
21
- @_anatomicalLocationSite = @entry.anatomical_location
22
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
23
- @_negationRationale = @entry.negationReason
24
- @_reason = @entry.reason
25
- @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
26
- if @entry.end_time
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: (@entry) ->
96
- super @entry
97
- @_negationRationale = @entry.negationReason
98
- @_reason = @entry.reason
99
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
100
- delete @entry.end_time
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: (@entry) ->
137
- super @entry
138
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
139
- @_negationRationale = @entry.negationReason
140
- @_reason = @entry.reason
141
- delete @entry.end_time
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: (@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)
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 = @entry.anatomical_location
32
- @_severity = @entry.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: (@entry) ->
23
- super @entry
24
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
25
- @_method = @entry.method
26
- @_negationRationale = @entry.negationReason
27
- @_reason = @entry.reason
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: (@entry) ->
74
- super @entry
75
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
76
- @_facilityLocation = @entry.facility
77
- @_method = @entry.method
78
- @_negationRationale = @entry.negationReason
79
- @_reason = @entry.reason
80
- if @entry.values? && @entry.values.length > 0
81
- @_result = @entry.values?[0]
82
- @_resultDatetime = CQL_QDM.Helpers.convertDateTime(@entry.result_date_time)
83
- @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
84
- if @entry.end_time
85
- @_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(@entry.end_time)
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 = @entry.qdm_status
90
- @_components = @entry.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: (@entry) ->
189
- super @entry
190
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
191
- @_method = @entry.method
192
- @_negationRationale = @entry.negationReason
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: (@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
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: (@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)
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 = @entry.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: (@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
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: (@entry) ->
20
- super @entry
21
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
22
- @_relationship = @entry.relationshipToPatient
23
- delete @entry.end_time
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: (@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
- @_supply = @entry.supply
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: (@entry) ->
92
- super @entry
93
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
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 @entry.active_datetime?
97
- @_activeDatetime = CQL_QDM.Helpers.convertDateTime(@entry.active_datetime)
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 = @entry.dose
102
- @_negationRationale = @entry.negationReason
103
- @_reason = @entry.reason
104
- @_route = @entry.route
105
- @_supply = @entry.supply
106
- delete @entry.end_time
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: (@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
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: (@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)
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 @entry.values? && @entry.values.length > 0
70
- @_result = @entry.values?[0]
71
- @_status = @entry.qdm_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: (@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
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: (@entry) ->
17
- super @entry
18
- @_method = @entry.method
19
- @_negationRationale = @entry.negationReason
20
- @_reason = @entry.reason
21
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
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: (@entry) ->
67
- super @entry
68
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
69
- @_method = @entry.method
70
- @_negationRationale = @entry.negationReason
71
- @_reason = @entry.reason
72
- @_referenceRangeLow = @entry.referenceRangeLow
73
- @_referenceRangeHigh = @entry.referenceRangeHigh
74
- @_relevantPeriodLow = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
75
- if @entry.end_time
76
- @_relevantPeriodHigh = CQL_QDM.Helpers.convertDateTime(@entry.end_time)
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 @entry.values? && @entry.values.length > 0
81
- @_result = @entry.values?[0]
82
- @_resultDatetime = CQL_QDM.Helpers.convertDateTime(@entry.result_date_time)
83
- @_status = @entry.qdm_status
84
- @_components = @entry.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: (@entry) ->
206
- super @entry
207
- @_authorDatetime = CQL_QDM.Helpers.convertDateTime(@entry.start_time)
208
- @_method = @entry.method
209
- @_negationRationale = @entry.negationReason
210
- @_reason = @entry.reason
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
  ###